From 7301e099aa3f8ad76ccd687962e4f531f3145c25 Mon Sep 17 00:00:00 2001 From: Eric Voskuil Date: Tue, 17 Nov 2026 12:16:40 -0500 Subject: [PATCH] Show native configuration on the native site. --- console/embedded/native_css.cpp | 11 +- console/embedded/native_ecma.cpp | 194 +++++++++--------- web/native/src/lib/api/client.tsx | 4 +- .../src/lib/api/providers/blockstream.ts | 4 +- .../src/lib/api/providers/libbitcoin.ts | 17 +- web/native/src/routes/dashboard.tsx | 107 ++++++---- 6 files changed, 191 insertions(+), 146 deletions(-) diff --git a/console/embedded/native_css.cpp b/console/embedded/native_css.cpp index 26f4fb40..1c449a10 100644 --- a/console/embedded/native_css.cpp +++ b/console/embedded/native_css.cpp @@ -50,12 +50,11 @@ R"DELIM(/*! * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-500:oklch(69.6% .17 162.48);--color-rose-300:oklch(81% .117 11.638);--color-rose-500:oklch(64.5% .246 16.439);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--spacing:.25rem;--container-lg:32rem;--container-xl:36rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime)DELIM" -R"DELIM(-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is(input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--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);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media(forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1\/2{top:50%}.left-0{left:0}.left-3{left:calc(var(--spacing) * 3)}.z-50{z-index:50}.order-1{order:1}.order-2{order:2}.order-3{order:3}.m-auto{margin:auto}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85vh\]{max-height:85vh}.min-h-\[calc\(100vh-4rem\)\]{min-height:calc(100vh - 4rem)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-\[calc\(100\%_-_2rem\)\]{width:calc(100% - 2rem)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.cursor-pointer{cursor:pointer}.scroll-mt-24{scroll-margin-top:calc(var(--spacing) * 24)}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end)DELIM" -R"DELIM(}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--theme-accent-secondary) 30%,transparent)}}.place-self-start{place-self:start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\/20{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/20{border-color:color-mix(in oklab,var(--theme-accent) 20%,transparent)}}.border-accent\/30{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/30{border-color:color-mix(in oklab,var(--theme-accent) 30%,transparent)}}.border-accent\/40{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/40{border-color:color-mix(in oklab,var(--theme-accent) 40%,transparent)}}.border-accent\/50{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/50{border-color:color-mix(in oklab,var(--theme-accent) 50%,transparent)}}.border-accentSecondary\/20{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/20{border-color:color-mix(in oklab,var(--theme-accent-secondary) 20%,transparent)}}.border-accentSecondary\/30{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/30{border-color:color-mix(in oklab,var(--theme-accent-secondary) 30%,transparent)}}.border-accentSecondary\/40{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/40{border-color:color-mix(in oklab,var(--theme-accent-secondary) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-slate-500\/50{border-color:#62748e80}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/50{border-color:color-mix(in oklab,var(--color-slate-500) 50%,transparent)}}.border-textMuted\/10{border-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-textMuted\/10{border-color:color-mix(in oklab,var(--theme-text-muted) 10%,transparent)}}.border-textMuted\/30{border-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-textMuted\/30{border-color:color-mix(in oklab,var(--theme-text-muted) 30%,transparent)}}.bg-accent,.bg-accent\/5{background-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/5{background-color:color-mix(in oklab,var(--theme-accent) 5%,transparent)}}.bg-accent\/10{background-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/10{background-color:color-mix(in oklab,var(--theme-accent) 10%,transparent)}}.bg-accentSecondary,.bg-accentSecondary\/10{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/10{background-color:color-mix(in oklab,var(--theme-accent-secondary) 10%,transparent)}}.bg-accentSecondary\/15{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/15{background-color:color-mix(in oklab,var(--theme-accent-secondary) 15%,transparent)}}.bg-accentSecondary\/20{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/20{background-color:color-mix(in oklab,var(--theme-accent-secondary) 20%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-background{background-color:var(--theme-background)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-current{background-color:currentColor}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-inset{background-color:var(--theme-inset)}.bg-rose-500\/15{background-color:#ff235726}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/15{background-color:color-mix(in oklab,var(--color-rose-500) 15%,transparent)}}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-)DELIM" -R"DELIM(slate-500\/20{background-color:#62748e33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-surface,.bg-surface\/60{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/60{background-color:color-mix(in oklab,var(--theme-surface) 60%,transparent)}}.bg-surface\/80{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/80{background-color:color-mix(in oklab,var(--theme-surface) 80%,transparent)}}.bg-surface\/90{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/90{background-color:color-mix(in oklab,var(--theme-surface) 90%,transparent)}}.bg-surface\/95{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/95{background-color:color-mix(in oklab,var(--theme-surface) 95%,transparent)}}.bg-textMuted\/5{background-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-textMuted\/5{background-color:color-mix(in oklab,var(--theme-text-muted) 5%,transparent)}}.bg-textPrimary{background-color:var(--theme-text-primary)}.bg-transparent{background-color:#0000}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[linear-gradient\(180deg\,rgba\(255\,255\,255\,0\.18\)\,rgba\(255\,255\,255\,0\)\)\]{background-image:linear-gradient(#ffffff2e,#fff0)}.from-accent\/8{--tw-gradient-from:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.from-accent\/8{--tw-gradient-from:color-mix(in oklab, var(--theme-accent) 8%, transparent)}}.from-accent\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-surface\/60{--tw-gradient-to:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.to-surface\/60{--tw-gradient-to:color-mix(in oklab, var(--theme-surface) 60%, transparent)}}.to-surface\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--theme-accent)}.text-accentSecondary{color:var(--theme-accent-secondary)}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-rose-300{color:var(--color-rose-300)}.text-slate-300{color:var(--color-slate-300)}.text-textMuted{color:var(--theme-text-muted)}.text-textPrimary{color:var(--theme-text-primary)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--theme-accent)}.ring-inset{--tw-ring-color:var(--theme-inset)}.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{--tw-backdrop-blur:blur(8px);-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-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default)DELIM" -R"DELIM(-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-textMuted::placeholder{color:var(--theme-text-muted)}.backdrop\:bg-black\/70::backdrop{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.backdrop\:bg-black\/70::backdrop{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.first\:text-left:first-child{text-align:left}.last\:text-right:last-child{text-align:right}.checked\:bg-accent:checked{background-color:var(--theme-accent)}@media(hover:hover){.hover\:border-accent:hover{border-color:var(--theme-accent)}.hover\:border-accentSecondary:hover{border-color:var(--theme-accent-secondary)}.hover\:bg-accentSecondary\/10:hover{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accentSecondary\/10:hover{background-color:color-mix(in oklab,var(--theme-accent-secondary) 10%,transparent)}}.hover\:text-accent:hover{color:var(--theme-accent)}.hover\:text-accentSecondary:hover{color:var(--theme-accent-secondary)}}.focus\:border-accent:focus{border-color:var(--theme-accent)}.focus\:ring-accent:focus{--tw-ring-color:var(--theme-accent)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(min-width:40rem){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:48rem){.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:ml-auto{margin-left:auto}.md\:hidden{display:none}.md\:inline{display:inline}.md\:w-\[19rem\]{width:19rem}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:flex-nowrap{flex-wrap:nowrap}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[16rem_minmax\(0\,1fr\)\]{grid-template-columns:16rem minmax(0,1fr)}.lg\:grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(20rem\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(20rem,1fr)}}}:root{color-scheme:dark;--theme-background:#272822;--theme-surface:#1f211c;--theme-accent:#ffa022;--theme-accent-secondary:#c85637;--theme-text-primary:#ededed;--theme-text-muted:#cfcfcf;--theme-inset:#0000004d;--theme-notice-success:#022c22;--theme-notice-warning:#451a03;--theme-notice-text:#fff;--chart-grid:#c8563733;--chart-ticks:#ffa0224d}:root[data-theme=light]{color-scheme:light;--theme-background:#f5f3ed;--theme-surface:#fff;--theme-accent:#9c4a04;--theme-accent-secondary:#9b4430;--theme-text-primary:#222923;--theme-text-muted:#526052;--theme-inset:#2229230d;--theme-notice-success:#ecfdf5;--theme-notice-warning:#fffbeb;--theme-notice-text:#222923;--chart-grid:#52605226;--chart-ticks:#52605266;--chart-color-0:#9c4a04;--chart-color-1:#0369a1;--chart-color-2:#047857;--chart-color-3:#7e22ce;--chart-color-4:#be123c;--chart-color-5:#a21caf;--chart-color-6:#854d0e;--chart-color-7:#1d4ed8;--color-emerald-200:#065f46;--color-emerald-300:#065f46;--color-amber-200:#92400e;--color-amber-300:#92400e;--color-red-300:#991b1b;--color-rose-300:#9f1239;--color-orange-300:#9a3412;--color-sky-300:#075985;--color-cyan-300:#155e75;--color-blue-300:#1e40af;--color-violet-300:#5b21b6;--color-slate-300:#475569}:root[data-theme=midnight]{color-scheme:dark;--theme-background:#0e1525;--theme-surface:#141e32;--theme-accent:#7dd3fc;--theme-accent-secondary:#a5b4fc;--theme-text-primary:#e6edf7;--theme-text-muted:#a9bad0;--theme-inset:#00000040;--chart-grid:#a5b4fc33;--chart-ticks:#7dd3fc4d}html{scrollbar-gutter:stable}body{background-color:var(--theme-background);font-family:var(--font-sans);color:var(--theme-text-primary)}::selection{background-color:var(--theme-accent);color:var(--theme-background)}[tabindex="-1"]:focus{outline:none}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax)DELIM" -R"DELIM(:"*";inherits:false} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-amber-300:oklch(87.9% .169 91.605);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-500:oklch(69.6% .17 162.48);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--spacing:.25rem;--container-lg:32rem;--container-xl:36rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--tracking-wide:.025em;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=te)DELIM" +R"DELIM(l]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is(input:where([type=text]),input:where(:not([type])),input:where([type=email]),input:where([type=url]),input:where([type=password]),input:where([type=number]),input:where([type=date]),input:where([type=datetime-local]),input:where([type=month]),input:where([type=search]),input:where([type=tel]),input:where([type=time]),input:where([type=week]),select:where([multiple]),textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--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(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}select:where([multiple]),select:where([size]:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}input:where([type=checkbox]),input:where([type=radio]){appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}input:where([type=checkbox]){border-radius:0}input:where([type=radio]){border-radius:100%}input:where([type=checkbox]):focus,input:where([type=radio]):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--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);outline:2px solid #0000}input:where([type=checkbox]):checked,input:where([type=radio]):checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}input:where([type=checkbox]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=checkbox]):checked{appearance:auto}}input:where([type=radio]):checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media(forced-colors:active){input:where([type=radio]):checked{appearance:auto}}input:where([type=checkbox]):checked:hover,input:where([type=checkbox]):checked:focus,input:where([type=radio]):checked:hover,input:where([type=radio]):checked:focus{background-color:currentColor;border-color:#0000}input:where([type=checkbox]):indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media(forced-colors:active){input:where([type=checkbox]):indeterminate{appearance:auto}}input:where([type=checkbox]):indeterminate:hover,input:where([type=checkbox]):indeterminate:focus{background-color:currentColor;border-color:#0000}input:where([type=file]){background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}input:where([type=file]):focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1\/2{top:50%}.left-0{left:0}.left-3{left:calc(var(--spacing) * 3)}.z-50{z-index:50}.order-1{order:1}.order-2{order:2}.order-3{order:3}.m-auto{margin:auto}.mx-auto{margin-inline:auto}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-2{height:calc(var(--spacing) * 2)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-full{height:100%}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[60vh\]{max-height:60vh}.max-h-\[85vh\]{max-height:85vh}.min-h-\[calc\(100vh-4rem\)\]{min-height:calc(100vh - 4rem)}.min-h-screen{min-height:100vh}.w-2{width:calc(var(--spacing) * 2)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-\[calc\(100\%_-_2rem\)\]{width:calc(100% - 2rem)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-lg{max-width:var(--container-lg)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.cursor-pointer{cursor:pointer}.scroll-mt-24{scroll-margin-top:calc(var(--spacing) * 24)}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-betwee)DELIM" +R"DELIM(n}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){:where(.divide-accentSecondary\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--theme-accent-secondary) 30%,transparent)}}.place-self-start{place-self:start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-accent,.border-accent\/20{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/20{border-color:color-mix(in oklab,var(--theme-accent) 20%,transparent)}}.border-accent\/30{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/30{border-color:color-mix(in oklab,var(--theme-accent) 30%,transparent)}}.border-accent\/40{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/40{border-color:color-mix(in oklab,var(--theme-accent) 40%,transparent)}}.border-accent\/50{border-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\/50{border-color:color-mix(in oklab,var(--theme-accent) 50%,transparent)}}.border-accentSecondary\/20{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/20{border-color:color-mix(in oklab,var(--theme-accent-secondary) 20%,transparent)}}.border-accentSecondary\/30{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/30{border-color:color-mix(in oklab,var(--theme-accent-secondary) 30%,transparent)}}.border-accentSecondary\/40{border-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.border-accentSecondary\/40{border-color:color-mix(in oklab,var(--theme-accent-secondary) 40%,transparent)}}.border-emerald-500\/50{border-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/50{border-color:color-mix(in oklab,var(--color-emerald-500) 50%,transparent)}}.border-slate-500\/40{border-color:#62748e66}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/40{border-color:color-mix(in oklab,var(--color-slate-500) 40%,transparent)}}.border-slate-500\/50{border-color:#62748e80}@supports (color:color-mix(in lab,red,red)){.border-slate-500\/50{border-color:color-mix(in oklab,var(--color-slate-500) 50%,transparent)}}.border-textMuted\/10{border-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-textMuted\/10{border-color:color-mix(in oklab,var(--theme-text-muted) 10%,transparent)}}.border-textMuted\/30{border-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-textMuted\/30{border-color:color-mix(in oklab,var(--theme-text-muted) 30%,transparent)}}.bg-accent,.bg-accent\/5{background-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/5{background-color:color-mix(in oklab,var(--theme-accent) 5%,transparent)}}.bg-accent\/10{background-color:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\/10{background-color:color-mix(in oklab,var(--theme-accent) 10%,transparent)}}.bg-accentSecondary,.bg-accentSecondary\/10{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/10{background-color:color-mix(in oklab,var(--theme-accent-secondary) 10%,transparent)}}.bg-accentSecondary\/15{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/15{background-color:color-mix(in oklab,var(--theme-accent-secondary) 15%,transparent)}}.bg-accentSecondary\/20{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.bg-accentSecondary\/20{background-color:color-mix(in oklab,var(--theme-accent-secondary) 20%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500) 20%,transparent)}}.bg-background{background-color:var(--theme-background)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-current{background-color:currentColor}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500) 5%,transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/15{background-color:color-mix(in oklab,var(--color-emerald-500) 15%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-inset{background-color:var(--theme-inset)}.bg-slate-500\/15{background-color:#62748e26}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/15{background-color:color-mix(in oklab,var(--color-slate-500) 15%,transparent)}}.bg-slate-500\/20{background-color:#62748e)DELIM" +R"DELIM(33}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/20{background-color:color-mix(in oklab,var(--color-slate-500) 20%,transparent)}}.bg-surface,.bg-surface\/60{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/60{background-color:color-mix(in oklab,var(--theme-surface) 60%,transparent)}}.bg-surface\/80{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/80{background-color:color-mix(in oklab,var(--theme-surface) 80%,transparent)}}.bg-surface\/90{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/90{background-color:color-mix(in oklab,var(--theme-surface) 90%,transparent)}}.bg-surface\/95{background-color:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.bg-surface\/95{background-color:color-mix(in oklab,var(--theme-surface) 95%,transparent)}}.bg-textMuted\/5{background-color:var(--theme-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-textMuted\/5{background-color:color-mix(in oklab,var(--theme-text-muted) 5%,transparent)}}.bg-textPrimary{background-color:var(--theme-text-primary)}.bg-transparent{background-color:#0000}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[linear-gradient\(180deg\,rgba\(255\,255\,255\,0\.18\)\,rgba\(255\,255\,255\,0\)\)\]{background-image:linear-gradient(#ffffff2e,#fff0)}.from-accent\/8{--tw-gradient-from:var(--theme-accent)}@supports (color:color-mix(in lab,red,red)){.from-accent\/8{--tw-gradient-from:color-mix(in oklab, var(--theme-accent) 8%, transparent)}}.from-accent\/8{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-surface\/60{--tw-gradient-to:var(--theme-surface)}@supports (color:color-mix(in lab,red,red)){.to-surface\/60{--tw-gradient-to:color-mix(in oklab, var(--theme-surface) 60%, transparent)}}.to-surface\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-9{padding-left:calc(var(--spacing) * 9)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent{color:var(--theme-accent)}.text-accentSecondary{color:var(--theme-accent-secondary)}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-slate-300{color:var(--color-slate-300)}.text-textMuted{color:var(--theme-text-muted)}.text-textPrimary{color:var(--theme-text-primary)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset, ) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--theme-accent)}.ring-inset{--tw-ring-color:var(--theme-inset)}.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{--tw-backdrop-blur:blur(8px);-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-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default)DELIM" +R"DELIM(-transition-duration))}.outline-none{--tw-outline-style:none;outline-style:none}.ring-inset{--tw-ring-inset:inset}.placeholder\:text-textMuted::placeholder{color:var(--theme-text-muted)}.backdrop\:bg-black\/70::backdrop{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.backdrop\:bg-black\/70::backdrop{background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}.first\:text-left:first-child{text-align:left}.last\:text-right:last-child{text-align:right}.checked\:bg-accent:checked{background-color:var(--theme-accent)}@media(hover:hover){.hover\:border-accent:hover{border-color:var(--theme-accent)}.hover\:border-accentSecondary:hover{border-color:var(--theme-accent-secondary)}.hover\:bg-accentSecondary\/10:hover{background-color:var(--theme-accent-secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-accentSecondary\/10:hover{background-color:color-mix(in oklab,var(--theme-accent-secondary) 10%,transparent)}}.hover\:text-accent:hover{color:var(--theme-accent)}.hover\:text-accentSecondary:hover{color:var(--theme-accent-secondary)}}.focus\:border-accent:focus{border-color:var(--theme-accent)}.focus\:ring-accent:focus{--tw-ring-color:var(--theme-accent)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}@media(min-width:40rem){.sm\:block{display:block}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}}@media(min-width:48rem){.md\:order-2{order:2}.md\:order-3{order:3}.md\:order-4{order:4}.md\:ml-auto{margin-left:auto}.md\:hidden{display:none}.md\:inline{display:inline}.md\:w-\[19rem\]{width:19rem}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:flex-nowrap{flex-wrap:nowrap}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[16rem_minmax\(0\,1fr\)\]{grid-template-columns:16rem minmax(0,1fr)}.lg\:grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(20rem\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(20rem,1fr)}}}:root{color-scheme:dark;--theme-background:#272822;--theme-surface:#1f211c;--theme-accent:#ffa022;--theme-accent-secondary:#c85637;--theme-text-primary:#ededed;--theme-text-muted:#cfcfcf;--theme-inset:#0000004d;--theme-notice-success:#022c22;--theme-notice-warning:#451a03;--theme-notice-text:#fff;--chart-grid:#c8563733;--chart-ticks:#ffa0224d}:root[data-theme=light]{color-scheme:light;--theme-background:#f5f3ed;--theme-surface:#fff;--theme-accent:#9c4a04;--theme-accent-secondary:#9b4430;--theme-text-primary:#222923;--theme-text-muted:#526052;--theme-inset:#2229230d;--theme-notice-success:#ecfdf5;--theme-notice-warning:#fffbeb;--theme-notice-text:#222923;--chart-grid:#52605226;--chart-ticks:#52605266;--chart-color-0:#9c4a04;--chart-color-1:#0369a1;--chart-color-2:#047857;--chart-color-3:#7e22ce;--chart-color-4:#be123c;--chart-color-5:#a21caf;--chart-color-6:#854d0e;--chart-color-7:#1d4ed8;--color-emerald-200:#065f46;--color-emerald-300:#065f46;--color-amber-200:#92400e;--color-amber-300:#92400e;--color-red-300:#991b1b;--color-rose-300:#9f1239;--color-orange-300:#9a3412;--color-sky-300:#075985;--color-cyan-300:#155e75;--color-blue-300:#1e40af;--color-violet-300:#5b21b6;--color-slate-300:#475569}:root[data-theme=midnight]{color-scheme:dark;--theme-background:#0e1525;--theme-surface:#141e32;--theme-accent:#7dd3fc;--theme-accent-secondary:#a5b4fc;--theme-text-primary:#e6edf7;--theme-text-muted:#a9bad0;--theme-inset:#00000040;--chart-grid:#a5b4fc33;--chart-ticks:#7dd3fc4d}html{scrollbar-gutter:stable}body{background-color:var(--theme-background);font-family:var(--font-sans);color:var(--theme-text-primary)}::selection{background-color:var(--theme-accent);color:var(--theme-background)}[tabindex="-1"]:focus{outline:none}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false} )DELIM" ) diff --git a/console/embedded/native_ecma.cpp b/console/embedded/native_ecma.cpp index 83de7bf8..63e4cc6b 100644 --- a/console/embedded/native_ecma.cpp +++ b/console/embedded/native_ecma.cpp @@ -311,56 +311,56 @@ R"DELIM(to deal * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -function Qk(e,r){for(var i=0;is[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();function Dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var um={exports:{}},dl={};var Gb;function Xk(){if(Gb)return dl;Gb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(s,l,c){var d=null;if(c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:e,type:s,key:d,ref:l!==void 0?l:null,props:c}}return dl.Fragment=r,dl.jsx=i,dl.jsxs=i,dl}var Kb;function Jk(){return Kb||(Kb=1,um.exports=Xk()),um.exports}var p=Jk(),dm={exports:{}},$e={};var Qb;function Wk(){if(Qb)return $e;Qb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),w=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=w&&j[w]||j["@@iterator"],typeo)DELIM" -R"DELIM(f j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,H={};function O(j,G,he){this.props=j,this.context=G,this.refs=H,this.updater=he||_}O.prototype.isReactComponent={},O.prototype.setState=function(j,G){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,G,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function se(){}se.prototype=O.prototype;function ce(j,G,he){this.props=j,this.context=G,this.refs=H,this.updater=he||_}var K=ce.prototype=new se;K.constructor=ce,N(K,O.prototype),K.isPureReactComponent=!0;var oe=Array.isArray;function R(){}var k={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function P(j,G,he){var ee=he.ref;return{$$typeof:e,type:j,key:G,ref:ee!==void 0?ee:null,props:he}}function F(j,G){return P(j.type,G,j.props)}function X(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function fe(j){var G={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(he){return G[he]})}var ge=/\/+/g;function re(j,G){return typeof j=="object"&&j!==null&&j.key!=null?fe(""+j.key):G.toString(36)}function Q(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(R,R):(j.status="pending",j.then(function(G){j.status==="pending"&&(j.status="fulfilled",j.value=G)},function(G){j.status==="pending"&&(j.status="rejected",j.reason=G)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function Y(j,G,he,ee,je){var J=typeof j;(J==="undefined"||J==="boolean")&&(j=null);var me=!1;if(j===null)me=!0;else switch(J){case"bigint":case"string":case"number":me=!0;break;case"object":switch(j.$$typeof){case e:case r:me=!0;break;case v:return me=j._init,Y(me(j._payload),G,he,ee,je)}}if(me)return je=je(j),me=ee===""?"."+re(j,0):ee,oe(je)?(he="",me!=null&&(he=me.replace(ge,"$&/")+"/"),Y(je,G,he,"",function(be){return be})):je!=null&&(X(je)&&(je=F(je,he+(je.key==null||j&&j.key===je.key?"":(""+je.key).replace(ge,"$&/")+"/")+me)),G.push(je)),1;me=0;var W=ee===""?".":ee+":";if(oe(j))for(var le=0;le>>1,ye=Q[$];if(0>>1;$l(Ce,ie))jl(G,Ce)?(Q[$]=G,Q[j]=ie,$=j):(Q[$]=Ce,Q[xe]=ie,$=xe);else if(jl(G,ie))Q[$]=G,Q[j]=ie,$=j;else break e}}return Y}function l(Q,Y){var ie=Q.sortIndex-Y.sortIndex;return ie!==0?ie:Q.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],g=[],v=1,y=null,x=3,w=!1,E=!1,_=!1,N=!1,H=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,se=typeof setImmediate<"u"?setImmediate:null;function ce(Q){for(var Y=i(g);Y!==null;){if(Y.callback===null)s(g);else if(Y.startTime<=Q)s(g),Y.sortIndex=Y.expirationTime,r(m,Y);else break;Y=i(g)}}function K(Q){if(_=!1,ce(Q),!E)if(i(m)!==null)E=!0,oe||(oe=!0,X());else{var Y=i(g);Y!==null&&re(K,Y.startTime-Q)}}var oe=!1,R=-1,k=5,z=-1;function P(){return N?!0:!(e.unstable_now()-zQ&&P());){var $=y.callback;if(typeof $=="function"){y.callback=null,x=y.priorityLevel;var ye=$(y.expirationTime<=Q);if(Q=e.unstable_now(),typeof ye=="function"){y.callback=ye,ce(Q),Y=!0;break t}y===i(m)&&s(m),ce(Q)}else s(m);y=i(m)}if(y!==null)Y=!0;else{var He=i(g);He!==null&&re(K,He.startTime-Q),Y=!1}}break e}finally{y=null,x=ie,w=!1}Y=void 0}}finally{Y?X():oe=!1}}}var X;if(typeof se=="function")X=function(){se(F)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ge=fe.port2;fe.port1.onmessage=F,X=function(){ge.postMessage(null)}}else X=function(){H(F,0)};function re(Q,Y){R=H(function(){Q(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_forceFrameRate=function(Q){0>Q||125$?(Q.sortIndex=ie,r(g,Q),i(m)===null&&Q===i(g)&&(_?(O(R),R=-1):_=!0,re(K,ie-$))):(Q.sortIndex=ye,r(m,Q),E||w||(E=!0,oe||(oe=!0,X()))),Q},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(Q){var Y=x;return function(){var ie=x;x=Y;try{return Q.apply(this,arguments)}finally{x=ie}}}})(mm)),mm}var Wb;function n_(){return Wb||(Wb=1,hm.exports=t_()),hm.exports}var pm={exports:{}},gn={};var ex;function r_(){if(ex)return gn;ex=1;var e=Lp();function r(v){var y="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),pm.exports=r_(),pm.exports}var nx;function a_(){if(nx)return fl;nx=1;var e=n_(),r=Lp(),i=yw();function s(t){var n="https://react.dev/errors/"+t;if(1_e||(t.current=pe[_e],pe[_e]=null,_e--)}function Ue(t,n){_e++,pe[_e]=t.current,t.current=n}var dt=Me(null),qt=Me(null),Ye=Me(null),st=Me(null);function ot(t,n){switch(Ue(Ye,n),Ue(qt,t),Ue(dt,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?rb(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=rb(n),t=ab(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Le(dt),Ue(dt,t)}function at(){Le(dt),Le(qt),Le(Ye)}function wt(t){var n=t.memoizedState;n!==null&&(qs._currentValue=n.memoizedState,Ue(st,t)),n=dt.current;var a=ab(n,t.type);n!==a&&(Ue(qt,t),Ue(dt,a))}function ln(t){qt.current===t&&(Le(dt),Le(qt)),st.current===t&&(Le(st),qs._currentValue=be)}var xn,Ar;function Dt(t){if(xn===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);xn=n&&n[1]||"",Ar=-1s[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const c of l)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function s(l){if(l.ep)return;l.ep=!0;const c=i(l);fetch(l.href,c)}})();function Bp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dm={exports:{}},dl={};var Kb;function Jk(){if(Kb)return dl;Kb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function i(s,l,c){var d=null;if(c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),"key"in l){c={};for(var f in l)f!=="key"&&(c[f]=l[f])}else c=l;return l=c.ref,{$$typeof:e,type:s,key:d,ref:l!==void 0?l:null,props:c}}return dl.Fragment=r,dl.jsx=i,dl.jsxs=i,dl}var Qb;function Wk(){return Qb||(Qb=1,dm.exports=Jk()),dm.exports}var p=Wk(),fm={exports:{}},$e={};var Xb;function e_(){if(Xb)return $e;Xb=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.for("react.view_transition"),w=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=w&&j[w]||j["@@iterator"],typeo)DELIM" +R"DELIM(f j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,H={};function O(j,G,he){this.props=j,this.context=G,this.refs=H,this.updater=he||_}O.prototype.isReactComponent={},O.prototype.setState=function(j,G){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,G,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function se(){}se.prototype=O.prototype;function ce(j,G,he){this.props=j,this.context=G,this.refs=H,this.updater=he||_}var K=ce.prototype=new se;K.constructor=ce,N(K,O.prototype),K.isPureReactComponent=!0;var oe=Array.isArray;function R(){}var k={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function P(j,G,he){var ee=he.ref;return{$$typeof:e,type:j,key:G,ref:ee!==void 0?ee:null,props:he}}function F(j,G){return P(j.type,G,j.props)}function X(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function fe(j){var G={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(he){return G[he]})}var ge=/\/+/g;function re(j,G){return typeof j=="object"&&j!==null&&j.key!=null?fe(""+j.key):G.toString(36)}function Q(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(R,R):(j.status="pending",j.then(function(G){j.status==="pending"&&(j.status="fulfilled",j.value=G)},function(G){j.status==="pending"&&(j.status="rejected",j.reason=G)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function Y(j,G,he,ee,je){var J=typeof j;(J==="undefined"||J==="boolean")&&(j=null);var me=!1;if(j===null)me=!0;else switch(J){case"bigint":case"string":case"number":me=!0;break;case"object":switch(j.$$typeof){case e:case r:me=!0;break;case v:return me=j._init,Y(me(j._payload),G,he,ee,je)}}if(me)return je=je(j),me=ee===""?"."+re(j,0):ee,oe(je)?(he="",me!=null&&(he=me.replace(ge,"$&/")+"/"),Y(je,G,he,"",function(be){return be})):je!=null&&(X(je)&&(je=F(je,he+(je.key==null||j&&j.key===je.key?"":(""+je.key).replace(ge,"$&/")+"/")+me)),G.push(je)),1;me=0;var W=ee===""?".":ee+":";if(oe(j))for(var le=0;le>>1,ye=Q[$];if(0>>1;$l(Ce,ie))jl(G,Ce)?(Q[$]=G,Q[j]=ie,$=j):(Q[$]=Ce,Q[xe]=ie,$=xe);else if(jl(G,ie))Q[$]=G,Q[j]=ie,$=j;else break e}}return Y}function l(Q,Y){var ie=Q.sortIndex-Y.sortIndex;return ie!==0?ie:Q.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var m=[],g=[],v=1,y=null,x=3,w=!1,E=!1,_=!1,N=!1,H=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,se=typeof setImmediate<"u"?setImmediate:null;function ce(Q){for(var Y=i(g);Y!==null;){if(Y.callback===null)s(g);else if(Y.startTime<=Q)s(g),Y.sortIndex=Y.expirationTime,r(m,Y);else break;Y=i(g)}}function K(Q){if(_=!1,ce(Q),!E)if(i(m)!==null)E=!0,oe||(oe=!0,X());else{var Y=i(g);Y!==null&&re(K,Y.startTime-Q)}}var oe=!1,R=-1,k=5,z=-1;function P(){return N?!0:!(e.unstable_now()-zQ&&P());){var $=y.callback;if(typeof $=="function"){y.callback=null,x=y.priorityLevel;var ye=$(y.expirationTime<=Q);if(Q=e.unstable_now(),typeof ye=="function"){y.callback=ye,ce(Q),Y=!0;break t}y===i(m)&&s(m),ce(Q)}else s(m);y=i(m)}if(y!==null)Y=!0;else{var He=i(g);He!==null&&re(K,He.startTime-Q),Y=!1}}break e}finally{y=null,x=ie,w=!1}Y=void 0}}finally{Y?X():oe=!1}}}var X;if(typeof se=="function")X=function(){se(F)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ge=fe.port2;fe.port1.onmessage=F,X=function(){ge.postMessage(null)}}else X=function(){H(F,0)};function re(Q,Y){R=H(function(){Q(e.unstable_now())},Y)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_forceFrameRate=function(Q){0>Q||125$?(Q.sortIndex=ie,r(g,Q),i(m)===null&&Q===i(g)&&(_?(O(R),R=-1):_=!0,re(K,ie-$))):(Q.sortIndex=ye,r(m,Q),E||w||(E=!0,oe||(oe=!0,X()))),Q},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(Q){var Y=x;return function(){var ie=x;x=Y;try{return Q.apply(this,arguments)}finally{x=ie}}}})(pm)),pm}var ex;function r_(){return ex||(ex=1,mm.exports=n_()),mm.exports}var gm={exports:{}},gn={};var tx;function a_(){if(tx)return gn;tx=1;var e=Lp();function r(v){var y="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),gm.exports=a_(),gm.exports}var rx;function i_(){if(rx)return fl;rx=1;var e=r_(),r=Lp(),i=vw();function s(t){var n="https://react.dev/errors/"+t;if(1_e||(t.current=pe[_e],pe[_e]=null,_e--)}function Ue(t,n){_e++,pe[_e]=t.current,t.current=n}var dt=Me(null),qt=Me(null),Ye=Me(null),st=Me(null);function ot(t,n){switch(Ue(Ye,n),Ue(qt,t),Ue(dt,null),n.nodeType){case 9:case 11:t=(t=n.documentElement)&&(t=t.namespaceURI)?ab(t):0;break;default:if(t=n.tagName,n=n.namespaceURI)n=ab(n),t=ib(n,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Be(dt),Ue(dt,t)}function at(){Be(dt),Be(qt),Be(Ye)}function wt(t){var n=t.memoizedState;n!==null&&($s._currentValue=n.memoizedState,Ue(st,t)),n=dt.current;var a=ib(n,t.type);n!==a&&(Ue(qt,t),Ue(dt,a))}function ln(t){qt.current===t&&(Be(dt),Be(qt)),st.current===t&&(Be(st),$s._currentValue=be)}var xn,Ar;function Dt(t){if(xn===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);xn=n&&n[1]||"",Ar=-1)":-1u||C[o]!==U[u]){var V=` -`+C[o].replace(" at new "," at ");return t.displayName&&V.includes("")&&(V=V.replace("",t.displayName)),V}while(1<=o&&0<=u);break}}}finally{kn=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Dt(a):""}function Dd(t,n){switch(t.tag){case 26:case 27:case 5:return Dt(t.type);case 16:return Dt("Lazy");case 13:return t.child!==n&&n!==null?Dt("Suspense Fallback"):Dt("Suspense");case 19:return Dt("SuspenseList");case 0:case 15:return vo(t.type,!1);case 11:return vo(t.type.render,!1);case 1:return vo(t.type,!0);case 31:return Dt("Activity");case 30:return Dt("ViewTransition");default:return""}}function ts(t){try{var n="",a=null;do n+=Dd(t,a),a=t,t=t.return;while(t);return n}catch(o){return` +`+C[o].replace(" at new "," at ");return t.displayName&&V.includes("")&&(V=V.replace("",t.displayName)),V}while(1<=o&&0<=u);break}}}finally{kn=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Dt(a):""}function Bd(t,n){switch(t.tag){case 26:case 27:case 5:return Dt(t.type);case 16:return Dt("Lazy");case 13:return t.child!==n&&n!==null?Dt("Suspense Fallback"):Dt("Suspense");case 19:return Dt("SuspenseList");case 0:case 15:return vo(t.type,!1);case 11:return vo(t.type.render,!1);case 1:return vo(t.type,!0);case 31:return Dt("Activity");case 30:return Dt("ViewTransition");default:return""}}function es(t){try{var n="",a=null;do n+=Bd(t,a),a=t,t=t.return;while(t);return n}catch(o){return` Error generating stack: `+o.message+` -`+o.stack}}var bo=Object.prototype.hasOwnProperty,Zn=e.unstable_scheduleCallback,ns=e.unstable_cancelCallback,nc=e.unstable_shouldYield,rc=e.unstable_requestPaint,_n=e.unstable_now,ac=e.unstable_getCurrentPriorityLevel,yi=e.unstable_ImmediatePriority,xo=e.unstable_UserBlockingPriority,ka=e.unstable_NormalPriority,Ld)DELIM" -R"DELIM(=e.unstable_LowPriority,wo=e.unstable_IdlePriority,Bd=e.log,ic=e.unstable_setDisableYieldValue,Or=null,Jt=null;function br(t){if(typeof Bd=="function"&&ic(t),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(Or,t)}catch{}}var Nn=Math.clz32?Math.clz32:D,Ud=Math.log,A=Math.LN2;function D(t){return t>>>=0,t===0?32:31-(Ud(t)/A|0)|0}var I=256,ue=262144,de=4194304;function Te(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Se(t,n,a){var o=t.pendingLanes;if(o===0)return 0;var u=0,h=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var S=o&134217727;return S!==0?(o=S&~h,o!==0?u=Te(o):(b&=S,b!==0?u=Te(b):a||(a=S&~t,a!==0&&(u=Te(a))))):(S=o&~h,S!==0?u=Te(S):b!==0?u=Te(b):a||(a=o&~t,a!==0&&(u=Te(a)))),u===0?0:n!==0&&n!==u&&(n&h)===0&&(h=u&-u,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:u}function Ne(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Ee(t,n){(n&8)!==0&&(n|=n&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=n;0a;a++)n.push(t);return n}function ze(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function lt(t,n,a,o,u,h){var b=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var S=t.entanglements,C=t.expirationTimes,U=t.hiddenUpdates;for(a=b&~a;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vd=!1;if(aa)try{var To={};Object.defineProperty(To,"passive",{get:function(){Vd=!0}}),window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{Vd=!1}var Ca=null,Yd=null,uc=null;function Wg(){if(uc)return uc;var t,n=Yd,a=n.length,o,u="value"in Ca?Ca.value:Ca.textContent,h=u.length;)DELIM" -R"DELIM(for(t=0;t=No),iy=" ",sy=!1;function oy(t,n){switch(t){case"keyup":return Y2.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ly(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var us=!1;function K2(t,n){switch(t){case"compositionend":return ly(n);case"keypress":return n.which!==32?null:(sy=!0,iy);case"textInput":return t=n.data,t===iy&&sy?null:t;default:return null}}function Q2(t,n){if(us)return t==="compositionend"||!Jd&&oy(t,n)?(t=Wg(),uc=Yd=Ca=null,us=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function gy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function yy(t,n){var a=gy(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=n&&o>=n)return{node:a,offset:n-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=gy(a)}}function vy(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?vy(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function by(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=tf(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=tf(t.document)}return n}function nf(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var aT=aa&&"documentMode"in document&&11>=document.documentMode,ds=null,rf=nul)DELIM" -R"DELIM(l,Ao=null,af=!1;function xy(t,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;af||ds==null||ds!==tf(o)||(o=ds,"selectionStart"in o&&nf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ao&&Ro(Ao,o)||(Ao=o,o=pu(rf,"onSelect"),0>=b,u-=b,Ur=1<<32-Nn(n)+u|a<Be?(Vt=Oe,Oe=null):Vt=Oe.sibling;var nt=L(B,Oe,q[Be],te);if(nt===null){Oe===null&&(Oe=Vt);break}t&&Oe&&nt.alternate===null&&n(B,Oe),M=h(nt,M,Be),We===null?we=nt:We.sibling=nt,We=nt,Oe=Vt}if(Be===q.length)return a(B,Oe),Ke&&la(B,Be),we;if(Oe===null){for(;BeBe?(Vt=Oe,Oe=null):Vt=Oe.sibling;var Wa=L(B,Oe,nt.value,te);if(Wa===null){Oe===null&&(Oe=Vt);break}t&&Oe&&Wa.alternate===null&&n(B,Oe),M=h(Wa,M,Be),We===null?we=Wa:We.sibling=Wa,We=Wa,Oe=Vt}if(nt.done)return a(B,Oe),Ke&&la(B,Be),we;if(Oe===null){for(;!nt.done;Be++,nt=q.next())nt=ne(B,nt.value,te),nt!==null&&(M=h(nt,M,Be),We===null?we=nt:We.sibling=nt,We=nt);return Ke&&la(B,Be),we}for(Oe=o(Oe);!nt.done;Be++,nt=q.next())nt=Z(Oe,B,Be,nt.value,te),nt!==null&&(t&&(Vt=nt.alternate,Vt!==null&&Oe.delete(Vt.key===null?Be:Vt.key)),M=h(nt,M,Be),We===null?we=nt:We.sibling=nt,We=nt);return t&&Oe.forEach(function(Kk){return n(B,Kk)}),Ke&&la(B,Be),we}function Fe(B,M,q,te){if(typeof q=="object"&&q!==null&&q.type===F&&q.key===null&&q.props.ref===void 0&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case z:e:{for(var we=q.key;M!==null;){if(M.key===we){if(we=q.type,we===F){if(M.tag===7){a(B,M.sibling),te=u(M,q.props.children),za(te,q),te.return=B,B=te;break e}}else if(M.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===ye&&Ri(we)===M.type){a(B,M.sibling),te=u(M,q.props),za(te,q),te.return=B,B=te;break e}a(B,M);break}else n(B,M);M=M.sibling}q.type===F?(te=Ei(q.props.children,B.mode,te,q.key),za(te,q),te.return=B,B=te):(te=xc(q.type,q.key,q.props,null,B.mode,te),za(te,q),te.return=B,B=te)}return b(B);case P:e:{for(we=q.key;M!==null;){if(M.key===we)if(M.tag===4&&M.stateNode.containerInfo===q.containerInfo&&M.stateNode.implementation===q.implementation){a(B,M.sibling),te=u(M,q.children||[]),te.return=B,B=te;break e}else{a(B,M);break}else n(B,M);M=M.sibling}te=ff(q,B.mode,te),te.return=B,B=te}return b(B);case ye:return q=Ri(q),Fe(B,M,q,te)}if(me(q))return ve(B,M,q,te);if(ee(q)){if(we=ee(q),typeof we!="function")throw Error(s(150));return q=we.call(q),ke(B,M,q,te)}if(typeof q.then=="function")return Fe(B,M,Rc(q),te);if(q.$$typeof===re)return Fe(B,M,_c(B,q),te);Ac(B,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,M!==null&&M.tag===6?(a(B,M.sibling),te=u(M,q),te.return=B,B=te):(a(B,M),te=df(q,B.mode,te),te.return=B,B=te),b(B)):a(B,M)}return function(B,M,q,te){try{Bo=0;var we=Fe(B,M,q,te);return xs=null,we}catch(Oe){if(Oe===bs||Oe===Cc)throw Oe;var We=Ln(29,Oe,null,B.mode);return We.lanes=te,We.return=B,We}}}var Oi=Iy(!0),Fy=Iy(!1),Da=!1;function Sf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function La(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Ba(t,n,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(ft&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,n=bc(t),Cy(t,null,a),n}return vc(t,o,n,a),bc(t)}function Uo(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,Lt(t,a)}}function Tf(t,n){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?u=h=b:h=h.next=b,a=a.next}while(a!==null);h===null?u=h=n:h=h.next=n}else u=h=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var kf=!1;function Ho(){if(kf){var t=vs;if(t!==null)throw t}}function Po(t,n,a,o){kf=!1;var u=t.updateQueue;Da=!1;var h=u.firstBaseUpdate,b=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var C=S,U=C.next;C.next=null,b===null?h=U:b.next=U,b=C;var V=t.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==b&&(S===null?V.firstBaseUpdate=U:S.next=U,V.lastBaseUpdate=C))}if(h!==null){var ne=u.baseState;b=0,V=U=C=null,S=h;do{var L=S.lane&-536870913,Z=L!==S.lane;if(Z?(Je&L)===L:(o&L)===L){L!==0&&L===Ci&&(kf=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ve=t,ke=S;L=n;var Fe=a;switch(ke.tag){case 1:if(ve=ke.payload,typeof ve=="function"){ne=ve.call(Fe,ne,L);break e}ne=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ke.payload,L=typeof ve=="function"?ve.call(Fe,ne,L):ve,L==null)break e;ne=R({},ne,L);break e;case 2:Da=!0}}L=S.callback,L!==null&&(t.flags|=64,Z&&(t.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[L]:Z.push(L))}else Z={lane:L,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(U=V=Z,C=ne):V=V.next=Z,b|=L;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;Z=S,S=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);V===null&&(C=ne),u.baseState=C,u.firstBaseUpdate=U,u.lastBaseUpdate=V,h===null&&(u.shared.lanes=0),Ia|=b,t.lanes=b,t.memoizedState=ne}}function Vy(t,n){if(ty)DELIM" -R"DELIM(peof t!="function")throw Error(s(191,t));t.call(n)}function Yy(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;th?h:8;var b=W.T,S={};S.types=b!==null?b.types:null,W.T=S,Ff(t,!1,n,a);try{var C=u(),U=W.S;if(U!==null&&U(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var V=pT(C,o);Io(t,n,V,Qn(t))}else Io(t,n,o,Qn(t))}catch(ne){Io(t,n,{then:function(){},status:"rejected",reason:ne},Qn())}finally{le.p=h,b!==null&&S.types!==null&&(b.types=S.types),W.T=b}}function wT(){}function Zf(t,n,a,o){if(t.tag!==5)throw Error(s(476));var u=kv(t).queue;Tv(t,u,n,be,a===null?wT:function(){return _v(t),a(o)})}function kv(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:be},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function _v(t){var n=kv(t);n.next===null&&(n=t.alternate.memoizedState),Io(t,n.next.queue,{},Qn())}function If(){return dn(qs)}function Nv(){return Ht().memoizedState}function Cv(){return Ht().memoizedState}function ST(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=Qn();t=La(a);var o=Ba(n,t,a);o!==null&&(Pn(o,n,a),Uo(o,n,a)),n={cache:vf()},t.payload=n;return}n=n.return}}function ET(t,n,a){var o=Qn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$c(t)?Rv(n,a):(a=cf(t,n,a,o),a!==null&&(Pn(a,t,o),Av(a,n,o)))}function jv(t,n,a){var o=Qn();Io(t,n,a,o)}function Io(t,n,a,o){var u={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if($c(t))Rv(n,u);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,S=h(b,a);if(u.hasEagerState=!0,u.eagerState=S,Fn(S,b))return vc(t,n,u,0),xt===null&&yc(),!1}catch{}if(a=cf(t,n,u,o),a!==null)return Pn(a,t,o),Av(a,n,o),!0}return!1}function Ff(t,n,a,o){if(o={lane:2,revertLane:Dh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$c(t)){if(n)throw Error(s(479))}else n=cf(t,a,o,2),n!==null&&Pn(n,t,2)}function $c(t){var n=t.alternate;return t===Ie||n!==null&&n===Ie}function Rv(t,n){ws=zc=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Av(t,n,a){if((a&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,Lt(t,a)}}var qc={readContext:dn,use:Bc,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt,useEffectEvent:Bt},Ov={readContext:dn,use:Bc,useCallback:function(t,n){return jn().memoizedState=[t,n===void 0?null:n],t},useContext:dn,useEffect:pv,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Hc(4194308,4,bv.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Hc(4194308,4,t,n)},useInsertionEffect:function(t,n){Hc(4,2,t,n)},useMemo:function(t,n){var a=jn();n=n===void 0?null:n;var o=t();if(Mi){br(!0);try{t()}finally{br(!1)}}return a.memoizedState=[o,n],o},useReducer:function(t,n,a){var o=jn();if(a!==void 0){var u=a(n);if(Mi){br(!0);try{a(n)}finally{br(!1)}}}else u=n;return o.memoizedState=o.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},o.queue=t,t=t.dispatch=ET.bind(null,Ie,t),[o.memoizedState,t]},useRef:function(t){var n=jn();return t={current:t},n.memoizedState=t},useState:function(t){t=Uf(t);var n=t.queue,a=jv.bind(null,Ie,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:$f,useDeferredValue:function(t,n){var a=jn();return qf(a,t,n)},useTransition:function(){var t=Uf(!1);return t=Tv.bind(null,Ie,t.queue,!0,!1),jn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var o=Ie,u=jn();if(Ke){if(a===void 0)throw Error(s(407));a=a()}else{if(a=n(),xt===null)throw Error(s(349));(Je&127)!==0||Wy(o,n,a)}u.memoizedState=a;var h={value:a,getSnapshot:n};return u.queue=h,pv(tv.bind(null,o,h,t),[t]),o.flags|=2048,Es(9,{destroy:void 0},ev.bind(null,o,h,a,n),null),a},useId:function(){var t=jn(),n=xt.identifierPrefix;if(Ke){var a=Hr,o=Ur;a=(o&~(1<<32-Nn(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Dc++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?b.createElement(u,{is:o.is}):b.createElement(u)}}h[kt]=n,h[Rt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;e:switch(pn(h,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ma(n)}}return Et(n),n.subtreeFlags&=-33554433,ah(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&ma(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(s(166));if(t=Ye.current,ys(n)){if(t=n.stateNode,a=n.memoizedProps,o=null,u=nn,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[kt]=n,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||tb(t.nodeValue,a)),t||Oa(n,!0)}else t=rl(t).createTextNode(o),t[kt]=n,n.stateNode=t}return Et(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(o=ys(n),a!==null){if(t===null){if(!o)throw Error(s(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[kt]=n}else Ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Et(n),t=!1}else a=pf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(Vn(n),n):(Vn(n),null);if((n.flags&128)!==0)throw Error(s(558))}return Et(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=ys(n),o!==null&&o.dehydrated!==null){if(t===null){if(!u)throw Error(s(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[kt]=n}else Ti(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Et(n),u=!1}else u=pf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Vn(n),n):(Vn(n),null)}return Vn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=n.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==u&&(o.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Gc(n,n.updateQueue),Et(n),null);case 4:return at(),t===null&&Hh(n.stateNode.containerInfo),n.flags|=67108864,Et(n),null;case 10:return ua(n.type),Et(n),null;case 19:if(jf(n),o=n.memoizedState,o===null)return Et(n),null;if(u=(n.flags&128)!==0,h=o.rendering,h===null)if(u)Vo(o,!1);else{if(Ut!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(h=Mc(t),h!==null){for(n.flags|=128,Vo(o,!1),t=h.updateQueue,n.updateQueue=t,Gc(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)jy(a,t),a=a.sibling;return $o(n,hn.current&1|2),Ke&&la(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&_n()>su&&(n.flags|=128,u=!0,Vo(o,!1),n.lanes=4194304)}else{if(!u)if(t=Mc(h),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Gc(n,t),Vo(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!h.alternate&&!Ke)return Et(n),null}else 2*_n()-o.renderingStartTime>su&&a!==536870912&&(n.flags|=128,u=!0,Vo(o,!1),n.lanes=4194304);o.isBackwards?(h.sibling=n.child,n.child=h):(t=o.last,t!==null?t.sibling=h:n.child=h,o.last=h)}if(o.tail!==null){t=o.tail;e:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return o.rendering=t,o.tail=t.sibling,o.renderingStartTime=_n(),t.sibling=null,h=hn.current,h=u?h&1|2:h&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!a||Ke?$o(n,h):(a=h,Ue(fn,n),Ue(hn,a),Sn===null&&(Sn=n)),Ke&&la(n,o.treeForkCount),t}return Et(n),null;case 22:case 23:return Vn(n),Nf(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(Et(n),n.subtreeFlags&6&&(n.flags|=8192)):Et(n),a=n.updateQueue,a!==null&&Gc(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),t!==null&&Le(ji),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ua(Zt),Et(n),null;case 25:return null;case 30:return n.flags|=33554432,Et(n),null}throw Error(s(156,n.tag))}function RT(t,n){switch(hf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ua(Zt),at(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return ln(n),null;case 31:if(n.memoizedState!==null){if(Vn(n),n.alternate===null)throw Error(s(340));Ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Vn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));Ti()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return jf(n),t=n.flags,t&65536?(n.flags=t&-65537|128,t=n.memoizedState,t!==null&&(t.rendering=null,t.tail=null),n.flags|=4,n):null;case 4:return at(),null;case 10:return ua(n.type),null;case 22:case 23:return Vn(n),Nf(),t!==null&&Le(ji),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ua(Zt),null;case 25:return null;default:return null}}function r0(t,n){switch(hf(n),n.tag){case 3:ua(Zt),at();break;case 26:case 27:case 5:ln(n);break;case 4:at();break;case 31:n.memoizedState!==null&&Vn(n);break;case 13:Vn(n);break;case 19:jf(n);break;case 10:ua(n.type);break;case 22:case 23:Vn(n),Nf(),t!==null&&Le(ji);break;case 24:ua(Zt)}}function Yo(t,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var u=o.next;a=u;do{if((a.tag&t)===t){o=void 0;var h=a.create,b=a.inst;o=h(),b.destroy=o}a=a.next}while(a!==u)DELIM" -R"DELIM()}}catch(S){yt(n,n.return,S)}}function $a(t,n,a){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var h=u.next;o=h;do{if((o.tag&t)===t){var b=o.inst,S=b.destroy;if(S!==void 0){b.destroy=void 0,u=n;var C=a,U=S;try{U()}catch(V){yt(u,C,V)}}}o=o.next}while(o!==h)}}catch(V){yt(n,n.return,V)}}function a0(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Yy(n,a)}catch(o){yt(t,t.return,o)}}}function i0(t,n,a){a.props=zi(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){yt(t,n,o)}}function Pr(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:var u=t.stateNode,h=ia(t.memoizedProps,u);(u.ref===null||u.ref.name!==h)&&(u.ref=fb(h)),o=u.ref;break;case 7:if(t.stateNode===null){var b=new Xn(t);y(t.child,!1,xk,b,void 0,void 0),t.stateNode=b}o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(S){yt(t,n,S)}}function mn(t,n){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(u){yt(t,n,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){yt(t,n,u)}else a.current=null}function Kc(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var a=0;a title"))),pn(o,n,a),o[kt]=t,Ze(o),n=o;break e;case"link":if(h=jb("link","href",u).get(n+(a.href||""))){for(b=0;bFe&&(b=Fe,Fe=ke,ke=b);var B=yy(S,ke),M=yy(S,Fe);if(B&&M&&(Z.rangeCount!==1||Z.anchorNode!==B.node||Z.anchorOffset!==B.offset||Z.focusNode!==M.node||Z.focusOffset!==M.offset)){var q=ne.createRange();q.setStart(B.node,B.offset),Z.removeAllRanges(),ke>Fe?(Z.addRange(q),Z.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),Z.addRange(q))}}}}for(ne=[],Z=S;Z=Z.parentNode;)Z.nodeType===1&&ne.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;Sa?32:a,W.T=null,a=kh,kh=null;var h=Tr,b=Vr;if(At=0,Ui=Tr=null,Vr=0,(ft&6)!==0)throw Error(s(331));var S=ft;if(ft|=4,C0(h.current),k0(h,h.current,b,a),ft=S,el(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(Or,h)}catch{}return!0}finally{le.p=u,W.T=o,Z0(t,n)}}function I0(t,n,a){n=ar(a,n),n=Gf(t.stateNode,n,2),t=Ba(t,n,2),t!==null&&(ze(t,2),Yr(t))}function yt(t,n,a){if(t.tag===3)I0(t,t,a);else for(;n!==null;){if(n.tag===3){I0(n,t,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fa===null||!Fa.has(o))){t=ar(a,t),a=Pv(2),o=Ba(n,a,2),o!==null&&($v(a,o,n,t),ze(o,2),Yr(o));break}}n=n.return}}function Oh(t,n,a){var o=t.pingCache;if(o===null){o=t.pingCache=new zT;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(Sh=!0,u.add(a),t=qT.bind(null,t,n,a),n.then(t,t))}function qT(t,n,a){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,xt===t&&(Je&a)===a&&((Ut===4||Ut===3&&(Je&62914560)===Je&&300>_n()-iu)&&(ft&2)===0?zs(t,0):au|=a,js===Je&&(js=0)),Yr(t)}function F0(t,n){n===0&&(n=Ae()),t=Si(t,n),t!==null&&(ze(t,n),Yr(t))}function ZT(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),F0(t,a)}function IT(t,n){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,u=t.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(n),F0(t,a)}function FT(t,n){return Zn(t,n)}var Ls=null,Bs=null,Mh=!1,hu=!1,zh=!1,Ya=0;function Yr(t){t!==Bs&&t.next===null&&(Bs===null?Ls=Bs=t:Bs=Bs.next=t),hu=!0,Mh||(Mh=!0,YT())}function el(t,n){if(!zh&&hu){zh=!0;do for(var a=!1,o=Ls;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var h=0;else{var b=o.suspendedLanes,S=o.pingedLanes;h=(1<<31-Nn(42|t)+1)-1,h&=u)DELIM" -R"DELIM(&~(b&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,K0(o,h))}else h=Je,h=Se(o,o===xt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Ne(o,h)||(a=!0,K0(o,h));o=o.next}while(a);zh=!1}}function VT(){V0()}function V0(){hu=Mh=!1;var t=0;Ya!==0&&ak()&&(t=Ya);for(var n=_n(),a=null,o=Ls;o!==null;){var u=o.next,h=Y0(o,n);h===0?(o.next=null,a===null?Ls=u:a.next=u,u===null&&(Bs=a)):(a=o,(t!==0||(h&3)!==0)&&(hu=!0)),o=u}At!==0&&At!==5||el(t),Ya!==0&&(Ya=0)}function Y0(t,n){for(var a=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,h=t.pendingLanes&-62914561;0S)break;var V=C.transferSize,ne=C.initiatorType;V&&nb(ne)&&(C=C.responseEnd,b+=V*(Cvu){ke.length=ve;break}q=new Promise(uk.bind(q)),ke.push(q)}}}if(0"u"?null:document;function kb(t,n,a){var o=Hs;if(o&&typeof n=="string"&&n){var u=nr(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Tb.has(u)||(Tb.add(u),t={rel:t,crossOrigin:a,href:n},o.querySelector(u)===null&&(n=o.createElement("link"),pn(n,"link",t),Ze(n),o.head.appendChild(n)))}}function jk(t){ga.D(t),kb("dns-prefetch",t,null)}function Rk(t,n){ga.C(t,n),kb("preconnect",t,n)}function Ak(t,n,a){ga.L(t,n,a);var o=Hs;if(o&&t&&n){var u='link[rel="preload"][as="'+nr(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+nr(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+nr(a.imageSizes)+'"]')):u+='[href="'+nr(t)+'"]';var h=u;switch(n){case"style":h=Ps(t);break;case"script":h=$s(t)}if(!(ur.has(h)||(t=R({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),ur.set(h,t),o.querySelector(u)!==null||n==="style"&&o.querySelector(il(h))||n==="script"&&o.querySelector(sl(h))))){var b=o.createElement("link");pn(b,"link",t),n==="style"&&(b[Ge]=!0,b.onload=b.onerror=function(){Lr(b)}),Ze(b),o.head.appendChild(b)}}}function Ok(t,n){ga.m(t,n);var a=Hs;if(a&&t){var o=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+nr(o)+'"][href="'+nr(t)+'"]',h=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=$s(t)}if(!ur.has(h)&&(t=R({rel:"modulepreload",href:t},n),ur.set(h,t),a.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sl(h)))return}o=a.createElement("link"),pn(o,"link",t),Ze(o),a.head.appendChild(o)}}}function Mk(t,n,a){ga.S(t,n,a);var o=Hs;if(o&&t){var u=Dr(o).hoistableStyles,h=Ps(t);n=n||"default";var b=u.get(h);if(!b){var S={loading:0,preload:null};if(b=o.querySelector(il(h)))S.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":n},a),(a=ur.get(h))&&tm(t,a);var C=b=o.createElement("link");Ze(C),pn(C,"link",t),C._p=new Promise(function(U,V){C.onload=U,C.onerror=V}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,gu(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:S},u.set(h,b)}}}function zk(t,n){ga.X(t,n);var a=Hs;if(a&&t){var o=Dr(a).hoistableScripts,u=$s(t),h=o.get(u);h||(h=a.querySelector(sl(u)),h||(t=R({src:t,async:!0},n),(n=ur.get(u))&&nm(t,n),h=a.createElement("script"),Ze(h),pn(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(u,h))}}function Dk(t,n){ga.M(t,n);var a=Hs;if(a&&t){var o=Dr(a).hoistableScripts,u=$s(t),h=o.get(u);h||(h=a.querySelector(sl(u)),h||(t=R({src:t,async:!0,type:"module"},n),(n=ur.get(u))&&nm(t,n),h=a.createElement("script"),Ze(h),pn(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(u,h))}}function _b(t,n,a,o){var u=(u=Ye.current)?al(u):null;if(!u)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Ps(a.href),n=Dr(u).hoistableStyles,o=n.get(a),o||(o={type:"style",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Ps(a.href);var h=Dr(u).hoistableStyles,b=h.get(t);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,b),(h=u.querySelector(il(t)))?h._p||(b.instance=h,b.state.loading=5):(h=ur.get(t),h||(h={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ur.set(t,h)),Lk(u,t,h,b.state))),n&&o===null)throw Error(s(528,""));return b}if(n&&o!==null)throw Error(s(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=$s(a),n=Dr(u).hoistableScripts,o=n.get(a),o||(o={type:"script",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Ps(t){return'href="'+nr(t)+'"'}function il(t){return'link[rel="stylesheet"]['+t+"]"}function Nb(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function Lk(t,n,a,o){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Ge]!==!0){o.loading=1;return}}else n=t.createElement("link"),n[Ge]=!0,n.onload=n.onerror=Lr.bind(null,n),pn(n,"link",a),Ze(n),t.head.appendChild(n);o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2})}function $s(t){return'[src="'+nr(t)+'"]'}function sl(t){return"script[async]"+t}function Cb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+nr(a.href)+'"]');if(o)return n.instance=o,Ze(o),o;var u=R({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ze(o),pn(o,"style",u),gu(o,a.precedence,t),n.instance=o;case"stylesheet":u=Ps(a.href);var h=t.querySelector(il(u));if(h)return n.state.loading|=4,n.instance=h,Ze(h),h;o=Nb(a),(u=ur.get(u))&&tm(o,u),h=(t.ownerDocument||t).createElement("link"),Ze(h);var b=h;return b._p=new Promise(function(S,C){b.onload=S,b.onerror=C}),pn(h,"link",o),n.state.loading|=4,gu(h,a.precedence,t),n.instance=h;case"script":return h=$s(a.src),(u=t.querySelector(sl(h)))?(n.instance=u,Ze(u),u):(o=a,(u=ur.get(h))&&(o=R({},a),nm(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),Ze(u),pn(u,"link",o),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,gu(o,a.precedence,t));return n.instance}function gu(t,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,h=u,b=0;b title"):null)}function Bk(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):)DELIM" -R"DELIM(!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Rb(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Ab(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Ob(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function Mb(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=Ob(n),t.suspenseyImages.push(n)),t=Pk.bind(t),n.decode().then(t,t))}function Uk(t,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ps(o.href),h=n.querySelector(il(u));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=ol.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=h,Ze(h);return}h=n.ownerDocument||n,o=Nb(o),(u=ur.get(u))&&tm(o,u),h=h.createElement("link"),Ze(h);var b=h;b._p=new Promise(function(S,C){b.onload=S,b.onerror=C}),pn(h,"link",o),a.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ol.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var vu=0;function Hk(t,n){return t.stylesheets&&t.count===0&&xu(t,t.stylesheets),0vu?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function zb(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)xu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function ol(){this.count--,zb(this)}function Pk(){this.imgCount--,zb(this)}var bu=null;function xu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,bu=new Map,n.forEach($k,t),bu=null,ol.call(t))}function $k(t,n){if(!(n.state.loading&4)){var a=bu.get(t);if(a)var o=a.get(null);else{a=new Map,bu.set(t,a);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),fm.exports=a_(),fm.exports}var s_=i_();const o_=Dp(s_),l_=[{id:"current",label:"Classic"},{id:"light",label:"Light"},{id:"midnight",label:"Midnight"}],Bp="libbitcoinTheme",rd="libbitcoin-theme-change";function Up(e){return e==="light"||e==="midnight"?e:"current"}function vw(){try{return Up(localStorage.getItem(Bp))}catch{return"current"}}function Hp(e){document.documentElement.dataset.theme=e;const r=getComputedStyle(document.documentElement).getPropertyValue("--theme-background").trim();r&&document.querySelector('meta[name="theme-color"]')?.setAttribute("content",r)}function c_(){Hp(vw()),globalThis.addEventListener("storage",f_)}function u_(e){const r=Up(e);Hp(r);try{localStorage.setItem(Bp,r)}catch{}globalThis.dispatchEvent(new Event(rd))}function d_(){return Up(document.documentElement.dataset.theme)}function f_(e){e.key!==null&&e.key!==Bp||(Hp(vw()),globalThis.dispatchEvent(new Event(rd)))}function h_(e){return globalThis.addEventListener(rd,e),()=>{globalThis.removeEventListener(rd,e)}}function m_(){return T.useSyncExternalStore(h_,d_,()=>"current")}const bw=T.createContext(void 0),xw=e=>{const r=T.useContext(bw);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},p_=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(bw.Provider,{value:e,children:r})),g_={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var y_=class{#e=g_;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,r){return this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}};const Vi=new y_;function v_(e){setTimeout(e,0)}const b_=typeof window>"u"||"Deno"in globalThis;function $n(){}function x_(e,r){return typeof e=="function"?e(r):e}function ww(e){return typeof e=="number"&&e>=0&&e!==1/0}function Sw(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Nt(e,r){return typeof e=="function"?e(r):e}function ax(e,r){const{type:i="all",exact:s,fetchStatus:l,predicate:c,queryKey:d,stale:f}=e;if(d){if(s){if(r.queryHash!==Pp(d,r.options))return!1}else if(!ao(r.queryKey,d))return!1}if(i!=="all"){const m=r.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof f=="boolean"&&r.isStale()!==f||l&&l!==r.state.fetchStatus||c&&!c(r))}function ix(e,r){const{exact:i,status:s,predic)DELIM" -R"DELIM(ate:l,mutationKey:c}=e;if(c){if(!r.options.mutationKey)return!1;if(i){if(Bl(r.options.mutationKey)!==Bl(c))return!1}else if(!ao(r.options.mutationKey,c))return!1}return!(s&&r.state.status!==s||l&&!l(r))}function Pp(e,r){return(r?.queryKeyHashFn||Bl)(e)}function Bl(e){return JSON.stringify(e,(r,i)=>ep(i)?Object.keys(i).sort().reduce((s,l)=>(s[l]=i[l],s),{}):i)}function ao(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){if(r.length>e.length)return!1;for(let s=0;s500)return r;const s=sx(e)&&sx(r);if(!s&&!(ep(e)&&ep(r)))return r;const l=(s?e:Object.keys(e)).length,c=s?r:Object.keys(r),d=c.length,f=s?new Array(d):{};let m=0;for(let g=0;g{Vi.setTimeout(r,e)})}function tp(e,r,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,r):i.structuralSharing!==!1?Tw(e,r):r}function S_(e,r,i=0){const s=[...e,r];return i&&s.length>i?s.slice(-i):s}function E_(e,r,i=0){const s=[r,...e];return i&&s.length>i?s.slice(0,i):s}const $p=Symbol();function kw(e,r){return!e.queryFn&&r?.initialPromise?()=>r.initialPromise:!e.queryFn||e.queryFn===$p?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _w(e,r){return typeof e=="function"?e(...r):!!e}const qp=Symbol();function T_(e,r,i,s){let l=!1,c;return Object.defineProperties(e,{[qp]:{value:s},signal:{enumerable:!0,get:()=>(c??=r(),l||(l=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}}),e}let k_=()=>b_;const Zp=()=>k_();var Fl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},__=class extends Fl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const Ip=new __,N_=v_;function C_(){let e=[],r=0,i=f=>{f()},s=f=>{f()},l=N_;const c=f=>{r?e.push(f):l(()=>{i(f)})},d=()=>{const f=e;e=[],f.length&&l(()=>{s(()=>{f.forEach(m=>{i(m)})})})};return{batch:f=>{let m;r++;try{m=f()}finally{r--,r||d()}return m},batchCalls:f=>(...m)=>{c(()=>{f(...m)})},schedule:c,setNotifyFunction:f=>{i=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{l=f}}}const bn=C_();var j_=class extends Fl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}};const ad=new j_;function R_(e){return Math.min(1e3*2**e,3e4)}function Nw(e){return(e??"online")==="online"?ad.isOnline():!0}var np=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Cw(e){let r=!1,i=0,s,l="pending",c,d;const f=new Promise((O,se)=>{c=O,d=se});f.catch($n);const m=()=>l!=="pending",g=O=>{if(!m()){const se=new np(O);_(se),e.onCancel?.(se)}},v=()=>{r=!0},y=()=>{r=!1},x=()=>Ip.isFocused()&&(e.networkMode==="always"||ad.isOnline())&&e.canRun(),w=()=>Nw(e.networkMode)&&e.canRun(),E=O=>{m()||(s?.(),l="resolved",c(O))},_=O=>{m()||(s?.(),l="rejected",d(O))},N=O=>new Promise(se=>{s=ce=>{(m()||O())&&se(ce)},e.onPause?.()}).then(()=>{s=void 0,m()||e.onContinue?.()}),H=()=>{if(m())return;let O;const se=i===0?e.initialPromise:void 0;try{O=se??e.fn()}catch(ce){O=Promise.reject(ce)}Promise.resolve(O).then(E).catch(ce=>{if(m())return;const K=e.retry??(Zp()?0:3),oe=e.retryDelay??R_,R=typeof oe=="function"?oe(i,ce):oe,k=K===!0||typeof K=="number"&&im()||x()?void 0:N(x)).then(()=>{r?_(ce):H()})})};return{promise:f,status:()=>l,cancel:g,continue:()=>(s?.(),f),cancelRetry:v,continueRetry:y,canStart:w,start:()=>(w()?H():N(w).then(H),f)}}var jw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ww(this.gcTime)&&(this.#e=Vi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zp()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Vi.clearTimeout(this.#e),this.#e=void 0)}};function A_(e){return{onFetch:(r,i)=>{const s=r.options,l=r.fetchOptions?.meta?.fetchMore?.direction,c=r.state.data?.pages||[],d=r.state.data?.pageParams||[];let f={pages:[],pageParams:[]},m=0;const g=async()=>{let v=!1;const y=r,x=_=>{T_(_,()=>r.signal,()=>v=!0,y[qp])},w=kw(r.options,r.fetchOptions),E=async(_,N,H)=>{if(v)return Promise.reject(r.signal.reason);if(N==null&&_.pages.length)return Promise.resolve(_);const se=(()=>{const R={client:r.client,queryKey:r.queryKey,pageParam:N,direction:H?"backward":"forward",meta:r.options.meta};return x(R),R})(),ce=await w(se),{maxPages:K}=r.options,oe=H?E_:S_;return{pages:oe(_.pages,ce,K),pageParams:oe(_.pageParams,N,K)}};if(l&&c.length){const _=l==="backward",N=_?O_:lx,H={pages:c,pageParams:d};f=await E(H,N(s,H),_)}else{const _=e??c.length;do{const N=m===0?d[0]===void 0?s.initialPageParam:d[0]:lx(s,f);if(m>0&&N==null)break;f=await E(f,N),m++}while(m<_)}return f};r.options.persister?r.fetchFn=()=>r.options.persister?.(g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},i):r.fetchFn=g}}}function lx(e,{pages:r,pageParams:i}){const s=r.length-1;return r.length>0?e.getNextPageParam(r[s],r,i[s],i):void 0}function O_(e,{pages:r,pageParams:i}){return r.length>0?e.getPreviousPageParam?.(r[0],r,i[0],i):void 0}var M_=class extends jw{#e;#t;#n;#r;#i;#a;#s;#l;#c;constructor(e){super(),this.#c=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=ux(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#l,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTim)DELIM" -R"DELIM(e),this.state&&this.state.data===void 0){const r=ux(this.options);r.data!==void 0&&(this.setState(cx(r.data,r.dataUpdatedAt)),this.#t=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,r){const i=tp(this.state.data,e,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(e){this.#o({type:"setState",state:e})}cancel(e){const r=this.#a?.promise;return this.#a?.cancel(e),r?r.then($n).catch($n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Nt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===$p||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(e=>Nt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Sw(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const r=this.observers.indexOf(e);r!==-1&&(this.observers.splice(r,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#s)return this.#a.continueRetry(),this.#s}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(v=>v.options.queryFn);g&&this.setOptions(g.options)}const i=new AbortController,s=g=>{Object.defineProperties(g,{[qp]:{value:i.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,i.signal)}})},l=()=>{const g=kw(this.options,r),y=(()=>{const x={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(x),x})();return this.#c=!1,this.options.persister?this.options.persister(g,y,this):g(y)},d=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return s(g),g})();(this.#e==="infinite"?A_(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#o({type:"fetch",meta:d.fetchOptions?.meta});const f=this.#a=Cw({initialPromise:r?.initialPromise,fn:d.fetchFn,onCancel:g=>{g instanceof np&&g.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(g,v)=>{this.#o({type:"failed",failureCount:g,error:v})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}),m=(async()=>{try{const g=await f.promise;if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#r.config.onSuccess?.(g,this),this.#r.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof np){if(g.silent){if(this.#a!==f&&this.#s)return this.#s;throw g}else if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#o({type:"error",error:g}),this.#r.config.onError?.(g,this),this.#r.config.onSettled?.(this.state.data,g,this),g}finally{this.#a===f&&(this.#a=void 0,this.#s=void 0),this.scheduleGc()}})();return this.#s=m,f.start(),m}#o(e){const r=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Rw(i.data,this.options),fetchMeta:e.meta??null};case"success":const s={...i,...cx(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const l=e.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=r(this.state),bn.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Rw(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nw(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function cx(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ux(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,i=r!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var z_=class extends Fl{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#s;#l;#c;#o;#d;#f;#u;#m=new Set;constructor(e,r){super(),this.options=r,this.#e=e,this.#s=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dx(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rp(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rp(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const r=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!gm(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&fx(this.#t,i,this.options,r)&&this.#h(),this.updateResult(),s&&(this.#t!==i||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||Nt(this.options.staleTime,this.#t)!==Nt(r.staleTime,this.#t))&&this.#g();const l=this.#y();s&&(this.#t!==i||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||l!==this.#u)&&this.#v(l)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(r,e);return gm(this.getCurrentResult(),i)||(this.#r=i,this.#a=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(e,r){return new Proxy(e,{get:(i,s)=>(this.trackProp(s),r?.(s),Reflect.get(i,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCa)DELIM" -R"DELIM(che().build(this.#e,r);let s=()=>{},l;const c=new Promise(d=>{l=d,s=this.#e.getQueryCache().subscribe(f=>{f.type==="updated"&&f.query.queryHash===i.queryHash&&i.state.data!==void 0&&(s(),d(this.createResult(i,r)))})});return Promise.race([i.fetch(r).then(()=>{const d=this.createResult(i,r);return l?.(d),d}).finally(()=>{s()}),c])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let r=this.#t.fetch(this.options,e);return e?.throwOnError||(r=r.catch($n)),r}#p(e){return!Zp()&&Nt(this.options.enabled,this.#t)!==!1&&ww(e)}#g(){this.#x();const e=Nt(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#p(e))return;const r=Sw(this.#r.dataUpdatedAt,e)+1;this.#d=Vi.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return Nt(this.options.refetchInterval,this.#t)??!1}#v(e){this.#w(),this.#u=e,!(this.#u===0||!this.#p(this.#u))&&(this.#f=Vi.setInterval(()=>{(this.options.refetchIntervalInBackground||Ip.isFocused())&&this.#h()},this.#u))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#d!==void 0&&(Vi.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Vi.clearInterval(this.#f),this.#f=void 0)}createResult(e,r){const i=this.#t,s=this.options,l=this.#r,c=this.#i,d=this.#a,f=e!==i?e.state:this.#n,{state:m}=e;let g={...m},v=!1,y;if(r._optimisticResults){const K=this.hasListeners(),oe=!K&&dx(e,r),R=K&&fx(e,i,r,s);(oe||R)&&(g={...g,...Rw(m.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:E}=g;y=g.data;let _=!1;if(r.placeholderData!==void 0&&y===void 0&&E==="pending"){let K;l?.isPlaceholderData&&r.placeholderData===d?.placeholderData?(K=l.data,_=!0):K=typeof r.placeholderData=="function"?r.placeholderData(this.#o?.state.data,this.#o):r.placeholderData,K!==void 0&&(E="success",y=tp(l?.data,K,r),v=!0)}if(r.select&&y!==void 0&&!_)if(l&&y===c?.data&&r.select===this.#l)y=this.#c;else try{this.#l=r.select,y=r.select(y),y=tp(l?.data,y,r),this.#c=y,this.#s=null}catch(K){this.#s=K}else y===void 0&&(this.#s=null);this.#s&&(x=this.#s,y=this.#c,w=l?.error===x?l.errorUpdatedAt:Date.now(),E="error",v=!1);const N=g.fetchStatus==="fetching",H=E==="pending",O=E==="error",se=H&&N,ce=y!==void 0;return{status:E,fetchStatus:g.fetchStatus,isPending:H,isSuccess:E==="success",isError:O,isInitialLoading:se,isLoading:se,data:y,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!H,isLoadingError:O&&!ce,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&ce,isStale:Fp(e,r),refetch:this.refetch,isEnabled:Nt(r.enabled,e)!==!1}}updateResult(){const e=this.#r,r=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#o=this.#t),gm(r,e))return;this.#r=r;const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(const d of c??this.#m)if(this.#r[d]!==e[d])return!0;return!1})();bn.batch(()=>{s&&this.listeners.forEach(l=>{l(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const r=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function D_(e,r){return Nt(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Nt(r.retryOnMount,e)===!1)}function dx(e,r){return D_(e,r)||e.state.data!==void 0&&rp(e,r,r.refetchOnMount)}function rp(e,r,i){if(Nt(r.enabled,e)!==!1&&Nt(r.staleTime,e)!=="static"){const s=Nt(i,e);return s==="always"||s!==!1&&Fp(e,r)}return!1}function fx(e,r,i,s){return(e!==r||Nt(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Fp(e,i)}function Fp(e,r){return Nt(r.enabled,e)!==!1&&e.isStaleByTime(Nt(r.staleTime,e))}var L_=class extends jw{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||B_(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(r=>r!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const r=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},s=this.#r=Cw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),l=this.state.status==="pending",c=!s.canStart();try{if(l)r();else{this.#i({type:"pending",variables:e,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const f=await this.options.onMutate?.(e,i);f!==this.state.context&&this.#i({type:"pending",context:f,variables:e,isPaused:c})}this.state.isPaused&&s.canStart()&&r();const d=await s.start();return await this.#n.config.onSuccess?.(d,e,this.state.context,this,i),await this.options.onSuccess?.(d,e,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,e,this.state.context,i),this.#i({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,e,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(d,e,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,d,e,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#i({type:"error",error:d}),d}finally{this.#r===s&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){const r=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),bn.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function B_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var U_=class extends Fl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,r,i){const s=new L_({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(r),state:i});return this.add(s),s}add(e){this.#e.add(e);const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r);)DELIM" -R"DELIM(i?i.push(e):this.#t.set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r);if(i)if(i.length>1){const s=i.indexOf(e);s!==-1&&i.splice(s,1)}else i[0]===e&&this.#t.delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const r=Nu(e);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(r=>{this.notify({type:"removed",mutation:r})})})}getAll(){return Array.from(this.#e)}find(e){const r={exact:!0,...e};return this.getAll().find(i=>ix(r,i))}findAll(e={}){return this.getAll().filter(r=>ix(e,r))}notify(e){bn.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return bn.batch(()=>Promise.all(e.map(r=>r.continue().catch($n))))}};function Nu(e){return e.options.scope?.id}var H_=class extends Fl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,r,i){const s=r.queryKey,l=r.queryHash??Pp(s,r);let c=this.get(l);return c||(c=new M_({client:e,queryKey:s,queryHash:l,options:e.defaultQueryOptions(r),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const r={exact:!0,...e};return this.getAll().find(i=>ax(r,i))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(i=>ax(e,i)):r}notify(e){bn.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},P_=class{#e;#t;#n;#r;#i;#a;#s;#l;constructor(e={}){this.#e=e.queryCache||new H_,this.#t=e.mutationCache||new U_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=Ip.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=ad.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),i=this.#e.build(this,r),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Nt(r.staleTime,i))&&this.prefetchQuery(r),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:r,state:i})=>[r,i.data])}setQueryData(e,r,i){const s=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(s.queryHash)?.state.data,c=x_(r,l);if(c!==void 0)return this.#e.build(this,s).setData(c,{...i,manual:!0})}setQueriesData(e,r,i){return bn.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,i)]))}getQueryState(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state}removeQueries(e){const r=this.#e;bn.batch(()=>{r.findAll(e).forEach(i=>{r.remove(i)})})}resetQueries(e,r){const i=this.#e;return bn.batch(()=>{const s=i.findAll(e),l=new Set(s);return s.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>l.has(c)},r)})}cancelQueries(e,r={}){const i={revert:!0,...r},s=bn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(i)));return Promise.all(s).then($n).catch($n)}invalidateQueries(e,r={}){return bn.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},r)))}refetchQueries(e,r={}){const i={...r,cancelRefetch:r.cancelRefetch??!0},s=bn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,i);const d=l.state.fetchStatus==="paused";return(!i.throwOnError||d)&&(c=c.catch($n)),d?Promise.resolve():c}));return Promise.all(s).then($n)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const i=this.#e.build(this,r),s=i.isStaleByTime(Nt(r.staleTime,i))?await i.fetch(r):i.state.data,l=r.select;return l?l(s):s}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const i=this.#e.build(this,r);return i.isStaleByTime(Nt(r.staleTime,i))?i.fetch(r):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($n).catch($n)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($n).catch($n)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ad.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,r){this.#r.set(Bl(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...this.#r.values()],i={};return r.forEach(s=>{ao(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,r){this.#i.set(Bl(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...this.#i.values()],i={};return r.forEach(s=>{ao(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const r={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=Pp(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===$p&&(r.enabled=!1),r}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Aw=T.createContext(!1),$_=()=>T.useContext(Aw);Aw.Provider;function q_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Z_=T.createContext(q_()),I_=()=>T.useContext(Z_),F_=(e,r,i)=>{const s=i?.state.status==="error"&&typeof e.throwOnError=="function"?_w(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||s)&&(r.isReset()||(e.retryOnMount=!1))},V_=e=>{T.useEffect(()=>{e.clearReset()},[e])},Y_=({result:e,errorResetBoundary:r,throwOnError:i,query:s,suspense:l})=>e.isError&&!r.isReset()&&!e.isFetching&&s&&(l&&e.data===void 0||_w(i,[e.error,s])),G_=e=>{if(e.suspense){const i=l=>l==="static"?l:Math.max(l??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...l)=>i(s(...l)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},K_=(e,r)=>e?.suspense&&r.isPending,Q_=(e,r,i)=>r.fetchOptimistic(e).catch(()=>{i.clearReset()});function X_(e,r,i){const s=$_(),l=I_(),c=xw(),d=c.defaultQueryOptions(e),f=c.getQueryCache().get(d.queryHash),m=e.subscribed!==!1;d._optimisticResults=s?"isRestoring":m?"optimistic":void 0,G_(d),F_(d,l,f),V_(l);const[g]=T.useState(()=>new r(c,d)),v=g.getOptimisticResult(d);T.useEffect(()=>{g.setOptions(d)},[d,g]);const y=!s&&m;if(T.useSyncExternalStore(T.useCallback(x=>{const w=y?g.subscribe(bn.batchCalls(x)):$n;return g.updateResult(),w},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),K_(d,v))throw Q_(d,g,l);if(Y_({result:v,errorResetBoundary:l,throwOnError:d.throwOnE)DELIM" -R"DELIM(rror,query:f,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:g.trackResult(v)}function J_(e,r){return X_(e,z_)}function ap(e){const r=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,l])=>r.indexOf(+s)===-1).map(([s,l])=>l)}function hx(e,r="|"){return e.map(i=>Lw(i)).join(r)}function ip(e,r){return typeof r=="bigint"?r.toString():r}class W_{constructor(r){this._getter=r,this._value=void 0}get value(){const r=this._getter;return r!==void 0&&(this._value=r(),this._getter=void 0),this._value}}function wd(e){return new W_(e)}function e4(e){return e==null}function Vp(e){const r=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(r,i)}function t4(e,r){const i=e/r,s=Math.round(i),l=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-s){const f=r._zod.def.shape[c];return s?s(f,c):f}):Mw(e,c,s?s(d.value,c):d.value))}}function n4(e,r){for(const i of Reflect.ownKeys(r)){const s=Object.getOwnPropertyDescriptor(r,i);s.enumerable&&(s.get?Ow(e,i,()=>r[i]):Mw(e,i,s.value))}}function Wn(...e){const r={};for(const i of e){const s=Object.getOwnPropertyDescriptors(i);Object.assign(r,s)}return Object.defineProperties({},r)}function r4(e){return JSON.stringify(e)}function a4(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const zw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ul(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const i4=wd(()=>{if(Rr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function io(e){if(Ul(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const i=r.prototype;return!(Ul(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Dw(e){return io(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const s4=new Set(["string","number","symbol"]);function so(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gi(e,r,i){const s=new e._zod.constr(r??e._zod.def);return(!r||i?.parent)&&(s._zod.parent=e),s}function Re(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Lw(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function o4(e){return Object.keys(e).filter(r=>e[r]._zod.optin!==void 0&&e[r]._zod.optout==="optional")}const Bw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},l4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function c4(e,r){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return Qi(c,e,Sd(e,r)),gi(e,Wn(i,{shape:c,checks:[]}))}function Sd(e,r){const i=xa(e),s=[];for(const l of Reflect.ownKeys(r)){if(!Object.getOwnPropertyDescriptor(i,l)?.enumerable)throw new Error(`Unrecognized key: "${String(l)}"`);r[l]&&s.push(l)}return s}function u4(e,r){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Sd(e,r)),d={};return Qi(d,e,Reflect.ownKeys(xa(e)).filter(f=>!c.has(f))),gi(e,Wn(i,{shape:d,checks:[]}))}function d4(e,r){if(!io(r))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const l=xa(e);for(const c of Reflect.ownKeys(r))if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return gi(e,Wn(e._zod.def,{shape:Uw(e,r)}))}function Uw(e,r){const i={};return Qi(i,e,Reflect.ownKeys(xa(e))),n4(i,r),i}function f4(e,r){if(!io(r))throw new Error("Invalid input to safeExtend: expected a plain object");return gi(e,Wn(e._zod.def,{shape:Uw(e,r)}))}function h4(e,r){if(!r?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const i={};Qi(i,e,Reflect.ownKeys(xa(e))),Qi(i,r,Reflect.ownKeys(xa(r)));const s=Wn(e._zod.def,{shape:i,get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return gi(e,s)}function mx(e,r,i,s="partial"){const c=r._zod.def.checks;if(c&&c.length>0)throw new Error(`.${s}() cannot be used on object schemas containing refinements`);const f=i?new Set(Sd(r,i)):void 0,m={};return Qi(m,r,Reflect.ownKeys(xa(r)),e&&((g,v)=>f&&!f.has(v)?g:new e({type:"optional",innerType:g}))),gi(r,Wn(r._zod.def,{shape:m,checks:[]}))}function m4(e,r,i){const s=i?new Set(Sd(r,i)):void 0,l={};return Qi(l,r,Reflect.ownKeys(xa(r)),(c,d)=>s&&!s.has(d)?c:new e({type:"nonoptional",innerType:c})),gi(r,Wn(r._zod.def,{shape:l}))}function va(e,r=0){if(e.aborted===!0)return!0;for(let i=r;i{var s;return(s=i).path??(s.path=[]),i.path.unshift(e),i})}function hl(e){return typeof e=="string"?e:e?.message}function px(e){const r=[];for(const i of e??[]){const s=i._zod.def;if(!/_(length|size)$|_equals$/.test(s.check))break;const l=s.maximum??s.length??s.size;l>=0&&r.push([l,i])}return r}function sp(e,r,i){var s;for(let l=r;le;return r[E4]=!0,r}var gx;const vm={value:void 0,enumerable:!1};let yx="captureStackTrace"in Error?Error:null;function k4(e){const r=yx;if(r){const i=r.stackTraceLimit;if(typeof i=="number"){try{r.stackTraceLimit=0}catch{return yx=null,new e}try{return new e}finally{r.stackTraceLimit=i}}}return new e}function ae(e,r,i,s){const l={};function c(x){this.def=x,this.constr=y,this.traits=new Set}c.prototype=l;const d=i,f=d&&new WeakSet;function m(x,w){if(x._zod){if(x._zod.traits.has(e))return}else{vm.value=new c(w);try{Object.defineProperty(x,"_zod",vm)}finally{vm.value=void 0}}if(x._zod.traits.add(e),r(x,w),f){const _=Object.getPrototypeOf(x),N=x._zod.constr.prototype;let H=_;for(;H&&H!==N;)H=Object.getPrototypeOf(H);const O=H??_;f.has(O)||(f.add(O),v4(O,d))}const E=y.prototype;for(const _ in E)Object.prototype.hasOwnProperty.call(E,_)&&(_ in x||(x[_]=E[_].bind(x)))}const g=s?.Parent??Object;class v extends g{}Object.defineProperty(v,"name",{value:e});function y(x){const w=s?.Parent?k4(v):this;m(w,x);const E=w._zod.deferred;if(E){for(const N of E)N();w._zod.deferred=void 0}const _=globalThis.__zod_globalConfig?.postProcessor;return _&&_(w),w}return Object.defineProperty(y,"init",{value:m}),Object.defineProperty(y,Symbol.hasInstance,{value:x=>s?.Parent&&x instanceof s.Parent?!0:x?._zod?.traits?.has(e)}),Object.defineProperty(y,"name",{value:e}),y}class Ki extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $w extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}(gx=globalThis).__zod_globalConfig??(gx.__zod_globalConfig={});const Rr=globalThis.__zod_globalConfig;function Wr(e){return e&&Object.assign(Rr,e),Rr}function _4(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,ip,2)),e.message}function N4(e){this._zod.message=e}const C4={get:_4,set:N4,enumerable:!0,configurable:!0},bm={value:void 0,enumerable:!1},vx=new WeakSet([Object.prototype,Error.prototype]),j4=(e,r)=>{e.name="$ZodError",bm.value=r,Object.defineProperty(e,"issues",bm),bm.value=void 0,Object.defineProperty(e,"message",C4);const i=Object.getPrototypeOf(e);vx.has(i)||(vx.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){const s=()=>this.message;return Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0})}}))},R4=ae("$ZodError",j4);function A4(e,r,i){return Object.prototype.hasOwnProperty.call(e,r)||(r==="__proto__"?Object.defineProperty(e,r,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[r]=i()),e[r]}function O4(e,r=i=>i.message){const i={},s=[];for(const l of e.issues)l.path.length>0?A4(i,l.path[0],()=>[]).push(r(l)):s.push(r(l));return{formErrors:s,fieldErrors:i}}function M4(e,r=i=>i.message){const i={_errors:[]},s=(l,c=[])=>{for(const d of l.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>s({issues:f},[...c,...d.path]));else if(d.code==="invalid_key")s({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")s({issues:d.issues},[...c,...d.path]);else{const f=[...c,...d.path];if(f.length===0)i._errors.push(r(d));else{let m=i,g=0;for(;g{const r=(i,s,l,c)=>{const d=l?{...l,async:!1}:{async:!1},f=i._zod.run({value:s,issues:[]},d);if(f instanceof Promise)throw new Ki;if(f.issues.length){const m=new(c?.Err??e)(f.issues.map(g=>hi(g,d,Wr())));throw zw(m,c?.callee??r),m}return f.value};return r},Xp=e=>{const r=async(i,s,l,c)=>{const d=l?{...l,async:!0}:{async:!0};let f=i._zod.run({value:s,issues:[]},d);if(f instanceof Promise&&(f=await f),f.issues.length){const m=new(c?.Err??e)(f.issues.map(g=>hi(g,d,Wr())));throw zw(m,c?.callee??r),m}return f.value};return r},Jp=e=>(r,i,s)=>{const l=s?{...s,async:!1}:{async:!1},c=r._zod.run({value:i,issues:[]},l);if(c instanceof Promise)throw new Ki;return c.issues.length?qw(e,c.issues,l):{success:!0,data:c.value}};function qw(e,r,i){let s;return{success:!1,get error(){return s||(s=new e(r.map(l=>hi(l,i,Wr()))),r=void 0,i=void 0),s},set error(l){s=l,r=void 0,i=void 0}}}const Wp=e=>async(r,i,s)=>{const l=s?{...s,async:!0}:{async:!0};let c=r._zod.run({value:i,issues:[]},l);return c instanceof Promise&&(c=await c),c.issues.length?qw(e,c.issues,l):{success:!0,data:c.value}},z4=Symbol.for("zod.compile.invalid"),D4=Symbol.for("zod.compile.fallback"),L4=((e,r,i)=>{const s=e._zod.bag.validator;if(s!==void 0){if(s(r)!==z4)return!0;if(s.definite===!0&&i===void 0)return!1}return B4(e,r,i)});function B4(e,r,i){const s=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},l=e._zod.bag.fallbackRun;let c;if(l?(s[D4]=!0,c=l({value:r,issues:[]},s)):c=e._zod.run({value:r,issues:[]},s),c instanceof Promise)throw new Ki;return c.issues.length===0}const U4=async(e,r,i)=>{const s=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let l=e._zod.run({value:r,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length===0},H4=e=>{const r=Qp(e),i=(s,l,c,d)=>{const f=c?{...c,direction:"backward"}:{direction:"backward"};return r(s,l,f,Ed(i,d))};return i},P4=e=>{const r=Qp(e),i=(s,l,c,d)=>r(s,l,c,Ed(i,d));return i},$4=e=>{const r=Xp(e),i=async(s,l,c,d)=>{const f=c?{...c,direction:"backward"}:{direction:"backward"};return await r(s,l,f,Ed(i,d))};return i},q4=e=>{const r=Xp(e),i=async(s,l,c,d)=>await r(s,l,c,Ed(i,d));return i},Z4=e=>(r,i,s)=>{const l=s?{...s,direction:"backward"}:{direction:"backward"};return Jp(e)(r,i,l)},I4=e=>(r,i,s)=>Jp(e)(r,i,s),F4=e=>async(r,i,s)=>{const l=s?{...s,direction:"backward"}:{direction:"backward"};return Wp(e)(r,i,l)},V4=e=>async(r,i,s)=>Wp(e)(r,i,s),Y4=/^[cC][0-9a-z]{6,}$/,G4=/^[0-9a-z]+$/,K4=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Q4=/^[0-9a-vA-V]{20}$/,X4=/^[A-Za-z0-9]{27}$/,J4=/^[a-zA-Z0-9_-]{21}$/;function W4(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const eN=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tN=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89)DELIM" -R"DELIM(abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nN=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rN="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function aN(){return new RegExp(rN,"u")}const iN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,sN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,oN=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cN=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uN=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,dN=/^https?$/,fN=/^\+[1-9]\d{6,14}$/,Zw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function hN(e){return new RegExp(`^${e}$`)}const mN=hN(Zw);function op(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${r}:[0-5]\\d(?:\\.\\d+)?`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function pN(e){return new RegExp(`^${op(e)}$`)}function gN(e){const r=["Z"];e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${op({precision:e.precision,seconds:!0})}(?:${r.join("|")})`,s=e.local?`${i}|${op({precision:e.precision})}`:i;return new RegExp(`^${Zw}T(?:${s})$`)}const yN=/^[\s\S]{0,}$/,vN=/^-?\d+$/,eg=/^-?\d+(?:\.\d+)?$/,bN=/^(?:true|false)$/i,xN=/^[^A-Z]*$/,wN=/^[^a-z]*$/,qn=ae("$ZodCheck",(e,r)=>{var i;e._zod??(e._zod={}),e._zod.def=r,(i=e._zod).onattach??(i.onattach=[])}),tg=e=>{const r=e.value;return!e4(r)&&r.length!==void 0},id={number:"number",bigint:"bigint",object:"date"},Iw=ae("$ZodCheckLessThan",(e,r)=>{qn.init(e,r);const i=id[typeof r.value];e._zod.check=s=>{(r.inclusive?s.value<=r.value:s.value{qn.init(e,r);const i=id[typeof r.value];e._zod.check=s=>{(r.inclusive?s.value>=r.value:s.value>r.value)||s.issues.push({origin:id[typeof s.value]??i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:s.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),SN=ae("$ZodCheckMultipleOf",(e,r)=>{qn.init(e,r),e._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?r.value!==BigInt(0)&&i.value%r.value===BigInt(0):t4(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:e,continue:!r.abort})}}),EN=ae("$ZodCheckNumberFormat",(e,r)=>{qn.init(e,r),r.format=r.format||"float64";const i=r.format?.includes("int"),s=i?"int":"number",[l,c]=Bw[r.format];e._zod.check=d=>{const f=d.value;if(i){if(!Number.isInteger(f)){d.issues.push({expected:s,format:r.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?d.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!r.abort}):d.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!r.abort});return}}fc&&d.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!r.abort})}}),TN=ae("$ZodCheckMaxLength",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=tg),e._zod.check=s=>{const l=s.value,c=l.length;if((typeof l=="string"&&c>r.maximum?Gp(l):c)<=r.maximum)return;const f=Kp(l);s.issues.push({origin:f,code:"too_big",maximum:r.maximum,inclusive:!0,input:l,inst:e,continue:!r.abort})}}),kN=ae("$ZodCheckMinLength",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=tg),e._zod.check=s=>{const l=s.value,c=l.length;if((typeof l=="string"&&c>=r.minimum&&c=r.minimum)return;const f=Kp(l);s.issues.push({origin:f,code:"too_small",minimum:r.minimum,inclusive:!0,input:l,inst:e,continue:!r.abort})}}),_N=ae("$ZodCheckLengthEquals",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=tg),e._zod.check=s=>{const l=s.value,c=l.length,d=typeof l=="string"&&c>=r.length&&c<=r.length*2?Gp(l):c;if(d===r.length)return;const f=Kp(l),m=d>r.length;s.issues.push({origin:f,...m?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!r.abort})}}),Td=ae("$ZodCheckStringFormat",(e,r)=>{var i,s;qn.init(e,r),r.pattern?(i=e._zod).check??(i.check=l=>{r.pattern.lastIndex=0,!r.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:r.format,input:l.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(s=e._zod).check??(s.check=()=>{})}),NN=ae("$ZodCheckRegex",(e,r)=>{Td.init(e,r),e._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),CN=ae("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=xN),Td.init(e,r)}),jN=ae("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=wN),Td.init(e,r)}),RN=ae("$ZodCheckIncludes",(e,r)=>{qn.init(e,r);const i=so(r.includes),s=new RegExp(typeof r.position=="number"?`^.{${r.position},}${i}`:i);r.pattern=s,e._zod.check=l=>{l.value.includes(r.includes,r.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:l.value,inst:e,continue:!r.abort})}}),AN=ae("$ZodCheckStartsWith",(e,r)=>{qn.init(e,r);const i=new RegExp(`^${so(r.prefix)}.*`);r.pattern??(r.pattern=i),e._zod.check=s=>{s.value.startsWith(r.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:s.value,inst:e,continue:!r.abort})}}),ON=ae("$ZodCheckEndsWith",(e,r)=>{qn.init(e,r);const i=new RegExp(`.*${so(r.suffix)}$`);r.pattern??(r.pattern=i),e._zod.check=s=>{s.value.endsWith(r.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:s.value,inst:e,continue:!r.abort})}}),MN=ae("$ZodCheckOverwrite",(e,r)=>{qn.init(e,r),e._zod.check=i=>{i.value=r.tx(i.value)}});class zN{constructor(r=[],i={}){this.content=[],this.indent=0,this.args=r,this.closed=i}indented(r){this.indent+=1;try{r(this)}finally{this.indent-=1}}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const s=r.split(` +`+o.stack}}var bo=Object.prototype.hasOwnProperty,Zn=e.unstable_scheduleCallback,ts=e.unstable_cancelCallback,nc=e.unstable_shouldYield,rc=e.unstable_requestPaint,_n=e.unstable_now,ac=e.unstable_getCurrentPriorityLevel,vi=e.unstable_ImmediatePriority,xo=e.unstable_UserBlockingPriority,ka=e.unstable_NormalPriority,Ld)DELIM" +R"DELIM(=e.unstable_LowPriority,wo=e.unstable_IdlePriority,Ud=e.log,ic=e.unstable_setDisableYieldValue,Or=null,Jt=null;function br(t){if(typeof Ud=="function"&&ic(t),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(Or,t)}catch{}}var Nn=Math.clz32?Math.clz32:D,Hd=Math.log,A=Math.LN2;function D(t){return t>>>=0,t===0?32:31-(Hd(t)/A|0)|0}var I=256,ue=262144,de=4194304;function Te(t){var n=t&42;if(n!==0)return n;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Se(t,n,a){var o=t.pendingLanes;if(o===0)return 0;var u=0,h=t.suspendedLanes,b=t.pingedLanes;t=t.warmLanes;var S=o&134217727;return S!==0?(o=S&~h,o!==0?u=Te(o):(b&=S,b!==0?u=Te(b):a||(a=S&~t,a!==0&&(u=Te(a))))):(S=o&~h,S!==0?u=Te(S):b!==0?u=Te(b):a||(a=o&~t,a!==0&&(u=Te(a)))),u===0?0:n!==0&&n!==u&&(n&h)===0&&(h=u&-u,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:u}function Ne(t,n){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&n)===0}function Ee(t,n){(n&8)!==0&&(n|=n&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=n;0a;a++)n.push(t);return n}function ze(t,n){t.pendingLanes|=n,n!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function lt(t,n,a,o,u,h){var b=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var S=t.entanglements,C=t.expirationTimes,U=t.hiddenUpdates;for(a=b&~a;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yd=!1;if(aa)try{var To={};Object.defineProperty(To,"passive",{get:function(){Yd=!0}}),window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{Yd=!1}var Ca=null,Gd=null,uc=null;function ey(){if(uc)return uc;var t,n=Gd,a=n.length,o,u="value"in Ca?Ca.value:Ca.textContent,h=u.length;)DELIM" +R"DELIM(for(t=0;t=No),sy=" ",oy=!1;function ly(t,n){switch(t){case"keyup":return G2.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var cs=!1;function Q2(t,n){switch(t){case"compositionend":return cy(n);case"keypress":return n.which!==32?null:(oy=!0,sy);case"textInput":return t=n.data,t===sy&&oy?null:t;default:return null}}function X2(t,n){if(cs)return t==="compositionend"||!Wd&&ly(t,n)?(t=ey(),uc=Gd=Ca=null,cs=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function yy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vy(t,n){var a=yy(t);t=0;for(var o;a;){if(a.nodeType===3){if(o=t+a.textContent.length,t<=n&&o>=n)return{node:a,offset:n-t};t=o}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=yy(a)}}function by(t,n){return t&&n?t===n?!0:t&&t.nodeType===3?!1:n&&n.nodeType===3?by(t,n.parentNode):"contains"in t?t.contains(n):t.compareDocumentPosition?!!(t.compareDocumentPosition(n)&16):!1:!1}function xy(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var n=nf(t.document);n instanceof t.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)t=n.contentWindow;else break;n=nf(t.document)}return n}function rf(t){var n=t&&t.nodeName&&t.nodeName.toLowerCase();return n&&(n==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||n==="textarea"||t.contentEditable==="true")}var iT=aa&&"documentMode"in document&&11>=document.documentMode,us=null,af=nul)DELIM" +R"DELIM(l,Ao=null,sf=!1;function wy(t,n,a){var o=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;sf||us==null||us!==nf(o)||(o=us,"selectionStart"in o&&rf(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ao&&Ro(Ao,o)||(Ao=o,o=pu(af,"onSelect"),0>=b,u-=b,Ur=1<<32-Nn(n)+u|a<Le?(Vt=Oe,Oe=null):Vt=Oe.sibling;var nt=B(L,Oe,q[Le],te);if(nt===null){Oe===null&&(Oe=Vt);break}t&&Oe&&nt.alternate===null&&n(L,Oe),M=h(nt,M,Le),We===null?we=nt:We.sibling=nt,We=nt,Oe=Vt}if(Le===q.length)return a(L,Oe),Ke&&la(L,Le),we;if(Oe===null){for(;LeLe?(Vt=Oe,Oe=null):Vt=Oe.sibling;var Wa=B(L,Oe,nt.value,te);if(Wa===null){Oe===null&&(Oe=Vt);break}t&&Oe&&Wa.alternate===null&&n(L,Oe),M=h(Wa,M,Le),We===null?we=Wa:We.sibling=Wa,We=Wa,Oe=Vt}if(nt.done)return a(L,Oe),Ke&&la(L,Le),we;if(Oe===null){for(;!nt.done;Le++,nt=q.next())nt=ne(L,nt.value,te),nt!==null&&(M=h(nt,M,Le),We===null?we=nt:We.sibling=nt,We=nt);return Ke&&la(L,Le),we}for(Oe=o(Oe);!nt.done;Le++,nt=q.next())nt=Z(Oe,L,Le,nt.value,te),nt!==null&&(t&&(Vt=nt.alternate,Vt!==null&&Oe.delete(Vt.key===null?Le:Vt.key)),M=h(nt,M,Le),We===null?we=nt:We.sibling=nt,We=nt);return t&&Oe.forEach(function(Qk){return n(L,Qk)}),Ke&&la(L,Le),we}function Fe(L,M,q,te){if(typeof q=="object"&&q!==null&&q.type===F&&q.key===null&&q.props.ref===void 0&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case z:e:{for(var we=q.key;M!==null;){if(M.key===we){if(we=q.type,we===F){if(M.tag===7){a(L,M.sibling),te=u(M,q.props.children),za(te,q),te.return=L,L=te;break e}}else if(M.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===ye&&Ai(we)===M.type){a(L,M.sibling),te=u(M,q.props),za(te,q),te.return=L,L=te;break e}a(L,M);break}else n(L,M);M=M.sibling}q.type===F?(te=Ti(q.props.children,L.mode,te,q.key),za(te,q),te.return=L,L=te):(te=xc(q.type,q.key,q.props,null,L.mode,te),za(te,q),te.return=L,L=te)}return b(L);case P:e:{for(we=q.key;M!==null;){if(M.key===we)if(M.tag===4&&M.stateNode.containerInfo===q.containerInfo&&M.stateNode.implementation===q.implementation){a(L,M.sibling),te=u(M,q.children||[]),te.return=L,L=te;break e}else{a(L,M);break}else n(L,M);M=M.sibling}te=hf(q,L.mode,te),te.return=L,L=te}return b(L);case ye:return q=Ai(q),Fe(L,M,q,te)}if(me(q))return ve(L,M,q,te);if(ee(q)){if(we=ee(q),typeof we!="function")throw Error(s(150));return q=we.call(q),ke(L,M,q,te)}if(typeof q.then=="function")return Fe(L,M,Rc(q),te);if(q.$$typeof===re)return Fe(L,M,_c(L,q),te);Ac(L,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,M!==null&&M.tag===6?(a(L,M.sibling),te=u(M,q),te.return=L,L=te):(a(L,M),te=ff(q,L.mode,te),te.return=L,L=te),b(L)):a(L,M)}return function(L,M,q,te){try{Lo=0;var we=Fe(L,M,q,te);return bs=null,we}catch(Oe){if(Oe===vs||Oe===Cc)throw Oe;var We=Bn(29,Oe,null,L.mode);return We.lanes=te,We.return=L,We}}}var Mi=Fy(!0),Vy=Fy(!1),Da=!1;function Ef(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tf(t,n){t=t.updateQueue,n.updateQueue===t&&(n.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ba(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function La(t,n,a){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(ft&2)!==0){var u=o.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),o.pending=n,n=bc(t),jy(t,null,a),n}return vc(t,o,n,a),bc(t)}function Uo(t,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,Bt(t,a)}}function kf(t,n){var a=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,a===o)){var u=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?u=h=b:h=h.next=b,a=a.next}while(a!==null);h===null?u=h=n:h=h.next=n}else u=h=n;a={baseState:o.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:o.shared,callbacks:o.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=n:t.next=n,a.lastBaseUpdate=n}var _f=!1;function Ho(){if(_f){var t=ys;if(t!==null)throw t}}function Po(t,n,a,o){_f=!1;var u=t.updateQueue;Da=!1;var h=u.firstBaseUpdate,b=u.lastBaseUpdate,S=u.shared.pending;if(S!==null){u.shared.pending=null;var C=S,U=C.next;C.next=null,b===null?h=U:b.next=U,b=C;var V=t.alternate;V!==null&&(V=V.updateQueue,S=V.lastBaseUpdate,S!==b&&(S===null?V.firstBaseUpdate=U:S.next=U,V.lastBaseUpdate=C))}if(h!==null){var ne=u.baseState;b=0,V=U=C=null,S=h;do{var B=S.lane&-536870913,Z=B!==S.lane;if(Z?(Je&B)===B:(o&B)===B){B!==0&&B===ji&&(_f=!0),V!==null&&(V=V.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ve=t,ke=S;B=n;var Fe=a;switch(ke.tag){case 1:if(ve=ke.payload,typeof ve=="function"){ne=ve.call(Fe,ne,B);break e}ne=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=ke.payload,B=typeof ve=="function"?ve.call(Fe,ne,B):ve,B==null)break e;ne=R({},ne,B);break e;case 2:Da=!0}}B=S.callback,B!==null&&(t.flags|=64,Z&&(t.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[B]:Z.push(B))}else Z={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},V===null?(U=V=Z,C=ne):V=V.next=Z,b|=B;if(S=S.next,S===null){if(S=u.shared.pending,S===null)break;Z=S,S=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);V===null&&(C=ne),u.baseState=C,u.firstBaseUpdate=U,u.lastBaseUpdate=V,h===null&&(u.shared.lanes=0),Ia|=b,t.lanes=b,t.memoizedState=ne}}function Yy(t,n){if(ty)DELIM" +R"DELIM(peof t!="function")throw Error(s(191,t));t.call(n)}function Gy(t,n){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;th?h:8;var b=W.T,S={};S.types=b!==null?b.types:null,W.T=S,Vf(t,!1,n,a);try{var C=u(),U=W.S;if(U!==null&&U(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var V=gT(C,o);Io(t,n,V,Qn(t))}else Io(t,n,o,Qn(t))}catch(ne){Io(t,n,{then:function(){},status:"rejected",reason:ne},Qn())}finally{le.p=h,b!==null&&S.types!==null&&(b.types=S.types),W.T=b}}function ST(){}function If(t,n,a,o){if(t.tag!==5)throw Error(s(476));var u=_v(t).queue;kv(t,u,n,be,a===null?ST:function(){return Nv(t),a(o)})}function _v(t){var n=t.memoizedState;if(n!==null)return n;n={memoizedState:be,baseState:be,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:be},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:a},next:null},t.memoizedState=n,t=t.alternate,t!==null&&(t.memoizedState=n),n}function Nv(t){var n=_v(t);n.next===null&&(n=t.alternate.memoizedState),Io(t,n.next.queue,{},Qn())}function Ff(){return dn($s)}function Cv(){return Ht().memoizedState}function jv(){return Ht().memoizedState}function ET(t){for(var n=t.return;n!==null;){switch(n.tag){case 24:case 3:var a=Qn();t=Ba(a);var o=La(n,t,a);o!==null&&(Pn(o,n,a),Uo(o,n,a)),n={cache:bf()},t.payload=n;return}n=n.return}}function TT(t,n,a){var o=Qn();a={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},$c(t)?Av(n,a):(a=uf(t,n,a,o),a!==null&&(Pn(a,t,o),Ov(a,n,o)))}function Rv(t,n,a){var o=Qn();Io(t,n,a,o)}function Io(t,n,a,o){var u={lane:o,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if($c(t))Av(n,u);else{var h=t.alternate;if(t.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,S=h(b,a);if(u.hasEagerState=!0,u.eagerState=S,Fn(S,b))return vc(t,n,u,0),xt===null&&yc(),!1}catch{}if(a=uf(t,n,u,o),a!==null)return Pn(a,t,o),Ov(a,n,o),!0}return!1}function Vf(t,n,a,o){if(o={lane:2,revertLane:Bh(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$c(t)){if(n)throw Error(s(479))}else n=uf(t,a,o,2),n!==null&&Pn(n,t,2)}function $c(t){var n=t.alternate;return t===Ie||n!==null&&n===Ie}function Av(t,n){xs=zc=!0;var a=t.pending;a===null?n.next=n:(n.next=a.next,a.next=n),t.pending=n}function Ov(t,n,a){if((a&4194048)!==0){var o=n.lanes;o&=t.pendingLanes,a|=o,n.lanes=a,Bt(t,a)}}var qc={readContext:dn,use:Lc,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useLayoutEffect:Lt,useInsertionEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useSyncExternalStore:Lt,useId:Lt,useHostTransitionStatus:Lt,useFormState:Lt,useActionState:Lt,useOptimistic:Lt,useMemoCache:Lt,useCacheRefresh:Lt,useEffectEvent:Lt},Mv={readContext:dn,use:Lc,useCallback:function(t,n){return jn().memoizedState=[t,n===void 0?null:n],t},useContext:dn,useEffect:gv,useImperativeHandle:function(t,n,a){a=a!=null?a.concat([t]):null,Hc(4194308,4,xv.bind(null,n,t),a)},useLayoutEffect:function(t,n){return Hc(4194308,4,t,n)},useInsertionEffect:function(t,n){Hc(4,2,t,n)},useMemo:function(t,n){var a=jn();n=n===void 0?null:n;var o=t();if(zi){br(!0);try{t()}finally{br(!1)}}return a.memoizedState=[o,n],o},useReducer:function(t,n,a){var o=jn();if(a!==void 0){var u=a(n);if(zi){br(!0);try{a(n)}finally{br(!1)}}}else u=n;return o.memoizedState=o.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},o.queue=t,t=t.dispatch=TT.bind(null,Ie,t),[o.memoizedState,t]},useRef:function(t){var n=jn();return t={current:t},n.memoizedState=t},useState:function(t){t=Hf(t);var n=t.queue,a=Rv.bind(null,Ie,n);return n.dispatch=a,[t.memoizedState,a]},useDebugValue:qf,useDeferredValue:function(t,n){var a=jn();return Zf(a,t,n)},useTransition:function(){var t=Hf(!1);return t=kv.bind(null,Ie,t.queue,!0,!1),jn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,n,a){var o=Ie,u=jn();if(Ke){if(a===void 0)throw Error(s(407));a=a()}else{if(a=n(),xt===null)throw Error(s(349));(Je&127)!==0||ev(o,n,a)}u.memoizedState=a;var h={value:a,getSnapshot:n};return u.queue=h,gv(nv.bind(null,o,h,t),[t]),o.flags|=2048,Ss(9,{destroy:void 0},tv.bind(null,o,h,a,n),null),a},useId:function(){var t=jn(),n=xt.identifierPrefix;if(Ke){var a=Hr,o=Ur;a=(o&~(1<<32-Nn(o)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Dc++,0<\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?h.multiple=!0:o.size&&(h.size=o.size);break;default:h=typeof o.is=="string"?b.createElement(u,{is:o.is}):b.createElement(u)}}h[kt]=n,h[Rt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;e:switch(pn(h,u,o),u){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ma(n)}}return Et(n),n.subtreeFlags&=-33554433,ih(n,n.type,t===null?null:t.memoizedProps,n.pendingProps,a),null;case 6:if(t&&n.stateNode!=null)t.memoizedProps!==o&&ma(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(s(166));if(t=Ye.current,gs(n)){if(t=n.stateNode,a=n.memoizedProps,o=null,u=nn,u!==null)switch(u.tag){case 27:case 5:o=u.memoizedProps}t[kt]=n,t=!!(t.nodeValue===a||o!==null&&o.suppressHydrationWarning===!0||nb(t.nodeValue,a)),t||Oa(n,!0)}else t=rl(t).createTextNode(o),t[kt]=n,n.stateNode=t}return Et(n),null;case 31:if(a=n.memoizedState,t===null||t.memoizedState!==null){if(o=gs(n),a!==null){if(t===null){if(!o)throw Error(s(318));if(t=n.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(s(557));t[kt]=n}else ki(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Et(n),t=!1}else a=gf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return n.flags&256?(Vn(n),n):(Vn(n),null);if((n.flags&128)!==0)throw Error(s(558))}return Et(n),null;case 13:if(o=n.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=gs(n),o!==null&&o.dehydrated!==null){if(t===null){if(!u)throw Error(s(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(s(317));u[kt]=n}else ki(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Et(n),u=!1}else u=gf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Vn(n),n):(Vn(n),null)}return Vn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=o!==null,t=t!==null&&t.memoizedState!==null,a&&(o=n.child,u=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(u=o.alternate.memoizedState.cachePool.pool),h=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(h=o.memoizedState.cachePool.pool),h!==u&&(o.flags|=2048)),a!==t&&a&&(n.child.flags|=8192),Gc(n,n.updateQueue),Et(n),null);case 4:return at(),t===null&&Ph(n.stateNode.containerInfo),n.flags|=67108864,Et(n),null;case 10:return ua(n.type),Et(n),null;case 19:if(Rf(n),o=n.memoizedState,o===null)return Et(n),null;if(u=(n.flags&128)!==0,h=o.rendering,h===null)if(u)Vo(o,!1);else{if(Ut!==0||t!==null&&(t.flags&128)!==0)for(t=n.child;t!==null;){if(h=Mc(t),h!==null){for(n.flags|=128,Vo(o,!1),t=h.updateQueue,n.updateQueue=t,Gc(n,t),n.subtreeFlags=0,t=a,a=n.child;a!==null;)Ry(a,t),a=a.sibling;return $o(n,hn.current&1|2),Ke&&la(n,o.treeForkCount),n.child}t=t.sibling}o.tail!==null&&_n()>su&&(n.flags|=128,u=!0,Vo(o,!1),n.lanes=4194304)}else{if(!u)if(t=Mc(h),t!==null){if(n.flags|=128,u=!0,t=t.updateQueue,n.updateQueue=t,Gc(n,t),Vo(o,!0),o.tail===null&&o.tailMode!=="collapsed"&&o.tailMode!=="visible"&&!h.alternate&&!Ke)return Et(n),null}else 2*_n()-o.renderingStartTime>su&&a!==536870912&&(n.flags|=128,u=!0,Vo(o,!1),n.lanes=4194304);o.isBackwards?(h.sibling=n.child,n.child=h):(t=o.last,t!==null?t.sibling=h:n.child=h,o.last=h)}if(o.tail!==null){t=o.tail;e:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return o.rendering=t,o.tail=t.sibling,o.renderingStartTime=_n(),t.sibling=null,h=hn.current,h=u?h&1|2:h&1,o.tailMode==="visible"||o.tailMode==="collapsed"||!a||Ke?$o(n,h):(a=h,Ue(fn,n),Ue(hn,a),Sn===null&&(Sn=n)),Ke&&la(n,o.treeForkCount),t}return Et(n),null;case 22:case 23:return Vn(n),Cf(),o=n.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(a&536870912)!==0&&(n.flags&128)===0&&(Et(n),n.subtreeFlags&6&&(n.flags|=8192)):Et(n),a=n.updateQueue,a!==null&&Gc(n,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==a&&(n.flags|=2048),t!==null&&Be(Ri),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),ua(Zt),Et(n),null;case 25:return null;case 30:return n.flags|=33554432,Et(n),null}throw Error(s(156,n.tag))}function AT(t,n){switch(mf(n),n.tag){case 1:return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 3:return ua(Zt),at(),t=n.flags,(t&65536)!==0&&(t&128)===0?(n.flags=t&-65537|128,n):null;case 26:case 27:case 5:return ln(n),null;case 31:if(n.memoizedState!==null){if(Vn(n),n.alternate===null)throw Error(s(340));ki()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 13:if(Vn(n),t=n.memoizedState,t!==null&&t.dehydrated!==null){if(n.alternate===null)throw Error(s(340));ki()}return t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 19:return Rf(n),t=n.flags,t&65536?(n.flags=t&-65537|128,t=n.memoizedState,t!==null&&(t.rendering=null,t.tail=null),n.flags|=4,n):null;case 4:return at(),null;case 10:return ua(n.type),null;case 22:case 23:return Vn(n),Cf(),t!==null&&Be(Ri),t=n.flags,t&65536?(n.flags=t&-65537|128,n):null;case 24:return ua(Zt),null;case 25:return null;default:return null}}function a0(t,n){switch(mf(n),n.tag){case 3:ua(Zt),at();break;case 26:case 27:case 5:ln(n);break;case 4:at();break;case 31:n.memoizedState!==null&&Vn(n);break;case 13:Vn(n);break;case 19:Rf(n);break;case 10:ua(n.type);break;case 22:case 23:Vn(n),Cf(),t!==null&&Be(Ri);break;case 24:ua(Zt)}}function Yo(t,n){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var u=o.next;a=u;do{if((a.tag&t)===t){o=void 0;var h=a.create,b=a.inst;o=h(),b.destroy=o}a=a.next}while(a!==u)DELIM" +R"DELIM()}}catch(S){yt(n,n.return,S)}}function $a(t,n,a){try{var o=n.updateQueue,u=o!==null?o.lastEffect:null;if(u!==null){var h=u.next;o=h;do{if((o.tag&t)===t){var b=o.inst,S=b.destroy;if(S!==void 0){b.destroy=void 0,u=n;var C=a,U=S;try{U()}catch(V){yt(u,C,V)}}}o=o.next}while(o!==h)}}catch(V){yt(n,n.return,V)}}function i0(t){var n=t.updateQueue;if(n!==null){var a=t.stateNode;try{Gy(n,a)}catch(o){yt(t,t.return,o)}}}function s0(t,n,a){a.props=Di(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(o){yt(t,n,o)}}function Pr(t,n){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:var u=t.stateNode,h=ia(t.memoizedProps,u);(u.ref===null||u.ref.name!==h)&&(u.ref=hb(h)),o=u.ref;break;case 7:if(t.stateNode===null){var b=new Xn(t);y(t.child,!1,wk,b,void 0,void 0),t.stateNode=b}o=t.stateNode;break;default:o=t.stateNode}typeof a=="function"?t.refCleanup=a(o):a.current=o}}catch(S){yt(t,n,S)}}function mn(t,n){var a=t.ref,o=t.refCleanup;if(a!==null)if(typeof o=="function")try{o()}catch(u){yt(t,n,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){yt(t,n,u)}else a.current=null}function Kc(t,n){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&n!==null)for(var a=0;a title"))),pn(o,n,a),o[kt]=t,Ze(o),n=o;break e;case"link":if(h=Rb("link","href",u).get(n+(a.href||""))){for(b=0;bFe&&(b=Fe,Fe=ke,ke=b);var L=vy(S,ke),M=vy(S,Fe);if(L&&M&&(Z.rangeCount!==1||Z.anchorNode!==L.node||Z.anchorOffset!==L.offset||Z.focusNode!==M.node||Z.focusOffset!==M.offset)){var q=ne.createRange();q.setStart(L.node,L.offset),Z.removeAllRanges(),ke>Fe?(Z.addRange(q),Z.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),Z.addRange(q))}}}}for(ne=[],Z=S;Z=Z.parentNode;)Z.nodeType===1&&ne.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;Sa?32:a,W.T=null,a=_h,_h=null;var h=Tr,b=Vr;if(At=0,Hi=Tr=null,Vr=0,(ft&6)!==0)throw Error(s(331));var S=ft;if(ft|=4,j0(h.current),_0(h,h.current,b,a),ft=S,el(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(Or,h)}catch{}return!0}finally{le.p=u,W.T=o,I0(t,n)}}function F0(t,n,a){n=ar(a,n),n=Kf(t.stateNode,n,2),t=La(t,n,2),t!==null&&(ze(t,2),Yr(t))}function yt(t,n,a){if(t.tag===3)F0(t,t,a);else for(;n!==null;){if(n.tag===3){F0(n,t,a);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fa===null||!Fa.has(o))){t=ar(a,t),a=$v(2),o=La(n,a,2),o!==null&&(qv(a,o,n,t),ze(o,2),Yr(o));break}}n=n.return}}function Mh(t,n,a){var o=t.pingCache;if(o===null){o=t.pingCache=new DT;var u=new Set;o.set(n,u)}else u=o.get(n),u===void 0&&(u=new Set,o.set(n,u));u.has(a)||(Eh=!0,u.add(a),t=ZT.bind(null,t,n,a),n.then(t,t))}function ZT(t,n,a){var o=t.pingCache;o!==null&&o.delete(n),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,xt===t&&(Je&a)===a&&((Ut===4||Ut===3&&(Je&62914560)===Je&&300>_n()-iu)&&(ft&2)===0?Ms(t,0):au|=a,Cs===Je&&(Cs=0)),Yr(t)}function V0(t,n){n===0&&(n=Ae()),t=Ei(t,n),t!==null&&(ze(t,n),Yr(t))}function IT(t){var n=t.memoizedState,a=0;n!==null&&(a=n.retryLane),V0(t,a)}function FT(t,n){var a=0;switch(t.tag){case 31:case 13:var o=t.stateNode,u=t.memoizedState;u!==null&&(a=u.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(n),V0(t,a)}function VT(t,n){return Zn(t,n)}var Ds=null,Bs=null,zh=!1,hu=!1,Dh=!1,Ya=0;function Yr(t){t!==Bs&&t.next===null&&(Bs===null?Ds=Bs=t:Bs=Bs.next=t),hu=!0,zh||(zh=!0,GT())}function el(t,n){if(!Dh&&hu){Dh=!0;do for(var a=!1,o=Ds;o!==null;){if(t!==0){var u=o.pendingLanes;if(u===0)var h=0;else{var b=o.suspendedLanes,S=o.pingedLanes;h=(1<<31-Nn(42|t)+1)-1,h&=u)DELIM" +R"DELIM(&~(b&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,Q0(o,h))}else h=Je,h=Se(o,o===xt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(h&3)===0||Ne(o,h)||(a=!0,Q0(o,h));o=o.next}while(a);Dh=!1}}function YT(){Y0()}function Y0(){hu=zh=!1;var t=0;Ya!==0&&ik()&&(t=Ya);for(var n=_n(),a=null,o=Ds;o!==null;){var u=o.next,h=G0(o,n);h===0?(o.next=null,a===null?Ds=u:a.next=u,u===null&&(Bs=a)):(a=o,(t!==0||(h&3)!==0)&&(hu=!0)),o=u}At!==0&&At!==5||el(t),Ya!==0&&(Ya=0)}function G0(t,n){for(var a=t.suspendedLanes,o=t.pingedLanes,u=t.expirationTimes,h=t.pendingLanes&-62914561;0S)break;var V=C.transferSize,ne=C.initiatorType;V&&rb(ne)&&(C=C.responseEnd,b+=V*(Cvu){ke.length=ve;break}q=new Promise(dk.bind(q)),ke.push(q)}}}if(0"u"?null:document;function _b(t,n,a){var o=Us;if(o&&typeof n=="string"&&n){var u=nr(n);u='link[rel="'+t+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),kb.has(u)||(kb.add(u),t={rel:t,crossOrigin:a,href:n},o.querySelector(u)===null&&(n=o.createElement("link"),pn(n,"link",t),Ze(n),o.head.appendChild(n)))}}function Rk(t){ga.D(t),_b("dns-prefetch",t,null)}function Ak(t,n){ga.C(t,n),_b("preconnect",t,n)}function Ok(t,n,a){ga.L(t,n,a);var o=Us;if(o&&t&&n){var u='link[rel="preload"][as="'+nr(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+nr(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+nr(a.imageSizes)+'"]')):u+='[href="'+nr(t)+'"]';var h=u;switch(n){case"style":h=Hs(t);break;case"script":h=Ps(t)}if(!(ur.has(h)||(t=R({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:t,as:n},a),ur.set(h,t),o.querySelector(u)!==null||n==="style"&&o.querySelector(il(h))||n==="script"&&o.querySelector(sl(h))))){var b=o.createElement("link");pn(b,"link",t),n==="style"&&(b[Ge]=!0,b.onload=b.onerror=function(){Br(b)}),Ze(b),o.head.appendChild(b)}}}function Mk(t,n){ga.m(t,n);var a=Us;if(a&&t){var o=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+nr(o)+'"][href="'+nr(t)+'"]',h=u;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ps(t)}if(!ur.has(h)&&(t=R({rel:"modulepreload",href:t},n),ur.set(h,t),a.querySelector(u)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sl(h)))return}o=a.createElement("link"),pn(o,"link",t),Ze(o),a.head.appendChild(o)}}}function zk(t,n,a){ga.S(t,n,a);var o=Us;if(o&&t){var u=Dr(o).hoistableStyles,h=Hs(t);n=n||"default";var b=u.get(h);if(!b){var S={loading:0,preload:null};if(b=o.querySelector(il(h)))S.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":n},a),(a=ur.get(h))&&nm(t,a);var C=b=o.createElement("link");Ze(C),pn(C,"link",t),C._p=new Promise(function(U,V){C.onload=U,C.onerror=V}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,gu(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:S},u.set(h,b)}}}function Dk(t,n){ga.X(t,n);var a=Us;if(a&&t){var o=Dr(a).hoistableScripts,u=Ps(t),h=o.get(u);h||(h=a.querySelector(sl(u)),h||(t=R({src:t,async:!0},n),(n=ur.get(u))&&rm(t,n),h=a.createElement("script"),Ze(h),pn(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(u,h))}}function Bk(t,n){ga.M(t,n);var a=Us;if(a&&t){var o=Dr(a).hoistableScripts,u=Ps(t),h=o.get(u);h||(h=a.querySelector(sl(u)),h||(t=R({src:t,async:!0,type:"module"},n),(n=ur.get(u))&&rm(t,n),h=a.createElement("script"),Ze(h),pn(h,"link",t),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},o.set(u,h))}}function Nb(t,n,a,o){var u=(u=Ye.current)?al(u):null;if(!u)throw Error(s(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=Hs(a.href),n=Dr(u).hoistableStyles,o=n.get(a),o||(o={type:"style",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Hs(a.href);var h=Dr(u).hoistableStyles,b=h.get(t);if(b||(u=u.ownerDocument||u,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(t,b),(h=u.querySelector(il(t)))?h._p||(b.instance=h,b.state.loading=5):(h=ur.get(t),h||(h={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ur.set(t,h)),Lk(u,t,h,b.state))),n&&o===null)throw Error(s(528,""));return b}if(n&&o!==null)throw Error(s(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(a=Ps(a),n=Dr(u).hoistableScripts,o=n.get(a),o||(o={type:"script",instance:null,count:0,state:null},n.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,t))}}function Hs(t){return'href="'+nr(t)+'"'}function il(t){return'link[rel="stylesheet"]['+t+"]"}function Cb(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function Lk(t,n,a,o){if(n=t.querySelector('link[rel="preload"][as="style"]['+n+"]")){if(n[Ge]!==!0){o.loading=1;return}}else n=t.createElement("link"),n[Ge]=!0,n.onload=n.onerror=Br.bind(null,n),pn(n,"link",a),Ze(n),t.head.appendChild(n);o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2})}function Ps(t){return'[src="'+nr(t)+'"]'}function sl(t){return"script[async]"+t}function jb(t,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var o=t.querySelector('style[data-href~="'+nr(a.href)+'"]');if(o)return n.instance=o,Ze(o),o;var u=R({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Ze(o),pn(o,"style",u),gu(o,a.precedence,t),n.instance=o;case"stylesheet":u=Hs(a.href);var h=t.querySelector(il(u));if(h)return n.state.loading|=4,n.instance=h,Ze(h),h;o=Cb(a),(u=ur.get(u))&&nm(o,u),h=(t.ownerDocument||t).createElement("link"),Ze(h);var b=h;return b._p=new Promise(function(S,C){b.onload=S,b.onerror=C}),pn(h,"link",o),n.state.loading|=4,gu(h,a.precedence,t),n.instance=h;case"script":return h=Ps(a.src),(u=t.querySelector(sl(h)))?(n.instance=u,Ze(u),u):(o=a,(u=ur.get(h))&&(o=R({},a),rm(o,u)),t=t.ownerDocument||t,u=t.createElement("script"),Ze(u),pn(u,"link",o),t.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(s(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,gu(o,a.precedence,t));return n.instance}function gu(t,n,a){for(var o=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=o.length?o[o.length-1]:null,h=u,b=0;b title"):null)}function Uk(t,n,a){if(a===1||n.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(t=n.disabled,typeof n.precedence=="string"&&t==null):)DELIM" +R"DELIM(!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ab(t,n){return t==="img"&&n.src!=null&&n.src!==""&&n.onLoad==null&&n.loading!=="lazy"}function Ob(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Mb(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function zb(t,n){typeof n.decode=="function"&&(t.imgCount++,n.complete||(t.imgBytes+=Mb(n),t.suspenseyImages.push(n)),t=$k.bind(t),n.decode().then(t,t))}function Hk(t,n,a,o){if(a.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Hs(o.href),h=n.querySelector(il(u));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(t.count++,t=ol.bind(t),n.then(t,t)),a.state.loading|=4,a.instance=h,Ze(h);return}h=n.ownerDocument||n,o=Cb(o),(u=ur.get(u))&&nm(o,u),h=h.createElement("link"),Ze(h);var b=h;b._p=new Promise(function(S,C){b.onload=S,b.onerror=C}),pn(h,"link",o),a.instance=h}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ol.bind(t),n.addEventListener("load",a),n.addEventListener("error",a))}}var vu=0;function Pk(t,n){return t.stylesheets&&t.count===0&&xu(t,t.stylesheets),0vu?50:800)+n);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(u)}}:null}function Db(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)xu(t,t.stylesheets);else if(t.unsuspend){var n=t.unsuspend;t.unsuspend=null,n()}}}function ol(){this.count--,Db(this)}function $k(){this.imgCount--,Db(this)}var bu=null;function xu(t,n){t.stylesheets=null,t.unsuspend!==null&&(t.count++,bu=new Map,n.forEach(qk,t),bu=null,ol.call(t))}function qk(t,n){if(!(n.state.loading&4)){var a=bu.get(t);if(a)var o=a.get(null);else{a=new Map,bu.set(t,a);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(r){console.error(r)}}return e(),hm.exports=i_(),hm.exports}var o_=s_();const l_=Bp(o_),c_=[{id:"current",label:"Classic"},{id:"light",label:"Light"},{id:"midnight",label:"Midnight"}],Up="libbitcoinTheme",ad="libbitcoin-theme-change";function Hp(e){return e==="light"||e==="midnight"?e:"current"}function bw(){try{return Hp(localStorage.getItem(Up))}catch{return"current"}}function Pp(e){document.documentElement.dataset.theme=e;const r=getComputedStyle(document.documentElement).getPropertyValue("--theme-background").trim();r&&document.querySelector('meta[name="theme-color"]')?.setAttribute("content",r)}function u_(){Pp(bw()),globalThis.addEventListener("storage",h_)}function d_(e){const r=Hp(e);Pp(r);try{localStorage.setItem(Up,r)}catch{}globalThis.dispatchEvent(new Event(ad))}function f_(){return Hp(document.documentElement.dataset.theme)}function h_(e){e.key!==null&&e.key!==Up||(Pp(bw()),globalThis.dispatchEvent(new Event(ad)))}function m_(e){return globalThis.addEventListener(ad,e),()=>{globalThis.removeEventListener(ad,e)}}function p_(){return T.useSyncExternalStore(m_,f_,()=>"current")}const xw=T.createContext(void 0),ww=e=>{const r=T.useContext(xw);if(!r)throw new Error("No QueryClient set, use QueryClientProvider to set one");return r},g_=({client:e,children:r})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(xw.Provider,{value:e,children:r})),y_={setTimeout:(e,r)=>setTimeout(e,r),clearTimeout:e=>clearTimeout(e),setInterval:(e,r)=>setInterval(e,r),clearInterval:e=>clearInterval(e)};var v_=class{#e=y_;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,r){return this.#e.setTimeout(e,r)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,r){return this.#e.setInterval(e,r)}clearInterval(e){this.#e.clearInterval(e)}};const Fi=new v_;function b_(e){setTimeout(e,0)}const x_=typeof window>"u"||"Deno"in globalThis;function $n(){}function w_(e,r){return typeof e=="function"?e(r):e}function Sw(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ew(e,r){return Math.max(e+(r||0)-Date.now(),0)}function Nt(e,r){return typeof e=="function"?e(r):e}function ix(e,r){const{type:i="all",exact:s,fetchStatus:l,predicate:c,queryKey:d,stale:f}=e;if(d){if(s){if(r.queryHash!==$p(d,r.options))return!1}else if(!ao(r.queryKey,d))return!1}if(i!=="all"){const m=r.isActive();if(i==="active"&&!m||i==="inactive"&&m)return!1}return!(typeof f=="boolean"&&r.isStale()!==f||l&&l!==r.state.fetchStatus||c&&!c(r))}function sx(e,r){const{exact:i,status:s,predic)DELIM" +R"DELIM(ate:l,mutationKey:c}=e;if(c){if(!r.options.mutationKey)return!1;if(i){if(Ll(r.options.mutationKey)!==Ll(c))return!1}else if(!ao(r.options.mutationKey,c))return!1}return!(s&&r.state.status!==s||l&&!l(r))}function $p(e,r){return(r?.queryKeyHashFn||Ll)(e)}function Ll(e){return JSON.stringify(e,(r,i)=>tp(i)?Object.keys(i).sort().reduce((s,l)=>(s[l]=i[l],s),{}):i)}function ao(e,r){if(e===r)return!0;if(typeof e!=typeof r)return!1;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(Array.isArray(e)&&Array.isArray(r)){if(r.length>e.length)return!1;for(let s=0;s500)return r;const s=ox(e)&&ox(r);if(!s&&!(tp(e)&&tp(r)))return r;const l=(s?e:Object.keys(e)).length,c=s?r:Object.keys(r),d=c.length,f=s?new Array(d):{};let m=0;for(let g=0;g{Fi.setTimeout(r,e)})}function np(e,r,i){return typeof i.structuralSharing=="function"?i.structuralSharing(e,r):i.structuralSharing!==!1?kw(e,r):r}function E_(e,r,i=0){const s=[...e,r];return i&&s.length>i?s.slice(-i):s}function T_(e,r,i=0){const s=[r,...e];return i&&s.length>i?s.slice(0,i):s}const qp=Symbol();function _w(e,r){return!e.queryFn&&r?.initialPromise?()=>r.initialPromise:!e.queryFn||e.queryFn===qp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Nw(e,r){return typeof e=="function"?e(...r):!!e}const Zp=Symbol();function k_(e,r,i,s){let l=!1,c;return Object.defineProperties(e,{[Zp]:{value:s},signal:{enumerable:!0,get:()=>(c??=r(),l||(l=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}}),e}let __=()=>x_;const Ip=()=>__();var Fl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},N_=class extends Fl{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const Fp=new N_,C_=b_;function j_(){let e=[],r=0,i=f=>{f()},s=f=>{f()},l=C_;const c=f=>{r?e.push(f):l(()=>{i(f)})},d=()=>{const f=e;e=[],f.length&&l(()=>{s(()=>{f.forEach(m=>{i(m)})})})};return{batch:f=>{let m;r++;try{m=f()}finally{r--,r||d()}return m},batchCalls:f=>(...m)=>{c(()=>{f(...m)})},schedule:c,setNotifyFunction:f=>{i=f},setBatchNotifyFunction:f=>{s=f},setScheduler:f=>{l=f}}}const bn=j_();var R_=class extends Fl{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&window.addEventListener){const r=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}};const id=new R_;function A_(e){return Math.min(1e3*2**e,3e4)}function Cw(e){return(e??"online")==="online"?id.isOnline():!0}var rp=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function jw(e){let r=!1,i=0,s,l="pending",c,d;const f=new Promise((O,se)=>{c=O,d=se});f.catch($n);const m=()=>l!=="pending",g=O=>{if(!m()){const se=new rp(O);_(se),e.onCancel?.(se)}},v=()=>{r=!0},y=()=>{r=!1},x=()=>Fp.isFocused()&&(e.networkMode==="always"||id.isOnline())&&e.canRun(),w=()=>Cw(e.networkMode)&&e.canRun(),E=O=>{m()||(s?.(),l="resolved",c(O))},_=O=>{m()||(s?.(),l="rejected",d(O))},N=O=>new Promise(se=>{s=ce=>{(m()||O())&&se(ce)},e.onPause?.()}).then(()=>{s=void 0,m()||e.onContinue?.()}),H=()=>{if(m())return;let O;const se=i===0?e.initialPromise:void 0;try{O=se??e.fn()}catch(ce){O=Promise.reject(ce)}Promise.resolve(O).then(E).catch(ce=>{if(m())return;const K=e.retry??(Ip()?0:3),oe=e.retryDelay??A_,R=typeof oe=="function"?oe(i,ce):oe,k=K===!0||typeof K=="number"&&im()||x()?void 0:N(x)).then(()=>{r?_(ce):H()})})};return{promise:f,status:()=>l,cancel:g,continue:()=>(s?.(),f),cancelRetry:v,continueRetry:y,canStart:w,start:()=>(w()?H():N(w).then(H),f)}}var Rw=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sw(this.gcTime)&&(this.#e=Fi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ip()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Fi.clearTimeout(this.#e),this.#e=void 0)}};function O_(e){return{onFetch:(r,i)=>{const s=r.options,l=r.fetchOptions?.meta?.fetchMore?.direction,c=r.state.data?.pages||[],d=r.state.data?.pageParams||[];let f={pages:[],pageParams:[]},m=0;const g=async()=>{let v=!1;const y=r,x=_=>{k_(_,()=>r.signal,()=>v=!0,y[Zp])},w=_w(r.options,r.fetchOptions),E=async(_,N,H)=>{if(v)return Promise.reject(r.signal.reason);if(N==null&&_.pages.length)return Promise.resolve(_);const se=(()=>{const R={client:r.client,queryKey:r.queryKey,pageParam:N,direction:H?"backward":"forward",meta:r.options.meta};return x(R),R})(),ce=await w(se),{maxPages:K}=r.options,oe=H?T_:E_;return{pages:oe(_.pages,ce,K),pageParams:oe(_.pageParams,N,K)}};if(l&&c.length){const _=l==="backward",N=_?M_:cx,H={pages:c,pageParams:d};f=await E(H,N(s,H),_)}else{const _=e??c.length;do{const N=m===0?d[0]===void 0?s.initialPageParam:d[0]:cx(s,f);if(m>0&&N==null)break;f=await E(f,N),m++}while(m<_)}return f};r.options.persister?r.fetchFn=()=>r.options.persister?.(g,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},i):r.fetchFn=g}}}function cx(e,{pages:r,pageParams:i}){const s=r.length-1;return r.length>0?e.getNextPageParam(r[s],r,i[s],i):void 0}function M_(e,{pages:r,pageParams:i}){return r.length>0?e.getPreviousPageParam?.(r[0],r,i[0],i):void 0}var z_=class extends Rw{#e;#t;#n;#r;#i;#a;#s;#l;#c;constructor(e){super(),this.#c=!1,this.#l=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=dx(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#l,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTim)DELIM" +R"DELIM(e),this.state&&this.state.data===void 0){const r=dx(this.options);r.data!==void 0&&(this.setState(ux(r.data,r.dataUpdatedAt)),this.#t=r)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,r){const i=np(this.state.data,e,this.options);return this.#o({data:i,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),i}setState(e){this.#o({type:"setState",state:e})}cancel(e){const r=this.#a?.promise;return this.#a?.cancel(e),r?r.then($n).catch($n):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Nt(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data===void 0?!1:this.getObserversCount()>0?this.observers.some(e=>Nt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!Ew(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const r=this.observers.indexOf(e);r!==-1&&(this.observers.splice(r,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,r){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#s)return this.#a.continueRetry(),this.#s}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(v=>v.options.queryFn);g&&this.setOptions(g.options)}const i=new AbortController,s=g=>{Object.defineProperties(g,{[Zp]:{value:i.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,i.signal)}})},l=()=>{const g=_w(this.options,r),y=(()=>{const x={client:this.#i,queryKey:this.queryKey,meta:this.meta};return s(x),x})();return this.#c=!1,this.options.persister?this.options.persister(g,y,this):g(y)},d=(()=>{const g={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:l};return s(g),g})();(this.#e==="infinite"?O_(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#o({type:"fetch",meta:d.fetchOptions?.meta});const f=this.#a=jw({initialPromise:r?.initialPromise,fn:d.fetchFn,onCancel:g=>{g instanceof rp&&g.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(g,v)=>{this.#o({type:"failed",failureCount:g,error:v})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}),m=(async()=>{try{const g=await f.promise;if(g===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(g),this.#r.config.onSuccess?.(g,this),this.#r.config.onSettled?.(g,this.state.error,this),g}catch(g){if(g instanceof rp){if(g.silent){if(this.#a!==f&&this.#s)return this.#s;throw g}else if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw this.#o({type:"error",error:g}),this.#r.config.onError?.(g,this),this.#r.config.onSettled?.(this.state.data,g,this),g}finally{this.#a===f&&(this.#a=void 0,this.#s=void 0),this.scheduleGc()}})();return this.#s=m,f.start(),m}#o(e){const r=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Aw(i.data,this.options),fetchMeta:e.meta??null};case"success":const s={...i,...ux(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?s:void 0,s;case"error":const l=e.error;return{...i,error:l,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=r(this.state),bn.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Aw(e,r){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cw(r.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ux(e,r){return{data:e,dataUpdatedAt:r??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dx(e){const r=typeof e.initialData=="function"?e.initialData():e.initialData,i=r!==void 0,s=i?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:r,dataUpdateCount:0,dataUpdatedAt:i?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var D_=class extends Fl{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#s;#l;#c;#o;#d;#f;#u;#m=new Set;constructor(e,r){super(),this.options=r,this.#e=e,this.#s=null,this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),fx(this.#t,this.options)?this.#h():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ap(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ap(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const r=this.options,i=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),r._defaulted&&!ym(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const s=this.hasListeners();s&&hx(this.#t,i,this.options,r)&&this.#h(),this.updateResult(),s&&(this.#t!==i||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||Nt(this.options.staleTime,this.#t)!==Nt(r.staleTime,this.#t))&&this.#g();const l=this.#y();s&&(this.#t!==i||Nt(this.options.enabled,this.#t)!==Nt(r.enabled,this.#t)||l!==this.#u)&&this.#v(l)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(r,e);return ym(this.getCurrentResult(),i)||(this.#r=i,this.#a=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#r}trackResult(e,r){return new Proxy(e,{get:(i,s)=>(this.trackProp(s),r?.(s),Reflect.get(i,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=this.#e.defaultQueryOptions(e),i=this.#e.getQueryCa)DELIM" +R"DELIM(che().build(this.#e,r);let s=()=>{},l;const c=new Promise(d=>{l=d,s=this.#e.getQueryCache().subscribe(f=>{f.type==="updated"&&f.query.queryHash===i.queryHash&&i.state.data!==void 0&&(s(),d(this.createResult(i,r)))})});return Promise.race([i.fetch(r).then(()=>{const d=this.createResult(i,r);return l?.(d),d}).finally(()=>{s()}),c])}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let r=this.#t.fetch(this.options,e);return e?.throwOnError||(r=r.catch($n)),r}#p(e){return!Ip()&&Nt(this.options.enabled,this.#t)!==!1&&Sw(e)}#g(){this.#x();const e=Nt(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#p(e))return;const r=Ew(this.#r.dataUpdatedAt,e)+1;this.#d=Fi.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return Nt(this.options.refetchInterval,this.#t)??!1}#v(e){this.#w(),this.#u=e,!(this.#u===0||!this.#p(this.#u))&&(this.#f=Fi.setInterval(()=>{(this.options.refetchIntervalInBackground||Fp.isFocused())&&this.#h()},this.#u))}#b(){this.#g(),this.#v(this.#y())}#x(){this.#d!==void 0&&(Fi.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Fi.clearInterval(this.#f),this.#f=void 0)}createResult(e,r){const i=this.#t,s=this.options,l=this.#r,c=this.#i,d=this.#a,f=e!==i?e.state:this.#n,{state:m}=e;let g={...m},v=!1,y;if(r._optimisticResults){const K=this.hasListeners(),oe=!K&&fx(e,r),R=K&&hx(e,i,r,s);(oe||R)&&(g={...g,...Aw(m.data,e.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:x,errorUpdatedAt:w,status:E}=g;y=g.data;let _=!1;if(r.placeholderData!==void 0&&y===void 0&&E==="pending"){let K;l?.isPlaceholderData&&r.placeholderData===d?.placeholderData?(K=l.data,_=!0):K=typeof r.placeholderData=="function"?r.placeholderData(this.#o?.state.data,this.#o):r.placeholderData,K!==void 0&&(E="success",y=np(l?.data,K,r),v=!0)}if(r.select&&y!==void 0&&!_)if(l&&y===c?.data&&r.select===this.#l)y=this.#c;else try{this.#l=r.select,y=r.select(y),y=np(l?.data,y,r),this.#c=y,this.#s=null}catch(K){this.#s=K}else y===void 0&&(this.#s=null);this.#s&&(x=this.#s,y=this.#c,w=l?.error===x?l.errorUpdatedAt:Date.now(),E="error",v=!1);const N=g.fetchStatus==="fetching",H=E==="pending",O=E==="error",se=H&&N,ce=y!==void 0;return{status:E,fetchStatus:g.fetchStatus,isPending:H,isSuccess:E==="success",isError:O,isInitialLoading:se,isLoading:se,data:y,dataUpdatedAt:g.dataUpdatedAt,error:x,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>f.dataUpdateCount||g.errorUpdateCount>f.errorUpdateCount,isFetching:N,isRefetching:N&&!H,isLoadingError:O&&!ce,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&ce,isStale:Vp(e,r),refetch:this.refetch,isEnabled:Nt(r.enabled,e)!==!1}}updateResult(){const e=this.#r,r=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#o=this.#t),ym(r,e))return;this.#r=r;const s=(()=>{if(!e)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!this.#m.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(const d of c??this.#m)if(this.#r[d]!==e[d])return!0;return!1})();bn.batch(()=>{s&&this.listeners.forEach(l=>{l(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const r=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(r?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function B_(e,r){return Nt(r.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Nt(r.retryOnMount,e)===!1)}function fx(e,r){return B_(e,r)||e.state.data!==void 0&&ap(e,r,r.refetchOnMount)}function ap(e,r,i){if(Nt(r.enabled,e)!==!1&&Nt(r.staleTime,e)!=="static"){const s=Nt(i,e);return s==="always"||s!==!1&&Vp(e,r)}return!1}function hx(e,r,i,s){return(e!==r||Nt(s.enabled,e)===!1)&&(!i.suspense||e.state.status!=="error")&&Vp(e,i)}function Vp(e,r){return Nt(r.enabled,e)!==!1&&e.isStaleByTime(Nt(r.staleTime,e))}var L_=class extends Rw{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||U_(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(r=>r!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){const r=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},s=this.#r=jw({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,f)=>{this.#i({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#i({type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),l=this.state.status==="pending",c=!s.canStart();try{if(l)r();else{this.#i({type:"pending",variables:e,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,i);const f=await this.options.onMutate?.(e,i);f!==this.state.context&&this.#i({type:"pending",context:f,variables:e,isPaused:c})}this.state.isPaused&&s.canStart()&&r();const d=await s.start();return await this.#n.config.onSuccess?.(d,e,this.state.context,this,i),await this.options.onSuccess?.(d,e,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,e,this.state.context,i),this.#i({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,e,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onError?.(d,e,this.state.context,i)}catch(f){Promise.reject(f)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(f){Promise.reject(f)}try{await this.options.onSettled?.(void 0,d,e,this.state.context,i)}catch(f){Promise.reject(f)}throw this.#i({type:"error",error:d}),d}finally{this.#r===s&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){const r=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),bn.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function U_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var H_=class extends Fl{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,r,i){const s=new L_({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(r),state:i});return this.add(s),s}add(e){this.#e.add(e);const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r);)DELIM" +R"DELIM(i?i.push(e):this.#t.set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r);if(i)if(i.length>1){const s=i.indexOf(e);s!==-1&&i.splice(s,1)}else i[0]===e&&this.#t.delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Nu(e);if(typeof r=="string"){const i=this.#t.get(r)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const r=Nu(e);return typeof r=="string"?this.#t.get(r)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){bn.batch(()=>{const e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(r=>{this.notify({type:"removed",mutation:r})})})}getAll(){return Array.from(this.#e)}find(e){const r={exact:!0,...e};return this.getAll().find(i=>sx(r,i))}findAll(e={}){return this.getAll().filter(r=>sx(e,r))}notify(e){bn.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return bn.batch(()=>Promise.all(e.map(r=>r.continue().catch($n))))}};function Nu(e){return e.options.scope?.id}var P_=class extends Fl{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,r,i){const s=r.queryKey,l=r.queryHash??$p(s,r);let c=this.get(l);return c||(c=new z_({client:e,queryKey:s,queryHash:l,options:e.defaultQueryOptions(r),state:i,defaultOptions:e.getQueryDefaults(s)}),this.add(c)),c}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){bn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const r={exact:!0,...e};return this.getAll().find(i=>ix(r,i))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(i=>ix(e,i)):r}notify(e){bn.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$_=class{#e;#t;#n;#r;#i;#a;#s;#l;constructor(e={}){this.#e=e.queryCache||new P_,this.#t=e.mutationCache||new H_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#s=Fp.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#l=id.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#s?.(),this.#s=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state.data}ensureQueryData(e){const r=this.defaultQueryOptions(e),i=this.#e.build(this,r),s=i.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&i.isStaleByTime(Nt(r.staleTime,i))&&this.prefetchQuery(r),Promise.resolve(s))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:r,state:i})=>[r,i.data])}setQueryData(e,r,i){const s=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(s.queryHash)?.state.data,c=w_(r,l);if(c!==void 0)return this.#e.build(this,s).setData(c,{...i,manual:!0})}setQueriesData(e,r,i){return bn.batch(()=>this.#e.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,r,i)]))}getQueryState(e){const r=this.defaultQueryOptions({queryKey:e});return this.#e.get(r.queryHash)?.state}removeQueries(e){const r=this.#e;bn.batch(()=>{r.findAll(e).forEach(i=>{r.remove(i)})})}resetQueries(e,r){const i=this.#e;return bn.batch(()=>{const s=i.findAll(e),l=new Set(s);return s.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>l.has(c)},r)})}cancelQueries(e,r={}){const i={revert:!0,...r},s=bn.batch(()=>this.#e.findAll(e).map(l=>l.cancel(i)));return Promise.all(s).then($n).catch($n)}invalidateQueries(e,r={}){return bn.batch(()=>(this.#e.findAll(e).forEach(i=>{i.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},r)))}refetchQueries(e,r={}){const i={...r,cancelRefetch:r.cancelRefetch??!0},s=bn.batch(()=>this.#e.findAll(e).filter(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,i);const d=l.state.fetchStatus==="paused";return(!i.throwOnError||d)&&(c=c.catch($n)),d?Promise.resolve():c}));return Promise.all(s).then($n)}async query(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const i=this.#e.build(this,r),s=i.isStaleByTime(Nt(r.staleTime,i))?await i.fetch(r):i.state.data,l=r.select;return l?l(s):s}fetchQuery(e){const r=this.defaultQueryOptions(e);r.retry===void 0&&(r.retry=!1);const i=this.#e.build(this,r);return i.isStaleByTime(Nt(r.staleTime,i))?i.fetch(r):Promise.resolve(i.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($n).catch($n)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($n).catch($n)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return id.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,r){this.#r.set(Ll(e),{queryKey:e,defaultOptions:r})}getQueryDefaults(e){const r=[...this.#r.values()],i={};return r.forEach(s=>{ao(e,s.queryKey)&&Object.assign(i,s.defaultOptions)}),i}setMutationDefaults(e,r){this.#i.set(Ll(e),{mutationKey:e,defaultOptions:r})}getMutationDefaults(e){const r=[...this.#i.values()],i={};return r.forEach(s=>{ao(e,s.mutationKey)&&Object.assign(i,s.defaultOptions)}),i}defaultQueryOptions(e){if(e._defaulted)return e;const r={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return r.queryHash||(r.queryHash=$p(r.queryKey,r)),r.refetchOnReconnect===void 0&&(r.refetchOnReconnect=r.networkMode!=="always"),r.throwOnError===void 0&&(r.throwOnError=!!r.suspense),!r.networkMode&&r.persister&&(r.networkMode="offlineFirst"),r.queryFn===qp&&(r.enabled=!1),r}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Ow=T.createContext(!1),q_=()=>T.useContext(Ow);Ow.Provider;function Z_(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const I_=T.createContext(Z_()),F_=()=>T.useContext(I_),V_=(e,r,i)=>{const s=i?.state.status==="error"&&typeof e.throwOnError=="function"?Nw(e.throwOnError,[i.state.error,i]):e.throwOnError;(e.suspense||s)&&(r.isReset()||(e.retryOnMount=!1))},Y_=e=>{T.useEffect(()=>{e.clearReset()},[e])},G_=({result:e,errorResetBoundary:r,throwOnError:i,query:s,suspense:l})=>e.isError&&!r.isReset()&&!e.isFetching&&s&&(l&&e.data===void 0||Nw(i,[e.error,s])),K_=e=>{if(e.suspense){const i=l=>l==="static"?l:Math.max(l??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...l)=>i(s(...l)):i(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Q_=(e,r)=>e?.suspense&&r.isPending,X_=(e,r,i)=>r.fetchOptimistic(e).catch(()=>{i.clearReset()});function J_(e,r,i){const s=q_(),l=F_(),c=ww(),d=c.defaultQueryOptions(e),f=c.getQueryCache().get(d.queryHash),m=e.subscribed!==!1;d._optimisticResults=s?"isRestoring":m?"optimistic":void 0,K_(d),V_(d,l,f),Y_(l);const[g]=T.useState(()=>new r(c,d)),v=g.getOptimisticResult(d);T.useEffect(()=>{g.setOptions(d)},[d,g]);const y=!s&&m;if(T.useSyncExternalStore(T.useCallback(x=>{const w=y?g.subscribe(bn.batchCalls(x)):$n;return g.updateResult(),w},[g,y]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),Q_(d,v))throw X_(d,g,l);if(G_({result:v,errorResetBoundary:l,throwOnError:d.throwOnE)DELIM" +R"DELIM(rror,query:f,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:g.trackResult(v)}function W_(e,r){return J_(e,D_)}function ip(e){const r=Object.values(e).filter(s=>typeof s=="number");return Object.entries(e).filter(([s,l])=>r.indexOf(+s)===-1).map(([s,l])=>l)}function mx(e,r="|"){return e.map(i=>Lw(i)).join(r)}function sp(e,r){return typeof r=="bigint"?r.toString():r}class e4{constructor(r){this._getter=r,this._value=void 0}get value(){const r=this._getter;return r!==void 0&&(this._value=r(),this._getter=void 0),this._value}}function Sd(e){return new e4(e)}function t4(e){return e==null}function Yp(e){const r=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(r,i)}function n4(e,r){const i=e/r,s=Math.round(i),l=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-s){const f=r._zod.def.shape[c];return s?s(f,c):f}):zw(e,c,s?s(d.value,c):d.value))}}function r4(e,r){for(const i of Reflect.ownKeys(r)){const s=Object.getOwnPropertyDescriptor(r,i);s.enumerable&&(s.get?Mw(e,i,()=>r[i]):zw(e,i,s.value))}}function Wn(...e){const r={};for(const i of e){const s=Object.getOwnPropertyDescriptors(i);Object.assign(r,s)}return Object.defineProperties({},r)}function a4(e){return JSON.stringify(e)}function i4(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Dw="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Ul(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const s4=Sd(()=>{if(Rr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function io(e){if(Ul(e)===!1)return!1;const r=e.constructor;if(r===void 0||typeof r!="function")return!0;const i=r.prototype;return!(Ul(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Bw(e){return io(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const o4=new Set(["string","number","symbol"]);function so(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yi(e,r,i){const s=new e._zod.constr(r??e._zod.def);return(!r||i?.parent)&&(s._zod.parent=e),s}function Re(e){const r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Lw(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function l4(e){return Object.keys(e).filter(r=>e[r]._zod.optin!==void 0&&e[r]._zod.optout==="optional")}const Uw={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},c4={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function u4(e,r){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return Ki(c,e,Ed(e,r)),yi(e,Wn(i,{shape:c,checks:[]}))}function Ed(e,r){const i=xa(e),s=[];for(const l of Reflect.ownKeys(r)){if(!Object.getOwnPropertyDescriptor(i,l)?.enumerable)throw new Error(`Unrecognized key: "${String(l)}"`);r[l]&&s.push(l)}return s}function d4(e,r){const i=e._zod.def,s=i.checks;if(s&&s.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Ed(e,r)),d={};return Ki(d,e,Reflect.ownKeys(xa(e)).filter(f=>!c.has(f))),yi(e,Wn(i,{shape:d,checks:[]}))}function f4(e,r){if(!io(r))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const l=xa(e);for(const c of Reflect.ownKeys(r))if(Object.getOwnPropertyDescriptor(l,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return yi(e,Wn(e._zod.def,{shape:Hw(e,r)}))}function Hw(e,r){const i={};return Ki(i,e,Reflect.ownKeys(xa(e))),r4(i,r),i}function h4(e,r){if(!io(r))throw new Error("Invalid input to safeExtend: expected a plain object");return yi(e,Wn(e._zod.def,{shape:Hw(e,r)}))}function m4(e,r){if(!r?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const i={};Ki(i,e,Reflect.ownKeys(xa(e))),Ki(i,r,Reflect.ownKeys(xa(r)));const s=Wn(e._zod.def,{shape:i,get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return yi(e,s)}function px(e,r,i,s="partial"){const c=r._zod.def.checks;if(c&&c.length>0)throw new Error(`.${s}() cannot be used on object schemas containing refinements`);const f=i?new Set(Ed(r,i)):void 0,m={};return Ki(m,r,Reflect.ownKeys(xa(r)),e&&((g,v)=>f&&!f.has(v)?g:new e({type:"optional",innerType:g}))),yi(r,Wn(r._zod.def,{shape:m,checks:[]}))}function p4(e,r,i){const s=i?new Set(Ed(r,i)):void 0,l={};return Ki(l,r,Reflect.ownKeys(xa(r)),(c,d)=>s&&!s.has(d)?c:new e({type:"nonoptional",innerType:c})),yi(r,Wn(r._zod.def,{shape:l}))}function va(e,r=0){if(e.aborted===!0)return!0;for(let i=r;i{var s;return(s=i).path??(s.path=[]),i.path.unshift(e),i})}function hl(e){return typeof e=="string"?e:e?.message}function gx(e){const r=[];for(const i of e??[]){const s=i._zod.def;if(!/_(length|size)$|_equals$/.test(s.check))break;const l=s.maximum??s.length??s.size;l>=0&&r.push([l,i])}return r}function op(e,r,i){var s;for(let l=r;le;return r[T4]=!0,r}var yx;const bm={value:void 0,enumerable:!1};let vx="captureStackTrace"in Error?Error:null;function _4(e){const r=vx;if(r){const i=r.stackTraceLimit;if(typeof i=="number"){try{r.stackTraceLimit=0}catch{return vx=null,new e}try{return new e}finally{r.stackTraceLimit=i}}}return new e}function ae(e,r,i,s){const l={};function c(x){this.def=x,this.constr=y,this.traits=new Set}c.prototype=l;const d=i,f=d&&new WeakSet;function m(x,w){if(x._zod){if(x._zod.traits.has(e))return}else{bm.value=new c(w);try{Object.defineProperty(x,"_zod",bm)}finally{bm.value=void 0}}if(x._zod.traits.add(e),r(x,w),f){const _=Object.getPrototypeOf(x),N=x._zod.constr.prototype;let H=_;for(;H&&H!==N;)H=Object.getPrototypeOf(H);const O=H??_;f.has(O)||(f.add(O),b4(O,d))}const E=y.prototype;for(const _ in E)Object.prototype.hasOwnProperty.call(E,_)&&(_ in x||(x[_]=E[_].bind(x)))}const g=s?.Parent??Object;class v extends g{}Object.defineProperty(v,"name",{value:e});function y(x){const w=s?.Parent?_4(v):this;m(w,x);const E=w._zod.deferred;if(E){for(const N of E)N();w._zod.deferred=void 0}const _=globalThis.__zod_globalConfig?.postProcessor;return _&&_(w),w}return Object.defineProperty(y,"init",{value:m}),Object.defineProperty(y,Symbol.hasInstance,{value:x=>s?.Parent&&x instanceof s.Parent?!0:x?._zod?.traits?.has(e)}),Object.defineProperty(y,"name",{value:e}),y}class Gi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class qw extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}(yx=globalThis).__zod_globalConfig??(yx.__zod_globalConfig={});const Rr=globalThis.__zod_globalConfig;function Wr(e){return e&&Object.assign(Rr,e),Rr}function N4(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,sp,2)),e.message}function C4(e){this._zod.message=e}const j4={get:N4,set:C4,enumerable:!0,configurable:!0},xm={value:void 0,enumerable:!1},bx=new WeakSet([Object.prototype,Error.prototype]),R4=(e,r)=>{e.name="$ZodError",xm.value=r,Object.defineProperty(e,"issues",xm),xm.value=void 0,Object.defineProperty(e,"message",j4);const i=Object.getPrototypeOf(e);bx.has(i)||(bx.add(i),Object.defineProperty(i,"toString",{configurable:!0,enumerable:!1,get(){const s=()=>this.message;return Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,"toString",{value:s,configurable:!0,writable:!0})}}))},A4=ae("$ZodError",R4);function O4(e,r,i){return Object.prototype.hasOwnProperty.call(e,r)||(r==="__proto__"?Object.defineProperty(e,r,{value:i(),writable:!0,enumerable:!0,configurable:!0}):e[r]=i()),e[r]}function M4(e,r=i=>i.message){const i={},s=[];for(const l of e.issues)l.path.length>0?O4(i,l.path[0],()=>[]).push(r(l)):s.push(r(l));return{formErrors:s,fieldErrors:i}}function z4(e,r=i=>i.message){const i={_errors:[]},s=(l,c=[])=>{for(const d of l.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(f=>s({issues:f},[...c,...d.path]));else if(d.code==="invalid_key")s({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")s({issues:d.issues},[...c,...d.path]);else{const f=[...c,...d.path];if(f.length===0)i._errors.push(r(d));else{let m=i,g=0;for(;g{const r=(i,s,l,c)=>{const d=l?{...l,async:!1}:{async:!1},f=i._zod.run({value:s,issues:[]},d);if(f instanceof Promise)throw new Gi;if(f.issues.length){const m=new(c?.Err??e)(f.issues.map(g=>mi(g,d,Wr())));throw Dw(m,c?.callee??r),m}return f.value};return r},Jp=e=>{const r=async(i,s,l,c)=>{const d=l?{...l,async:!0}:{async:!0};let f=i._zod.run({value:s,issues:[]},d);if(f instanceof Promise&&(f=await f),f.issues.length){const m=new(c?.Err??e)(f.issues.map(g=>mi(g,d,Wr())));throw Dw(m,c?.callee??r),m}return f.value};return r},Wp=e=>(r,i,s)=>{const l=s?{...s,async:!1}:{async:!1},c=r._zod.run({value:i,issues:[]},l);if(c instanceof Promise)throw new Gi;return c.issues.length?Zw(e,c.issues,l):{success:!0,data:c.value}};function Zw(e,r,i){let s;return{success:!1,get error(){return s||(s=new e(r.map(l=>mi(l,i,Wr()))),r=void 0,i=void 0),s},set error(l){s=l,r=void 0,i=void 0}}}const eg=e=>async(r,i,s)=>{const l=s?{...s,async:!0}:{async:!0};let c=r._zod.run({value:i,issues:[]},l);return c instanceof Promise&&(c=await c),c.issues.length?Zw(e,c.issues,l):{success:!0,data:c.value}},D4=Symbol.for("zod.compile.invalid"),B4=Symbol.for("zod.compile.fallback"),L4=((e,r,i)=>{const s=e._zod.bag.validator;if(s!==void 0){if(s(r)!==D4)return!0;if(s.definite===!0&&i===void 0)return!1}return U4(e,r,i)});function U4(e,r,i){const s=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},l=e._zod.bag.fallbackRun;let c;if(l?(s[B4]=!0,c=l({value:r,issues:[]},s)):c=e._zod.run({value:r,issues:[]},s),c instanceof Promise)throw new Gi;return c.issues.length===0}const H4=async(e,r,i)=>{const s=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let l=e._zod.run({value:r,issues:[]},s);return l instanceof Promise&&(l=await l),l.issues.length===0},P4=e=>{const r=Xp(e),i=(s,l,c,d)=>{const f=c?{...c,direction:"backward"}:{direction:"backward"};return r(s,l,f,Td(i,d))};return i},$4=e=>{const r=Xp(e),i=(s,l,c,d)=>r(s,l,c,Td(i,d));return i},q4=e=>{const r=Jp(e),i=async(s,l,c,d)=>{const f=c?{...c,direction:"backward"}:{direction:"backward"};return await r(s,l,f,Td(i,d))};return i},Z4=e=>{const r=Jp(e),i=async(s,l,c,d)=>await r(s,l,c,Td(i,d));return i},I4=e=>(r,i,s)=>{const l=s?{...s,direction:"backward"}:{direction:"backward"};return Wp(e)(r,i,l)},F4=e=>(r,i,s)=>Wp(e)(r,i,s),V4=e=>async(r,i,s)=>{const l=s?{...s,direction:"backward"}:{direction:"backward"};return eg(e)(r,i,l)},Y4=e=>async(r,i,s)=>eg(e)(r,i,s),G4=/^[cC][0-9a-z]{6,}$/,K4=/^[0-9a-z]+$/,Q4=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,X4=/^[0-9a-vA-V]{20}$/,J4=/^[A-Za-z0-9]{27}$/,W4=/^[a-zA-Z0-9_-]{21}$/;function eN(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const tN=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nN=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,xx=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89)DELIM" +R"DELIM(abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,rN=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,aN="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function iN(){return new RegExp(aN,"u")}const sN=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lN=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cN=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uN=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dN=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,fN=/^https?$/,hN=/^\+[1-9]\d{6,14}$/,Iw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function mN(e){return new RegExp(`^${e}$`)}const pN=mN(Iw);function lp(e){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${r}:[0-5]\\d(?:\\.\\d+)?`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gN(e){return new RegExp(`^${lp(e)}$`)}function yN(e){const r=["Z"];e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${lp({precision:e.precision,seconds:!0})}(?:${r.join("|")})`,s=e.local?`${i}|${lp({precision:e.precision})}`:i;return new RegExp(`^${Iw}T(?:${s})$`)}const vN=/^[\s\S]{0,}$/,bN=/^-?\d+$/,tg=/^-?\d+(?:\.\d+)?$/,xN=/^(?:true|false)$/i,wN=/^[^A-Z]*$/,SN=/^[^a-z]*$/,qn=ae("$ZodCheck",(e,r)=>{var i;e._zod??(e._zod={}),e._zod.def=r,(i=e._zod).onattach??(i.onattach=[])}),ng=e=>{const r=e.value;return!t4(r)&&r.length!==void 0},sd={number:"number",bigint:"bigint",object:"date"},Fw=ae("$ZodCheckLessThan",(e,r)=>{qn.init(e,r);const i=sd[typeof r.value];e._zod.check=s=>{(r.inclusive?s.value<=r.value:s.value{qn.init(e,r);const i=sd[typeof r.value];e._zod.check=s=>{(r.inclusive?s.value>=r.value:s.value>r.value)||s.issues.push({origin:sd[typeof s.value]??i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:s.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),EN=ae("$ZodCheckMultipleOf",(e,r)=>{qn.init(e,r),e._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?r.value!==BigInt(0)&&i.value%r.value===BigInt(0):n4(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:e,continue:!r.abort})}}),TN=ae("$ZodCheckNumberFormat",(e,r)=>{qn.init(e,r),r.format=r.format||"float64";const i=r.format?.includes("int"),s=i?"int":"number",[l,c]=Uw[r.format];e._zod.check=d=>{const f=d.value;if(i){if(!Number.isInteger(f)){d.issues.push({expected:s,format:r.format,code:"invalid_type",continue:!1,input:f,inst:e});return}if(!Number.isSafeInteger(f)){f>0?d.issues.push({input:f,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!r.abort}):d.issues.push({input:f,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:s,inclusive:!0,continue:!r.abort});return}}fc&&d.issues.push({origin:"number",input:f,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!r.abort})}}),kN=ae("$ZodCheckMaxLength",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=ng),e._zod.check=s=>{const l=s.value,c=l.length;if((typeof l=="string"&&c>r.maximum?Kp(l):c)<=r.maximum)return;const f=Qp(l);s.issues.push({origin:f,code:"too_big",maximum:r.maximum,inclusive:!0,input:l,inst:e,continue:!r.abort})}}),_N=ae("$ZodCheckMinLength",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=ng),e._zod.check=s=>{const l=s.value,c=l.length;if((typeof l=="string"&&c>=r.minimum&&c=r.minimum)return;const f=Qp(l);s.issues.push({origin:f,code:"too_small",minimum:r.minimum,inclusive:!0,input:l,inst:e,continue:!r.abort})}}),NN=ae("$ZodCheckLengthEquals",(e,r)=>{var i;qn.init(e,r),(i=e._zod.def).when??(i.when=ng),e._zod.check=s=>{const l=s.value,c=l.length,d=typeof l=="string"&&c>=r.length&&c<=r.length*2?Kp(l):c;if(d===r.length)return;const f=Qp(l),m=d>r.length;s.issues.push({origin:f,...m?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:s.value,inst:e,continue:!r.abort})}}),kd=ae("$ZodCheckStringFormat",(e,r)=>{var i,s;qn.init(e,r),r.pattern?(i=e._zod).check??(i.check=l=>{r.pattern.lastIndex=0,!r.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:r.format,input:l.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(s=e._zod).check??(s.check=()=>{})}),CN=ae("$ZodCheckRegex",(e,r)=>{kd.init(e,r),e._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),jN=ae("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=wN),kd.init(e,r)}),RN=ae("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=SN),kd.init(e,r)}),AN=ae("$ZodCheckIncludes",(e,r)=>{qn.init(e,r);const i=so(r.includes),s=new RegExp(typeof r.position=="number"?`^.{${r.position},}${i}`:i);r.pattern=s,e._zod.check=l=>{l.value.includes(r.includes,r.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:l.value,inst:e,continue:!r.abort})}}),ON=ae("$ZodCheckStartsWith",(e,r)=>{qn.init(e,r);const i=new RegExp(`^${so(r.prefix)}.*`);r.pattern??(r.pattern=i),e._zod.check=s=>{s.value.startsWith(r.prefix)||s.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:s.value,inst:e,continue:!r.abort})}}),MN=ae("$ZodCheckEndsWith",(e,r)=>{qn.init(e,r);const i=new RegExp(`.*${so(r.suffix)}$`);r.pattern??(r.pattern=i),e._zod.check=s=>{s.value.endsWith(r.suffix)||s.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:s.value,inst:e,continue:!r.abort})}}),zN=ae("$ZodCheckOverwrite",(e,r)=>{qn.init(e,r),e._zod.check=i=>{i.value=r.tx(i.value)}});class DN{constructor(r=[],i={}){this.content=[],this.indent=0,this.args=r,this.closed=i}indented(r){this.indent+=1;try{r(this)}finally{this.indent-=1}}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const s=r.split(` `).filter(d=>d),l=Math.min(...s.map(d=>d.length-d.trimStart().length)),c=s.map(d=>d.slice(l)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d))DELIM" R"DELIM(}compile(){const r=Function,i=this?.content??[""];return new r(...Object.keys(this.closed),`return function (${this.args.join(", ")}) { ${i.join(` `)} -};`)(...Object.values(this.closed))}}const DN={major:4,minor:6,patch:7},Ot=ae("$ZodType",(e,r)=>{var i;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=DN;const s=e._zod.def.checks,l=e._zod.traits.has("$ZodCheck")?[e,...s??[]]:s?.length?[...s]:[];for(const c of l)for(const d of c._zod.onattach)d(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const c=(f,m,g)=>{if(f.memo)return f;let v=va(f),y;for(const x of m){if(x._zod.def.when){if(p4(f)||!x._zod.def.when(f))continue}else if(v)continue;const w=f.issues.length,E=x._zod.check(f);if(E instanceof Promise&&g?.async===!1)throw new Ki;if(y||E instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await E,f.issues.length!==w&&(sp(f.issues,w,e),v||(v=va(f,w)))});else{if(f.issues.length===w)continue;sp(f.issues,w,e),v||(v=va(f,w))}}return y?y.then(()=>f):f},d=(f,m,g)=>{if(va(f))return f.aborted=!0,f;const v=c(m,l,g);if(v instanceof Promise){if(g.async===!1)throw new Ki;return v.then(y=>e._zod.parse(y,g))}return e._zod.parse(v,g)};e._zod.run=(f,m)=>{if(m.skipChecks)return e._zod.parse(f,m);if(m.direction==="backward"){const v=e._zod.parse({value:f.value,issues:[]},{...m,skipChecks:!0});return v instanceof Promise?v.then(y=>d(y,f,m)):d(v,f,m)}const g=e._zod.parse(f,m);if(g instanceof Promise){if(m.async===!1)throw new Ki;return g.then(v=>c(v,l,m))}return c(g,l,m)}}},{get"~standard"(){return Hw(this,"~standard",Yw(this))},set"~standard"(e){mi(this,"~standard",e)}}),Vw=(e,r)=>e.issues.length?{issues:e.issues.map(i=>hi(i,r,Wr()))}:{value:e.value};async function LN(e,r){const i={async:!0};return Vw(await e._zod.run({value:r,issues:[]},i),i)}function Yw(e){return{validate:r=>{const i={async:!1};try{const s=e._zod.run({value:r,issues:[]},i);if(!(s instanceof Promise))return Vw(s,i)}catch{}return LN(e,r)},vendor:"zod",version:1}}const ng=ae("$ZodString",(e,r)=>{Ot.init(e,r),e._zod.pattern=r.pattern??yN,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),jt=ae("$ZodStringFormat",(e,r)=>{Td.init(e,r),ng.init(e,r)}),BN=ae("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=tN),jt.init(e,r)}),UN=ae("$ZodUUID",(e,r)=>{if(r.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(s===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=bx(s))}else r.pattern??(r.pattern=bx());jt.init(e,r)}),HN=ae("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=nN),jt.init(e,r)}),Gw=1,sd=2;function Kw(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function PN(e,r){return!("normalize"in r)&&!("hostname"in r)&&!("protocol"in r)?Kw(e)||sd:$N(e,r)}function $N(e,r){if(!r.normalize&&r.protocol?.source===dN.source&&!/^https?:\/\//i.test(e))return Gw;try{if(typeof URL<"u"){const i=URL;if(typeof i.parse=="function")return i.parse(e)??sd}return new URL(e)}catch{return sd}}const qN=/[\t\n\r]/g;function xx(e){return e.replace(qN,"")}function ZN(e,r){return r.lastIndex=0,r.test(e.hostname)}function IN(e,r){return r.lastIndex=0,r.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const FN=ae("$ZodURL",(e,r)=>{jt.init(e,r),e._zod.check=i=>{try{const s=i.value.trim(),l=PN(s,r);if(l===Gw){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!r.abort});return}if(l===sd){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort});return}if(l===!0){i.value=xx(s);return}r.hostname&&!ZN(l,r.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:e,continue:!r.abort}),r.protocol&&!IN(l,r.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:e,continue:!r.abort}),i.value=r.normalize?l.href:xx(s);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort})}}}),VN=ae("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=aN()),jt.init(e,r)}),YN=ae("$ZodNanoID",(e,r)=>{if(r.length!==void 0&&(!Number.isInteger(r.length)||r.length<1))throw new Error(`Invalid nanoid length: ${r.length}`);r.pattern??(r.pattern=r.length===void 0?J4:W4(r.length)),jt.init(e,r)}),GN=ae("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Y4),jt.init(e,r)}),KN=ae("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=G4),jt.init(e,r)}),QN=ae("$ZodULID",(e,r)=>{r.pattern??(r.pattern=K4),jt.init(e,r)}),XN=ae("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Q4),jt.init(e,r)}),JN=ae("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=X4),jt.init(e,r)}),WN=ae("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=gN(r)),jt.init(e,r)}),eC=ae("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=mN),jt.init(e,r)}),tC=ae("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=pN(r)),jt.init(e,r)}),nC=ae("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=eN),jt.init(e,r)}),rC=ae("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=iN),jt.init(e,r)}),aC=/^[0-9a-fA-F:.]+$/;function Qw(e){return aC.test(e)?Kw(`http://[${e}]`):!1}const iC=ae("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=sN),jt.init(e,r),e._zod.check=i=>{Qw(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}),sC=ae("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=oN),jt.init(e,r)});function oC(e){const r=e.split("/");if(r.length!==2)return!1;const[i,s]=r;if(!s)return!1;const l=Number(s);return`${l}`!==s||l<0||l>128?!1:Qw(i)}const lC=ae("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=lN),jt.init(e,r),e._zod.check=i=>{oC(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}});function Xw(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Jw=/^[0-9a-zA-Z+/]*={0,2}$/,cC=ae("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Jw),jt.init(e,r),e._zod.check=i=>{Xw(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}}),rg=/^[A-Za-z0-9_-]*$/;function uC(e){if(!rg.test(e))return!1;const r=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return Xw(i)}const dC=ae("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=rg),jt.init(e,r),e._zod.check=i=>{uC(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),fC=ae("$ZodE164",(e,r)=>{r.pattern??(r.pattern=fN),jt.init(e,r)});function hC(e,r=null){try{const i=e.split(".");if(i.length!==3)return!1;const[s]=i;if(!s)return!1;const l=JSON.parse(atob(s));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||r&&(!("alg"in l)||l.alg!==r))}catch{return!1}}const mC=ae("$ZodJWT",(e,r)=>{jt.init(e,r),e._zod.check=i=>{hC(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!r.abort})}}),Ww=ae("$ZodNumber",(e,r)=>{Ot.init(e,r),e._zod.pattern=eg,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}const l=i.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return i;const c=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:String(l):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...c?{received:c}:{}}),i}}),pC=ae("$ZodNumberFormat",(e,r)=>{EN.init(e,r),Ww.init(e,r)}),gC=ae("$ZodBoolean",(e,r)=>{Ot.init(e,r),e._zod.pattern=bN,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=!!i.value}catch{}const l=i.value;return typeof l=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),i}}),yC=ae("$ZodUnknown",(e,r)=>{Ot.init(e,r),e._zod.parse=i=>i}),vC=ae("$ZodNever",(e,r)=>{Ot.init(e,r),e._zod.parse=(i,s)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function bC(e,r)DELIM" -R"DELIM(){const i=px(e._zod.def.checks);if(!i.length)return;const s=Math.min(...i.map(c=>c[0])),l=e._zod.parse;e._zod.parse=(c,d)=>{const f=r(c.value);if(f>s&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,g]of px(e._zod.def.checks))if(f>m&&g._zod.def.when(c)){const v=c.issues.length;return g._zod.check(c),c.issues[v].continue=!1,sp(c.issues,v,e),c}}return l(c,d)}}const xC=e=>Array.isArray(e)?e.length:-1;function wx(e,r,i){e.issues.length&&r.issues.push(...Qs(i,e.issues)),r.value[i]=e.value}const wC=ae("$ZodArray",(e,r)=>{Ot.init(e,r);const i=Rr.memoizer;i?.attach(e),e._zod.parse=(s,l)=>{const c=s.value;if(!Array.isArray(c))return s.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),s;s.value=i?i.alloc(e,s,Array(c.length),l):Array(c.length);const d=[],f=l?.abortEarly;for(let m=0;mwx(y,s,m)));else if(wx(v,s,m),f&&v.issues.length!==0&&va(v))break}return d.length?Promise.all(d).then(()=>s):s},bC(e,xC)});function od(e,r,i,s,l,c){const d=i in s,f=c==="optional";if(!(!d&&f&&l==="optional")){if(e.issues.length){if(l!==void 0&&f&&!d)return;r.issues.push(...Qs(i,e.issues))}if(!d&&l===void 0){e.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?(d||l==="defaulted"&&!f)&&(r.value[i]=void 0):r.value[i]=e.value}}const SC=[];function eS(e){const r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),s=i.length?i:SC,l=s.length?[...r,...s]:r;for(const d of l)if(!e.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=o4(e.shape);return{...e,allKeys:l,symbolKeys:s,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(c)}}function tS(e,r,i,s,l,c,d){const f=[],m=l.keySet,g=l.catchall._zod,v=g.def.type,y=g.optin,x=g.optout;let w=0;for(const E in r){if(d&&i.issues.length!==w){if(va(i,w))break;w=i.issues.length}if(m.has(E))continue;if(E==="__proto__"){v==="never"&&f.push(E);continue}if(v==="never"){f.push(E);continue}const _=g.run({value:r[E],issues:[]},s);_ instanceof Promise?e.push(_.then(N=>od(N,i,E,r,y,x))):od(_,i,E,r,y,x)}return f.length&&i.issues.push({code:"unrecognized_keys",keys:f,input:r,inst:c,continue:!0}),e.length?Promise.all(e).then(()=>i):i}const EC=ae("$ZodObject",(e,r)=>{Ot.init(e,r);const i=Object.getOwnPropertyDescriptor(r,"shape"),s=i?.get?i.get.raw:r.shape??{};if(s){const g=()=>{const v={...s};return Object.defineProperty(r,"shape",{value:v}),g.raw=v,v};g.raw=s,Object.defineProperty(r,"shape",{get:g})}const l=wd(()=>eS(r));ht(e,"propValues",g=>{const v=g.def.shape,y={};for(const x in v){const w=v[x]._zod;if(w.values){Object.prototype.hasOwnProperty.call(y,x)||wa(y,x,new Set);for(const E of w.values)y[x].add(E);w.optin!==void 0&&y[x].add(void 0)}}return y});const c=Ul,d=r.catchall;let f;const m=Rr.memoizer;m?.attach(e),e._zod.parse=(g,v)=>{f??(f=l.value);const y=g.value;if(!c(y))return g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g;g.value=m?m.alloc(e,g,{},v):{};const x=[],w=f.shape,E=v?.abortEarly;let _=g.issues.length;for(const N of f.allKeys){if(E&&g.issues.length!==_){if(va(g,_))break;_=g.issues.length}if(N==="__proto__")continue;const H=w[N],O=H._zod.optin,se=H._zod.optout,ce=H._zod.run({value:y[N],issues:[]},v);ce instanceof Promise?x.push(ce.then(K=>od(K,g,N,y,O,se))):od(ce,g,N,y,O,se)}return d?tS(x,y,g,v,l.value,e,E===!0):x.length?Promise.all(x).then(()=>g):g}}),TC=ae("$ZodObjectJIT",(e,r)=>{EC.init(e,r);const i=e._zod.parse,s=wd(()=>eS(r)),l=Rr.memoizer,c=w=>{const E=s.value,_=E.symbolKeys,N=new zN(["payload","ctx"],{shape:w,inst:e,memo:l,syms:_}),H=K=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,O=(K,oe)=>` +};`)(...Object.values(this.closed))}}const BN={major:4,minor:6,patch:7},Ot=ae("$ZodType",(e,r)=>{var i;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=BN;const s=e._zod.def.checks,l=e._zod.traits.has("$ZodCheck")?[e,...s??[]]:s?.length?[...s]:[];for(const c of l)for(const d of c._zod.onattach)d(e);if(l.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const c=(f,m,g)=>{if(f.memo)return f;let v=va(f),y;for(const x of m){if(x._zod.def.when){if(g4(f)||!x._zod.def.when(f))continue}else if(v)continue;const w=f.issues.length,E=x._zod.check(f);if(E instanceof Promise&&g?.async===!1)throw new Gi;if(y||E instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await E,f.issues.length!==w&&(op(f.issues,w,e),v||(v=va(f,w)))});else{if(f.issues.length===w)continue;op(f.issues,w,e),v||(v=va(f,w))}}return y?y.then(()=>f):f},d=(f,m,g)=>{if(va(f))return f.aborted=!0,f;const v=c(m,l,g);if(v instanceof Promise){if(g.async===!1)throw new Gi;return v.then(y=>e._zod.parse(y,g))}return e._zod.parse(v,g)};e._zod.run=(f,m)=>{if(m.skipChecks)return e._zod.parse(f,m);if(m.direction==="backward"){const v=e._zod.parse({value:f.value,issues:[]},{...m,skipChecks:!0});return v instanceof Promise?v.then(y=>d(y,f,m)):d(v,f,m)}const g=e._zod.parse(f,m);if(g instanceof Promise){if(m.async===!1)throw new Gi;return g.then(v=>c(v,l,m))}return c(g,l,m)}}},{get"~standard"(){return Pw(this,"~standard",Gw(this))},set"~standard"(e){pi(this,"~standard",e)}}),Yw=(e,r)=>e.issues.length?{issues:e.issues.map(i=>mi(i,r,Wr()))}:{value:e.value};async function LN(e,r){const i={async:!0};return Yw(await e._zod.run({value:r,issues:[]},i),i)}function Gw(e){return{validate:r=>{const i={async:!1};try{const s=e._zod.run({value:r,issues:[]},i);if(!(s instanceof Promise))return Yw(s,i)}catch{}return LN(e,r)},vendor:"zod",version:1}}const rg=ae("$ZodString",(e,r)=>{Ot.init(e,r),e._zod.pattern=r.pattern??vN,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),jt=ae("$ZodStringFormat",(e,r)=>{kd.init(e,r),rg.init(e,r)}),UN=ae("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=nN),jt.init(e,r)}),HN=ae("$ZodUUID",(e,r)=>{if(r.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(s===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=xx(s))}else r.pattern??(r.pattern=xx());jt.init(e,r)}),PN=ae("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=rN),jt.init(e,r)}),Kw=1,od=2;function Qw(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function $N(e,r){return!("normalize"in r)&&!("hostname"in r)&&!("protocol"in r)?Qw(e)||od:qN(e,r)}function qN(e,r){if(!r.normalize&&r.protocol?.source===fN.source&&!/^https?:\/\//i.test(e))return Kw;try{if(typeof URL<"u"){const i=URL;if(typeof i.parse=="function")return i.parse(e)??od}return new URL(e)}catch{return od}}const ZN=/[\t\n\r]/g;function wx(e){return e.replace(ZN,"")}function IN(e,r){return r.lastIndex=0,r.test(e.hostname)}function FN(e,r){return r.lastIndex=0,r.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const VN=ae("$ZodURL",(e,r)=>{jt.init(e,r),e._zod.check=i=>{try{const s=i.value.trim(),l=$N(s,r);if(l===Kw){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!r.abort});return}if(l===od){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort});return}if(l===!0){i.value=wx(s);return}r.hostname&&!IN(l,r.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:e,continue:!r.abort}),r.protocol&&!FN(l,r.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:e,continue:!r.abort}),i.value=r.normalize?l.href:wx(s);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort})}}}),YN=ae("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=iN()),jt.init(e,r)}),GN=ae("$ZodNanoID",(e,r)=>{if(r.length!==void 0&&(!Number.isInteger(r.length)||r.length<1))throw new Error(`Invalid nanoid length: ${r.length}`);r.pattern??(r.pattern=r.length===void 0?W4:eN(r.length)),jt.init(e,r)}),KN=ae("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=G4),jt.init(e,r)}),QN=ae("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=K4),jt.init(e,r)}),XN=ae("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Q4),jt.init(e,r)}),JN=ae("$ZodXID",(e,r)=>{r.pattern??(r.pattern=X4),jt.init(e,r)}),WN=ae("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=J4),jt.init(e,r)}),eC=ae("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=yN(r)),jt.init(e,r)}),tC=ae("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=pN),jt.init(e,r)}),nC=ae("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=gN(r)),jt.init(e,r)}),rC=ae("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=tN),jt.init(e,r)}),aC=ae("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=sN),jt.init(e,r)}),iC=/^[0-9a-fA-F:.]+$/;function Xw(e){return iC.test(e)?Qw(`http://[${e}]`):!1}const sC=ae("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=oN),jt.init(e,r),e._zod.check=i=>{Xw(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}),oC=ae("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=lN),jt.init(e,r)});function lC(e){const r=e.split("/");if(r.length!==2)return!1;const[i,s]=r;if(!s)return!1;const l=Number(s);return`${l}`!==s||l<0||l>128?!1:Xw(i)}const cC=ae("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=cN),jt.init(e,r),e._zod.check=i=>{lC(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}});function Jw(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ww=/^[0-9a-zA-Z+/]*={0,2}$/,uC=ae("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=Ww),jt.init(e,r),e._zod.check=i=>{Jw(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}}),ag=/^[A-Za-z0-9_-]*$/;function dC(e){if(!ag.test(e))return!1;const r=e.replace(/[-_]/g,s=>s==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return Jw(i)}const fC=ae("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=ag),jt.init(e,r),e._zod.check=i=>{dC(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),hC=ae("$ZodE164",(e,r)=>{r.pattern??(r.pattern=hN),jt.init(e,r)});function mC(e,r=null){try{const i=e.split(".");if(i.length!==3)return!1;const[s]=i;if(!s)return!1;const l=JSON.parse(atob(s));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||r&&(!("alg"in l)||l.alg!==r))}catch{return!1}}const pC=ae("$ZodJWT",(e,r)=>{jt.init(e,r),e._zod.check=i=>{mC(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!r.abort})}}),eS=ae("$ZodNumber",(e,r)=>{Ot.init(e,r),e._zod.pattern=tg,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}const l=i.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return i;const c=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:String(l):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...c?{received:c}:{}}),i}}),gC=ae("$ZodNumberFormat",(e,r)=>{TN.init(e,r),eS.init(e,r)}),yC=ae("$ZodBoolean",(e,r)=>{Ot.init(e,r),e._zod.pattern=xN,e._zod.parse=(i,s)=>{if(r.coerce)try{i.value=!!i.value}catch{}const l=i.value;return typeof l=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),i}}),vC=ae("$ZodUnknown",(e,r)=>{Ot.init(e,r),e._zod.parse=i=>i}),bC=ae("$ZodNever",(e,r)=>{Ot.init(e,r),e._zod.parse=(i,s)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function xC(e,r)DELIM" +R"DELIM(){const i=gx(e._zod.def.checks);if(!i.length)return;const s=Math.min(...i.map(c=>c[0])),l=e._zod.parse;e._zod.parse=(c,d)=>{const f=r(c.value);if(f>s&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,g]of gx(e._zod.def.checks))if(f>m&&g._zod.def.when(c)){const v=c.issues.length;return g._zod.check(c),c.issues[v].continue=!1,op(c.issues,v,e),c}}return l(c,d)}}const wC=e=>Array.isArray(e)?e.length:-1;function Sx(e,r,i){e.issues.length&&r.issues.push(...Ks(i,e.issues)),r.value[i]=e.value}const SC=ae("$ZodArray",(e,r)=>{Ot.init(e,r);const i=Rr.memoizer;i?.attach(e),e._zod.parse=(s,l)=>{const c=s.value;if(!Array.isArray(c))return s.issues.push({expected:"array",code:"invalid_type",input:c,inst:e}),s;s.value=i?i.alloc(e,s,Array(c.length),l):Array(c.length);const d=[],f=l?.abortEarly;for(let m=0;mSx(y,s,m)));else if(Sx(v,s,m),f&&v.issues.length!==0&&va(v))break}return d.length?Promise.all(d).then(()=>s):s},xC(e,wC)});function ld(e,r,i,s,l,c){const d=i in s,f=c==="optional";if(!(!d&&f&&l==="optional")){if(e.issues.length){if(l!==void 0&&f&&!d)return;r.issues.push(...Ks(i,e.issues))}if(!d&&l===void 0){e.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?(d||l==="defaulted"&&!f)&&(r.value[i]=void 0):r.value[i]=e.value}}const EC=[];function tS(e){const r=Object.keys(e.shape),i=Object.getOwnPropertySymbols(e.shape),s=i.length?i:EC,l=s.length?[...r,...s]:r;for(const d of l)if(!e.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=l4(e.shape);return{...e,allKeys:l,symbolKeys:s,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(c)}}function nS(e,r,i,s,l,c,d){const f=[],m=l.keySet,g=l.catchall._zod,v=g.def.type,y=g.optin,x=g.optout;let w=0;for(const E in r){if(d&&i.issues.length!==w){if(va(i,w))break;w=i.issues.length}if(m.has(E))continue;if(E==="__proto__"){v==="never"&&f.push(E);continue}if(v==="never"){f.push(E);continue}const _=g.run({value:r[E],issues:[]},s);_ instanceof Promise?e.push(_.then(N=>ld(N,i,E,r,y,x))):ld(_,i,E,r,y,x)}return f.length&&i.issues.push({code:"unrecognized_keys",keys:f,input:r,inst:c,continue:!0}),e.length?Promise.all(e).then(()=>i):i}const TC=ae("$ZodObject",(e,r)=>{Ot.init(e,r);const i=Object.getOwnPropertyDescriptor(r,"shape"),s=i?.get?i.get.raw:r.shape??{};if(s){const g=()=>{const v={...s};return Object.defineProperty(r,"shape",{value:v}),g.raw=v,v};g.raw=s,Object.defineProperty(r,"shape",{get:g})}const l=Sd(()=>tS(r));ht(e,"propValues",g=>{const v=g.def.shape,y={};for(const x in v){const w=v[x]._zod;if(w.values){Object.prototype.hasOwnProperty.call(y,x)||wa(y,x,new Set);for(const E of w.values)y[x].add(E);w.optin!==void 0&&y[x].add(void 0)}}return y});const c=Ul,d=r.catchall;let f;const m=Rr.memoizer;m?.attach(e),e._zod.parse=(g,v)=>{f??(f=l.value);const y=g.value;if(!c(y))return g.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),g;g.value=m?m.alloc(e,g,{},v):{};const x=[],w=f.shape,E=v?.abortEarly;let _=g.issues.length;for(const N of f.allKeys){if(E&&g.issues.length!==_){if(va(g,_))break;_=g.issues.length}if(N==="__proto__")continue;const H=w[N],O=H._zod.optin,se=H._zod.optout,ce=H._zod.run({value:y[N],issues:[]},v);ce instanceof Promise?x.push(ce.then(K=>ld(K,g,N,y,O,se))):ld(ce,g,N,y,O,se)}return d?nS(x,y,g,v,l.value,e,E===!0):x.length?Promise.all(x).then(()=>g):g}}),kC=ae("$ZodObjectJIT",(e,r)=>{TC.init(e,r);const i=e._zod.parse,s=Sd(()=>tS(r)),l=Rr.memoizer,c=w=>{const E=s.value,_=E.symbolKeys,N=new DN(["payload","ctx"],{shape:w,inst:e,memo:l,syms:_}),H=K=>`shape[${K}]._zod.run({ value: input[${K}], issues: [] }, ctx)`,O=(K,oe)=>` let ${K}_ab = false; for (let i = 0; i < ${K}.issues.length; i++) { const iss = ${K}.issues[i]; @@ -371,7 +371,7 @@ R"DELIM(){const i=px(e._zod.def.checks);if(!i.length)return;const s=Math.min(... if (${K}_ab && ctx && ctx.abortEarly) { payload.value = newResult; return payload; - }`;N.write("const input = payload.value;");const se=Object.create(null);let ce=0;for(const K of E.allKeys)se[K]=`key_${ce++}`;N.write(l?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const K of E.allKeys){if(K==="__proto__")continue;const oe=se[K],R=typeof K=="symbol"?`syms[${_.indexOf(K)}]`:r4(K),k=`${R} in input`,z=w[K],P=z?._zod?.optin,F=P!==void 0,X=z?._zod?.optout==="optional";if(N.write(`const ${oe} = ${H(R)};`),F&&X){const fe=P==="optional"?`${oe}_present`:`${oe}.value !== undefined || ${oe}_present`;N.write(` + }`;N.write("const input = payload.value;");const se=Object.create(null);let ce=0;for(const K of E.allKeys)se[K]=`key_${ce++}`;N.write(l?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const K of E.allKeys){if(K==="__proto__")continue;const oe=se[K],R=typeof K=="symbol"?`syms[${_.indexOf(K)}]`:a4(K),k=`${R} in input`,z=w[K],P=z?._zod?.optin,F=P!==void 0,X=z?._zod?.optout==="optional";if(N.write(`const ${oe} = ${H(R)};`),F&&X){const fe=P==="optional"?`${oe}_present`:`${oe}.value !== undefined || ${oe}_present`;N.write(` const ${oe}_present = ${k}; if (!${oe}.issues.length || ${oe}_present) { if (${oe}.issues.length) {${O(oe,R)} @@ -410,63 +410,63 @@ R"DELIM(){const i=px(e._zod.def.checks);if(!i.length)return;const s=Math.min(... newResult[${R}] = ${oe}.value; } - `)}return N.write("payload.value = newResult;"),N.write("return payload;"),N.compile()};let d;const f=Ul,m=!Rr.jitless,v=m&&i4.value,y=r.catchall;let x;e._zod.parse=(w,E)=>{x??(x=s.value);const _=w.value;return f(_)?m&&v&&E?.async===!1&&E.jitless!==!0?(d||(d=c(r.shape)),w=d(w,E),y?tS([],_,w,E,x,e,E?.abortEarly===!0):w):i(w,E):(w.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),w)}});function Sx(e,r,i,s){for(const c of e)if(c.issues.length===0)return r.value=c.value,r;const l=e.filter(c=>!va(c));return l.length===1?(r.value=l[0].value,l[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(c=>c.issues.map(d=>hi(d,s,Wr())))}),r)}const nS=ae("$ZodUnion",(e,r)=>{Ot.init(e,r),ht(e,"optin",s=>s.def.options.some(l=>l._zod.optin==="defaulted")?"defaulted":s.def.options.some(l=>l._zod.optin!==void 0)?"optional":void 0),ht(e,"optout",s=>s.def.options.some(l=>l._zod.optout==="optional")?"optional":void 0),ht(e,"values",s=>{if(s.def.options.every(l=>l._zod.values))return new Set(s.def.options.flatMap(l=>Array.from(l._zod.values)))}),ht(e,"pattern",s=>{if(s.def.options.every(l=>l._zod.pattern)){const l=s.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Vp(c.source)).join("|")})$`)}});const i=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(s,l)=>{if(i)return i(s,l);let c=!1;const d=[];for(const f of r.options){const m=f._zod.run({value:s.value,issues:[]},l);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(f=>Sx(f,s,e,l)):Sx(d,s,e,l)}});function kC(e){const r=new Map;for(const i of e.options){const s=i._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(const l of s)if(r.has(l)){if(l!==void 0)throw new Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,null)}else r.set(l,i)}return r}const _C=ae("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,nS.init(e,r);const i=e._zod.parse;ht(e,"propValues",l=>{const c={};let d=0;for(const f of l.def.options){const m=f._zod.propValues;if(!m||Object.keys(m).l)DELIM" -R"DELIM(ength===0)throw new Error(`Invalid discriminated union option at index "${l.def.options.indexOf(f)}"`);m[l.def.discriminator]?.has(void 0)&&d++;for(const[g,v]of Object.entries(m)){Object.prototype.hasOwnProperty.call(c,g)||wa(c,g,new Set);for(const y of v)c[g].add(y)}}return!l.def.unionFallback&&d>1&&c[l.def.discriminator]?.delete(void 0),c}),r.options.forEach((l,c)=>{const d=Yp(l._zod.def);if(d&&!Object.prototype.hasOwnProperty.call(d,r.discriminator))throw new Error(`Invalid discriminated union option at index "${c}"`)});const s=wd(()=>kC(r));e._zod.parse=(l,c)=>{const d=l.value;if(!Ul(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const f=d?.[r.discriminator],m=s.value.get(f);return m&&(f!==void 0||c.direction!=="backward")?m._zod.run(l,c):r.unionFallback||c.direction==="backward"?i(l,c):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(s.value.keys()).filter(g=>s.value.get(g)!==null),input:d,path:[r.discriminator],inst:e}),l)}}),NC=ae("$ZodIntersection",(e,r)=>{Ot.init(e,r),e._zod.parse=(i,s)=>{const l=i.value,c=r.left._zod.run({value:l,issues:[]},s),d=r.right._zod.run({value:l,issues:[]},s);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,g])=>Ex(i,m,g)):Ex(i,c,d)}});function lp(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(io(e)&&io(r)){const i=Object.keys(r),s=Object.keys(e).filter(c=>i.indexOf(c)!==-1),l={...e,...r};Object.prototype.hasOwnProperty.call(l,"__proto__")&&delete l.__proto__;for(const c of s){if(c==="__proto__")continue;const d=lp(e[c],r[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};l[c]=d.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let s=0;s{let y;if(g.code==="unrecognized_keys"&&!g.path?.length)l??(l=g),y=g.keys;else if(g.code==="invalid_key"&&g.origin==="record"&&g.path?.length===1){const x=String(g.path[0]);c.has(x)||c.set(x,g),y=[x]}else return!1;for(const x of y)s.has(x)||s.set(x,{}),s.get(x)[v]=!0;return!0};for(const g of r.issues)d(g,"l")||e.issues.push(g);for(const g of i.issues)d(g,"r")||e.issues.push(g);const f=[...s].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(f.length){const g=l?f.filter(v=>l.keys.includes(v)):[];g.length&&e.issues.push({...l,keys:g});for(const v of f)!g.includes(v)&&c.has(v)&&e.issues.push(c.get(v))}const m=lp(r.value,i.value);if(!m.valid){if(va(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return e.value=m.data,e}const CC=ae("$ZodRecord",(e,r)=>{Ot.init(e,r);const i=Rr.memoizer;i?.attach(e),e._zod.parse=(s,l)=>{const c=s.value;if(!io(c))return s.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),s;const d=[],f=r.keyType._zod.values;if(f&&!r.partial){s.value=i?i.alloc(e,s,{},l):{};const m=new Set;for(const v of f)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){if(m.add(typeof v=="number"?v.toString():v),v==="__proto__")continue;const y=r.keyType._zod.run({value:v,issues:[]},l);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){s.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(E=>hi(E,l,Wr())),input:v,path:[v],inst:e});continue}const x=y.value;if(x==="__proto__")continue;const w=r.valueType._zod.run({value:c[v],issues:[]},l);w instanceof Promise?d.push(w.then(E=>{E.issues.length&&s.issues.push(...Qs(v,E.issues)),s.value[x]=E.value})):(w.issues.length&&s.issues.push(...Qs(v,w.issues)),s.value[x]=w.value)}let g;for(const v in c)if(!m.has(v))if(r.mode==="loose"){if(v==="__proto__")continue;s.value[v]=c[v]}else g=g??[],g.push(v);g&&g.length>0&&s.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:g,continue:!0})}else{s.value=i?i.alloc(e,s,{},l):{};let m;for(const g of Reflect.ownKeys(c)){if(g==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,g))continue;let v=r.keyType._zod.run({value:g,issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof g=="string"&&eg.test(g)&&v.issues.length){const E=r.keyType._zod.run({value:Number(g),issues:[]},l);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(v=E)}if(v.issues.length){r.mode==="loose"?s.value[g]=c[g]:f?(m=m??[],m.push(g)):s.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(E=>hi(E,l,Wr())),input:g,path:[g],inst:e});continue}const x=v.value;if(x==="__proto__")continue;const w=r.valueType._zod.run({value:c[g],issues:[]},l);w instanceof Promise?d.push(w.then(E=>{E.issues.length&&s.issues.push(...Qs(g,E.issues)),s.value[x]=E.value})):(w.issues.length&&s.issues.push(...Qs(g,w.issues)),s.value[x]=w.value)}m&&m.length>0&&s.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>s):s}}),jC=ae("$ZodEnum",(e,r)=>{Ot.init(e,r);const i=ap(r.entries),s=new Set(i);e._zod.values=s,ht(e,"pattern",l=>{const c=ap(l.def.entries).filter(d=>s4.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>so(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(l,c)=>{const d=l.value;return s.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),RC=ae("$ZodLiteral",(e,r)=>{Ot.init(e,r);const i=new Set(r.values);e._zod.values=i,ht(e,"pattern",s=>{const l=s.def.values;return new RegExp(l.length?`^(${l.map(c=>typeof c=="string"?so(c):c?so(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(s,l)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:r.values,input:c,inst:e}),s}}),AC=ae("$ZodTransform",(e,r)=>{Ot.init(e,r),e._zod.optin="optional",Rr.memoizer?.guard(e),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new $w(e.constructor.name);const l=r.transform(i.value,i);if(s.async)return(l instanceof Promise?l:Promise.resolve(l)).then(d=>(i.value=d,i));if(l instanceof Promise)throw new Ki;return i.value=l,i}});function Tx(e,r){return e.value=r.issues.length?void 0:r.value,e}const rS=ae("$ZodOptional",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ht(e,"values",i=>{const s=i.def.innerType._zod.values;return s?new Set([...s,void 0]):void 0}),ht(e,"pattern",i=>{const s=i.def.innerType._zod.pattern;return s?new RegExp(`^(${Vp(s.source)})?$`):void 0}),e._zod.parse=(i,s)=>{if(i.value===void 0){if(r.innerType._zod.optin!=="defaulted")return i;const l=r.innerType._zod.run({value:i.value,issues:[]},s);return l instanceof Promise?l.then(c=>Tx(i,c)):Tx(i,l)}return r.innerType._zod.run(i,s)}}),OC=ae("$ZodExactOptional",(e,r)=>{rS.init(e,r),ht(e,"values",i=>i.def.innerType._zod.values),ht(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,s)=>r.innerType._zod.run(i,s)}),MC=ae("$ZodNullable",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin),ht(e,"optout",i=>i.def.innerType._zod.optout),ht(e,"pattern",i=>{const s=i.def.innerType._zod.pattern;return s?new RegExp(`^(${Vp(s.source)}|null)$`):void 0}),ht(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,s)=>i.value===null?i:r.innerType._zod.run(i,s)}),zC=ae("$ZodDefault",(e,r)=>{Ot.init(e,r),e._zod.optin="defaulted",ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);if(i.value===void 0)return i.value=r.defaultValue,i;const l=r.innerType._zod.run(i,s);return l instanceof Promise?)DELIM" -R"DELIM(l.then(c=>kx(c,r)):kx(l,r)}});function kx(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const DC=ae("$ZodPrefault",(e,r)=>{Ot.init(e,r),e._zod.optin="defaulted",ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>(s.direction==="backward"||i.value===void 0&&(i.value=r.defaultValue),r.innerType._zod.run(i,s))}),LC=ae("$ZodNonOptional",(e,r)=>{Ot.init(e,r),ht(e,"values",i=>{const s=i.def.innerType._zod.values;return s?new Set([...s].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,s)=>{const l=r.innerType._zod.run(i,s);return l instanceof Promise?l.then(c=>_x(c,e)):_x(l,e)}});function _x(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}function Nx(e,r,i,s){return r.issues.length?(e.value=i.catchValue({...r,value:e.value,error:{issues:r.issues.map(l=>hi(l,s,Wr()))},input:e.value}),e):(e.value=r.value,r.memo&&(e.memo=!0),e)}const BC=ae("$ZodCatch",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ht(e,"optout",i=>i.def.innerType._zod.optout),ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);const l=r.innerType._zod.run({value:i.value,issues:[]},s);return l instanceof Promise?l.then(c=>Nx(i,c,r,s)):Nx(i,l,r,s)}}),UC=ae("$ZodPipe",(e,r)=>{Ot.init(e,r),ht(e,"values",i=>i.def.in._zod.values),ht(e,"optin",i=>i.def.in._zod.optin),ht(e,"optout",i=>i.def.out._zod.optout),ht(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,s)=>{if(s.direction==="backward"){const c=r.out._zod.run(i,s);return c instanceof Promise?c.then(d=>Cu(d,r.in,s)):Cu(c,r.in,s)}const l=r.in._zod.run(i,s);return l instanceof Promise?l.then(c=>Cu(c,r.out,s)):Cu(l,r.out,s)}});function Cu(e,r,i){return e.issues.some(s=>s.code!=="unrecognized_keys")?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},i)}const HC=ae("$ZodReadonly",(e,r)=>{Ot.init(e,r),ht(e,"propValues",i=>i.def.innerType._zod.propValues),ht(e,"values",i=>i.def.innerType._zod.values),ht(e,"optin",i=>i.def.innerType?._zod?.optin),ht(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);const l=r.innerType._zod.run(i,s);return l instanceof Promise?l.then(Cx):Cx(l)}});function Cx(e){return e.memo||(e.value=Object.freeze(e.value)),e}const PC=ae("$ZodCustom",(e,r)=>{qn.init(e,r),Ot.init(e,r),e._zod.parse=(i,s)=>i,e._zod.check=i=>{const s=i.value,l=r.fn(s);if(l instanceof Promise)return l.then(c=>jx(c,i,s,e));jx(l,i,s,e)}});function jx(e,r,i,s){if(!e){const l={code:"custom",input:i,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(l.params=s._zod.def.params),r.issues.push(Hl(l))}}class $C extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const cp="~memo",Rx=[];function aS(e){return e!==null&&typeof e=="object"}function xm(e){return e.map(r=>r.path?{...r,path:r.path.slice()}:{...r})}const iS=new WeakMap,Sl=0,Fu=1,Rl=2;function Vu(e,r,i){const s=iS.get(e);if(s!==void 0)return s?Rl:Sl;if(r.has(e))return Rl;r.add(e);let l=Sl;const c=v=>{if(l!==Rl&&v?._zod){const y=Vu(v,r);y>l&&(l=y)}},d=(v,y)=>{let x=Sl;for(const w of Reflect.ownKeys(v)){const E=Object.getOwnPropertyDescriptor(v,w);if(!E.enumerable)continue;const _=E.get?Fu:E.value?._zod?Vu(E.value,r):Sl;_>x&&(x=_)}return x},f=v=>{v>l&&(l=v)},m=e._zod.def;switch(m.type){case"object":{const v=Yp(m);f(v?d(v):Fu),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const v of m.items)c(v);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const v of m.options)c(v);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const v=m._cachedInner??void 0;f(v?Vu(v,r):Fu);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const v in m){const y=Object.getOwnPropertyDescriptor(m,v);if(!y||y.get)continue;const x=y.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const w of x)c(w)}}}return r.delete(e),qC(e,l)}function qC(e,r){return r!==Fu&&iS.set(e,r===Rl),r}function ZC(e,r){let i=e.buckets.get(r);return i||(i=new WeakMap,e.buckets.set(r,i)),i}let ju;const Ru=[],IC={alloc(e,r,i){const s=ju;if(!s)return i;ju=void 0;const l={value:i,issues:null};return s.set(r.value,l),Ru.push(l),i},guard(e){var r;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,s=(l,c)=>{if(c.direction!=="backward"&&VC(c,l.value))throw new $C;return i(l,c)};e._zod.parse=s,e._zod.run===i&&(e._zod.run=s)})},attach(e){var r;let i,s=!1,l,c;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{const d=e._zod.parse,f=(m,g)=>{if(i===void 0){const H=Vu(e,new Set);if(H===Sl)return e._zod.parse=d,e._zod.run===f&&(e._zod.run=d),d(m,g);H===Rl||s?i=!0:s=!0}const v=m.value;if(!aS(v))return d(m,g);let y=g[cp];y||(y={buckets:new WeakMap,backEdges:void 0},g[cp]=y);let x;l===g?x=c:(x=ZC(y,e),l=g,c=x);const w=x.get(v);if(w)return m.value=w.value,w.issues?w.issues.length&&m.issues.push(...xm(w.issues)):(m.memo=!0,y.backEdges??(y.backEdges=new WeakSet),y.backEdges.add(w.value)),m;ju=x;const E=Ru.length,_=d(m,g);ju=void 0;const N=Ru.length>E?Ru.pop():void 0;return _ instanceof Promise?_.then(H=>(N&&(N.issues=H.issues.length?xm(H.issues):Rx),H)):(N&&(N.issues=_.issues.length?xm(_.issues):Rx),_)};e._zod.parse=f,e._zod.run===d&&(e._zod.run=f)})}};function FC(){return IC}function VC(e,r){const i=e[cp]?.backEdges;return i!==void 0&&aS(r)&&i.has(r)}const YC=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(c){return e[c]??null}const i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},s={nan:"NaN"};function l(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):s[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=l(c.expected),f=y4(c.input),m=l(f,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${Lw(c.values[0])}`:`Invalid option: expected one of ${hx(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",f=r(c.origin);return f?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${f.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",f=r(c.origin);return f?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${f.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end )DELIM" -R"DELIM(with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${i[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${hx(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(f=>`'${f}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function GC(){return{localeError:YC()}}var Ax;class KC{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){const s=i[0];return this._map.set(r,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const i=this._map.get(r);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(r),this}get(r){const i=r._zod.parent;if(i){const s={...this.get(i)??{}};delete s.id;const l={...s,...this._map.get(r)};return Object.keys(l).length?l:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function QC(){return new KC}(Ax=globalThis).__zod_globalRegistry??(Ax.__zod_globalRegistry=QC());const El=globalThis.__zod_globalRegistry;function sS(e){return e.checks&&(e.checks=[...e.checks]),e}function XC(e,r){return new e(sS({type:"string",...Re(r)}))}function JC(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Re(r)})}function WC(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Re(r)})}function e3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Re(r)})}function t3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Re(r)})}function n3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Re(r)})}function r3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Re(r)})}function a3(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Re(r)})}function i3(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Re(r)})}function s3(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Re(r)})}function o3(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Re(r)})}function l3(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Re(r)})}function c3(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Re(r)})}function u3(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Re(r)})}function d3(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Re(r)})}function f3(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Re(r)})}function h3(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Re(r)})}function m3(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Re(r)})}function p3(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Re(r)})}function g3(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Re(r)})}function y3(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Re(r)})}function v3(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Re(r)})}function b3(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Re(r)})}function x3(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Re(r)})}function w3(e,r){return new e({type:"string",format:"date",check:"string_format",...Re(r)})}function S3(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...Re(r)})}function E3(e,r){return new e({type:"string",format:"duration",check:"string_format",...Re(r)})}function T3(e,r){return new e(sS({type:"number",checks:[],...Re(r)}))}function k3(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Re(r)})}function _3(e,r){return new e({type:"boolean",...Re(r)})}function N3(e){return new e({type:"unknown"})}function C3(e,r){return new e({type:"never",...Re(r)})}function Ox(e,r){return new Iw({check:"less_than",...Re(r),value:e,inclusive:!1})}function wm(e,r){return new Iw({check:"less_than",...Re(r),value:e,inclusive:!0})}function Mx(e,r){return new Fw({check:"greater_than",...Re(r),value:e,inclusive:!1})}function Sm(e,r){return new Fw({check:"greater_than",...Re(r),value:e,inclusive:!0})}function zx(e,r){return new SN({check:"multiple_of",...Re(r),value:e})}function oS(e,r){return new TN({check:"max_length",...Re(r),maximum:e})}function ld(e,r){return new kN({check:"min_length",...Re(r),minimum:e})}function lS(e,r){return new _N({check:"length_equals",...Re(r),length:e})}function j3(e,r){return new NN({check:"string_format",format:"regex",...Re(r),pattern:e})}function R3(e){return new CN({check:"string_format",format:"lowercase",...Re(e)})}function A3(e){return new jN({check:"string_format",format:"uppercase",...Re(e)})}function O3(e,r){return new RN({check:"string_format",format:"includes",...Re(r),includes:e})}function M3(e,r){return new AN({check:"string_format",format:"starts_with",...Re(r),prefix:e})}function z3(e,r){return new ON({check:"string_format",format:"ends_with",...Re(r),suffix:e})}function ho(e){return new MN({check:"overwrite",tx:e})}function D3(e){return ho(r=>r.normalize(e))}function L3(){return ho(e=>e.trim())}function B3(){return ho(e=>e.toLowerCase())}function U3(){return ho(e=>e.toUpperCase())}function H3(){return ho(e=>a4(e))}function P3(e,r,i){return new e({type:"array",element:r,...Re(i)})}function $3(e,r,i){return new e({type:"custom",check:"custom",fn:r,...Re(i)})}function q3(e,r){const i=Z3(s=>(s.addIssue=l=>{if(typeof l=="string")s.issues.push(Hl(l,s.value,i._zod.def));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=s.value),c.inst??(c.inst=i),c.continue??(c.continue=!i._zod.def.abort),s.issues.push(Hl(c))}},e(s.value,s)),r);return i}function Z3(e,r){const i=new qn({check:"custom",...Re(r)});return i._zod.check=e,i}function Al(e,...r){for(const i of r)for(const s of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,s)&&wa(e,s,i[s]);return e}function cS(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??El,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function pi(e,r,i,s,l){const c=typeof r.unrepresentable=="function"?r.unrepresentable({zodSchema:e,path:s.path,message:l}):r.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(l);return Object.assign(i,c),!0}function Gt(e,r,i={path:[],schemaPath:[]}){var s;const l=e._zod.def,c=r.seen.get(e);if(c)return c.count++,i.schemaPath.includes(e)&&(c.cycle=i.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};r.seen.set(e,d),r.sharedDefsExtractedFor=void 0,r.sharedEmitDoneFor=void 0;const f=e._zod.toJSONSchema?.();if(f)d.schema=f;else{const v={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,d.schema,v);else{const x=d.schema,w=r.processors[l.type];if(!w)throw new Err)DELIM" -R"DELIM(or(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);w(e,r,x,v)}const y=e._zod.parent;y&&(d.ref||(d.ref=y),Gt(y,r,v),r.seen.get(y).isParent=!0)}const m=r.metadataRegistry.get(e);return m&&Al(d.schema,m),r.io==="input"&&On(e)&&(delete d.schema.examples,delete d.schema.default),r.io==="input"&&"_prefault"in d.schema&&((s=d.schema).default??(s.default=d.schema._prefault)),delete d.schema._prefault,r.seen.get(e).schema}function Dx(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function uS(e,r){const i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const s=new Map;for(const d of e.seen.entries()){const f=e.metadataRegistry.get(d[0])?.id;if(f){const m=s.get(f);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(f,d[0])}}const l=d=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(d[0])?.id,x=e.external.uri??(E=>E);if(y)return{ref:x(y)};const w=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=w,{defId:w,ref:`${x("__shared")}#/${f}/${Dx(w)}`}}const m="#",g=`${m}/${f}/`;if(d[1]===i&&!d[1].schema.id)return{ref:m};const v=d[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:g+Dx(v)}},c=d=>{if(d[1].schema.$ref)return;const f=d[1],{ref:m,defId:g}=l(d);f.def={...f.schema},g&&(f.defId=g);const v=f.schema;for(const y in v)delete v[y];v.$ref=m};if(e.cycles==="throw")for(const d of e.seen.entries()){const f=d[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ + `)}return N.write("payload.value = newResult;"),N.write("return payload;"),N.compile()};let d;const f=Ul,m=!Rr.jitless,v=m&&s4.value,y=r.catchall;let x;e._zod.parse=(w,E)=>{x??(x=s.value);const _=w.value;return f(_)?m&&v&&E?.async===!1&&E.jitless!==!0?(d||(d=c(r.shape)),w=d(w,E),y?nS([],_,w,E,x,e,E?.abortEarly===!0):w):i(w,E):(w.issues.push({expected:"object",code:"invalid_type",input:_,inst:e}),w)}});function Ex(e,r,i,s){for(const c of e)if(c.issues.length===0)return r.value=c.value,r;const l=e.filter(c=>!va(c));return l.length===1?(r.value=l[0].value,l[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(c=>c.issues.map(d=>mi(d,s,Wr())))}),r)}const rS=ae("$ZodUnion",(e,r)=>{Ot.init(e,r),ht(e,"optin",s=>s.def.options.some(l=>l._zod.optin==="defaulted")?"defaulted":s.def.options.some(l=>l._zod.optin!==void 0)?"optional":void 0),ht(e,"optout",s=>s.def.options.some(l=>l._zod.optout==="optional")?"optional":void 0),ht(e,"values",s=>{if(s.def.options.every(l=>l._zod.values))return new Set(s.def.options.flatMap(l=>Array.from(l._zod.values)))}),ht(e,"pattern",s=>{if(s.def.options.every(l=>l._zod.pattern)){const l=s.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${l.map(c=>Yp(c.source)).join("|")})$`)}});const i=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(s,l)=>{if(i)return i(s,l);let c=!1;const d=[];for(const f of r.options){const m=f._zod.run({value:s.value,issues:[]},l);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(f=>Ex(f,s,e,l)):Ex(d,s,e,l)}});function _C(e){const r=new Map;for(const i of e.options){const s=i._zod.propValues?.[e.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(i)}"`);for(const l of s)if(r.has(l)){if(l!==void 0)throw new Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,null)}else r.set(l,i)}return r}const NC=ae("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,rS.init(e,r);const i=e._zod.parse;ht(e,"propValues",l=>{const c={};let d=0;for(const f of l.def.options){const m=f._zod.propValues;if(!m||Object.keys(m).l)DELIM" +R"DELIM(ength===0)throw new Error(`Invalid discriminated union option at index "${l.def.options.indexOf(f)}"`);m[l.def.discriminator]?.has(void 0)&&d++;for(const[g,v]of Object.entries(m)){Object.prototype.hasOwnProperty.call(c,g)||wa(c,g,new Set);for(const y of v)c[g].add(y)}}return!l.def.unionFallback&&d>1&&c[l.def.discriminator]?.delete(void 0),c}),r.options.forEach((l,c)=>{const d=Gp(l._zod.def);if(d&&!Object.prototype.hasOwnProperty.call(d,r.discriminator))throw new Error(`Invalid discriminated union option at index "${c}"`)});const s=Sd(()=>_C(r));e._zod.parse=(l,c)=>{const d=l.value;if(!Ul(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const f=d?.[r.discriminator],m=s.value.get(f);return m&&(f!==void 0||c.direction!=="backward")?m._zod.run(l,c):r.unionFallback||c.direction==="backward"?i(l,c):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(s.value.keys()).filter(g=>s.value.get(g)!==null),input:d,path:[r.discriminator],inst:e}),l)}}),CC=ae("$ZodIntersection",(e,r)=>{Ot.init(e,r),e._zod.parse=(i,s)=>{const l=i.value,c=r.left._zod.run({value:l,issues:[]},s),d=r.right._zod.run({value:l,issues:[]},s);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,g])=>Tx(i,m,g)):Tx(i,c,d)}});function cp(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(io(e)&&io(r)){const i=Object.keys(r),s=Object.keys(e).filter(c=>i.indexOf(c)!==-1),l={...e,...r};Object.prototype.hasOwnProperty.call(l,"__proto__")&&delete l.__proto__;for(const c of s){if(c==="__proto__")continue;const d=cp(e[c],r[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};l[c]=d.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let s=0;s{let y;if(g.code==="unrecognized_keys"&&!g.path?.length)l??(l=g),y=g.keys;else if(g.code==="invalid_key"&&g.origin==="record"&&g.path?.length===1){const x=String(g.path[0]);c.has(x)||c.set(x,g),y=[x]}else return!1;for(const x of y)s.has(x)||s.set(x,{}),s.get(x)[v]=!0;return!0};for(const g of r.issues)d(g,"l")||e.issues.push(g);for(const g of i.issues)d(g,"r")||e.issues.push(g);const f=[...s].filter(([,g])=>g.l&&g.r).map(([g])=>g);if(f.length){const g=l?f.filter(v=>l.keys.includes(v)):[];g.length&&e.issues.push({...l,keys:g});for(const v of f)!g.includes(v)&&c.has(v)&&e.issues.push(c.get(v))}const m=cp(r.value,i.value);if(!m.valid){if(va(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return e.value=m.data,e}const jC=ae("$ZodRecord",(e,r)=>{Ot.init(e,r);const i=Rr.memoizer;i?.attach(e),e._zod.parse=(s,l)=>{const c=s.value;if(!io(c))return s.issues.push({expected:"record",code:"invalid_type",input:c,inst:e}),s;const d=[],f=r.keyType._zod.values;if(f&&!r.partial){s.value=i?i.alloc(e,s,{},l):{};const m=new Set;for(const v of f)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){if(m.add(typeof v=="number"?v.toString():v),v==="__proto__")continue;const y=r.keyType._zod.run({value:v,issues:[]},l);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){s.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(E=>mi(E,l,Wr())),input:v,path:[v],inst:e});continue}const x=y.value;if(x==="__proto__")continue;const w=r.valueType._zod.run({value:c[v],issues:[]},l);w instanceof Promise?d.push(w.then(E=>{E.issues.length&&s.issues.push(...Ks(v,E.issues)),s.value[x]=E.value})):(w.issues.length&&s.issues.push(...Ks(v,w.issues)),s.value[x]=w.value)}let g;for(const v in c)if(!m.has(v))if(r.mode==="loose"){if(v==="__proto__")continue;s.value[v]=c[v]}else g=g??[],g.push(v);g&&g.length>0&&s.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:g,continue:!0})}else{s.value=i?i.alloc(e,s,{},l):{};let m;for(const g of Reflect.ownKeys(c)){if(g==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,g))continue;let v=r.keyType._zod.run({value:g,issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof g=="string"&&tg.test(g)&&v.issues.length){const E=r.keyType._zod.run({value:Number(g),issues:[]},l);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(v=E)}if(v.issues.length){r.mode==="loose"?s.value[g]=c[g]:f?(m=m??[],m.push(g)):s.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(E=>mi(E,l,Wr())),input:g,path:[g],inst:e});continue}const x=v.value;if(x==="__proto__")continue;const w=r.valueType._zod.run({value:c[g],issues:[]},l);w instanceof Promise?d.push(w.then(E=>{E.issues.length&&s.issues.push(...Ks(g,E.issues)),s.value[x]=E.value})):(w.issues.length&&s.issues.push(...Ks(g,w.issues)),s.value[x]=w.value)}m&&m.length>0&&s.issues.push({code:"unrecognized_keys",input:c,inst:e,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>s):s}}),RC=ae("$ZodEnum",(e,r)=>{Ot.init(e,r);const i=ip(r.entries),s=new Set(i);e._zod.values=s,ht(e,"pattern",l=>{const c=ip(l.def.entries).filter(d=>o4.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>so(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(l,c)=>{const d=l.value;return s.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),AC=ae("$ZodLiteral",(e,r)=>{Ot.init(e,r);const i=new Set(r.values);e._zod.values=i,ht(e,"pattern",s=>{const l=s.def.values;return new RegExp(l.length?`^(${l.map(c=>typeof c=="string"?so(c):c?so(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(s,l)=>{const c=s.value;return i.has(c)||s.issues.push({code:"invalid_value",values:r.values,input:c,inst:e}),s}}),OC=ae("$ZodTransform",(e,r)=>{Ot.init(e,r),e._zod.optin="optional",Rr.memoizer?.guard(e),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new qw(e.constructor.name);const l=r.transform(i.value,i);if(s.async)return(l instanceof Promise?l:Promise.resolve(l)).then(d=>(i.value=d,i));if(l instanceof Promise)throw new Gi;return i.value=l,i}});function kx(e,r){return e.value=r.issues.length?void 0:r.value,e}const aS=ae("$ZodOptional",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",ht(e,"values",i=>{const s=i.def.innerType._zod.values;return s?new Set([...s,void 0]):void 0}),ht(e,"pattern",i=>{const s=i.def.innerType._zod.pattern;return s?new RegExp(`^(${Yp(s.source)})?$`):void 0}),e._zod.parse=(i,s)=>{if(i.value===void 0){if(r.innerType._zod.optin!=="defaulted")return i;const l=r.innerType._zod.run({value:i.value,issues:[]},s);return l instanceof Promise?l.then(c=>kx(i,c)):kx(i,l)}return r.innerType._zod.run(i,s)}}),MC=ae("$ZodExactOptional",(e,r)=>{aS.init(e,r),ht(e,"values",i=>i.def.innerType._zod.values),ht(e,"pattern",i=>i.def.innerType._zod.pattern),e._zod.parse=(i,s)=>r.innerType._zod.run(i,s)}),zC=ae("$ZodNullable",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin),ht(e,"optout",i=>i.def.innerType._zod.optout),ht(e,"pattern",i=>{const s=i.def.innerType._zod.pattern;return s?new RegExp(`^(${Yp(s.source)}|null)$`):void 0}),ht(e,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),e._zod.parse=(i,s)=>i.value===null?i:r.innerType._zod.run(i,s)}),DC=ae("$ZodDefault",(e,r)=>{Ot.init(e,r),e._zod.optin="defaulted",ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);if(i.value===void 0)return i.value=r.defaultValue,i;const l=r.innerType._zod.run(i,s);return l instanceof Promise?)DELIM" +R"DELIM(l.then(c=>_x(c,r)):_x(l,r)}});function _x(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}const BC=ae("$ZodPrefault",(e,r)=>{Ot.init(e,r),e._zod.optin="defaulted",ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>(s.direction==="backward"||i.value===void 0&&(i.value=r.defaultValue),r.innerType._zod.run(i,s))}),LC=ae("$ZodNonOptional",(e,r)=>{Ot.init(e,r),ht(e,"values",i=>{const s=i.def.innerType._zod.values;return s?new Set([...s].filter(l=>l!==void 0)):void 0}),e._zod.parse=(i,s)=>{const l=r.innerType._zod.run(i,s);return l instanceof Promise?l.then(c=>Nx(c,e)):Nx(l,e)}});function Nx(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}function Cx(e,r,i,s){return r.issues.length?(e.value=i.catchValue({...r,value:e.value,error:{issues:r.issues.map(l=>mi(l,s,Wr()))},input:e.value}),e):(e.value=r.value,r.memo&&(e.memo=!0),e)}const UC=ae("$ZodCatch",(e,r)=>{Ot.init(e,r),ht(e,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),ht(e,"optout",i=>i.def.innerType._zod.optout),ht(e,"values",i=>i.def.innerType._zod.values),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);const l=r.innerType._zod.run({value:i.value,issues:[]},s);return l instanceof Promise?l.then(c=>Cx(i,c,r,s)):Cx(i,l,r,s)}}),HC=ae("$ZodPipe",(e,r)=>{Ot.init(e,r),ht(e,"values",i=>i.def.in._zod.values),ht(e,"optin",i=>i.def.in._zod.optin),ht(e,"optout",i=>i.def.out._zod.optout),ht(e,"propValues",i=>i.def.in._zod.propValues),e._zod.parse=(i,s)=>{if(s.direction==="backward"){const c=r.out._zod.run(i,s);return c instanceof Promise?c.then(d=>Cu(d,r.in,s)):Cu(c,r.in,s)}const l=r.in._zod.run(i,s);return l instanceof Promise?l.then(c=>Cu(c,r.out,s)):Cu(l,r.out,s)}});function Cu(e,r,i){return e.issues.some(s=>s.code!=="unrecognized_keys")?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues},i)}const PC=ae("$ZodReadonly",(e,r)=>{Ot.init(e,r),ht(e,"propValues",i=>i.def.innerType._zod.propValues),ht(e,"values",i=>i.def.innerType._zod.values),ht(e,"optin",i=>i.def.innerType?._zod?.optin),ht(e,"optout",i=>i.def.innerType?._zod?.optout),e._zod.parse=(i,s)=>{if(s.direction==="backward")return r.innerType._zod.run(i,s);const l=r.innerType._zod.run(i,s);return l instanceof Promise?l.then(jx):jx(l)}});function jx(e){return e.memo||(e.value=Object.freeze(e.value)),e}const $C=ae("$ZodCustom",(e,r)=>{qn.init(e,r),Ot.init(e,r),e._zod.parse=(i,s)=>i,e._zod.check=i=>{const s=i.value,l=r.fn(s);if(l instanceof Promise)return l.then(c=>Rx(c,i,s,e));Rx(l,i,s,e)}});function Rx(e,r,i,s){if(!e){const l={code:"custom",input:i,inst:s,path:[...s._zod.def.path??[]],continue:!s._zod.def.abort};s._zod.def.params&&(l.params=s._zod.def.params),r.issues.push(Hl(l))}}class qC extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const up="~memo",Ax=[];function iS(e){return e!==null&&typeof e=="object"}function wm(e){return e.map(r=>r.path?{...r,path:r.path.slice()}:{...r})}const sS=new WeakMap,Sl=0,Vu=1,Rl=2;function Yu(e,r,i){const s=sS.get(e);if(s!==void 0)return s?Rl:Sl;if(r.has(e))return Rl;r.add(e);let l=Sl;const c=v=>{if(l!==Rl&&v?._zod){const y=Yu(v,r);y>l&&(l=y)}},d=(v,y)=>{let x=Sl;for(const w of Reflect.ownKeys(v)){const E=Object.getOwnPropertyDescriptor(v,w);if(!E.enumerable)continue;const _=E.get?Vu:E.value?._zod?Yu(E.value,r):Sl;_>x&&(x=_)}return x},f=v=>{v>l&&(l=v)},m=e._zod.def;switch(m.type){case"object":{const v=Gp(m);f(v?d(v):Vu),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const v of m.items)c(v);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const v of m.options)c(v);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const v=m._cachedInner??void 0;f(v?Yu(v,r):Vu);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const v in m){const y=Object.getOwnPropertyDescriptor(m,v);if(!y||y.get)continue;const x=y.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const w of x)c(w)}}}return r.delete(e),ZC(e,l)}function ZC(e,r){return r!==Vu&&sS.set(e,r===Rl),r}function IC(e,r){let i=e.buckets.get(r);return i||(i=new WeakMap,e.buckets.set(r,i)),i}let ju;const Ru=[],FC={alloc(e,r,i){const s=ju;if(!s)return i;ju=void 0;const l={value:i,issues:null};return s.set(r.value,l),Ru.push(l),i},guard(e){var r;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,s=(l,c)=>{if(c.direction!=="backward"&&YC(c,l.value))throw new qC;return i(l,c)};e._zod.parse=s,e._zod.run===i&&(e._zod.run=s)})},attach(e){var r;let i,s=!1,l,c;(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred.push(()=>{const d=e._zod.parse,f=(m,g)=>{if(i===void 0){const H=Yu(e,new Set);if(H===Sl)return e._zod.parse=d,e._zod.run===f&&(e._zod.run=d),d(m,g);H===Rl||s?i=!0:s=!0}const v=m.value;if(!iS(v))return d(m,g);let y=g[up];y||(y={buckets:new WeakMap,backEdges:void 0},g[up]=y);let x;l===g?x=c:(x=IC(y,e),l=g,c=x);const w=x.get(v);if(w)return m.value=w.value,w.issues?w.issues.length&&m.issues.push(...wm(w.issues)):(m.memo=!0,y.backEdges??(y.backEdges=new WeakSet),y.backEdges.add(w.value)),m;ju=x;const E=Ru.length,_=d(m,g);ju=void 0;const N=Ru.length>E?Ru.pop():void 0;return _ instanceof Promise?_.then(H=>(N&&(N.issues=H.issues.length?wm(H.issues):Ax),H)):(N&&(N.issues=_.issues.length?wm(_.issues):Ax),_)};e._zod.parse=f,e._zod.run===d&&(e._zod.run=f)})}};function VC(){return FC}function YC(e,r){const i=e[up]?.backEdges;return i!==void 0&&iS(r)&&i.has(r)}const GC=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(c){return e[c]??null}const i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},s={nan:"NaN"};function l(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):s[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=l(c.expected),f=v4(c.input),m=l(f,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${Lw(c.values[0])}`:`Invalid option: expected one of ${mx(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",f=r(c.origin);return f?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${f.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",f=r(c.origin);return f?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${f.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end )DELIM" +R"DELIM(with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${i[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${mx(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(f=>`'${f}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function KC(){return{localeError:GC()}}var Ox;class QC{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){const s=i[0];return this._map.set(r,s),s&&typeof s=="object"&&"id"in s&&this._idmap.set(s.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const i=this._map.get(r);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(r),this}get(r){const i=r._zod.parent;if(i){const s={...this.get(i)??{}};delete s.id;const l={...s,...this._map.get(r)};return Object.keys(l).length?l:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function XC(){return new QC}(Ox=globalThis).__zod_globalRegistry??(Ox.__zod_globalRegistry=XC());const El=globalThis.__zod_globalRegistry;function oS(e){return e.checks&&(e.checks=[...e.checks]),e}function JC(e,r){return new e(oS({type:"string",...Re(r)}))}function WC(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Re(r)})}function e3(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Re(r)})}function t3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Re(r)})}function n3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Re(r)})}function r3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Re(r)})}function a3(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Re(r)})}function i3(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Re(r)})}function s3(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Re(r)})}function o3(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Re(r)})}function l3(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Re(r)})}function c3(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Re(r)})}function u3(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Re(r)})}function d3(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Re(r)})}function f3(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Re(r)})}function h3(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Re(r)})}function m3(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Re(r)})}function p3(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Re(r)})}function g3(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Re(r)})}function y3(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Re(r)})}function v3(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Re(r)})}function b3(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Re(r)})}function x3(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Re(r)})}function w3(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Re(r)})}function S3(e,r){return new e({type:"string",format:"date",check:"string_format",...Re(r)})}function E3(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...Re(r)})}function T3(e,r){return new e({type:"string",format:"duration",check:"string_format",...Re(r)})}function k3(e,r){return new e(oS({type:"number",checks:[],...Re(r)}))}function _3(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Re(r)})}function N3(e,r){return new e({type:"boolean",...Re(r)})}function C3(e){return new e({type:"unknown"})}function j3(e,r){return new e({type:"never",...Re(r)})}function Mx(e,r){return new Fw({check:"less_than",...Re(r),value:e,inclusive:!1})}function Sm(e,r){return new Fw({check:"less_than",...Re(r),value:e,inclusive:!0})}function zx(e,r){return new Vw({check:"greater_than",...Re(r),value:e,inclusive:!1})}function Em(e,r){return new Vw({check:"greater_than",...Re(r),value:e,inclusive:!0})}function Dx(e,r){return new EN({check:"multiple_of",...Re(r),value:e})}function lS(e,r){return new kN({check:"max_length",...Re(r),maximum:e})}function cd(e,r){return new _N({check:"min_length",...Re(r),minimum:e})}function cS(e,r){return new NN({check:"length_equals",...Re(r),length:e})}function R3(e,r){return new CN({check:"string_format",format:"regex",...Re(r),pattern:e})}function A3(e){return new jN({check:"string_format",format:"lowercase",...Re(e)})}function O3(e){return new RN({check:"string_format",format:"uppercase",...Re(e)})}function M3(e,r){return new AN({check:"string_format",format:"includes",...Re(r),includes:e})}function z3(e,r){return new ON({check:"string_format",format:"starts_with",...Re(r),prefix:e})}function D3(e,r){return new MN({check:"string_format",format:"ends_with",...Re(r),suffix:e})}function ho(e){return new zN({check:"overwrite",tx:e})}function B3(e){return ho(r=>r.normalize(e))}function L3(){return ho(e=>e.trim())}function U3(){return ho(e=>e.toLowerCase())}function H3(){return ho(e=>e.toUpperCase())}function P3(){return ho(e=>i4(e))}function $3(e,r,i){return new e({type:"array",element:r,...Re(i)})}function q3(e,r,i){return new e({type:"custom",check:"custom",fn:r,...Re(i)})}function Z3(e,r){const i=I3(s=>(s.addIssue=l=>{if(typeof l=="string")s.issues.push(Hl(l,s.value,i._zod.def));else{const c=l;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=s.value),c.inst??(c.inst=i),c.continue??(c.continue=!i._zod.def.abort),s.issues.push(Hl(c))}},e(s.value,s)),r);return i}function I3(e,r){const i=new qn({check:"custom",...Re(r)});return i._zod.check=e,i}function Al(e,...r){for(const i of r)for(const s of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,s)&&wa(e,s,i[s]);return e}function uS(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??El,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function gi(e,r,i,s,l){const c=typeof r.unrepresentable=="function"?r.unrepresentable({zodSchema:e,path:s.path,message:l}):r.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(l);return Object.assign(i,c),!0}function Gt(e,r,i={path:[],schemaPath:[]}){var s;const l=e._zod.def,c=r.seen.get(e);if(c)return c.count++,i.schemaPath.includes(e)&&(c.cycle=i.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};r.seen.set(e,d),r.sharedDefsExtractedFor=void 0,r.sharedEmitDoneFor=void 0;const f=e._zod.toJSONSchema?.();if(f)d.schema=f;else{const v={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,d.schema,v);else{const x=d.schema,w=r.processors[l.type];if(!w)throw new Err)DELIM" +R"DELIM(or(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);w(e,r,x,v)}const y=e._zod.parent;y&&(d.ref||(d.ref=y),Gt(y,r,v),r.seen.get(y).isParent=!0)}const m=r.metadataRegistry.get(e);return m&&Al(d.schema,m),r.io==="input"&&On(e)&&(delete d.schema.examples,delete d.schema.default),r.io==="input"&&"_prefault"in d.schema&&((s=d.schema).default??(s.default=d.schema._prefault)),delete d.schema._prefault,r.seen.get(e).schema}function Bx(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function dS(e,r){const i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const s=new Map;for(const d of e.seen.entries()){const f=e.metadataRegistry.get(d[0])?.id;if(f){const m=s.get(f);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);s.set(f,d[0])}}const l=d=>{const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=e.external.registry.get(d[0])?.id,x=e.external.uri??(E=>E);if(y)return{ref:x(y)};const w=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=w,{defId:w,ref:`${x("__shared")}#/${f}/${Bx(w)}`}}const m="#",g=`${m}/${f}/`;if(d[1]===i&&!d[1].schema.id)return{ref:m};const v=d[1].schema.id??`__schema${e.counter++}`;return{defId:v,ref:g+Bx(v)}},c=d=>{if(d[1].schema.$ref)return;const f=d[1],{ref:m,defId:g}=l(d);f.def={...f.schema},g&&(f.defId=g);const v=f.schema;for(const y in v)delete v[y];v.$ref=m};if(e.cycles==="throw")for(const d of e.seen.entries()){const f=d[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const f=d[1];if(r===d[0]){c(d);continue}if(e.external){const g=e.external.registry.get(d[0])?.id;if(r!==d[0]&&g){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(f.cycle){c(d);continue}f.count>1&&e.reused==="ref"&&c(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function dS(e){const r=e.anyOf;if(!Array.isArray(r)||r.length===0||e.type!==void 0)return;const i=[];for(const s of r){if(!s||typeof s!="object")return;dS(s);const l=Object.keys(s);if(l.length!==1||l[0]!=="type")return;const c=s.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;i.includes(d)||i.push(d)}}delete e.anyOf,e.type=i.length===1?i[0]:i}const fS=new Set(["type","properties","required","additionalProperties"]),Lx=["oneOf","anyOf"];function Bx(e){const r=e.additionalProperties;return r===void 0||r===!1||typeof r!="object"||r===null?null:Object.keys(r).length?r:null}function up(e){const r=[];for(const c of e){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!fS.has(d))return null;r.push(c)}const i={},s=new Set;for(const c of r){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;const f=[];for(const g of r){const v=g.properties?.[d]??Bx(g);v!=null&&(f.some(y=>JSON.stringify(y)===JSON.stringify(v))||f.push(v))}const m=f.length===1?f[0]:up(f)??{allOf:f};wa(i,d,m)}for(const d of c.required??[])s.add(d)}const l={type:"object",properties:i};if(s.size&&(l.required=[...s]),r.every(c=>c.additionalProperties===!1))l.additionalProperties=!1;else{const c=[];for(const d of r){const f=Bx(d);f&&!c.some(m=>JSON.stringify(m)===JSON.stringify(f))&&c.push(f)}c.length===1?l.additionalProperties=c[0]:c.length>1&&(l.additionalProperties={allOf:c})}return l}function I3(e){const r=e.allOf;if(!Array.isArray(r)||r.length<2)return;for(const l of fS)if(l in e)return;const i=r.filter(l=>Lx.some(c=>Array.isArray(l[c])));let s=null;if(!i.length)s=up(r);else{const l=i[0],c=Lx.find(m=>Array.isArray(l[m]));if(Object.keys(l).length!==1)return;const d=r.filter(m=>m!==l),f=l[c].map(m=>up([...d,m]));if(f.some(m=>!m))return;s={[c]:f}}s&&(delete e.allOf,Al(e,s))}function hS(e,r){const i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=f=>{const m=e.seen.get(f);if(m.ref===null)return;const g=m.def??m.schema,v={...g},y=m.ref;if(m.ref=null,y){s(y);const w=e.seen.get(y),E=w.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(E)):Al(g,E),Al(g,v),f._zod.parent===y)for(const N in g)N==="$ref"||N==="allOf"||N in v||delete g[N];if(E.$ref&&w.def)for(const N in g)N==="$ref"||N==="allOf"||N in w.def&&JSON.stringify(g[N])===JSON.stringify(w.def[N])&&delete g[N]}const x=f._zod.parent;if(x&&x!==y){s(x);const w=e.seen.get(x);if(w?.schema.$ref&&(g.$ref=w.schema.$ref,w.def))for(const E in g)E==="$ref"||E==="allOf"||E in w.def&&JSON.stringify(g[E])===JSON.stringify(w.def[E])&&delete g[E]}e.override({zodSchema:f,jsonSchema:g,path:m.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const f of[...e.seen.entries()].reverse())s(f[0]);if(e.target!=="openapi-3.0")for(const f of e.seen.entries())dS(f[1].def??f[1].schema);for(const f of e.deferred)f();if(e.intersections.length){const f=new Map;for(const m of e.seen.values())for(const g of[m.schema,m.def]){const v=g?.allOf;if(!Array.isArray(v))continue;const y=f.get(v);y?y.push(g):f.set(v,[g])}for(const m of e.intersections)for(const g of f.get(m)??[])I3(g)}}const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(r)?.id;if(!f)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(f)}Al(l,i.defId?i.schema:i.def??i.schema);const c=e.metadataRegistry.get(r)?.id;c!==void 0&&l.id===c&&delete l.id;const d=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const f of e.seen.entries()){const m=f[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,wa(d,m.defId,m.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?l.$defs=d:l.definitions=d);try{const f=JSON.parse(JSON.stringify(l));return Object.defineProperty(f,"~standard",{value:{...r["~standard"],jsonSchema:{input:cd(r,"input",e.processors),output:cd(r,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function On(e,r){const i=r??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return On(s.element,i);if(s.type==="set")return On(s.valueType,i);if(s.type==="lazy")return On(s.getter(),i);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault"||s.type==="catch")return On(s.innerType,i);if(s.type==="intersection")return On(s.left,i)||On(s.right,i);if(s.type==="record"||s.type==="map")return On(s.keyType,i)||On(s.valueType,i);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:On(s.in,i)||On(s.out,i);if(s.type==="object"){for(const l in s.shape)if(On(s.shape[l],i))return!0;return!1}if(s.type==="union"){for(const l of s.options)if(On(l,i))return!0;return!1}if(s.type==="tuple"){for(const l of s.items)if(On(l,i))return!0;return!!(s.rest&&On(s.rest,i))}return!1}const F3=(e,r={})=>i=>{const s=cS({...i,processors:r});return Gt(e,s),uS(s,e),hS(s,e)},cd=(e,r,i={})=>s=>{const{libraryOptions:l,target:c}=s??{},d=cS({...l??{},target:c,io:r,processors:i});return Gt(e,d),uS(d,e),hS(d,e)},oo=(e,r,i)=>{(e[r]===void 0||i>e[r])&&(e[r]=i)},lo=(e,r,i)=>{(e[r]===void 0||i{oo(e,"minimum",r),lo(e,"maximum",r)},mS=(e,r)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(r)||e.multipleOf.push(r)},pS=(e,r)=>{e.patterns??(e.patterns=new Set),e.patterns.add(r)},gS=(e,r)=>{e.mime=e.mime?e.mime.filter(i=>r.includes(i)):[...r]},yS=(e,r)=>{e.format=r,)DELIM" -R"DELIM(r.includes("int")&&(e.isInt=!0)},Hx=(e,r)=>oo(e,"minimum",r.minimum),Px=(e,r)=>lo(e,"maximum",r.maximum),$x=e=>(r,i)=>{yS(r,i.format);const[s,l]=e[i.format];oo(r,"minimum",s),lo(r,"maximum",l)},V3={greater_than:(e,r)=>oo(e,r.inclusive?"minimum":"exclusiveMinimum",r.value),less_than:(e,r)=>lo(e,r.inclusive?"maximum":"exclusiveMaximum",r.value),multiple_of:(e,r)=>mS(e,r.value),number_format:$x(Bw),bigint_format:$x(l4),min_length:Hx,max_length:Px,length_equals:(e,r)=>Ux(e,r.length),min_size:Hx,max_size:Px,size_equals:(e,r)=>Ux(e,r.size),string_format:(e,r)=>{yS(e,r.format),r.pattern&&pS(e,r.pattern),(r.format==="base64"||r.format==="base64url")&&(e.contentEncoding=r.format),(r.local||r.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,r)=>gS(e,r.mime)};function Cr(e){const r={},i=e._zod.def,s=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(const c of s)V3[c._zod.def.check]?.(r,c._zod.def);const l=e._zod.bag;l.minimum!==void 0&&oo(r,"minimum",l.minimum),l.exclusiveMinimum!==void 0&&oo(r,"exclusiveMinimum",l.exclusiveMinimum),l.maximum!==void 0&&lo(r,"maximum",l.maximum),l.exclusiveMaximum!==void 0&&lo(r,"exclusiveMaximum",l.exclusiveMaximum),l.multipleOf!==void 0&&mS(r,l.multipleOf),l.format!==void 0&&(r.format??(r.format=l.format),l.format.includes("int")&&(r.isInt=!0)),l.mime&&gS(r,l.mime);for(const c of l.patterns??[])pS(r,c);return r}const Y3={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},G3=new Map([[Jw,cN],[rg,uN]]),vS=e=>G3.get(e)??e,K3=(e,r,i,s)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:f,patterns:m,contentEncoding:g,laxFormat:v}=Cr(e);if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),f&&(l.format=Y3[f]??f,l.format===""&&delete l.format,(f==="time"||v)&&delete l.format),g&&(l.contentEncoding=g),m&&m.size>0){const y=[...m].map(vS);y.length===1?l.pattern=y[0].source:y.length>1&&(l.allOf=[...y.map(x=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},Q3=(e,r,i,s)=>{const l=i,{minimum:c,maximum:d,multipleOf:f,exclusiveMaximum:m,exclusiveMinimum:g,isInt:v}=Cr(e);l.type=v?"integer":"number";const y=typeof g=="number"&&g>=(c??Number.NEGATIVE_INFINITY),x=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),w=r.target==="draft-04"||r.target==="openapi-3.0";if(y?w?(l.minimum=g,l.exclusiveMinimum=!0):l.exclusiveMinimum=g:typeof c=="number"&&(l.minimum=c),x?w?(l.maximum=m,l.exclusiveMaximum=!0):l.exclusiveMaximum=m:typeof d=="number"&&(l.maximum=d),f){const E=new Set;for(const H of f)Number.isFinite(H)&&H!==0?E.add(Math.abs(H)):pi(e,r,l,s,`A multipleOf divisor of ${H} cannot be represented in JSON Schema`);const[_,...N]=E;_!==void 0&&(l.multipleOf=_),N.length&&(l.allOf=[...l.allOf??[],...N.map(H=>({multipleOf:H}))])}},X3=(e,r,i,s)=>{i.type="boolean"},J3=(e,r,i,s)=>{i.not={}},W3=(e,r,i,s)=>{},ej=(e,r,i,s)=>{const l=e._zod.def,c=ap(l.entries);if(c.length===0){i.not={};return}c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},tj=(e,r,i,s)=>{const l=e._zod.def;if(l.values.length===0){i.not={};return}const c=[];for(const d of l.values)if(d===void 0){if(pi(e,r,i,s,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(pi(e,r,i,s,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];i.type=d===null?"null":typeof d,r.target==="draft-04"||r.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},nj=(e,r,i,s)=>{pi(e,r,i,s,"Custom types cannot be represented in JSON Schema")},rj=(e,r,i,s)=>{pi(e,r,i,s,"Transforms cannot be represented in JSON Schema")},aj=(e,r,i,s)=>{const l=i,c=e._zod.def,{minimum:d,maximum:f}=Cr(e);typeof d=="number"&&(l.minItems=d),typeof f=="number"&&(l.maxItems=f),l.type="array",l.items=Gt(c.element,r,{...s,path:[...s.path,"items"]})};function ud(e){const r=e._zod.def;return r.type==="pipe"&&r.in._zod.traits.has("$ZodTransform")?ud(r.out):r.type==="catch"?ud(r.innerType):e._zod.optin}const ij=(e,r,i,s)=>{const l=i,c=e._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&pi(e,r,l,s,"Symbol keys cannot be represented in JSON Schema"))return;l.type="object",l.properties={};for(const g in d)wa(l.properties,g,Gt(d[g],r,{...s,path:[...s.path,"properties",g]}));const m=[];for(const g of Object.keys(d)){const v=c.shape[g];(r.io==="input"?ud(v)===void 0:v._zod.optout===void 0)&&m.push(g)}m.length>0&&(l.required=m),c.catchall?._zod.def.type==="never"?l.additionalProperties=!1:c.catchall?c.catchall&&(l.additionalProperties=Gt(c.catchall,r,{...s,path:[...s.path,"additionalProperties"]})):r.io==="output"&&(l.additionalProperties=!1)},sj=(e,r,i,s)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((f,m)=>Gt(f,r,{...s,path:[...s.path,c?"oneOf":"anyOf",m]}));c?i.oneOf=d:i.anyOf=d},oj=(e,r,i,s)=>{const l=e._zod.def,c=Gt(l.left,r,{...s,path:[...s.path,"allOf",0]}),d=Gt(l.right,r,{...s,path:[...s.path,"allOf",1]}),f=g=>"allOf"in g&&Object.keys(g).length===1,m=[...f(c)?c.allOf:[c],...f(d)?d.allOf:[d]];i.allOf=m,r.intersections.push(m)};function dp(e,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);const E=e.get(r)?.def;if(!E)return r;const _=dp(e,E,i);return _===E?r:_}for(const E of["anyOf","oneOf"]){const _=r[E];if(!Array.isArray(_))continue;const N=_.map(H=>dp(e,H,i));N.some((H,O)=>H!==_[O])&&(r={...r,[E]:N})}const s=Array.isArray(r.type)?r.type:[r.type],l=!s.includes("string")&&s.some(E=>E==="number"||E==="integer"),c=r.enum??(r.const!==void 0?[r.const]:void 0);if(!l&&!c?.some(E=>typeof E=="number"))return r;const{minimum:d,maximum:f,exclusiveMinimum:m,exclusiveMaximum:g,multipleOf:v,format:y,id:x,...w}=r;return w.enum?w.enum=w.enum.map(E=>typeof E=="number"?String(E):E):typeof w.const=="number"&&(w.const=String(w.const)),l&&(w.type="string",c||(w.pattern=(s.includes("number")?eg:vN).source)),w}const fp=new WeakMap;function lj(e){const r=new Map;for(const s of e.seen.values())s.def&&!r.has(s.schema)&&r.set(s.schema,s);const i=new Map;for(const s of fp.get(e)??[]){const l=e.seen.get(s),c=(l?.def??l?.schema)?.propertyNames;if(!c||c===!0||i.has(c))continue;const d=dp(r,c,new Set);d!==c&&i.set(c,d)}if(i.size)for(const s of e.seen.values())for(const l of[s.schema,s.def]){const c=l&&i.get(l.propertyNames);c&&(l.propertyNames=c)}}const cj=(e,r,i,s)=>{const l=i,c=e._zod.def;l.type="object";const d=c.keyType,f=Cr(d).patterns;if(c.mode==="loose"&&f&&f.size>0){const v=Gt(c.valueType,r,{...s,path:[...s.path,"patternProperties","*"]});l.patternProperties={};for(const y of f)wa(l.patternProperties,vS(y).source,v)}else{if(r.target==="draft-07"||r.target==="draft-2020-12"){l.propertyNames=Gt(c.keyType,r,{...s,path:[...s.path,"propertyNames"]});let v=fp.get(r);v||(v=[],fp.set(r,v),r.deferred.push(()=>lj(r))),v.push(e)}l.additionalProperties=Gt(c.valueType,r,{...s,path:[...s.path,"additionalProperties"]})}const m=d._zod.values,g=r.io==="input"&&ud(c.valueType)!==void 0;if(m&&!c.partial&&!g){const v=[...m].filter(y=>typeof y=="string"||typeof y=="number");v.length>0&&(l.required=v.map(String))}},uj=(e,r,i,s)=>{const l=e._zod.def,c=Gt(l.innerType,r,s),d=r.seen.get(e);r.target==="openapi-3.0"?(d.ref=l.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},dj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType},ag=Symbol();function bS(e,r,i,s,l){let c=!1;const d=JSON.stringify(e,(f,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(pi(r,i,s,l,"BigInt defaults cannot be represented in JSON Schema"),ag):JSON.parse(d)}const fj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType;const d=bS(l.defaultValue,e,r,i,s);d!==ag&&(i.default=d)},hj=(e,r,i,s)=>{const l=e._zod.def;G)DELIM" -R"DELIM(t(l.innerType,r,s);const c=r.seen.get(e);if(c.ref=l.innerType,r.io!=="input")return;const d=bS(l.defaultValue,e,r,i,s);d!==ag&&(i._prefault=d)},mj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType;let d;try{d=l.catchValue(void 0)}catch{pi(e,r,i,s,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},pj=(e,r,i,s)=>{const l=e._zod.def,c=l.in._zod.traits.has("$ZodTransform"),d=r.io==="input"?c?l.out:l.in:l.out;Gt(d,r,s);const f=r.seen.get(e);f.ref=d},gj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType,i.readOnly=!0},xS=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType},qx=new WeakSet([Object.prototype,Error.prototype]);function Au(e,r,i){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get(){const s=i(this);return Object.defineProperty(this,r,{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,r,{value:s,configurable:!0,writable:!0})}})}const yj=(e,r)=>{R4.init(e,r),e.name="ZodError";const i=Object.getPrototypeOf(e);qx.has(i)||(qx.add(i),Au(i,"format",s=>l=>M4(s,l)),Au(i,"flatten",s=>l=>O4(s,l)),Au(i,"addIssue",s=>l=>{s.issues.push(l),s.message=JSON.stringify(s.issues,ip,2)}),Au(i,"addIssues",s=>l=>{s.issues.push(...l),s.message=JSON.stringify(s.issues,ip,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},gr=ae("ZodError",yj,void 0,{Parent:Error}),vj=Qp(gr),bj=Xp(gr),xj=Jp(gr),wj=Wp(gr),Sj=H4(gr),Ej=P4(gr),Tj=$4(gr),kj=q4(gr),_j=Z4(gr),Nj=I4(gr),Cj=F4(gr),jj=V4(gr);function Rj(){Rr.localeError||Wr(GC())}function kd(){Rr.memoizer||Wr({memoizer:FC()})}const Mt=ae("ZodType",(e,r)=>(Rj(),Ot.init(e,r),e.def=r,e.type=r.type,e),{check(...e){const r=this.def;return this.clone(Wn(r,{checks:[...r.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,r){return gi(this,e,r)},brand(){return this},register(e,r){return e.add(this,r),this},refine(e,r){return this.check(jR(e,r))},superRefine(e,r){return this.check(RR(e,r))},overwrite(e){return this.check(ho(e))},optional(){return Fx(this)},exactOptional(){return gR(this)},nullable(){return Vx(this)},nullish(){return Fx(Vx(this))},nonoptional(e){return SR(this,e)},array(){return ea(this)},or(e){return oR([this,e])},and(e){return uR(this,e)},transform(e){return Yx(this,pR(e))},default(e){return bR(this,e)},prefault(e){return wR(this,e)},catch(e){return TR(this,e)},pipe(e){return Yx(this,e)},readonly(){return NR(this)},describe(e){const r=this.clone();return El.add(r,{description:e}),r},meta(...e){if(e.length===0)return El.get(this);const r=this.clone();return El.add(r,e[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...r){return r.length===0?e(this):e(this,...r)},get"~standard"(){return Hw(this,"~standard",{...Yw(this),jsonSchema:{input:cd(this,"input"),output:cd(this,"output")}})},set"~standard"(e){mi(this,"~standard",e)},parse:function e(r,i){return vj(this,r,i,{callee:e})},parseAsync:async function e(r,i){return await bj(this,r,i,{callee:e})},safeParse(e,r){return xj(this,e,r)},async safeParseAsync(e,r){return wj(this,e,r)},get spa(){return this?.safeParseAsync},set spa(e){mi(this,"spa",e)},validate(e,r){return L4(this,e,r)},validateAsync(e,r){return U4(this,e,r)},encode:function e(r,i){return Sj(this,r,i,{callee:e})},decode:function e(r,i){return Ej(this,r,i,{callee:e})},encodeAsync:async function e(r,i){return await Tj(this,r,i,{callee:e})},decodeAsync:async function e(r,i){return await kj(this,r,i,{callee:e})},safeEncode(e,r){return _j(this,e,r)},safeDecode(e,r){return Nj(this,e,r)},async safeEncodeAsync(e,r){return Cj(this,e,r)},async safeDecodeAsync(e,r){return jj(this,e,r)},toJSONSchema(e){return F3(this,{})(e)},get description(){return El.get(this)?.description},get _def(){return this._zod.def}}),wS=ae("_ZodString",(e,r)=>{ng.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>K3(e,i,s)},Pw({format:e=>Cr(e).format??null,minLength:e=>Cr(e).minimum??null,maxLength:e=>Cr(e).maximum??null},{regex(...e){return this.check(j3(...e))},includes(...e){return this.check(O3(...e))},startsWith(...e){return this.check(M3(...e))},endsWith(...e){return this.check(z3(...e))},min(...e){return this.check(ld(...e))},max(...e){return this.check(oS(...e))},length(...e){return this.check(lS(...e))},nonempty(...e){return this.check(ld(1,...e))},lowercase(e){return this.check(R3(e))},uppercase(e){return this.check(A3(e))},trim(){return this.check(L3())},normalize(...e){return this.check(D3(...e))},toLowerCase(){return this.check(B3())},toUpperCase(){return this.check(U3())},slugify(){return this.check(H3())}})),Aj=ae("ZodString",(e,r)=>{ng.init(e,r),wS.init(e,r)},{email(e){return this.check(JC(Lj,e))},url(e){return this.check(a3(Uj,e))},jwt(e){return this.check(b3(Wj,e))},emoji(e){return this.check(i3(Hj,e))},guid(e){return this.check(WC(Bj,e))},uuid(e){return this.check(e3(Ou,e))},uuidv4(e){return this.check(t3(Ou,e))},uuidv6(e){return this.check(n3(Ou,e))},uuidv7(e){return this.check(r3(Ou,e))},nanoid(e){return this.check(s3(Pj,e))},cuid(e){return this.check(o3($j,e))},cuid2(e){return this.check(l3(qj,e))},ulid(e){return this.check(c3(Zj,e))},base64(e){return this.check(g3(Qj,e))},base64url(e){return this.check(y3(Xj,e))},xid(e){return this.check(u3(Ij,e))},ksuid(e){return this.check(d3(Fj,e))},ipv4(e){return this.check(f3(Vj,e))},ipv6(e){return this.check(h3(Yj,e))},cidrv4(e){return this.check(m3(Gj,e))},cidrv6(e){return this.check(p3(Kj,e))},e164(e){return this.check(v3(Jj,e))},datetime(e){return this.check(x3(Oj,e))},date(e){return this.check(w3(Mj,e))},time(e){return this.check(S3(zj,e))},duration(e){return this.check(E3(Dj,e))}});function et(e){return XC(Aj,e)}const zt=ae("ZodStringFormat",(e,r)=>{jt.init(e,r),wS.init(e,r)}),Oj=ae("ZodISODateTime",(e,r)=>{WN.init(e,r),zt.init(e,r)}),Mj=ae("ZodISODate",(e,r)=>{eC.init(e,r),zt.init(e,r)}),zj=ae("ZodISOTime",(e,r)=>{tC.init(e,r),zt.init(e,r)}),Dj=ae("ZodISODuration",(e,r)=>{nC.init(e,r),zt.init(e,r)}),Lj=ae("ZodEmail",(e,r)=>{HN.init(e,r),zt.init(e,r)}),Bj=ae("ZodGUID",(e,r)=>{BN.init(e,r),zt.init(e,r)}),Ou=ae("ZodUUID",(e,r)=>{UN.init(e,r),zt.init(e,r)}),Uj=ae("ZodURL",(e,r)=>{FN.init(e,r),zt.init(e,r)}),Hj=ae("ZodEmoji",(e,r)=>{VN.init(e,r),zt.init(e,r)}),Pj=ae("ZodNanoID",(e,r)=>{YN.init(e,r),zt.init(e,r)}),$j=ae("ZodCUID",(e,r)=>{GN.init(e,r),zt.init(e,r)}),qj=ae("ZodCUID2",(e,r)=>{KN.init(e,r),zt.init(e,r)}),Zj=ae("ZodULID",(e,r)=>{QN.init(e,r),zt.init(e,r)}),Ij=ae("ZodXID",(e,r)=>{XN.init(e,r),zt.init(e,r)}),Fj=ae("ZodKSUID",(e,r)=>{JN.init(e,r),zt.init(e,r)}),Vj=ae("ZodIPv4",(e,r)=>{rC.init(e,r),zt.init(e,r)}),Yj=ae("ZodIPv6",(e,r)=>{iC.init(e,r),zt.init(e,r)}),Gj=ae("ZodCIDRv4",(e,r)=>{sC.init(e,r),zt.init(e,r)}),Kj=ae("ZodCIDRv6",(e,r)=>{lC.init(e,r),zt.init(e,r)}),Qj=ae("ZodBase64",(e,r)=>{cC.init(e,r),zt.init(e,r)}),Xj=ae("ZodBase64URL",(e,r)=>{dC.init(e,r),zt.init(e,r)}),Jj=ae("ZodE164",(e,r)=>{fC.init(e,r),zt.init(e,r)}),Wj=ae("ZodJWT",(e,r)=>{mC.init(e,r),zt.init(e,r)}),SS=ae("ZodNumber",(e,r)=>{Ww.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>Q3(e,i,s,l),e.isFinite=!0},Pw({minValue:e=>{const{minimum:r,exclusiveMinimum:i}=Cr(e);return Math.max(r??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:r,exclusiveMaximum:i}=Cr(e);return Math.min(r??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:r,multipleOf:i}=Cr(e);return!!r||!!i?.some(Number.isSafeInteger)},format:e=>Cr(e).format??null},{gt(e,r){return this.check(Mx(e,r))},gte(e,r){return this.check(Sm(e,r))},min(e,r){return this.check(Sm(e,r))},lt(e,r){return this.check(Ox(e,r))},lte(e,r){return this.check(wm(e,r))},max(e,r){return this.check(wm(e,r))},int(e){return this.check(Zx(e))},safe(e){return this.check(Zx(e))},positive(e){return th)DELIM" -R"DELIM(is.check(Mx(0,e))},nonnegative(e){return this.check(Sm(0,e))},negative(e){return this.check(Ox(0,e))},nonpositive(e){return this.check(wm(0,e))},multipleOf(e,r){return this.check(zx(e,r))},step(e,r){return this.check(zx(e,r))},finite(){return this}}));function Ve(e){return T3(SS,e)}const eR=ae("ZodNumberFormat",(e,r)=>{pC.init(e,r),SS.init(e,r)});function Zx(e){return k3(eR,e)}const tR=ae("ZodBoolean",(e,r)=>{gC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>X3(e,i,s)});function oi(e){return _3(tR,e)}const nR=ae("ZodUnknown",(e,r)=>{yC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>W3()});function hp(){return N3(nR)}const rR=ae("ZodNever",(e,r)=>{vC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>J3(e,i,s)});function aR(e){return C3(rR,e)}const iR=ae("ZodArray",(e,r)=>{kd(),wC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>aj(e,i,s,l),e.element=r.element},{min(e,r){return this.check(ld(e,r))},nonempty(e){return this.check(ld(1,e))},max(e,r){return this.check(oS(e,r))},length(e,r){return this.check(lS(e,r))},unwrap(){return this.element}});function ea(e,r){return P3(iR,e,r)}const sR=ae("ZodObject",(e,r)=>{kd(),TC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>ij(e,i,s,l),S4(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return fR(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Wn(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Wn(this._zod.def,{catchall:hp()}))},loose(){return this.clone(Wn(this._zod.def,{catchall:hp()}))},strict(){return this.clone(Wn(this._zod.def,{catchall:aR()}))},strip(){return this.clone(Wn(this._zod.def,{catchall:void 0}))},extend(e){return d4(this,e)},safeExtend(e){return f4(this,e)},merge(e){return h4(this,e)},pick(e){return c4(this,e)},omit(e){return u4(this,e)},partial(...e){return mx(kS,this,e[0])},exactPartial(...e){return mx(_S,this,e[0],"exactPartial")},required(...e){return m4(NS,this,e[0])}});function Tt(e,r){const i={type:"object",shape:e??{},...Re(r)};return new sR(i)}const ES=ae("ZodUnion",(e,r)=>{nS.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>sj(e,i,s,l),e.options=r.options});function oR(e,r){return new ES({type:"union",options:e,...Re(r)})}const lR=ae("ZodDiscriminatedUnion",(e,r)=>{ES.init(e,r),_C.init(e,r)});function TS(e,r,i){return new lR({type:"union",options:r,discriminator:e,...Re(i)})}const cR=ae("ZodIntersection",(e,r)=>{NC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>oj(e,i,s,l)});function uR(e,r){return new cR({type:"intersection",left:e,right:r})}const Ix=ae("ZodRecord",(e,r)=>{kd(),CC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>cj(e,i,s,l),e.keyType=r.keyType,e.valueType=r.valueType});function dR(e,r,i){return!r||!r._zod?new Ix({type:"record",keyType:et(),valueType:e,...Re(r)}):new Ix({type:"record",keyType:e,valueType:r,...Re(i)})}const mp=ae("ZodEnum",(e,r)=>{jC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(s,l,c)=>ej(e,s,l),e.enum=r.entries,e.options=[...e._zod.values];const i=new Set(Object.keys(r.entries));e.extract=(s,l)=>{const c={};for(const d of s)if(i.has(d))c[d]=r.entries[d];else throw new Error(`Key ${d} not found in enum`);return new mp({...r,checks:[],...Re(l),entries:c})},e.exclude=(s,l)=>{const c={...r.entries};for(const d of s)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new mp({...r,checks:[],...Re(l),entries:c})}});function fR(e,r){const i=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new mp({type:"enum",entries:i,...Re(r)})}const hR=ae("ZodLiteral",(e,r)=>{RC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>tj(e,i,s,l),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function li(e,r){return new hR({type:"literal",values:Array.isArray(e)?e:[e],...Re(r)})}const mR=ae("ZodTransform",(e,r)=>{kd(),AC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>rj(e,i,s,l),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new $w(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(Hl(c,i.value,r));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=e),i.issues.push(Hl(d))}};const l=r.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function pR(e){return new mR({type:"transform",transform:e})}const kS=ae("ZodOptional",(e,r)=>{rS.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>xS(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function Fx(e){return new kS({type:"optional",innerType:e})}const _S=ae("ZodExactOptional",(e,r)=>{OC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>xS(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function gR(e){return new _S({type:"optional",innerType:e})}const yR=ae("ZodNullable",(e,r)=>{MC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>uj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function Vx(e){return new yR({type:"nullable",innerType:e})}const vR=ae("ZodDefault",(e,r)=>{zC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>fj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function bR(e,r){return new vR({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Dw(r)}})}const xR=ae("ZodPrefault",(e,r)=>{DC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>hj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function wR(e,r){return new xR({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Dw(r)}})}const NS=ae("ZodNonOptional",(e,r)=>{LC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>dj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function SR(e,r){return new NS({type:"nonoptional",innerType:e,...Re(r)})}const ER=ae("ZodCatch",(e,r)=>{BC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>mj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function TR(e,r){return new ER({type:"catch",innerType:e,catchValue:typeof r=="function"?r:T4(r)})}const kR=ae("ZodPipe",(e,r)=>{UC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>pj(e,i,s,l),e.in=r.in,e.out=r.out});function Yx(e,r){return new kR({type:"pipe",in:e,out:r})}const _R=ae("ZodReadonly",(e,r)=>{HC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>gj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function NR(e){return new _R({type:"readonly",innerType:e})}const CR=ae("ZodCustom",(e,r)=>{PC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>nj(e,i,s,l)});function jR(e,r={}){return $3(CR,e,r)}function RR(e,r){return q3(e,r)}function ba(e){if(!e)return;const r=e.trim();if(!r)return;const i=r.toLowerCase(),s=i.indexOf("1");if(s>0){const d=i.slice(0,s);if(["bc","tb","bcrt","ltc","sb"].includes(d)){const f=i.slice(s+1);if(!f)return;const m=f.charAt(0);return m==="p"?"p2tr":m==="q"?f.length===39||f.length===40||e.length===42?"p2wpkh":f.length===59||f.length===60||e.length===62?"p2wsh":"segwit":"segwit"}}const l=/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(r)&&r.length>=26&&r.length<=35;switch(i[0]){case"1":case"m":case"n":return l?"p2pkh":void 0;case"3":case"2":return l?"p2sh":void 0;default:return}}const ig=e=>Object.freeze(e());function CS(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function Xi(e){if(!CS(e))throw new TypeError("Uint8Array expected")}function AR(e,r){return Array.isArray(r)?r.length===0?!0:r.every(i=>Number.isSafeInteger(i)):!1}function sg(e){if(typeof e!="function")throw new TypeError("function expected");return!0}function dd(e,r){if(typeof r!="string")throw new TypeError(`${e}: string expected`);return!0}function fd(e,r="number"){if(typeof e!="number")throw new TypeError(`${r}: expected number, got ${typeof e}`);if(!Number.isSafeInteger(e))throw new RangeError(`${r}: expected)DELIM" -R"DELIM( safe integer, got ${e}`)}function Gx(e,r){if(!AR(!1,r))throw new TypeError(`${e}: array of numbers expected`)}function OR(...e){const r=c=>c,i=(c,d)=>f=>c(d(f)),s=e.map(c=>c.encode).reduceRight(i,r),l=e.map(c=>c.decode).reduce(i,r);return{encode:s,decode:l}}const MR=(()=>{let e=[];for(let r=0;r<40;r++)e.push(2**r);return e})();function Kx(e,r=e.length){const i=new Array(r);for(let s=0;s{try{const e=new TextDecoder;return e.decode(Uint8Array.of(65,48,43,127))==="A0+"?e:void 0}catch{return}})(),Em=8192;function zR(e){const r=e.length;if(Qx!==void 0&&r>=12)return Qx.decode(e);if(r<=Em)return String.fromCharCode.apply(null,e);let i="";for(let s=0;s8)throw new RangeError("radix2: bits should be in (0..8]");const r=MR[e]-1;return{encode:i=>{Xi(i);const s=i.length,l=new Uint8Array(Math.ceil(s*8/e));let c=0,d=0,f=0;for(let m=0;m>d&r,!(d0&&(l[f]=c<{const s=i.length,l=new Uint8Array(Math.floor(s*e/8));let c=0,d=0,f=0;for(let m=0;m=8;d-=8)l[f++]=c>>d-8&255;if(c=c<<8-d&255,d>=e)throw new Error("Excess padding");if(c>0)throw new Error(`Non-zero padding: ${c}`);return l}}}function jS(e,r){const i=e.length;if(i>128)throw new Error("alphabet: max 128 letters");const s=new Uint8Array(i),l=new Int8Array(128).fill(-1);for(let c=0;c127)throw new Error("alphabet: single-char ASCII letters only");s[c]=d,l[d]=c}if(r!==void 0)for(const c of Object.keys(r)){const d=c.charCodeAt(0),f=l[r[c].charCodeAt(0)];if(c.length!==1||d>127||f===void 0||f===-1)throw new Error(`alphabet: invalid alias ${c}`);l[d]=f}return{encode:c=>{const d=new Uint8Array(c.length);for(let f=0;f{dd("decode",c);const d=c.length,f=new Uint8Array(d);for(let m=0;m({encode:i=>{Xi(i);const s=i.length;if(s===0)return new Uint8Array(0);if(s>=Jx)throw new Error("invalid length");let l=0;for(;l=l;E=Math.floor(E/e))x[w--]=E%e;return x},decode:i=>{Xi(i);const s=i.length;if(s===0)return new Uint8Array(0);if(s>=Jx)throw new Error("invalid length");let l=0;for(;l=e)throw new Error(`invalid integer: ${N}`);x=x*e+N,w*=e}m=5;let E=x;for(let _=0;_0;E=Math.floor(E/65536))c[d++]=E%65536}const g=d===0?1:d*2-(c[d-1]<256?1:0),v=new Uint8Array(l+g);let y=v.length-1;for(let x=0;x=l&&(v[y--]=w>>8)}return v}}),$R=(e,r)=>{const i=jS(r);return{encode(s){if(Xi(s),s.length>UR)throw new Error("invalid length");return i.encode(e.encode(s))},decode(s){if(dd("baseN.decode",s),s.length>HR)throw new Error("invalid length");return e.decode(i.decode(s))}}},qR=PR(58,BR),ZR=e=>$R(qR,e),IR=ig(()=>ZR("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),FR=e=>{sg(e);const r=e;return OR(LR(4,i=>r(r(i))),IR)},pp=jS("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),VR=/^[\x21-\x60\x7b-\x7e]+$/;function Wx(e,r){for(let i=0;i126)throw new Error(`${e}: printable ASCII expected`)}}function YR(e){const r=e.length,i=new Uint8Array(r);for(let s=0;s=32)throw new Error(`alphabet.encode: invalid digit ${l}`);i[s]=l}return i}const e1=[996825010,642813549,513874426,1027748829,705979059];function ml(e){const r=e>>25;let i=(e&33554431)<<5;for(let s=0;s>s&1)===1&&(i^=e1[s]);return i}function t1(e,r,i=1){const s=e.length;let l=1;for(let d=0;d126)throw new Error(`Invalid prefix (${e})`);l=ml(l)^f>>5}l=ml(l);for(let d=0;d>>5*(5-d)&31;return pp.encode(c)}function RS(e){const r=e==="bech32"?1:734539939,i=DR(5),s=y=>{Xi(y);const x=y.length,w=new Array(Math.ceil(x*8/5));let E=0,_=0,N=0;for(let H=0;H=5;_-=5)w[N++]=E>>_-5&31;return _>0&&(w[N]=E<<5-_&31),w},l=y=>{Gx("radix2.decode",y);const x=y.length,w=new Uint8Array(x);for(let E=0;E=32)throw new Error(`convertRadix2: invalid word=${_}`);w[E]=_}return i.decode(w)},c=Xx(l);function d(y,x,w=90){dd("bech32.encode prefix",y),w!==!1&&fd(w,"limit"),CS(x)&&(x=Kx(x)),Gx("bech32.encode",x);const E=y.length;if(E===0)throw new TypeError(`Invalid prefix length ${E}`);const _=E+7+x.length;if(w!==!1&&_>w)throw new TypeError(`Length ${_} exceeds limit ${w}`);Wx("bech32.encode prefix",y);const N=y.toLowerCase(),H=t1(N,x,r);return`${N}1${pp.encode(YR(x))}${H}`}function f(y,x=90){dd("bech32.decode input",y),x!==!1&&fd(x,"limit");const w=y.length;if(w<8||x!==!1&&w>x)throw new TypeError(`invalid string length ${w}, expected (8..${x})`);const E=y.toLowerCase();if(y!==E&&!VR.test(y))throw Wx("bech32.decode input",y),new Error("mixed-case string not allowed");const _=E.lastIndexOf("1");if(_===0||_===-1)throw new Error('invalid separator "1"');const N=E.slice(0,_),H=E.slice(_+1);if(H.length<6)throw new Error("invalid data length");const O=pp.decode(H),se=Kx(O,O.length-6),ce=t1(N,se,r);if(!H.endsWith(ce))throw new Error(`Invalid checksum in ${y}`);return{prefix:N,words:se}}const m=Xx(f);function g(y,x=90){const{prefix:w,words:E}=f(y,x);return{prefix:w,words:E,bytes:l(E)}}function v(y,x){return d(y,s(x))}return{encode:d,decode:f,encodeFromBytes:v,decodeToBytes:g,decodeUnsafe:m,fromWords:l,fromWordsUnsafe:c,toWords:s}}const hd=ig(()=>RS("bech32")),gp=ig(()=>RS("bech32m")),GR=e=>e/2**32|0,KR=e=>e>>>0;function QR(e,r,i,s){const l=GR(i),c=KR(i);e.setUint32(r,s?c:l,s),e.setUint32(r+4,s?l:c,s)}function n1(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const XR=e=>e?`"${e}" `:"";function og(e,r,i=""){if(n1(e)&&r===void 0)return e;const s=n1(e),l="",c=s?`length=${e.length}`:`type=${typeof e}`,d=XR(i)+"expected Uint8Array"+l+", got "+c;throw s?new RangeError(d):new TypeError(d)}const JR=(e,r)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((r==="object"?"":`"${r}" `)+"expected object, got type="+typeof e)},r1=(e,r)=>{JR(e,r);const i=Object.getPrototypeOf(e);if(i!==Object.prototype&&i!==null)throw new TypeError(`"${r}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${r}.__proto__" is not allowed`)};fu)DELIM" -R"DELIM(nction a1(e,r=!0){if(e.destroyed)throw new Error("hash was destroyed");if(r&&e.finished)throw new Error("digest() was already called")}function WR(e,r){og(e,void 0,"output");const i=r.outputLen;if(!(e.length>=i))throw new RangeError('"output" expected length >= '+i)}function i1(...e){for(let r=0;r>>r}const eA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",tA=Array.from({length:256},(e,r)=>r.toString(16).padStart(2,"0"));function Yu(e){if(og(e),eA)return e.toHex();let r="";for(let i=0;i{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(s)&&m)return;qe(v.relativePath.startsWith(s),`Absolute route path "${v.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(s.length)}let y=pr([s,v.relativePath]),x=i.concat(v);d.children&&d.children.length>0&&(qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),gE(d.children,r,x,y,m)),!(d.path==null&&!d.index)&&r.push({path:y,score:IO(y,d.index),routesMeta:x.map((w,E)=>{let[_,N]=bE(w.relativePath,w.caseSensitive,E===x.length-1);return{...w,matcher:_,compiledParams:N}})})};return e.forEach((d,f)=>{if(d.path===""||!d.path?.includes("?"))c(d,f);else for(let m of yE(d.path))c(d,f,!0,m)}),r}function yE(e){let r=e.split("/");if(r.length===0)return[];let[i,...s]=r,l=i.endsWith("?"),c=i.replace(/\?$/,"");if(s.length===0)return l?[c,""]:[c];let d=yE(s.join("/")),f=[];return f.push(...d.map(m=>m===""?c:[c,m].join("/"))),l&&f.push(...d),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function BO(e){e.sort((r,i)=>r.score!==i.score?i.score-r.score:FO(r.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var UO=/^:[\w-]+$/,HO=3,PO=2,$O=1,qO=10,ZO=-2,C1=e=>e==="*";function IO(e,r){let i=e.split("/"),s=i.length;return i.some(C1)&&(s+=ZO),r&&(s+=PO),i.filter(l=>!C1(l)).reduce((l,c)=>l+(UO.test(c)?HO:c===""?$O:qO),s)}function FO(e,r){return e.length===r.length&&e.slice(0,-1).every((s,l)=>s===r[l])?e[e.length-1]-r[r.length-1]:0}function VO(e,r,i=!1){let{routesMeta:s}=e,l={},c="/",d=[];for(let f=0;f{if(v==="*"){let E=f[x]||"";d=co(c.slice(0,c.length-E.length),1)}const w=f[x];return y&&!w?g[v]=void 0:g[v]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:e}}function bE(e,r=!1,i=!0){Ct(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 s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m,g,v)=>{if(s.push({paramName:f,isOptional:m!=null}),m){let y=v.charAt(g+d.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),s]}function YO(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ct(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function tr(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let i=r.endsWith("/")?r.length-1:r.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}function GO({basename:e,pathname:r}){return r==="/"?e:pr([e,r])}var gg=e=>Cd.test(e);function KO(e,r="/"){let{pathname:i,search:s="",hash:l=""}=typeof e=="string"?na(e):e,c;return i?(i=yg(i),i.startsWith("/")||i.startsWith("\\")?c=j1(i.substring(1),"/"):c=j1(i,r)):c=r,{pathname:c,search:XO(s),hash:JO(l)}}function j1(e,r){let i=co(r).split("/");return e.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function Lm(e,r,i,s){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function xE(e){return e.filter((r,i)=>i===0||r.route.path&&r.route.path.length>0)}function Rd(e){let r=xE(e);return r.map((i,s)=>s===r.length-1?i.pathname:i.pathnameBase)}function Kl(e,r,i,s=!1){let l;typeof e=="string"?l=na(e):(l={...e},qe(!l.pathname||!l.pathname.includes("?"),Lm("?","pathname","search",l)),qe(!l.pathname||!l.pathname.includes("#"),Lm("#","pathname","hash",l)),qe(!l.search||!l.search.includes("#"),Lm("#","search","hash",l)));let c=e===""||l.pathname==="",d=c?"/":l.pathname,f;if(d==null)f=i;else{let y=r.length-1;if(!s&&d.startsWith("..")){let x=d.split("/");for(;x[0]==="..";)x.shift(),y-=1;l.pathname=x.join("/")}f=y>=0?r[y]:"/"}let m=KO(l,f),g=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var yg=e=>e.replace(/[\\/]{2,}/g,"/"),pr=e=>yg(e.join("/"));function co(e,r=0){let i=e.length;for(;i>r&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var QO=e=>co(e).replace(/^\/*/,"/"),XO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,WO=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ql=class{constructor(e,r,i,s=!1){this.status=e,this.statusText=r||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.er)DELIM" -R"DELIM(ror=i):this.data=i}};function Zl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Xl(e){let r=e.map(i=>i.route.path).filter(Boolean);return pr(r)||"/"}var wE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function SE(e,r){let i=e;if(typeof i!="string"||!Cd.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,l=!1;if(wE)try{let c=new URL(window.location.href),d=jd.test(i)?new URL(dE(i,c.protocol)):new URL(i),f=tr(d.pathname,r);d.origin===c.origin&&f!=null?i=f+d.search+d.hash:l=!0}catch{Ct(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:l,to:i}}var di=Symbol("Uninstrumented");function eM(e,r){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:r.id,index:r.index,path:r.path,instrument(c){let d=Object.keys(i);for(let f of d)c[f]&&i[f].push(c[f])}}));let s={};if(typeof r.lazy=="function"&&i.lazy.length>0){let l=Xs(i.lazy,r.lazy,()=>{});l&&(s.lazy=l)}if(typeof r.lazy=="object"){let l=r.lazy;["middleware","loader","action"].forEach(c=>{let d=l[c],f=i[`lazy.${c}`];if(typeof d=="function"&&f.length>0){let m=Xs(f,d,()=>{});m&&(s.lazy=Object.assign(s.lazy||{},{[c]:m}))}})}return["loader","action"].forEach(l=>{let c=r[l];if(typeof c=="function"&&i[l].length>0){let d=c[di]??c,f=Xs(i[l],d,(...m)=>R1(m[0]));f&&(l==="loader"&&d.hydrate===!0&&(f.hydrate=!0),f[di]=d,s[l]=f)}}),r.middleware&&r.middleware.length>0&&i.middleware.length>0&&(s.middleware=r.middleware.map(l=>{let c=l[di]??l,d=Xs(i.middleware,c,(...f)=>R1(f[0]));return d?(d[di]=c,d):l})),s}function tM(e,r){let i={navigate:[],fetch:[]};if(r.forEach(s=>s({instrument(l){let c=Object.keys(l);for(let d of c)l[d]&&i[d].push(l[d])}})),i.navigate.length>0){let s=e.navigate[di]??e.navigate,l=Xs(i.navigate,s,(...c)=>{let[d,f]=c;return{to:typeof d=="number"||typeof d=="string"?d:d?Mn(d):".",...A1(e,f??{})}});l&&(l[di]=s,e.navigate=l)}if(i.fetch.length>0){let s=e.fetch[di]??e.fetch,l=Xs(i.fetch,s,(...c)=>{let[d,,f,m]=c;return{href:f??".",fetcherKey:d,...A1(e,m??{})}});l&&(l[di]=s,e.fetch=l)}return e}function Xs(e,r,i){return e.length===0?null:async(...s)=>{let l=await EE(e,i(...s),()=>r(...s),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function EE(e,r,i,s){let l=e[s],c;if(l){let d,f=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=EE(e,r,i,s-1),c=await d,qe(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await l(f,r)}catch(m){console.error("An instrumentation function threw an error:",m)}d||await f(),await d}else try{c={type:"success",value:await i()}}catch(d){c={type:"error",value:d}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function R1(e){let{request:r,context:i,params:s,pattern:l}=e;return{request:nM(r),params:{...s},pattern:l,context:rM(i)}}function A1(e,r){return{currentUrl:Mn(e.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function nM(e){return{method:e.method,url:e.url,headers:{get:(...r)=>e.headers.get(...r)}}}function rM(e){if(iM(e)){let r={...e};return Object.freeze(r),r}else return{get:r=>e.get(r)}}var aM=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function iM(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===aM}var O1=new URL("http://localhost");function vg(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),O1)}catch{return O1}}function Bm(e,r){return e.origin===r.origin&&(e.origin!=="null"||e.protocol===r.protocol&&e.host===r.host)}function sM(e,r){if(e.startsWith("//"))return!0;let i=r.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?r.host===""||e.slice(i.length).startsWith("//"):!1}function Ws(e,r,i,s){let l=null;try{l=e==null?null:new URL(e,i)}catch{}let c=new URL(r,i),d=l!=null&&!Bm(l,i),f=!Bm(c,i);if(s==="reject"){if(d||f)throw new Error("External navigation is not allowed")}else if(f&&(l==null||!sM(e,l)||!Bm(l,c)))throw new Error("External navigation is not allowed")}var TE=["POST","PUT","PATCH","DELETE"],oM=new Set(TE),lM=["GET",...TE],cM=new Set(lM),kE=new Set([301,302,303,307,308]),uM=new Set([307,308]),Um={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},fM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),_E="remix-router-transitions",NE=Symbol("ResetLoaderData"),qi,Ys,ii,Gs,hM=class{constructor(e){_l(this,qi),_l(this,Ys),_l(this,ii),_l(this,Gs),Kr(this,qi,e),Kr(this,Ys,Xu(e))}get stableRoutes(){return fr(this,qi)}get activeRoutes(){return fr(this,ii)??fr(this,qi)}get branches(){return fr(this,Gs)??fr(this,Ys)}get hasHMRRoutes(){return fr(this,ii)!=null}setRoutes(e){Kr(this,qi,e),Kr(this,Ys,Xu(e))}setHmrRoutes(e){Kr(this,ii,e),Kr(this,Gs,Xu(e))}commitHmrRoutes(){fr(this,ii)&&(Kr(this,qi,fr(this,ii)),Kr(this,Ys,fr(this,Gs)),Kr(this,ii,void 0),Kr(this,Gs,void 0))}};qi=new WeakMap;Ys=new WeakMap;ii=new WeakMap;Gs=new WeakMap;function mM(e){const r=e.window?e.window:typeof window<"u"?window:void 0,i=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=e.hydrationRouteProperties||[],l=e.mapRouteProperties||fM,c=l;if(e.instrumentations){let A=e.instrumentations;c=D=>({...l(D),...eM(A.map(I=>I.route).filter(Boolean),D)})}let d={},f=new hM(ql(e.routes,c,void 0,d)),m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=e.dataStrategy||bM,v={...e.future},y=null,x=new Set,w=null,E=null,_=null,N=null,H=e.hydrationData!=null,O=Nr(f.activeRoutes,e.history.location,m,!1,f.branches),se=!1,ce=null,K,oe;if(O==null&&!e.patchRoutesOnNavigation){let A=hr(404,{pathname:e.history.location.pathname}),{matches:D,route:I}=Uu(f.activeRoutes);K=!0,oe=!K,O=D,ce={[I.id]:A}}else if(O&&!e.hydrationData&&Or(O,f.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(A=>A.route.lazy))K=!1,oe=!K;else if(!O.some(A=>bg(A.route)))K=!0,oe=!K;else{let A=e.hydrationData?e.hydrationData.loaderData:null,D=e.hydrationData?e.hydrationData.errors:null,I=O;if(D){let ue=O.findIndex(de=>D[de.route.id]!==void 0);I=I.slice(0,ue+1)}oe=!1,K=!0,I.forEach(ue=>{let de=CE(ue.route,A,D);oe=oe||de.renderFallback,K=K&&!de.shouldLoad})}else{K=!1,oe=!K,O=[];let A=Or(null,f.activeRoutes,e.history.location.pathname);A.active&&A.matches&&(se=!0,O=A.matches)}let R,k={historyAction:e.history.action,location:e.history.location,matches:O,initialized:K,renderFallback:oe,navigation:Um,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ce,fetchers:new Map,blockers:new Map},z="POP",P=null,F=!1,X,fe=!1,ge=new Map,re=null,Q=!1,Y=!1,ie=new Set,$=new Map,ye=0,He=-1,xe=new Map,Ce=new Set,j=new Map,G=new Map,he=new Set,ee=new Map,je,J=null;function me(){if(y=e.history.listen(({action:A,location:D,delta:I})=>{if(je){je(),je=void 0;return}Ct(ee.size===0||I!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating ou)DELIM" -R"DELIM(tside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ue=xo({currentLocation:k.location,nextLocation:D,historyAction:A});if(ue&&I!=null){let de=new Promise(Te=>{je=Te});e.history.go(I*-1),yi(ue,{state:"blocked",location:D,proceed(){yi(ue,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),de.then(()=>e.history.go(I))},reset(){let Te=new Map(k.blockers);Te.set(ue,yl),be({blockers:Te})}}),P?.resolve(),P=null;return}return Le(A,D)}),i){UM(r,ge);let A=()=>HM(r,ge);r.addEventListener("pagehide",A),re=()=>r.removeEventListener("pagehide",A)}return k.initialized||Le("POP",k.location,{initialHydration:!0}),R}function W(){y&&y(),re&&re(),x.clear(),X&&X.abort(),k.fetchers.forEach((A,D)=>ts(k.fetchers,D)),k.blockers.forEach((A,D)=>ac(D))}function le(A){if(x.add(A),w){let{newErrors:D}=w;w=null,A(k,{deletedFetchers:[],newErrors:D,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(A)}function be(A,D={}){A.matches&&(A.matches=A.matches.map(de=>{let Te=d[de.route.id],Se=de.route;return Se.element!==Te.element||Se.errorElement!==Te.errorElement||Se.hydrateFallbackElement!==Te.hydrateFallbackElement?{...de,route:Te}:de})),k={...k,...A};let I=[],ue=[];k.fetchers.forEach((de,Te)=>{de.state==="idle"&&(he.has(Te)?I.push(Te):ue.push(Te))}),he.forEach(de=>{!k.fetchers.has(de)&&!$.has(de)&&I.push(de)}),x.size===0&&(w={newErrors:A.errors??null}),[...x].forEach(de=>de(k,{deletedFetchers:I,newErrors:A.errors??null,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),I.forEach(de=>ts(k.fetchers,de)),ue.forEach(de=>k.fetchers.delete(de))}function pe(A,D,{flushSync:I}={}){let ue=k.actionData!=null&&k.navigation.formMethod!=null&&Tn(k.navigation.formMethod)&&k.navigation.state==="loading"&&A.state?._isRedirect!==!0,de;D.actionData?Object.keys(D.actionData).length>0?de=D.actionData:de=null:ue?de=k.actionData:de=null;let Te=D.loaderData?q1(k.loaderData,D.loaderData,D.matches||[],D.errors):k.loaderData,Se=k.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((Ae,Pe)=>Se.set(Pe,yl)));let Ne=Q?!1:ic(A,D.matches||k.matches),Ee=F===!0||k.navigation.formMethod!=null&&Tn(k.navigation.formMethod)&&A.state?._isRedirect!==!0;f.commitHmrRoutes(),Q||z==="POP"||(z==="PUSH"?e.history.push(A,A.state):z==="REPLACE"&&e.history.replace(A,A.state));let De;if(z==="POP"&&!Q&&A!==k.location){let Ae=ge.get(k.location.pathname);Ae&&Ae.has(A.pathname)?De={currentLocation:k.location,nextLocation:A}:ge.has(A.pathname)&&(De={currentLocation:A,nextLocation:k.location})}else if(fe){let Ae=ge.get(k.location.pathname);Ae?Ae.add(A.pathname):(Ae=new Set([A.pathname]),ge.set(k.location.pathname,Ae)),De={currentLocation:k.location,nextLocation:A}}be({...D,actionData:de,loaderData:Te,historyAction:z,location:A,initialized:!0,renderFallback:!1,navigation:Um,revalidation:"idle",restoreScrollPosition:Ne,preventScrollReset:Ee,blockers:Se},{viewTransitionOpts:De,flushSync:I===!0}),z="POP",F=!1,fe=!1,Q=!1,Y=!1,P?.resolve(),P=null,J?.resolve(),J=null}async function _e(A,D){if(P?.resolve(),P=null,typeof A=="number"){P||(P=V1());let mt=P.promise;return e.history.go(A),mt}let I=kp(k.location,k.matches,m,A,D?.fromRouteId,D?.relative),{path:ue,submission:de,error:Te}=M1(!1,I,D),Se;if(D?.mask){let mt=typeof D.mask=="string"?na(D.mask):{...k.location.mask,...D.mask};if(Se={pathname:mt.pathname??"",search:mt.search??"",hash:mt.hash??""},jd.test(Se.pathname))throw new Error("External navigation is not allowed");Se.pathname.startsWith("\\")&&(Se.pathname=Se.pathname.replace(/^\\+/,"/")),Ws(typeof D.mask=="string"?D.mask:Mn(D.mask),Mn(Se),e.history.createURL("/"),"reject")}let Ne=k.location,Ee=$l(Ne,ue,D&&D.state,void 0,Se);Ee={...Ee,...e.history.encodeLocation(Ee)},Ws(A==null?e.history.createHref(k.location):typeof A=="string"?A:Mn(A),e.history.createHref(Ee.mask||Ee),e.history.createURL("/"),"reject");let De=D&&D.replace!=null?D.replace:void 0,Ae="PUSH";De===!0?Ae="REPLACE":De===!1||de!=null&&Tn(de.formMethod)&&de.formAction===k.location.pathname+k.location.search&&(Ae="REPLACE");let Pe=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,ze=(D&&D.flushSync)===!0,lt=xo({currentLocation:Ne,nextLocation:Ee,historyAction:Ae});if(lt){yi(lt,{state:"blocked",location:Ee,proceed(){yi(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),_e(A,D)},reset(){let mt=new Map(k.blockers);mt.set(lt,yl),be({blockers:mt})}});return}await Le(Ae,Ee,{submission:de,pendingError:Te,preventScrollReset:Pe,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:ze,callSiteDefaultShouldRevalidate:D&&D.defaultShouldRevalidate})}function Me(){J||(J=V1()),Ar(),be({revalidation:"loading"});let A=J.promise;return k.navigation.state==="submitting"?A:k.navigation.state==="idle"?(Le(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),A):(Le(z||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:fe===!0}),A)}async function Le(A,D,I){X&&X.abort(),X=null,z=A,Q=(I&&I.startUninterruptedRevalidation)===!0,Bd(k.location,k.matches),F=(I&&I.preventScrollReset)===!0,fe=(I&&I.enableViewTransition)===!0;let ue=f.activeRoutes,de=I?.initialHydration&&k.matches&&k.matches.length>0&&!se?k.matches:Nr(ue,D,m,!1,f.branches),Te=(I&&I.flushSync)===!0;if(de&&k.initialized&&!Y&&CM(k.location,D)&&!(I&&I.submission&&Tn(I.submission.formMethod))){pe(D,{matches:de},{flushSync:Te});return}let Se=Or(de,ue,D.pathname);if(Se.active&&Se.matches&&(de=Se.matches),!de){let{error:ct,notFoundMatches:tt,route:Wt}=ka(D.pathname);pe(D,{matches:tt,loaderData:{},errors:{[Wt.id]:ct}},{flushSync:Te});return}let Ne=I&&I.overrideNavigation?{...I.overrideNavigation,matches:de,historyAction:A}:void 0;X=new AbortController;let Ee=Ks(e.history,D,X.signal,I&&I.submission),De=e.getContext?await e.getContext():new _1,Ae;if(I&&I.pendingError)Ae=[ui(de).route.id,{type:"error",error:I.pendingError}];else if(I&&I.submission&&Tn(I.submission.formMethod)){let ct=await Ue(Ee,D,I.submission,de,A,De,Se.active,I&&I.initialHydration===!0,{replace:I.replace,flushSync:Te});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[tt,Wt]=ct.pendingActionResult;if(Jn(Wt)&&Zl(Wt.error)&&Wt.error.status===404){X=null,pe(D,{matches:ct.matches,loaderData:{},errors:{[tt]:Wt.error}});return}}de=ct.matches||de,Ae=ct.pendingActionResult,Ne=Hm(D,de,A,I.submission),Te=!1,Se.active=!1,Ee=Ks(e.history,Ee.url,Ee.signal)}let{shortCircuited:Pe,matches:ze,loaderData:lt,errors:mt,workingFetchers:Lt}=await dt(Ee,D,de,A,De,Se.active,Ne,I&&I.submission,I&&I.fetcherSubmission,I&&I.replace,I&&I.initialHydration===!0,Te,Ae,I&&I.callSiteDefaultShouldRevalidate);Pe||(X=null,pe(D,{matches:ze||de,...Z1(Ae),loaderData:lt,errors:mt,...Lt?{fetchers:Lt}:{}}))}async function Ue(A,D,I,ue,de,Te,Se,Ne,Ee={}){Ar();let De=LM(D,ue,de,I);if(be({navigation:De},{flushSync:Ee.flushSync===!0}),Se){let ze=await Jt(ue,D.pathname,A.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){if(ze.partialMatches.length===0){let{matches:mt,route:Lt}=Uu(f.activeRoutes);return{matches:mt,pendingActionResult:[Lt.id,{type:"error",error:ze.error}]}}let lt=ui(ze.partialMatches).route.id;return{matches:ze.partialMatches,pendingActionResult:[lt,{type:"error",error:ze.error}]}}else if(ze.matches)ue=ze.matches;else{let{notFoundMatches:lt,error:mt,route:Lt}=ka(D.pathname);return{matches:lt,pendingActionResult:[Lt.id,{type:"error",error:mt}]}}}let Ae,Pe=Ju(ue,D);if(!Pe.route.action&&!Pe.route.lazy)Ae={type:"error",error:hr(405,{method:A.method,pathname:D.pathname,routeId:Pe.route.id})};else{let ze=eo(c,d,A,D,ue,Pe,Ne?[]:s,Te),lt=await ln(A,D,ze,Te,null);if(Ae=lt[Pe.route.id],!Ae){for(let mt of ue)if(lt[mt.route.id]){Ae=lt[mt.route.id];break}}if(A.signal.aborted)return{shortCircuited:!0}}if(Gi(Ae)){let ze;return Ee&&Ee.replace!=null?ze=Ee.replace:ze=H1(Ae.response.headers.get("Location"),new URL(A.url),m)DELIM" -R"DELIM(,e.history)===k.location.pathname+k.location.search,await wt(A,Ae,!0,{submission:I,replace:ze}),{shortCircuited:!0}}if(Jn(Ae)){let ze=ui(ue,Pe.route.id);return(Ee&&Ee.replace)!==!0&&(z="PUSH"),{matches:ue,pendingActionResult:[ze.route.id,Ae,Pe.route.id]}}return{matches:ue,pendingActionResult:[Pe.route.id,Ae]}}async function dt(A,D,I,ue,de,Te,Se,Ne,Ee,De,Ae,Pe,ze,lt){let mt=Se||Hm(D,I,ue,Ne),Lt=Ne||Ee||F1(mt),ct=!Q&&!Ae;if(Te){if(ct){let Kt=qt(ze);be({navigation:mt,...Kt!==void 0?{actionData:Kt}:{}},{flushSync:Pe})}let Ge=await Jt(I,D.pathname,A.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){if(Ge.partialMatches.length===0){let{matches:tn,route:wn}=Uu(f.activeRoutes);return{matches:tn,loaderData:{},errors:{[wn.id]:Ge.error}}}let Kt=ui(Ge.partialMatches).route.id;return{matches:Ge.partialMatches,loaderData:{},errors:{[Kt]:Ge.error}}}else if(Ge.matches)I=Ge.matches;else{let{error:Kt,notFoundMatches:tn,route:wn}=ka(D.pathname);return{matches:tn,loaderData:{},errors:{[wn.id]:Kt}}}}let tt=f.activeRoutes,{dsMatches:Wt,revalidatingFetchers:cn}=z1(A,de,c,d,e.history,k,I,Lt,D,Ae?[]:s,Ae===!0,Y,ie,he,j,Ce,tt,m,e.patchRoutesOnNavigation!=null,f.branches,ze,lt);if(He=++ye,!e.dataStrategy&&!Wt.some(Ge=>Ge.shouldLoad)&&!Wt.some(Ge=>Ge.route.middleware&&Ge.route.middleware.length>0)&&cn.length===0){let Ge=new Map(k.fetchers),Kt=nc(Ge);return pe(D,{matches:I,loaderData:{},errors:ze&&Jn(ze[1])?{[ze[0]]:ze[1].error}:null,...Z1(ze),...Kt?{fetchers:Ge}:{}},{flushSync:Pe}),{shortCircuited:!0}}if(ct){let Ge={};if(!Te){Ge.navigation=mt;let Kt=qt(ze);Kt!==void 0&&(Ge.actionData=Kt)}cn.length>0&&(Ge.fetchers=Ye(cn)),be(Ge,{flushSync:Pe})}cn.forEach(Ge=>{Zn(Ge.key),Ge.controller&&$.set(Ge.key,Ge.controller)});let _a=()=>cn.forEach(Ge=>Zn(Ge.key));X&&X.signal.addEventListener("abort",_a);let{loaderResults:en,fetcherResults:kt}=await xn(Wt,cn,A,D,de);if(A.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",_a),cn.forEach(Ge=>$.delete(Ge.key));let Rt=Hu(en);if(Rt)return await wt(A,Rt.result,!0,{replace:De}),{shortCircuited:!0};if(Rt=Hu(kt),Rt)return Ce.add(Rt.key),await wt(A,Rt.result,!0,{replace:De}),{shortCircuited:!0};let un=new Map(k.fetchers),{loaderData:rs,errors:Mr}=$1(k,I,en,ze,cn,kt,un);Ae&&k.errors&&(Mr={...k.errors,...Mr});let as=nc(un),vi=rc(He,un),zr=as||vi||cn.length>0;return{matches:I,loaderData:rs,errors:Mr,...zr?{workingFetchers:un}:{}}}function qt(A){if(A&&!Jn(A[1]))return{[A[0]]:A[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function Ye(A){let D=new Map(k.fetchers);return A.forEach(I=>{let ue=D.get(I.key),de=vl(void 0,ue?ue.data:void 0);D.set(I.key,de)}),D}async function st(A,D,I,ue){Zn(A);let de=(ue&&ue.flushSync)===!0,Te=f.activeRoutes,Se=kp(k.location,k.matches,m,I,D,ue?.relative),Ne=Nr(Te,Se,m,!1,f.branches),Ee=Or(Ne,Te,Se);if(Ee.active&&Ee.matches&&(Ne=Ee.matches),!Ne){kn(A,D,hr(404,{pathname:Se}),{flushSync:de});return}let{path:De,submission:Ae,error:Pe}=M1(!0,Se,ue);if(Pe){kn(A,D,Pe,{flushSync:de});return}let ze=e.getContext?await e.getContext():new _1,lt=(ue&&ue.preventScrollReset)===!0;if(Ae&&Tn(Ae.formMethod)){await ot(A,D,De,Ne,ze,Ee.active,de,lt,Ae,ue&&ue.defaultShouldRevalidate);return}j.set(A,{routeId:D,path:De}),await at(A,D,De,Ne,ze,Ee.active,de,lt,Ae)}async function ot(A,D,I,ue,de,Te,Se,Ne,Ee,De){Ar(),j.delete(A);let Ae=k.fetchers.get(A);Dt(A,BM(Ee,Ae),{flushSync:Se});let Pe=new AbortController,ze=Ks(e.history,I,Pe.signal,Ee);if(Te){let Ze=await Jt(ue,new URL(ze.url).pathname,ze.signal,A);if(Ze.type==="aborted")return;if(Ze.type==="error"){kn(A,D,Ze.error,{flushSync:Se});return}else if(Ze.matches)ue=Ze.matches;else{kn(A,D,hr(404,{pathname:I}),{flushSync:Se});return}}let lt=Ju(ue,I);if(!lt.route.action&&!lt.route.lazy){let Ze=hr(405,{method:Ee.formMethod,pathname:I,routeId:D});kn(A,D,Ze,{flushSync:Se});return}$.set(A,Pe);let mt=ye,Lt=eo(c,d,ze,I,ue,lt,s,de),ct=await ln(ze,I,Lt,de,A),tt=ct[lt.route.id];if(!tt){for(let Ze of Lt)if(ct[Ze.route.id]){tt=ct[Ze.route.id];break}}if(ze.signal.aborted){$.get(A)===Pe&&$.delete(A);return}if(he.has(A)){if(Gi(tt)||Jn(tt)){Dt(A,Qr(void 0));return}}else{if(Gi(tt))if($.delete(A),He>mt){Dt(A,Qr(void 0));return}else return Ce.add(A),Dt(A,vl(Ee)),wt(ze,tt,!1,{fetcherSubmission:Ee,preventScrollReset:Ne});if(Jn(tt)){kn(A,D,tt.error);return}}let Wt=k.navigation.location||k.location,cn=Ks(e.history,Wt,Pe.signal),_a=f.activeRoutes,en=k.navigation.state!=="idle"?Nr(_a,k.navigation.location,m,!1,f.branches):k.matches;qe(en,"Didn't find any matches after fetcher action");let kt=++ye;xe.set(A,kt);let{dsMatches:Rt,revalidatingFetchers:un}=z1(cn,de,c,d,e.history,k,en,Ee,Wt,s,!1,Y,ie,he,j,Ce,_a,m,e.patchRoutesOnNavigation!=null,f.branches,[lt.route.id,tt],De),rs=vl(Ee,tt.data),Mr=new Map(k.fetchers);Mr.set(A,rs),un.filter(Ze=>Ze.key!==A).forEach(Ze=>{let Lr=Ze.key,So=Mr.get(Lr),sc=vl(void 0,So?So.data:void 0);Mr.set(Lr,sc),Zn(Lr),Ze.controller&&$.set(Lr,Ze.controller)}),be({fetchers:Mr});let as=()=>un.forEach(Ze=>Zn(Ze.key));Pe.signal.addEventListener("abort",as);let{loaderResults:vi,fetcherResults:zr}=await xn(Rt,un,cn,Wt,de);if(Pe.signal.aborted)return;Pe.signal.removeEventListener("abort",as),xe.delete(A),$.delete(A),un.forEach(Ze=>$.delete(Ze.key));let Ge=k.fetchers.has(A),Kt=Ze=>{if(!Ge)return Ze;let Lr=new Map(Ze.fetchers);return Lr.set(A,Qr(tt.data)),{...Ze,fetchers:Lr}},tn=Hu(vi);if(tn)return k=Kt(k),wt(cn,tn.result,!1,{preventScrollReset:Ne});if(tn=Hu(zr),tn)return Ce.add(tn.key),k=Kt(k),wt(cn,tn.result,!1,{preventScrollReset:Ne});let wn=new Map(k.fetchers);Ge&&wn.set(A,Qr(tt.data));let{loaderData:Na,errors:Dr}=$1(k,en,vi,void 0,un,zr,wn);rc(kt,wn),k.navigation.state==="loading"&&kt>He?(qe(z,"Expected pending action"),X&&X.abort(),pe(k.navigation.location,{matches:en,loaderData:Na,errors:Dr,fetchers:wn})):(be({errors:Dr,loaderData:q1(k.loaderData,Na,en,Dr),fetchers:wn}),Y=!1)}async function at(A,D,I,ue,de,Te,Se,Ne,Ee){let De=k.fetchers.get(A);Dt(A,vl(Ee,De?De.data:void 0),{flushSync:Se});let Ae=new AbortController,Pe=Ks(e.history,I,Ae.signal);if(Te){let tt=await Jt(ue,new URL(Pe.url).pathname,Pe.signal,A);if(tt.type==="aborted")return;if(tt.type==="error"){kn(A,D,tt.error,{flushSync:Se});return}else if(tt.matches)ue=tt.matches;else{kn(A,D,hr(404,{pathname:I}),{flushSync:Se});return}}let ze=Ju(ue,I);$.set(A,Ae);let lt=ye,mt=eo(c,d,Pe,I,ue,ze,s,de),Lt=await ln(Pe,I,mt,de,A),ct=Lt[ze.route.id];if(!ct){for(let tt of ue)if(Lt[tt.route.id]){ct=Lt[tt.route.id];break}}if($.get(A)===Ae&&$.delete(A),!Pe.signal.aborted){if(he.has(A)){Dt(A,Qr(void 0));return}if(Gi(ct))if(He>lt){Dt(A,Qr(void 0));return}else{Ce.add(A),await wt(Pe,ct,!1,{preventScrollReset:Ne});return}if(Jn(ct)){kn(A,D,ct.error);return}Dt(A,Qr(ct.data))}}async function wt(A,D,I,{submission:ue,fetcherSubmission:de,preventScrollReset:Te,replace:Se}={}){I||(P?.resolve(),P=null),D.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let Ne=D.response.headers.get("Location");qe(Ne,"Expected a Location header on the redirect Response");let Ee=Ne,De=new URL(A.url);Ne=H1(Ne,De,m,e.history),Ws(Ee,Ne,De,"allow-explicit");let Ae=$l(k.location,Ne,{_isRedirect:!0});if(i){let ct=!1;if(D.response.headers.has("X-Remix-Reload-Document"))ct=!0;else if(gg(Ne)){const tt=hE(r,Ne,!0);ct=tt.origin!==r.location.origin||tr(tt.pathname,m)==null}if(ct){Se?r.location.replace(Ne):r.location.assign(Ne);return}}X=null;let Pe=Se===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ze,formAction:lt,formEncType:mt}=k.navigation;!ue&&!de&&ze&<&&mt&&(ue=F1(k.navigation));let Lt=ue||de;if(uM.has(D.response.status)&&Lt&&Tn(Lt.formMethod))await Le(Pe,Ae,{submission:{...Lt,formAction:Ne},preventScrollReset:Te||F,enableViewTransition:I?fe:void 0});else{let ct=Hm(Ae,[],Pe,ue);await Le(Pe,Ae,{overrideNavigation:ct,fetcherSubmission:de,preventScrollReset:Te||F,enableViewTransition:I?fe:void 0})}}async function ln(A,D,I,ue,de){let Te,Se={};try{Te=await wM(g,A,D,I,de,ue,!1)}catch(Ne){)DELIM" -R"DELIM(return I.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{Se[Ee.route.id]={type:"error",error:Ne}}),Se}if(A.signal.aborted)return Se;if(!Tn(A.method))for(let Ne of I){if(Te[Ne.route.id]?.type==="error")break;!Te.hasOwnProperty(Ne.route.id)&&!k.loaderData.hasOwnProperty(Ne.route.id)&&(!k.errors||!k.errors.hasOwnProperty(Ne.route.id))&&Ne.shouldCallHandler()&&(Te[Ne.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ne.route.id}`)})}for(let[Ne,Ee]of Object.entries(Te))if(OM(Ee)){let De=Ee.result;Se[Ne]={type:"redirect",response:kM(De,A,Ne,I,m)}}else Se[Ne]=await TM(Ee);return Se}async function xn(A,D,I,ue,de){let Te=ln(I,ue,A,de,null),Se=Promise.all(D.map(async De=>{if(De.matches&&De.match&&De.request&&De.controller){let Pe=(await ln(De.request,De.path,De.matches,de,De.key))[De.match.route.id];return{[De.key]:Pe}}else return Promise.resolve({[De.key]:{type:"error",error:hr(404,{pathname:De.path})}})})),Ne=await Te,Ee=(await Se).reduce((De,Ae)=>Object.assign(De,Ae),{});return{loaderResults:Ne,fetcherResults:Ee}}function Ar(){Y=!0,j.forEach((A,D)=>{$.has(D)&&ie.add(D),Zn(D)})}function Dt(A,D,I={}){let ue=new Map(k.fetchers);ue.set(A,D),be({fetchers:ue},{flushSync:(I&&I.flushSync)===!0})}function kn(A,D,I,ue={}){let de=ui(k.matches,D),Te=new Map(k.fetchers);ts(Te,A),be({errors:{[de.route.id]:I},fetchers:Te},{flushSync:(ue&&ue.flushSync)===!0})}function vo(A){return G.set(A,(G.get(A)||0)+1),he.has(A)&&he.delete(A),k.fetchers.get(A)||dM}function Dd(A,D){Zn(A,D?.reason),Dt(A,Qr(null))}function ts(A,D){let I=k.fetchers.get(D);$.has(D)&&!(I&&I.state==="loading"&&xe.has(D))&&Zn(D),j.delete(D),xe.delete(D),Ce.delete(D),he.delete(D),ie.delete(D),A.delete(D)}function bo(A){let D=(G.get(A)||0)-1;D<=0?(G.delete(A),he.add(A)):G.set(A,D),be({fetchers:new Map(k.fetchers)})}function Zn(A,D){let I=$.get(A);I&&(I.abort(D),$.delete(A))}function ns(A,D){for(let I of A){let ue=D.get(I);qe(ue,`Expected fetcher: ${I}`);let de=Qr(ue.data);D.set(I,de)}}function nc(A){let D=[],I=!1;for(let ue of Ce){let de=A.get(ue);qe(de,`Expected fetcher: ${ue}`),de.state==="loading"&&(Ce.delete(ue),D.push(ue),I=!0)}return ns(D,A),I}function rc(A,D){let I=[];for(let[ue,de]of xe)if(de0}function _n(A,D){let I=k.blockers.get(A)||yl;return ee.get(A)!==D&&ee.set(A,D),I}function ac(A){k.blockers.delete(A),ee.delete(A)}function yi(A,D){let I=k.blockers.get(A)||yl;qe(I.state==="unblocked"&&D.state==="blocked"||I.state==="blocked"&&D.state==="blocked"||I.state==="blocked"&&D.state==="proceeding"||I.state==="blocked"&&D.state==="unblocked"||I.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${I.state} -> ${D.state}`);let ue=new Map(k.blockers);ue.set(A,D),be({blockers:ue})}function xo({currentLocation:A,nextLocation:D,historyAction:I}){if(ee.size===0)return;ee.size>1&&Ct(!1,"A router only supports one blocker at a time");let ue=Array.from(ee.entries()),[de,Te]=ue[ue.length-1],Se=k.blockers.get(de);if(!(Se&&Se.state==="proceeding")&&Te({currentLocation:A,nextLocation:D,historyAction:I}))return de}function ka(A){let D=hr(404,{pathname:A}),I=f.activeRoutes,{matches:ue,route:de}=Uu(I);return{notFoundMatches:ue,route:de,error:D}}function Ld(A,D,I){if(E=A,N=D,_=I||null,!H&&k.navigation===Um){H=!0;let ue=ic(k.location,k.matches);ue!=null&&be({restoreScrollPosition:ue})}return()=>{E=null,N=null,_=null}}function wo(A,D){return _&&_(A,D.map(ue=>pE(ue,k.loaderData)))||A.key}function Bd(A,D){if(E&&N){let I=wo(A,D);E[I]=N()}}function ic(A,D){if(E){let I=wo(A,D),ue=E[I];if(typeof ue=="number")return ue}return null}function Or(A,D,I){if(e.patchRoutesOnNavigation){let ue=f.branches;if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:Nr(D,I,m,!0,ue)}}else return{active:!0,matches:Nr(D,I,m,!0,ue)||[]}}return{active:!1,matches:null}}async function Jt(A,D,I,ue){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let de=A;for(;;){let Te=d;try{await e.patchRoutesOnNavigation({signal:I,path:D,matches:de,fetcherKey:ue,patch:(De,Ae)=>{I.aborted||D1(De,Ae,f,Te,c,!1)}})}catch(De){return{type:"error",error:De,partialMatches:de}}if(I.aborted)return{type:"aborted"};let Se=f.branches,Ne=Nr(f.activeRoutes,D,m,!1,Se),Ee=null;if(Ne){if(Object.keys(Ne[0].params).length===0)return{type:"success",matches:Ne};if(Ee=Nr(f.activeRoutes,D,m,!0,Se),!(Ee&&de.lengthI.route.id===D[ue].route.id)}function Nn(A){d={},f.setHmrRoutes(ql(A,c,void 0,d))}function Ud(A,D,I=!1){D1(A,D,f,d,c,I),f.hasHMRRoutes||be({})}return R={get basename(){return m},get future(){return v},get state(){return k},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return d},get window(){return r},initialize:me,subscribe:le,enableScrollRestoration:Ld,navigate:_e,fetch:st,revalidate:Me,createHref:A=>e.history.createHref(A),createURL:A=>e.history.createURL(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:vo,resetFetcher:Dd,deleteFetcher:bo,dispose:W,getBlocker:_n,deleteBlocker:ac,patchRoutes:Ud,_internalFetchControllers:$,_internalSetRoutes:Nn,_internalSetStateDoNotUseOrYouWillBreakYourApp(A){be(A)}},e.instrumentations&&(R=tM(R,e.instrumentations.map(A=>A.router).filter(Boolean))),R}function pM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function kp(e,r,i,s,l,c){let d,f;if(l){d=[];for(let g of r)if(d.push(g),g.route.id===l){f=g;break}}else d=r,f=r[r.length-1];let m=Kl(s||".",Rd(d),tr(e.pathname,i)||e.pathname,c==="path");if(s==null&&(m.search=e.search,m.hash=e.hash),(s==null||s===""||s===".")&&f){let g=wg(m.search);if(f.route.index&&!g)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&g){let v=new URLSearchParams(m.search),y=v.getAll("index");v.delete("index"),y.filter(w=>w).forEach(w=>v.append("index",w));let x=v.toString();m.search=x?`?${x}`:""}}return i!=="/"&&(m.pathname=GO({basename:i,pathname:m.pathname})),Mn(m)}function M1(e,r,i){if(!i||!pM(i))return{path:r};if(i.formMethod&&!DM(i.formMethod))return{path:r,error:hr(405,{method:i.formMethod})};let s=()=>({path:r,error:hr(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),d=DE(r);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Tn(c))return s();let y=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((x,[w,E])=>`${x}${w}=${E} -`,""):String(i.body);return{path:r,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:void 0,text:y}}}else if(i.formEncType==="application/json"){if(!Tn(c))return s();try{let y=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:r,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:y,text:void 0}}}catch{return s()}}}qe(typeof FormData=="function","FormData is not available in this environment");let f,m;if(i.formData)f=Cp(i.formData),m=i.formData;else if(i.body instanceof FormData)f=Cp(i.body),m=i.body;else if(i.body instanceof URLSearchParams)f=i.body,m=P1(f);else if(i.body==null)f=new URLSearchParams,m=new FormData;else try{f=new URLSearchParams(i.body),m=P1(f)}catch{return s()}let g={formMethod:c,formAction:d,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(Tn(g.formMethod))return{path:r,submission:g};let v=na(r);return e&&v.search&&wg(v.search)&&f.append("index",""),v.search=`?${f}`,{path:Mn(v),submission:g}}function z1(e,r,i,s,l,c,d,f,m,g,v,y,x,w,E,_,N,H,O,se,ce,K){let oe=ce?Jn(ce[1])?ce[1].error:ce[1].data:void 0,R=l.createURL(c.location),k=l.createURL(m),z;if(v&&c.errors){let Q=Object.keys(c.errors)[0])DELIM" -R"DELIM(;z=d.findIndex(Y=>Y.route.id===Q)}else if(ce&&Jn(ce[1])){let Q=ce[0];z=d.findIndex(Y=>Y.route.id===Q)-1}let P=ce?ce[1].statusCode:void 0,F=P&&P>=400,X={currentUrl:R,currentParams:c.matches[0]?.params||{},nextUrl:k,nextParams:d[0].params,...f,actionResult:oe,actionStatus:P},fe=Xl(d),ge=d.map((Q,Y)=>{let{route:ie}=Q,$=null;if(z!=null&&Y>z)$=!1;else if(ie.lazy)$=!0;else if(!bg(ie))$=!1;else if(v){let{shouldLoad:Ce}=CE(ie,c.loaderData,c.errors);$=Ce}else gM(c.loaderData,c.matches[Y],Q)&&($=!0);if($!==null)return _p(i,s,e,m,fe,Q,g,r,$);let ye=!1;typeof K=="boolean"?ye=K:F?ye=!1:(y||R.pathname+R.search===k.pathname+k.search||R.search!==k.search||yM(c.matches[Y],Q))&&(ye=!0);let He={...X,defaultShouldRevalidate:ye},xe=zl(Q,He);return _p(i,s,e,m,fe,Q,g,r,xe,He,K)}),re=[];return E.forEach((Q,Y)=>{if(v||!d.some(G=>G.route.id===Q.routeId)||w.has(Y))return;let ie=c.fetchers.get(Y),$=ie&&ie.state!=="idle"&&ie.data===void 0,ye=Nr(N,Q.path,H??"/",!1,se);if(!ye){if(O&&$)return;re.push({key:Y,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(_.has(Y))return;let He=Ju(ye,Q.path),xe=new AbortController,Ce=Ks(l,Q.path,xe.signal),j=null;if(x.has(Y))x.delete(Y),j=eo(i,s,Ce,Q.path,ye,He,g,r);else if($)y&&(j=eo(i,s,Ce,Q.path,ye,He,g,r));else{let G;typeof K=="boolean"?G=K:F?G=!1:G=y;let he={...X,defaultShouldRevalidate:G};zl(He,he)&&(j=eo(i,s,Ce,Q.path,ye,He,g,r,he))}j&&re.push({key:Y,routeId:Q.routeId,path:Q.path,matches:j,match:He,request:Ce,controller:xe})}),{dsMatches:ge,revalidatingFetchers:re}}function bg(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function CE(e,r,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!bg(e))return{shouldLoad:!1,renderFallback:!1};let s=r!=null&&e.id in r,l=i!=null&&i[e.id]!==void 0;if(!s&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let c=!s&&!l;return{shouldLoad:c,renderFallback:c}}function gM(e,r,i){let s=!r||i.route.id!==r.route.id,l=!e.hasOwnProperty(i.route.id);return s||l}function yM(e,r){let i=e.route.path;return e.pathname!==r.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==r.params["*"]}function zl(e,r){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(r);if(typeof i=="boolean")return i}return r.defaultShouldRevalidate}function D1(e,r,i,s,l,c){let d;if(e){let g=s[e];qe(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),d=g.children}else d=i.activeRoutes;let f=[],m=[];if(r.forEach(g=>{let v=d.find(y=>jE(g,y));v?m.push({existingRoute:v,newRoute:g}):f.push(g)}),f.length>0){let g=ql(f,l,[e||"_","patch",String(d?.length||"0")],s);d.push(...g)}if(c&&m.length>0)for(let g=0;gr.children?.some(l=>jE(i,l)))??!1:!1}var L1=new WeakMap,RE=({key:e,route:r,manifest:i,mapRouteProperties:s})=>{let l=i[r.id];if(qe(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let c=l.lazy[e];if(!c)return;let d=L1.get(l);d||(d={},L1.set(l,d));let f=d[e];if(f)return f;let m=(async()=>{let g=MO(e),y=l[e]!==void 0&&e!=="hasErrorBoundary";if(g)Ct(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),d[e]=Promise.resolve();else if(y)Ct(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await c();x!=null&&(Object.assign(l,{[e]:x}),Object.assign(l,s(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(x=>x===void 0)&&(l.lazy=void 0))})();return d[e]=m,m},B1=new WeakMap;function vM(e,r,i,s,l){let c=i[e.id];if(qe(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let v=B1.get(c);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let y=(async()=>{qe(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),w={};for(let E in x){let _=x[E];if(_===void 0)continue;let N=DO(E),O=c[E]!==void 0&&E!=="hasErrorBoundary";N?Ct(!N,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Ct(!O,`Route "${c.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):w[E]=_}Object.assign(c,w),Object.assign(c,{...s(c),lazy:void 0})})();return B1.set(c,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(e.lazy),f=[],m;for(let v of d){if(l&&l.includes(v))continue;let y=RE({key:v,route:e,manifest:i,mapRouteProperties:s});y&&(f.push(y),v===r&&(m=y))}let g=f.length>0?Promise.all(f).then(()=>{}):void 0;return g?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:m}}async function U1(e){let r=e.matches.filter(l=>l.shouldLoad),i={};return(await Promise.all(r.map(l=>l.resolve()))).forEach((l,c)=>{i[r[c].route.id]=l}),i}async function bM(e){return e.matches.some(r=>r.route.middleware)?AE(e,()=>U1(e)):U1(e)}function AE(e,r){return xM(e,r,s=>{if(zM(s))throw s;return s},RM,i);function i(s,l,c){if(c)return Promise.resolve(Object.assign(c.value,{[l]:{type:"error",result:s}}));{let{matches:d}=e,f=Math.min(Math.max(d.findIndex(g=>g.route.id===l),0),Math.max(d.findIndex(g=>g.shouldCallHandler()),0)),m=ui(d,d[f].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:s}})}}}async function xM(e,r,i,s,l){let{matches:c,...d}=e,f=c.flatMap(g=>g.route.middleware?g.route.middleware.map(v=>[g.route.id,v]):[]);return await OE(d,f,r,i,s,l)}async function OE(e,r,i,s,l,c,d=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let m=r[d];if(!m)return await i();let[g,v]=m,y,x=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await OE(e,r,i,s,l,c,d+1)},y.value}catch(w){return y={value:await c(w,g,y)},y.value}};try{let w=await v(e,x),E=w!=null?s(w):void 0;return l(E)?E:y?E??y.value:(y={value:await x()},y.value)}catch(w){return await c(w,g,y)}}function ME(e,r,i,s,l){let c=RE({key:"middleware",route:s.route,manifest:r,mapRouteProperties:e}),d=vM(s.route,Tn(i.method)?"action":"loader",r,e,l);return{middleware:c,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function _p(e,r,i,s,l,c,d,f,m,g=null,v){let y=!1,x=ME(e,r,i,c,d);return{...c,_lazyPromises:x,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(w){return y=!0,g?typeof v=="boolean"?zl(c,{...g,defaultShouldRevalidate:v}):typeof w=="boolean"?zl(c,{...g,defaultShouldRevalidate:w}):zl(c,g):m},resolve(w){let{lazy:E,loader:_,middleware:N}=c.route,H=y||m||w&&!Tn(i.method)&&(E||_),O=N&&N.length>0&&!_&&!E;return H&&(Tn(i.method)||!O)?SM({request:i,path:s,pattern:l,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:w,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function eo(e,r,i,s,l,c,d,f,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:ME(e,r,i,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:_p(e,r,i,s,Xl(l),g,d,f,!0,m))}async function wM(e,r,i,s,l,c,d){s.some(v=>v._lazyPromises?.middleware)&&await Promise.all(s.map(v=>v._lazyPromises?.middleware));let f={request:r,url:zE(r,i),pattern:Xl(s),params:s[0].params,context:c,matches:s},g=await e({...f,fetcherKey:l,runClientMiddleware:v=>{)DELIM" -R"DELIM(let y=f;return AE(y,()=>v({...y,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(v=>[v._lazyPromises?.handler,v._lazyPromises?.route]))}catch{}return g}async function SM({request:e,path:r,pattern:i,match:s,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:d,scopedContext:f}){let m,g,v=Tn(e.method),y=v?"action":"loader",x=w=>{let E,_=new Promise((O,se)=>E=se);g=()=>E(),e.signal.addEventListener("abort",g);let N=O=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${s.route.id}]`)):w({request:e,url:zE(e,r),pattern:i,params:s.params,context:f},...O!==void 0?[O]:[]),H=(async()=>{try{return{type:"data",result:await(d?d(se=>N(se)):N())}}catch(O){return{type:"error",result:O}}})();return Promise.race([H,_])};try{let w=v?s.route.action:s.route.loader;if(l||c)if(w){let E,[_]=await Promise.all([x(w).catch(N=>{E=N}),l,c]);if(E!==void 0)throw E;m=_}else{await l;let E=v?s.route.action:s.route.loader;if(E)[m]=await Promise.all([x(E),c]);else if(y==="action"){let _=new URL(e.url),N=_.pathname+_.search;throw hr(405,{method:e.method,pathname:N,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(w)m=await x(w);else{let E=new URL(e.url),_=E.pathname+E.search;throw hr(404,{pathname:_})}}catch(w){return{type:"error",result:w}}finally{g&&e.signal.removeEventListener("abort",g)}return m}async function EM(e){let r=e.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?e.body==null?null:e.json():e.text()}async function TM(e){let{result:r,type:i}=e;if(xg(r)){let s;try{s=await EM(r)}catch(l){return{type:"error",error:l}}return i==="error"?{type:"error",error:new Ql(r.status,r.statusText,s),statusCode:r.status,headers:r.headers}:{type:"data",data:s,statusCode:r.status,headers:r.headers}}return i==="error"?I1(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:jM(r),statusCode:Zl(r)?r.status:void 0,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:Zl(r)?r.status:void 0}:I1(r)?{type:"data",data:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function kM(e,r,i,s,l){let c=e.headers.get("Location");if(qe(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!gg(c)){let d=s.slice(0,s.findIndex(f=>f.route.id===i)+1);c=kp(new URL(r.url),d,l,c),e.headers.set("Location",c)}return e}var _M=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Np(e){try{return _M.includes(new URL(e).protocol)}catch{return!1}}function H1(e,r,i,s){if(gg(e)){let l=e,c=jd.test(l)?new URL(dE(l,r.protocol)):new URL(l);if(Np(c.toString()))throw new Error("Invalid redirect location");let d=tr(c.pathname,i)!=null;if(c.origin===r.origin&&d)return yg(c.pathname)+c.search+c.hash}try{let l=s.createURL(e);if(Np(l.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Ks(e,r,i,s){let l=e.createURL(DE(r)).toString(),c={signal:i};if(s&&Tn(s.formMethod)){let{formMethod:d,formEncType:f}=s;c.method=d.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(s.json)):f==="text/plain"?c.body=s.text:f==="application/x-www-form-urlencoded"&&s.formData?c.body=Cp(s.formData):c.body=s.formData}return new Request(l,c)}function zE(e,r){let i=new URL(e.url),s=typeof r=="string"?na(r):r;if(i.pathname=s.pathname||"/",s.search){let l=new URLSearchParams(s.search),c=l.getAll("index");l.delete("index");for(let d of c.filter(Boolean))l.append("index",d);i.search=l.size?`?${l.toString()}`:""}else i.search="";return i.hash=s.hash||"",i}function Cp(e){let r=new URLSearchParams;for(let[i,s]of e.entries())r.append(i,typeof s=="string"?s:s.name);return r}function P1(e){let r=new FormData;for(let[i,s]of e.entries())r.append(i,s);return r}function NM(e,r,i,s=!1,l=!1){let c={},d=null,f,m=!1,g={},v=i&&Jn(i[1])?i[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in r))return;let x=y.route.id,w=r[x];if(qe(!Gi(w),"Cannot handle redirect results in processLoaderData"),Jn(w)){let E=w.error;if(v!==void 0&&(E=v,v=void 0),d=d||{},l)d[x]=E;else{let _=ui(e,x);d[_.route.id]==null&&(d[_.route.id]=E)}s||(c[x]=NE),m||(m=!0,f=Zl(w.error)?w.error.status:500),w.headers&&(g[x]=w.headers)}else c[x]=w.data,w.statusCode&&w.statusCode!==200&&!m&&(f=w.statusCode),w.headers&&(g[x]=w.headers)}),v!==void 0&&i&&(d={[i[0]]:v},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:d,statusCode:f||200,loaderHeaders:g}}function $1(e,r,i,s,l,c,d){let{loaderData:f,errors:m}=NM(r,i,s);return l.filter(g=>!g.matches||g.matches.some(v=>v.shouldLoad)).forEach(g=>{let{key:v,match:y,controller:x}=g;if(x&&x.signal.aborted)return;let w=c[v];if(qe(w,"Did not find corresponding fetcher result"),Jn(w)){let E=ui(e.matches,y?.route.id);m&&m[E.route.id]||(m={...m,[E.route.id]:w.error}),d.delete(v)}else if(Gi(w))qe(!1,"Unhandled fetcher revalidation redirect");else{let E=Qr(w.data);d.set(v,E)}}),{loaderData:f,errors:m}}function q1(e,r,i,s){let l=Object.entries(r).filter(([,c])=>c!==NE).reduce((c,[d,f])=>(c[d]=f,c),{});for(let c of i){let d=c.route.id;if(!r.hasOwnProperty(d)&&e.hasOwnProperty(d)&&c.route.loader&&(l[d]=e[d]),s&&s.hasOwnProperty(d))break}return l}function Z1(e){return e?Jn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ui(e,r){return(r?e.slice(0,e.findIndex(s=>s.route.id===r)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function Uu(e){let r=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function hr(e,{pathname:r,routeId:i,method:s,type:l,message:c}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(d="Bad Request",s&&r&&i?f=`You made a ${s} request to "${r}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(d="Forbidden",f=`Route "${i}" does not match URL "${r}"`):e===404?(d="Not Found",f=`No route matches URL "${r}"`):e===405&&(d="Method Not Allowed",s&&r&&i?f=`You made a ${s.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:s&&(f=`Invalid request method "${s.toUpperCase()}"`)),new Ql(e||500,d,new Error(f),!0)}function Hu(e){let r=Object.entries(e);for(let i=r.length-1;i>=0;i--){let[s,l]=r[i];if(Gi(l))return{key:s,result:l}}}function DE(e){let r=typeof e=="string"?na(e):e;return Mn({...r,hash:""})}function CM(e,r){return e.pathname!==r.pathname||e.search!==r.search?!1:e.hash===""?r.hash!=="":e.hash===r.hash?!0:r.hash!==""}function jM(e){return new Ql(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function RM(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([r,i])=>typeof r=="string"&&AM(i))}function AM(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function OM(e){return xg(e.result)&&kE.has(e.result.status)}function Jn(e){return e.type==="error"}function Gi(e){return(e&&e.type)==="redirect"}function I1(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function xg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function MM(e){return kE.has(e)}function zM(e){return xg(e)&&MM(e.status)&&e.headers.has("Location")}function DM(e){return cM.has(e.toUpperCase())}function Tn(e){return oM.has(e.toUpperCase())}function wg(e){return new URLSearchParams(e).getAll("index").some(r=>r==="")}f)DELIM" -R"DELIM(unction Ju(e,r){let i=typeof r=="string"?na(r).search:r.search;if(e[e.length-1].route.index&&wg(i||""))return e[e.length-1];let s=xE(e);return s[s.length-1]}function F1(e){let{formMethod:r,formAction:i,formEncType:s,text:l,formData:c,json:d}=e;if(!(!r||!i||!s)){if(l!=null)return{formMethod:r,formAction:i,formEncType:s,formData:void 0,json:void 0,text:l};if(c!=null)return{formMethod:r,formAction:i,formEncType:s,formData:c,json:void 0,text:void 0};if(d!==void 0)return{formMethod:r,formAction:i,formEncType:s,formData:void 0,json:d,text:void 0}}}function Hm(e,r,i,s){return s?{state:"loading",location:e,matches:r,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}:{state:"loading",location:e,matches:r,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function LM(e,r,i,s){return{state:"submitting",location:e,matches:r,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}}function vl(e,r){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function BM(e,r){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r?r.data:void 0}}function Qr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function UM(e,r){try{let i=e.sessionStorage.getItem(_E);if(i){let s=JSON.parse(i);for(let[l,c]of Object.entries(s||{}))c&&Array.isArray(c)&&r.set(l,new Set(c||[]))}}catch{}}function HM(e,r){if(r.size>0){let i={};for(let[s,l]of r)i[s]=[...l];try{e.sessionStorage.setItem(_E,JSON.stringify(i))}catch(s){Ct(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function V1(){let e,r,i=new Promise((s,l)=>{e=async c=>{s(c);try{await i}catch{}},r=async c=>{l(c);try{await i}catch{}}});return{promise:i,resolve:e,reject:r}}var Wi=T.createContext(null);Wi.displayName="DataRouter";var go=T.createContext(null);go.displayName="DataRouterState";var LE=T.createContext(!1);function BE(){return T.useContext(LE)}var Sg=T.createContext({isTransitioning:!1});Sg.displayName="ViewTransition";var UE=T.createContext(new Map);UE.displayName="Fetchers";var PM=T.createContext(null);PM.displayName="Await";var Dn=T.createContext(null);Dn.displayName="Navigation";var Jl=T.createContext(null);Jl.displayName="Location";var yr=T.createContext({outlet:null,matches:[],isDataRoute:!1});yr.displayName="Route";var Eg=T.createContext(null);Eg.displayName="RouteError";var HE="REACT_ROUTER_ERROR",$M="REDIRECT",qM="ROUTE_ERROR_RESPONSE";function ZM(e){if(e.startsWith(`${HE}:${$M}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function IM(e){if(e.startsWith(`${HE}:${qM}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Ql(r.status,r.statusText,r.data)}catch{}}function FM(e,{relative:r}={}){qe(yo(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:s}=T.useContext(Dn),{hash:l,pathname:c,search:d}=Wl(e,{relative:r}),f=c;return i!=="/"&&(f=c==="/"?i:pr([i,c])),s.createHref({pathname:f,search:d,hash:l})}function yo(){return T.useContext(Jl)!=null}function Xt(){return qe(yo(),"useLocation() may be used only in the context of a component."),T.useContext(Jl).location}function VM(){return T.useContext(Jl).navigationType}var PE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $E(e){T.useContext(Dn).static||T.useLayoutEffect(e)}function vr(){let{isDataRoute:e}=T.useContext(yr);return e?sz():YM()}function YM(){qe(yo(),"useNavigate() may be used only in the context of a component.");let e=T.useContext(Wi),{basename:r,navigator:i}=T.useContext(Dn),{matches:s}=T.useContext(yr),{pathname:l}=Xt(),c=JSON.stringify(Rd(s)),d=T.useRef(!1);return $E(()=>{d.current=!0}),T.useCallback((m,g={})=>{if(Ct(d.current,PE),!d.current)return;if(typeof m=="number"){i.go(m);return}let v=Kl(m,JSON.parse(c),l,g.relative==="path");e==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:pr([r,v.pathname])),Ws(typeof m=="string"?m:Mn(m),i.createHref(v),vg(i),"reject"),(g.replace?i.replace:i.push)(v,g.state,g)},[r,i,c,l,e])}var GM=T.createContext(null);function KM(e){let r=T.useContext(yr).outlet;return T.useMemo(()=>r&&T.createElement(GM.Provider,{value:e},r),[r,e])}function Tg(){let{matches:e}=T.useContext(yr);return e[e.length-1]?.params??{}}function Wl(e,{relative:r}={}){let{matches:i}=T.useContext(yr),{pathname:s}=Xt(),l=JSON.stringify(Rd(i));return T.useMemo(()=>Kl(e,JSON.parse(l),s,r==="path"),[e,l,s,r])}function QM(e,r,i){qe(yo(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=T.useContext(Dn),{matches:l}=T.useContext(yr),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",m=c?c.pathnameBase:"/",g=c&&c.route;{let N=g&&g.path||"";FE(f,!g||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const f=d[1];if(r===d[0]){c(d);continue}if(e.external){const g=e.external.registry.get(d[0])?.id;if(r!==d[0]&&g){c(d);continue}}if(e.metadataRegistry.get(d[0])?.id){c(d);continue}if(f.cycle){c(d);continue}f.count>1&&e.reused==="ref"&&c(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function fS(e){const r=e.anyOf;if(!Array.isArray(r)||r.length===0||e.type!==void 0)return;const i=[];for(const s of r){if(!s||typeof s!="object")return;fS(s);const l=Object.keys(s);if(l.length!==1||l[0]!=="type")return;const c=s.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;i.includes(d)||i.push(d)}}delete e.anyOf,e.type=i.length===1?i[0]:i}const hS=new Set(["type","properties","required","additionalProperties"]),Lx=["oneOf","anyOf"];function Ux(e){const r=e.additionalProperties;return r===void 0||r===!1||typeof r!="object"||r===null?null:Object.keys(r).length?r:null}function dp(e){const r=[];for(const c of e){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!hS.has(d))return null;r.push(c)}const i={},s=new Set;for(const c of r){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;const f=[];for(const g of r){const v=g.properties?.[d]??Ux(g);v!=null&&(f.some(y=>JSON.stringify(y)===JSON.stringify(v))||f.push(v))}const m=f.length===1?f[0]:dp(f)??{allOf:f};wa(i,d,m)}for(const d of c.required??[])s.add(d)}const l={type:"object",properties:i};if(s.size&&(l.required=[...s]),r.every(c=>c.additionalProperties===!1))l.additionalProperties=!1;else{const c=[];for(const d of r){const f=Ux(d);f&&!c.some(m=>JSON.stringify(m)===JSON.stringify(f))&&c.push(f)}c.length===1?l.additionalProperties=c[0]:c.length>1&&(l.additionalProperties={allOf:c})}return l}function F3(e){const r=e.allOf;if(!Array.isArray(r)||r.length<2)return;for(const l of hS)if(l in e)return;const i=r.filter(l=>Lx.some(c=>Array.isArray(l[c])));let s=null;if(!i.length)s=dp(r);else{const l=i[0],c=Lx.find(m=>Array.isArray(l[m]));if(Object.keys(l).length!==1)return;const d=r.filter(m=>m!==l),f=l[c].map(m=>dp([...d,m]));if(f.some(m=>!m))return;s={[c]:f}}s&&(delete e.allOf,Al(e,s))}function mS(e,r){const i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const s=f=>{const m=e.seen.get(f);if(m.ref===null)return;const g=m.def??m.schema,v={...g},y=m.ref;if(m.ref=null,y){s(y);const w=e.seen.get(y),E=w.schema;if(E.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(E)):Al(g,E),Al(g,v),f._zod.parent===y)for(const N in g)N==="$ref"||N==="allOf"||N in v||delete g[N];if(E.$ref&&w.def)for(const N in g)N==="$ref"||N==="allOf"||N in w.def&&JSON.stringify(g[N])===JSON.stringify(w.def[N])&&delete g[N]}const x=f._zod.parent;if(x&&x!==y){s(x);const w=e.seen.get(x);if(w?.schema.$ref&&(g.$ref=w.schema.$ref,w.def))for(const E in g)E==="$ref"||E==="allOf"||E in w.def&&JSON.stringify(g[E])===JSON.stringify(w.def[E])&&delete g[E]}e.override({zodSchema:f,jsonSchema:g,path:m.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const f of[...e.seen.entries()].reverse())s(f[0]);if(e.target!=="openapi-3.0")for(const f of e.seen.entries())fS(f[1].def??f[1].schema);for(const f of e.deferred)f();if(e.intersections.length){const f=new Map;for(const m of e.seen.values())for(const g of[m.schema,m.def]){const v=g?.allOf;if(!Array.isArray(v))continue;const y=f.get(v);y?y.push(g):f.set(v,[g])}for(const m of e.intersections)for(const g of f.get(m)??[])F3(g)}}const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(r)?.id;if(!f)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(f)}Al(l,i.defId?i.schema:i.def??i.schema);const c=e.metadataRegistry.get(r)?.id;c!==void 0&&l.id===c&&delete l.id;const d=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const f of e.seen.entries()){const m=f[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,wa(d,m.defId,m.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(d).length>0&&(e.target==="draft-2020-12"?l.$defs=d:l.definitions=d);try{const f=JSON.parse(JSON.stringify(l));return Object.defineProperty(f,"~standard",{value:{...r["~standard"],jsonSchema:{input:ud(r,"input",e.processors),output:ud(r,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function On(e,r){const i=r??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const s=e._zod.def;if(s.type==="transform")return!0;if(s.type==="array")return On(s.element,i);if(s.type==="set")return On(s.valueType,i);if(s.type==="lazy")return On(s.getter(),i);if(s.type==="promise"||s.type==="optional"||s.type==="nonoptional"||s.type==="nullable"||s.type==="readonly"||s.type==="default"||s.type==="prefault"||s.type==="catch")return On(s.innerType,i);if(s.type==="intersection")return On(s.left,i)||On(s.right,i);if(s.type==="record"||s.type==="map")return On(s.keyType,i)||On(s.valueType,i);if(s.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:On(s.in,i)||On(s.out,i);if(s.type==="object"){for(const l in s.shape)if(On(s.shape[l],i))return!0;return!1}if(s.type==="union"){for(const l of s.options)if(On(l,i))return!0;return!1}if(s.type==="tuple"){for(const l of s.items)if(On(l,i))return!0;return!!(s.rest&&On(s.rest,i))}return!1}const V3=(e,r={})=>i=>{const s=uS({...i,processors:r});return Gt(e,s),dS(s,e),mS(s,e)},ud=(e,r,i={})=>s=>{const{libraryOptions:l,target:c}=s??{},d=uS({...l??{},target:c,io:r,processors:i});return Gt(e,d),dS(d,e),mS(d,e)},oo=(e,r,i)=>{(e[r]===void 0||i>e[r])&&(e[r]=i)},lo=(e,r,i)=>{(e[r]===void 0||i{oo(e,"minimum",r),lo(e,"maximum",r)},pS=(e,r)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(r)||e.multipleOf.push(r)},gS=(e,r)=>{e.patterns??(e.patterns=new Set),e.patterns.add(r)},yS=(e,r)=>{e.mime=e.mime?e.mime.filter(i=>r.includes(i)):[...r]},vS=(e,r)=>{e.format=r,)DELIM" +R"DELIM(r.includes("int")&&(e.isInt=!0)},Px=(e,r)=>oo(e,"minimum",r.minimum),$x=(e,r)=>lo(e,"maximum",r.maximum),qx=e=>(r,i)=>{vS(r,i.format);const[s,l]=e[i.format];oo(r,"minimum",s),lo(r,"maximum",l)},Y3={greater_than:(e,r)=>oo(e,r.inclusive?"minimum":"exclusiveMinimum",r.value),less_than:(e,r)=>lo(e,r.inclusive?"maximum":"exclusiveMaximum",r.value),multiple_of:(e,r)=>pS(e,r.value),number_format:qx(Uw),bigint_format:qx(c4),min_length:Px,max_length:$x,length_equals:(e,r)=>Hx(e,r.length),min_size:Px,max_size:$x,size_equals:(e,r)=>Hx(e,r.size),string_format:(e,r)=>{vS(e,r.format),r.pattern&&gS(e,r.pattern),(r.format==="base64"||r.format==="base64url")&&(e.contentEncoding=r.format),(r.local||r.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,r)=>yS(e,r.mime)};function Cr(e){const r={},i=e._zod.def,s=e._zod.traits.has("$ZodCheck")?[e,...i.checks??[]]:i.checks??[];for(const c of s)Y3[c._zod.def.check]?.(r,c._zod.def);const l=e._zod.bag;l.minimum!==void 0&&oo(r,"minimum",l.minimum),l.exclusiveMinimum!==void 0&&oo(r,"exclusiveMinimum",l.exclusiveMinimum),l.maximum!==void 0&&lo(r,"maximum",l.maximum),l.exclusiveMaximum!==void 0&&lo(r,"exclusiveMaximum",l.exclusiveMaximum),l.multipleOf!==void 0&&pS(r,l.multipleOf),l.format!==void 0&&(r.format??(r.format=l.format),l.format.includes("int")&&(r.isInt=!0)),l.mime&&yS(r,l.mime);for(const c of l.patterns??[])gS(r,c);return r}const G3={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},K3=new Map([[Ww,uN],[ag,dN]]),bS=e=>K3.get(e)??e,Q3=(e,r,i,s)=>{const l=i;l.type="string";const{minimum:c,maximum:d,format:f,patterns:m,contentEncoding:g,laxFormat:v}=Cr(e);if(typeof c=="number"&&(l.minLength=c),typeof d=="number"&&(l.maxLength=d),f&&(l.format=G3[f]??f,l.format===""&&delete l.format,(f==="time"||v)&&delete l.format),g&&(l.contentEncoding=g),m&&m.size>0){const y=[...m].map(bS);y.length===1?l.pattern=y[0].source:y.length>1&&(l.allOf=[...y.map(x=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},X3=(e,r,i,s)=>{const l=i,{minimum:c,maximum:d,multipleOf:f,exclusiveMaximum:m,exclusiveMinimum:g,isInt:v}=Cr(e);l.type=v?"integer":"number";const y=typeof g=="number"&&g>=(c??Number.NEGATIVE_INFINITY),x=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),w=r.target==="draft-04"||r.target==="openapi-3.0";if(y?w?(l.minimum=g,l.exclusiveMinimum=!0):l.exclusiveMinimum=g:typeof c=="number"&&(l.minimum=c),x?w?(l.maximum=m,l.exclusiveMaximum=!0):l.exclusiveMaximum=m:typeof d=="number"&&(l.maximum=d),f){const E=new Set;for(const H of f)Number.isFinite(H)&&H!==0?E.add(Math.abs(H)):gi(e,r,l,s,`A multipleOf divisor of ${H} cannot be represented in JSON Schema`);const[_,...N]=E;_!==void 0&&(l.multipleOf=_),N.length&&(l.allOf=[...l.allOf??[],...N.map(H=>({multipleOf:H}))])}},J3=(e,r,i,s)=>{i.type="boolean"},W3=(e,r,i,s)=>{i.not={}},ej=(e,r,i,s)=>{},tj=(e,r,i,s)=>{const l=e._zod.def,c=ip(l.entries);if(c.length===0){i.not={};return}c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},nj=(e,r,i,s)=>{const l=e._zod.def;if(l.values.length===0){i.not={};return}const c=[];for(const d of l.values)if(d===void 0){if(gi(e,r,i,s,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(gi(e,r,i,s,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];i.type=d===null?"null":typeof d,r.target==="draft-04"||r.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},rj=(e,r,i,s)=>{gi(e,r,i,s,"Custom types cannot be represented in JSON Schema")},aj=(e,r,i,s)=>{gi(e,r,i,s,"Transforms cannot be represented in JSON Schema")},ij=(e,r,i,s)=>{const l=i,c=e._zod.def,{minimum:d,maximum:f}=Cr(e);typeof d=="number"&&(l.minItems=d),typeof f=="number"&&(l.maxItems=f),l.type="array",l.items=Gt(c.element,r,{...s,path:[...s.path,"items"]})};function dd(e){const r=e._zod.def;return r.type==="pipe"&&r.in._zod.traits.has("$ZodTransform")?dd(r.out):r.type==="catch"?dd(r.innerType):e._zod.optin}const sj=(e,r,i,s)=>{const l=i,c=e._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&gi(e,r,l,s,"Symbol keys cannot be represented in JSON Schema"))return;l.type="object",l.properties={};for(const g in d)wa(l.properties,g,Gt(d[g],r,{...s,path:[...s.path,"properties",g]}));const m=[];for(const g of Object.keys(d)){const v=c.shape[g];(r.io==="input"?dd(v)===void 0:v._zod.optout===void 0)&&m.push(g)}m.length>0&&(l.required=m),c.catchall?._zod.def.type==="never"?l.additionalProperties=!1:c.catchall?c.catchall&&(l.additionalProperties=Gt(c.catchall,r,{...s,path:[...s.path,"additionalProperties"]})):r.io==="output"&&(l.additionalProperties=!1)},oj=(e,r,i,s)=>{const l=e._zod.def,c=l.inclusive===!1,d=l.options.map((f,m)=>Gt(f,r,{...s,path:[...s.path,c?"oneOf":"anyOf",m]}));c?i.oneOf=d:i.anyOf=d},lj=(e,r,i,s)=>{const l=e._zod.def,c=Gt(l.left,r,{...s,path:[...s.path,"allOf",0]}),d=Gt(l.right,r,{...s,path:[...s.path,"allOf",1]}),f=g=>"allOf"in g&&Object.keys(g).length===1,m=[...f(c)?c.allOf:[c],...f(d)?d.allOf:[d]];i.allOf=m,r.intersections.push(m)};function fp(e,r,i){if(r.$ref){if(i.has(r))return r;i.add(r);const E=e.get(r)?.def;if(!E)return r;const _=fp(e,E,i);return _===E?r:_}for(const E of["anyOf","oneOf"]){const _=r[E];if(!Array.isArray(_))continue;const N=_.map(H=>fp(e,H,i));N.some((H,O)=>H!==_[O])&&(r={...r,[E]:N})}const s=Array.isArray(r.type)?r.type:[r.type],l=!s.includes("string")&&s.some(E=>E==="number"||E==="integer"),c=r.enum??(r.const!==void 0?[r.const]:void 0);if(!l&&!c?.some(E=>typeof E=="number"))return r;const{minimum:d,maximum:f,exclusiveMinimum:m,exclusiveMaximum:g,multipleOf:v,format:y,id:x,...w}=r;return w.enum?w.enum=w.enum.map(E=>typeof E=="number"?String(E):E):typeof w.const=="number"&&(w.const=String(w.const)),l&&(w.type="string",c||(w.pattern=(s.includes("number")?tg:bN).source)),w}const hp=new WeakMap;function cj(e){const r=new Map;for(const s of e.seen.values())s.def&&!r.has(s.schema)&&r.set(s.schema,s);const i=new Map;for(const s of hp.get(e)??[]){const l=e.seen.get(s),c=(l?.def??l?.schema)?.propertyNames;if(!c||c===!0||i.has(c))continue;const d=fp(r,c,new Set);d!==c&&i.set(c,d)}if(i.size)for(const s of e.seen.values())for(const l of[s.schema,s.def]){const c=l&&i.get(l.propertyNames);c&&(l.propertyNames=c)}}const uj=(e,r,i,s)=>{const l=i,c=e._zod.def;l.type="object";const d=c.keyType,f=Cr(d).patterns;if(c.mode==="loose"&&f&&f.size>0){const v=Gt(c.valueType,r,{...s,path:[...s.path,"patternProperties","*"]});l.patternProperties={};for(const y of f)wa(l.patternProperties,bS(y).source,v)}else{if(r.target==="draft-07"||r.target==="draft-2020-12"){l.propertyNames=Gt(c.keyType,r,{...s,path:[...s.path,"propertyNames"]});let v=hp.get(r);v||(v=[],hp.set(r,v),r.deferred.push(()=>cj(r))),v.push(e)}l.additionalProperties=Gt(c.valueType,r,{...s,path:[...s.path,"additionalProperties"]})}const m=d._zod.values,g=r.io==="input"&&dd(c.valueType)!==void 0;if(m&&!c.partial&&!g){const v=[...m].filter(y=>typeof y=="string"||typeof y=="number");v.length>0&&(l.required=v.map(String))}},dj=(e,r,i,s)=>{const l=e._zod.def,c=Gt(l.innerType,r,s),d=r.seen.get(e);r.target==="openapi-3.0"?(d.ref=l.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},fj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType},ig=Symbol();function xS(e,r,i,s,l){let c=!1;const d=JSON.stringify(e,(f,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(gi(r,i,s,l,"BigInt defaults cannot be represented in JSON Schema"),ig):JSON.parse(d)}const hj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType;const d=xS(l.defaultValue,e,r,i,s);d!==ig&&(i.default=d)},mj=(e,r,i,s)=>{const l=e._zod.def;G)DELIM" +R"DELIM(t(l.innerType,r,s);const c=r.seen.get(e);if(c.ref=l.innerType,r.io!=="input")return;const d=xS(l.defaultValue,e,r,i,s);d!==ig&&(i._prefault=d)},pj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType;let d;try{d=l.catchValue(void 0)}catch{gi(e,r,i,s,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},gj=(e,r,i,s)=>{const l=e._zod.def,c=l.in._zod.traits.has("$ZodTransform"),d=r.io==="input"?c?l.out:l.in:l.out;Gt(d,r,s);const f=r.seen.get(e);f.ref=d},yj=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType,i.readOnly=!0},wS=(e,r,i,s)=>{const l=e._zod.def;Gt(l.innerType,r,s);const c=r.seen.get(e);c.ref=l.innerType},Zx=new WeakSet([Object.prototype,Error.prototype]);function Au(e,r,i){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get(){const s=i(this);return Object.defineProperty(this,r,{value:s,configurable:!0,writable:!0}),s},set(s){Object.defineProperty(this,r,{value:s,configurable:!0,writable:!0})}})}const vj=(e,r)=>{A4.init(e,r),e.name="ZodError";const i=Object.getPrototypeOf(e);Zx.has(i)||(Zx.add(i),Au(i,"format",s=>l=>z4(s,l)),Au(i,"flatten",s=>l=>M4(s,l)),Au(i,"addIssue",s=>l=>{s.issues.push(l),s.message=JSON.stringify(s.issues,sp,2)}),Au(i,"addIssues",s=>l=>{s.issues.push(...l),s.message=JSON.stringify(s.issues,sp,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},gr=ae("ZodError",vj,void 0,{Parent:Error}),bj=Xp(gr),xj=Jp(gr),wj=Wp(gr),Sj=eg(gr),Ej=P4(gr),Tj=$4(gr),kj=q4(gr),_j=Z4(gr),Nj=I4(gr),Cj=F4(gr),jj=V4(gr),Rj=Y4(gr);function Aj(){Rr.localeError||Wr(KC())}function _d(){Rr.memoizer||Wr({memoizer:VC()})}const Mt=ae("ZodType",(e,r)=>(Aj(),Ot.init(e,r),e.def=r,e.type=r.type,e),{check(...e){const r=this.def;return this.clone(Wn(r,{checks:[...r.checks??[],...e.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,r){return yi(this,e,r)},brand(){return this},register(e,r){return e.add(this,r),this},refine(e,r){return this.check(RR(e,r))},superRefine(e,r){return this.check(AR(e,r))},overwrite(e){return this.check(ho(e))},optional(){return Vx(this)},exactOptional(){return yR(this)},nullable(){return Yx(this)},nullish(){return Vx(Yx(this))},nonoptional(e){return ER(this,e)},array(){return ea(this)},or(e){return lR([this,e])},and(e){return dR(this,e)},transform(e){return Gx(this,gR(e))},default(e){return xR(this,e)},prefault(e){return SR(this,e)},catch(e){return kR(this,e)},pipe(e){return Gx(this,e)},readonly(){return CR(this)},describe(e){const r=this.clone();return El.add(r,{description:e}),r},meta(...e){if(e.length===0)return El.get(this);const r=this.clone();return El.add(r,e[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...r){return r.length===0?e(this):e(this,...r)},get"~standard"(){return Pw(this,"~standard",{...Gw(this),jsonSchema:{input:ud(this,"input"),output:ud(this,"output")}})},set"~standard"(e){pi(this,"~standard",e)},parse:function e(r,i){return bj(this,r,i,{callee:e})},parseAsync:async function e(r,i){return await xj(this,r,i,{callee:e})},safeParse(e,r){return wj(this,e,r)},async safeParseAsync(e,r){return Sj(this,e,r)},get spa(){return this?.safeParseAsync},set spa(e){pi(this,"spa",e)},validate(e,r){return L4(this,e,r)},validateAsync(e,r){return H4(this,e,r)},encode:function e(r,i){return Ej(this,r,i,{callee:e})},decode:function e(r,i){return Tj(this,r,i,{callee:e})},encodeAsync:async function e(r,i){return await kj(this,r,i,{callee:e})},decodeAsync:async function e(r,i){return await _j(this,r,i,{callee:e})},safeEncode(e,r){return Nj(this,e,r)},safeDecode(e,r){return Cj(this,e,r)},async safeEncodeAsync(e,r){return jj(this,e,r)},async safeDecodeAsync(e,r){return Rj(this,e,r)},toJSONSchema(e){return V3(this,{})(e)},get description(){return El.get(this)?.description},get _def(){return this._zod.def}}),SS=ae("_ZodString",(e,r)=>{rg.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>Q3(e,i,s)},$w({format:e=>Cr(e).format??null,minLength:e=>Cr(e).minimum??null,maxLength:e=>Cr(e).maximum??null},{regex(...e){return this.check(R3(...e))},includes(...e){return this.check(M3(...e))},startsWith(...e){return this.check(z3(...e))},endsWith(...e){return this.check(D3(...e))},min(...e){return this.check(cd(...e))},max(...e){return this.check(lS(...e))},length(...e){return this.check(cS(...e))},nonempty(...e){return this.check(cd(1,...e))},lowercase(e){return this.check(A3(e))},uppercase(e){return this.check(O3(e))},trim(){return this.check(L3())},normalize(...e){return this.check(B3(...e))},toLowerCase(){return this.check(U3())},toUpperCase(){return this.check(H3())},slugify(){return this.check(P3())}})),Oj=ae("ZodString",(e,r)=>{rg.init(e,r),SS.init(e,r)},{email(e){return this.check(WC(Lj,e))},url(e){return this.check(i3(Hj,e))},jwt(e){return this.check(x3(eR,e))},emoji(e){return this.check(s3(Pj,e))},guid(e){return this.check(e3(Uj,e))},uuid(e){return this.check(t3(Ou,e))},uuidv4(e){return this.check(n3(Ou,e))},uuidv6(e){return this.check(r3(Ou,e))},uuidv7(e){return this.check(a3(Ou,e))},nanoid(e){return this.check(o3($j,e))},cuid(e){return this.check(l3(qj,e))},cuid2(e){return this.check(c3(Zj,e))},ulid(e){return this.check(u3(Ij,e))},base64(e){return this.check(y3(Xj,e))},base64url(e){return this.check(v3(Jj,e))},xid(e){return this.check(d3(Fj,e))},ksuid(e){return this.check(f3(Vj,e))},ipv4(e){return this.check(h3(Yj,e))},ipv6(e){return this.check(m3(Gj,e))},cidrv4(e){return this.check(p3(Kj,e))},cidrv6(e){return this.check(g3(Qj,e))},e164(e){return this.check(b3(Wj,e))},datetime(e){return this.check(w3(Mj,e))},date(e){return this.check(S3(zj,e))},time(e){return this.check(E3(Dj,e))},duration(e){return this.check(T3(Bj,e))}});function et(e){return JC(Oj,e)}const zt=ae("ZodStringFormat",(e,r)=>{jt.init(e,r),SS.init(e,r)}),Mj=ae("ZodISODateTime",(e,r)=>{eC.init(e,r),zt.init(e,r)}),zj=ae("ZodISODate",(e,r)=>{tC.init(e,r),zt.init(e,r)}),Dj=ae("ZodISOTime",(e,r)=>{nC.init(e,r),zt.init(e,r)}),Bj=ae("ZodISODuration",(e,r)=>{rC.init(e,r),zt.init(e,r)}),Lj=ae("ZodEmail",(e,r)=>{PN.init(e,r),zt.init(e,r)}),Uj=ae("ZodGUID",(e,r)=>{UN.init(e,r),zt.init(e,r)}),Ou=ae("ZodUUID",(e,r)=>{HN.init(e,r),zt.init(e,r)}),Hj=ae("ZodURL",(e,r)=>{VN.init(e,r),zt.init(e,r)}),Pj=ae("ZodEmoji",(e,r)=>{YN.init(e,r),zt.init(e,r)}),$j=ae("ZodNanoID",(e,r)=>{GN.init(e,r),zt.init(e,r)}),qj=ae("ZodCUID",(e,r)=>{KN.init(e,r),zt.init(e,r)}),Zj=ae("ZodCUID2",(e,r)=>{QN.init(e,r),zt.init(e,r)}),Ij=ae("ZodULID",(e,r)=>{XN.init(e,r),zt.init(e,r)}),Fj=ae("ZodXID",(e,r)=>{JN.init(e,r),zt.init(e,r)}),Vj=ae("ZodKSUID",(e,r)=>{WN.init(e,r),zt.init(e,r)}),Yj=ae("ZodIPv4",(e,r)=>{aC.init(e,r),zt.init(e,r)}),Gj=ae("ZodIPv6",(e,r)=>{sC.init(e,r),zt.init(e,r)}),Kj=ae("ZodCIDRv4",(e,r)=>{oC.init(e,r),zt.init(e,r)}),Qj=ae("ZodCIDRv6",(e,r)=>{cC.init(e,r),zt.init(e,r)}),Xj=ae("ZodBase64",(e,r)=>{uC.init(e,r),zt.init(e,r)}),Jj=ae("ZodBase64URL",(e,r)=>{fC.init(e,r),zt.init(e,r)}),Wj=ae("ZodE164",(e,r)=>{hC.init(e,r),zt.init(e,r)}),eR=ae("ZodJWT",(e,r)=>{pC.init(e,r),zt.init(e,r)}),ES=ae("ZodNumber",(e,r)=>{eS.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>X3(e,i,s,l),e.isFinite=!0},$w({minValue:e=>{const{minimum:r,exclusiveMinimum:i}=Cr(e);return Math.max(r??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:e=>{const{maximum:r,exclusiveMaximum:i}=Cr(e);return Math.min(r??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:e=>{const{isInt:r,multipleOf:i}=Cr(e);return!!r||!!i?.some(Number.isSafeInteger)},format:e=>Cr(e).format??null},{gt(e,r){return this.check(zx(e,r))},gte(e,r){return this.check(Em(e,r))},min(e,r){return this.check(Em(e,r))},lt(e,r){return this.check(Mx(e,r))},lte(e,r){return this.check(Sm(e,r))},max(e,r){return this.check(Sm(e,r))},int(e){return this.check(Ix(e))},safe(e){return this.check(Ix(e))},positive(e){return th)DELIM" +R"DELIM(is.check(zx(0,e))},nonnegative(e){return this.check(Em(0,e))},negative(e){return this.check(Mx(0,e))},nonpositive(e){return this.check(Sm(0,e))},multipleOf(e,r){return this.check(Dx(e,r))},step(e,r){return this.check(Dx(e,r))},finite(){return this}}));function Ve(e){return k3(ES,e)}const tR=ae("ZodNumberFormat",(e,r)=>{gC.init(e,r),ES.init(e,r)});function Ix(e){return _3(tR,e)}const nR=ae("ZodBoolean",(e,r)=>{yC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>J3(e,i,s)});function li(e){return N3(nR,e)}const rR=ae("ZodUnknown",(e,r)=>{vC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>ej()});function mp(){return C3(rR)}const aR=ae("ZodNever",(e,r)=>{bC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>W3(e,i,s)});function iR(e){return j3(aR,e)}const sR=ae("ZodArray",(e,r)=>{_d(),SC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>ij(e,i,s,l),e.element=r.element},{min(e,r){return this.check(cd(e,r))},nonempty(e){return this.check(cd(1,e))},max(e,r){return this.check(lS(e,r))},length(e,r){return this.check(cS(e,r))},unwrap(){return this.element}});function ea(e,r){return $3(sR,e,r)}const oR=ae("ZodObject",(e,r)=>{_d(),kC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>sj(e,i,s,l),E4(e,"shape",i=>i._zod.def.shape,!1)},{keyof(){return hR(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Wn(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Wn(this._zod.def,{catchall:mp()}))},loose(){return this.clone(Wn(this._zod.def,{catchall:mp()}))},strict(){return this.clone(Wn(this._zod.def,{catchall:iR()}))},strip(){return this.clone(Wn(this._zod.def,{catchall:void 0}))},extend(e){return f4(this,e)},safeExtend(e){return h4(this,e)},merge(e){return m4(this,e)},pick(e){return u4(this,e)},omit(e){return d4(this,e)},partial(...e){return px(_S,this,e[0])},exactPartial(...e){return px(NS,this,e[0],"exactPartial")},required(...e){return p4(CS,this,e[0])}});function Tt(e,r){const i={type:"object",shape:e??{},...Re(r)};return new oR(i)}const TS=ae("ZodUnion",(e,r)=>{rS.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>oj(e,i,s,l),e.options=r.options});function lR(e,r){return new TS({type:"union",options:e,...Re(r)})}const cR=ae("ZodDiscriminatedUnion",(e,r)=>{TS.init(e,r),NC.init(e,r)});function kS(e,r,i){return new cR({type:"union",options:r,discriminator:e,...Re(i)})}const uR=ae("ZodIntersection",(e,r)=>{CC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>lj(e,i,s,l)});function dR(e,r){return new uR({type:"intersection",left:e,right:r})}const Fx=ae("ZodRecord",(e,r)=>{_d(),jC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>uj(e,i,s,l),e.keyType=r.keyType,e.valueType=r.valueType});function fR(e,r,i){return!r||!r._zod?new Fx({type:"record",keyType:et(),valueType:e,...Re(r)}):new Fx({type:"record",keyType:e,valueType:r,...Re(i)})}const pp=ae("ZodEnum",(e,r)=>{RC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(s,l,c)=>tj(e,s,l),e.enum=r.entries,e.options=[...e._zod.values];const i=new Set(Object.keys(r.entries));e.extract=(s,l)=>{const c={};for(const d of s)if(i.has(d))c[d]=r.entries[d];else throw new Error(`Key ${d} not found in enum`);return new pp({...r,checks:[],...Re(l),entries:c})},e.exclude=(s,l)=>{const c={...r.entries};for(const d of s)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new pp({...r,checks:[],...Re(l),entries:c})}});function hR(e,r){const i=Array.isArray(e)?Object.fromEntries(e.map(s=>[s,s])):e;return new pp({type:"enum",entries:i,...Re(r)})}const mR=ae("ZodLiteral",(e,r)=>{AC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>nj(e,i,s,l),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function ci(e,r){return new mR({type:"literal",values:Array.isArray(e)?e:[e],...Re(r)})}const pR=ae("ZodTransform",(e,r)=>{_d(),OC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>aj(e,i,s,l),e._zod.parse=(i,s)=>{if(s.direction==="backward")throw new qw(e.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(Hl(c,i.value,r));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=e),i.issues.push(Hl(d))}};const l=r.transform(i.value,i);return l instanceof Promise?l.then(c=>(i.value=c,i)):(i.value=l,i)}});function gR(e){return new pR({type:"transform",transform:e})}const _S=ae("ZodOptional",(e,r)=>{aS.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>wS(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function Vx(e){return new _S({type:"optional",innerType:e})}const NS=ae("ZodExactOptional",(e,r)=>{MC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>wS(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function yR(e){return new NS({type:"optional",innerType:e})}const vR=ae("ZodNullable",(e,r)=>{zC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>dj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function Yx(e){return new vR({type:"nullable",innerType:e})}const bR=ae("ZodDefault",(e,r)=>{DC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>hj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function xR(e,r){return new bR({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():Bw(r)}})}const wR=ae("ZodPrefault",(e,r)=>{BC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>mj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function SR(e,r){return new wR({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():Bw(r)}})}const CS=ae("ZodNonOptional",(e,r)=>{LC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>fj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function ER(e,r){return new CS({type:"nonoptional",innerType:e,...Re(r)})}const TR=ae("ZodCatch",(e,r)=>{UC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>pj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function kR(e,r){return new TR({type:"catch",innerType:e,catchValue:typeof r=="function"?r:k4(r)})}const _R=ae("ZodPipe",(e,r)=>{HC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>gj(e,i,s,l),e.in=r.in,e.out=r.out});function Gx(e,r){return new _R({type:"pipe",in:e,out:r})}const NR=ae("ZodReadonly",(e,r)=>{PC.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>yj(e,i,s,l),e.unwrap=()=>e._zod.def.innerType});function CR(e){return new NR({type:"readonly",innerType:e})}const jR=ae("ZodCustom",(e,r)=>{$C.init(e,r),Mt.init(e,r),e._zod.processJSONSchema=(i,s,l)=>rj(e,i,s,l)});function RR(e,r={}){return q3(jR,e,r)}function AR(e,r){return Z3(e,r)}function ba(e){if(!e)return;const r=e.trim();if(!r)return;const i=r.toLowerCase(),s=i.indexOf("1");if(s>0){const d=i.slice(0,s);if(["bc","tb","bcrt","ltc","sb"].includes(d)){const f=i.slice(s+1);if(!f)return;const m=f.charAt(0);return m==="p"?"p2tr":m==="q"?f.length===39||f.length===40||e.length===42?"p2wpkh":f.length===59||f.length===60||e.length===62?"p2wsh":"segwit":"segwit"}}const l=/^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+$/u.test(r)&&r.length>=26&&r.length<=35;switch(i[0]){case"1":case"m":case"n":return l?"p2pkh":void 0;case"3":case"2":return l?"p2sh":void 0;default:return}}const sg=e=>Object.freeze(e());function jS(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function Qi(e){if(!jS(e))throw new TypeError("Uint8Array expected")}function OR(e,r){return Array.isArray(r)?r.length===0?!0:r.every(i=>Number.isSafeInteger(i)):!1}function og(e){if(typeof e!="function")throw new TypeError("function expected");return!0}function fd(e,r){if(typeof r!="string")throw new TypeError(`${e}: string expected`);return!0}function hd(e,r="number"){if(typeof e!="number")throw new TypeError(`${r}: expected number, got ${typeof e}`);if(!Number.isSafeInteger(e))throw new RangeError(`${r}: expected)DELIM" +R"DELIM( safe integer, got ${e}`)}function Kx(e,r){if(!OR(!1,r))throw new TypeError(`${e}: array of numbers expected`)}function MR(...e){const r=c=>c,i=(c,d)=>f=>c(d(f)),s=e.map(c=>c.encode).reduceRight(i,r),l=e.map(c=>c.decode).reduce(i,r);return{encode:s,decode:l}}const zR=(()=>{let e=[];for(let r=0;r<40;r++)e.push(2**r);return e})();function Qx(e,r=e.length){const i=new Array(r);for(let s=0;s{try{const e=new TextDecoder;return e.decode(Uint8Array.of(65,48,43,127))==="A0+"?e:void 0}catch{return}})(),Tm=8192;function DR(e){const r=e.length;if(Xx!==void 0&&r>=12)return Xx.decode(e);if(r<=Tm)return String.fromCharCode.apply(null,e);let i="";for(let s=0;s8)throw new RangeError("radix2: bits should be in (0..8]");const r=zR[e]-1;return{encode:i=>{Qi(i);const s=i.length,l=new Uint8Array(Math.ceil(s*8/e));let c=0,d=0,f=0;for(let m=0;m>d&r,!(d0&&(l[f]=c<{const s=i.length,l=new Uint8Array(Math.floor(s*e/8));let c=0,d=0,f=0;for(let m=0;m=8;d-=8)l[f++]=c>>d-8&255;if(c=c<<8-d&255,d>=e)throw new Error("Excess padding");if(c>0)throw new Error(`Non-zero padding: ${c}`);return l}}}function RS(e,r){const i=e.length;if(i>128)throw new Error("alphabet: max 128 letters");const s=new Uint8Array(i),l=new Int8Array(128).fill(-1);for(let c=0;c127)throw new Error("alphabet: single-char ASCII letters only");s[c]=d,l[d]=c}if(r!==void 0)for(const c of Object.keys(r)){const d=c.charCodeAt(0),f=l[r[c].charCodeAt(0)];if(c.length!==1||d>127||f===void 0||f===-1)throw new Error(`alphabet: invalid alias ${c}`);l[d]=f}return{encode:c=>{const d=new Uint8Array(c.length);for(let f=0;f{fd("decode",c);const d=c.length,f=new Uint8Array(d);for(let m=0;m({encode:i=>{Qi(i);const s=i.length;if(s===0)return new Uint8Array(0);if(s>=Wx)throw new Error("invalid length");let l=0;for(;l=l;E=Math.floor(E/e))x[w--]=E%e;return x},decode:i=>{Qi(i);const s=i.length;if(s===0)return new Uint8Array(0);if(s>=Wx)throw new Error("invalid length");let l=0;for(;l=e)throw new Error(`invalid integer: ${N}`);x=x*e+N,w*=e}m=5;let E=x;for(let _=0;_0;E=Math.floor(E/65536))c[d++]=E%65536}const g=d===0?1:d*2-(c[d-1]<256?1:0),v=new Uint8Array(l+g);let y=v.length-1;for(let x=0;x=l&&(v[y--]=w>>8)}return v}}),qR=(e,r)=>{const i=RS(r);return{encode(s){if(Qi(s),s.length>HR)throw new Error("invalid length");return i.encode(e.encode(s))},decode(s){if(fd("baseN.decode",s),s.length>PR)throw new Error("invalid length");return e.decode(i.decode(s))}}},ZR=$R(58,UR),IR=e=>qR(ZR,e),FR=sg(()=>IR("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")),VR=e=>{og(e);const r=e;return MR(LR(4,i=>r(r(i))),FR)},gp=RS("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),YR=/^[\x21-\x60\x7b-\x7e]+$/;function e1(e,r){for(let i=0;i126)throw new Error(`${e}: printable ASCII expected`)}}function GR(e){const r=e.length,i=new Uint8Array(r);for(let s=0;s=32)throw new Error(`alphabet.encode: invalid digit ${l}`);i[s]=l}return i}const t1=[996825010,642813549,513874426,1027748829,705979059];function ml(e){const r=e>>25;let i=(e&33554431)<<5;for(let s=0;s>s&1)===1&&(i^=t1[s]);return i}function n1(e,r,i=1){const s=e.length;let l=1;for(let d=0;d126)throw new Error(`Invalid prefix (${e})`);l=ml(l)^f>>5}l=ml(l);for(let d=0;d>>5*(5-d)&31;return gp.encode(c)}function AS(e){const r=e==="bech32"?1:734539939,i=BR(5),s=y=>{Qi(y);const x=y.length,w=new Array(Math.ceil(x*8/5));let E=0,_=0,N=0;for(let H=0;H=5;_-=5)w[N++]=E>>_-5&31;return _>0&&(w[N]=E<<5-_&31),w},l=y=>{Kx("radix2.decode",y);const x=y.length,w=new Uint8Array(x);for(let E=0;E=32)throw new Error(`convertRadix2: invalid word=${_}`);w[E]=_}return i.decode(w)},c=Jx(l);function d(y,x,w=90){fd("bech32.encode prefix",y),w!==!1&&hd(w,"limit"),jS(x)&&(x=Qx(x)),Kx("bech32.encode",x);const E=y.length;if(E===0)throw new TypeError(`Invalid prefix length ${E}`);const _=E+7+x.length;if(w!==!1&&_>w)throw new TypeError(`Length ${_} exceeds limit ${w}`);e1("bech32.encode prefix",y);const N=y.toLowerCase(),H=n1(N,x,r);return`${N}1${gp.encode(GR(x))}${H}`}function f(y,x=90){fd("bech32.decode input",y),x!==!1&&hd(x,"limit");const w=y.length;if(w<8||x!==!1&&w>x)throw new TypeError(`invalid string length ${w}, expected (8..${x})`);const E=y.toLowerCase();if(y!==E&&!YR.test(y))throw e1("bech32.decode input",y),new Error("mixed-case string not allowed");const _=E.lastIndexOf("1");if(_===0||_===-1)throw new Error('invalid separator "1"');const N=E.slice(0,_),H=E.slice(_+1);if(H.length<6)throw new Error("invalid data length");const O=gp.decode(H),se=Qx(O,O.length-6),ce=n1(N,se,r);if(!H.endsWith(ce))throw new Error(`Invalid checksum in ${y}`);return{prefix:N,words:se}}const m=Jx(f);function g(y,x=90){const{prefix:w,words:E}=f(y,x);return{prefix:w,words:E,bytes:l(E)}}function v(y,x){return d(y,s(x))}return{encode:d,decode:f,encodeFromBytes:v,decodeToBytes:g,decodeUnsafe:m,fromWords:l,fromWordsUnsafe:c,toWords:s}}const md=sg(()=>AS("bech32")),yp=sg(()=>AS("bech32m")),KR=e=>e/2**32|0,QR=e=>e>>>0;function XR(e,r,i,s){const l=KR(i),c=QR(i);e.setUint32(r,s?c:l,s),e.setUint32(r+4,s?l:c,s)}function r1(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const JR=e=>e?`"${e}" `:"";function lg(e,r,i=""){if(r1(e)&&r===void 0)return e;const s=r1(e),l="",c=s?`length=${e.length}`:`type=${typeof e}`,d=JR(i)+"expected Uint8Array"+l+", got "+c;throw s?new RangeError(d):new TypeError(d)}const WR=(e,r)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((r==="object"?"":`"${r}" `)+"expected object, got type="+typeof e)},a1=(e,r)=>{WR(e,r);const i=Object.getPrototypeOf(e);if(i!==Object.prototype&&i!==null)throw new TypeError(`"${r}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${r}.__proto__" is not allowed`)};fu)DELIM" +R"DELIM(nction i1(e,r=!0){if(e.destroyed)throw new Error("hash was destroyed");if(r&&e.finished)throw new Error("digest() was already called")}function eA(e,r){lg(e,void 0,"output");const i=r.outputLen;if(!(e.length>=i))throw new RangeError('"output" expected length >= '+i)}function s1(...e){for(let r=0;r>>r}const tA=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",nA=Array.from({length:256},(e,r)=>r.toString(16).padStart(2,"0"));function Gu(e){if(lg(e),tA)return e.toHex();let r="";for(let i=0;i{let v={relativePath:g===void 0?d.path||"":g,caseSensitive:d.caseSensitive===!0,childrenIndex:f,route:d};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(s)&&m)return;qe(v.relativePath.startsWith(s),`Absolute route path "${v.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(s.length)}let y=pr([s,v.relativePath]),x=i.concat(v);d.children&&d.children.length>0&&(qe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),yE(d.children,r,x,y,m)),!(d.path==null&&!d.index)&&r.push({path:y,score:FO(y,d.index),routesMeta:x.map((w,E)=>{let[_,N]=xE(w.relativePath,w.caseSensitive,E===x.length-1);return{...w,matcher:_,compiledParams:N}})})};return e.forEach((d,f)=>{if(d.path===""||!d.path?.includes("?"))c(d,f);else for(let m of vE(d.path))c(d,f,!0,m)}),r}function vE(e){let r=e.split("/");if(r.length===0)return[];let[i,...s]=r,l=i.endsWith("?"),c=i.replace(/\?$/,"");if(s.length===0)return l?[c,""]:[c];let d=vE(s.join("/")),f=[];return f.push(...d.map(m=>m===""?c:[c,m].join("/"))),l&&f.push(...d),f.map(m=>e.startsWith("/")&&m===""?"/":m)}function UO(e){e.sort((r,i)=>r.score!==i.score?i.score-r.score:VO(r.routesMeta.map(s=>s.childrenIndex),i.routesMeta.map(s=>s.childrenIndex)))}var HO=/^:[\w-]+$/,PO=3,$O=2,qO=1,ZO=10,IO=-2,j1=e=>e==="*";function FO(e,r){let i=e.split("/"),s=i.length;return i.some(j1)&&(s+=IO),r&&(s+=$O),i.filter(l=>!j1(l)).reduce((l,c)=>l+(HO.test(c)?PO:c===""?qO:ZO),s)}function VO(e,r){return e.length===r.length&&e.slice(0,-1).every((s,l)=>s===r[l])?e[e.length-1]-r[r.length-1]:0}function YO(e,r,i=!1){let{routesMeta:s}=e,l={},c="/",d=[];for(let f=0;f{if(v==="*"){let E=f[x]||"";d=co(c.slice(0,c.length-E.length),1)}const w=f[x];return y&&!w?g[v]=void 0:g[v]=(w||"").replace(/%2F/g,"/"),g},{}),pathname:c,pathnameBase:d,pattern:e}}function xE(e,r=!1,i=!0){Ct(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 s=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,f,m,g,v)=>{if(s.push({paramName:f,isOptional:m!=null}),m){let y=v.charAt(g+d.length);return y&&y!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),s]}function GO(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return Ct(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function tr(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let i=r.endsWith("/")?r.length-1:r.length,s=e.charAt(i);return s&&s!=="/"?null:e.slice(i)||"/"}function KO({basename:e,pathname:r}){return r==="/"?e:pr([e,r])}var yg=e=>jd.test(e);function QO(e,r="/"){let{pathname:i,search:s="",hash:l=""}=typeof e=="string"?na(e):e,c;return i?(i=vg(i),i.startsWith("/")||i.startsWith("\\")?c=R1(i.substring(1),"/"):c=R1(i,r)):c=r,{pathname:c,search:JO(s),hash:WO(l)}}function R1(e,r){let i=co(r).split("/");return e.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function Lm(e,r,i,s){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function wE(e){return e.filter((r,i)=>i===0||r.route.path&&r.route.path.length>0)}function Ad(e){let r=wE(e);return r.map((i,s)=>s===r.length-1?i.pathname:i.pathnameBase)}function Kl(e,r,i,s=!1){let l;typeof e=="string"?l=na(e):(l={...e},qe(!l.pathname||!l.pathname.includes("?"),Lm("?","pathname","search",l)),qe(!l.pathname||!l.pathname.includes("#"),Lm("#","pathname","hash",l)),qe(!l.search||!l.search.includes("#"),Lm("#","search","hash",l)));let c=e===""||l.pathname==="",d=c?"/":l.pathname,f;if(d==null)f=i;else{let y=r.length-1;if(!s&&d.startsWith("..")){let x=d.split("/");for(;x[0]==="..";)x.shift(),y-=1;l.pathname=x.join("/")}f=y>=0?r[y]:"/"}let m=QO(l,f),g=d&&d!=="/"&&d.endsWith("/"),v=(c||d===".")&&i.endsWith("/");return!m.pathname.endsWith("/")&&(g||v)&&(m.pathname+="/"),m}var vg=e=>e.replace(/[\\/]{2,}/g,"/"),pr=e=>vg(e.join("/"));function co(e,r=0){let i=e.length;for(;i>r&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var XO=e=>co(e).replace(/^\/*/,"/"),JO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,WO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,eM=["EvalError","RangeError","ReferenceError","SyntaxError","TypeEr)DELIM" +R"DELIM(ror","URIError"],Ql=class{constructor(e,r,i,s=!1){this.status=e,this.statusText=r||"",this.internal=s,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Zl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Xl(e){let r=e.map(i=>i.route.path).filter(Boolean);return pr(r)||"/"}var SE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function EE(e,r){let i=e;if(typeof i!="string"||!jd.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let s=i,l=!1;if(SE)try{let c=new URL(window.location.href),d=Rd.test(i)?new URL(fE(i,c.protocol)):new URL(i),f=tr(d.pathname,r);d.origin===c.origin&&f!=null?i=f+d.search+d.hash:l=!0}catch{Ct(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:l,to:i}}var fi=Symbol("Uninstrumented");function tM(e,r){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(l=>l({id:r.id,index:r.index,path:r.path,instrument(c){let d=Object.keys(i);for(let f of d)c[f]&&i[f].push(c[f])}}));let s={};if(typeof r.lazy=="function"&&i.lazy.length>0){let l=Xs(i.lazy,r.lazy,()=>{});l&&(s.lazy=l)}if(typeof r.lazy=="object"){let l=r.lazy;["middleware","loader","action"].forEach(c=>{let d=l[c],f=i[`lazy.${c}`];if(typeof d=="function"&&f.length>0){let m=Xs(f,d,()=>{});m&&(s.lazy=Object.assign(s.lazy||{},{[c]:m}))}})}return["loader","action"].forEach(l=>{let c=r[l];if(typeof c=="function"&&i[l].length>0){let d=c[fi]??c,f=Xs(i[l],d,(...m)=>A1(m[0]));f&&(l==="loader"&&d.hydrate===!0&&(f.hydrate=!0),f[fi]=d,s[l]=f)}}),r.middleware&&r.middleware.length>0&&i.middleware.length>0&&(s.middleware=r.middleware.map(l=>{let c=l[fi]??l,d=Xs(i.middleware,c,(...f)=>A1(f[0]));return d?(d[fi]=c,d):l})),s}function nM(e,r){let i={navigate:[],fetch:[]};if(r.forEach(s=>s({instrument(l){let c=Object.keys(l);for(let d of c)l[d]&&i[d].push(l[d])}})),i.navigate.length>0){let s=e.navigate[fi]??e.navigate,l=Xs(i.navigate,s,(...c)=>{let[d,f]=c;return{to:typeof d=="number"||typeof d=="string"?d:d?Mn(d):".",...O1(e,f??{})}});l&&(l[fi]=s,e.navigate=l)}if(i.fetch.length>0){let s=e.fetch[fi]??e.fetch,l=Xs(i.fetch,s,(...c)=>{let[d,,f,m]=c;return{href:f??".",fetcherKey:d,...O1(e,m??{})}});l&&(l[fi]=s,e.fetch=l)}return e}function Xs(e,r,i){return e.length===0?null:async(...s)=>{let l=await TE(e,i(...s),()=>r(...s),e.length-1);if(l.type==="error")throw l.value;return l.value}}async function TE(e,r,i,s){let l=e[s],c;if(l){let d,f=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=TE(e,r,i,s-1),c=await d,qe(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await l(f,r)}catch(m){console.error("An instrumentation function threw an error:",m)}d||await f(),await d}else try{c={type:"success",value:await i()}}catch(d){c={type:"error",value:d}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function A1(e){let{request:r,context:i,params:s,pattern:l}=e;return{request:rM(r),params:{...s},pattern:l,context:aM(i)}}function O1(e,r){return{currentUrl:Mn(e.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function rM(e){return{method:e.method,url:e.url,headers:{get:(...r)=>e.headers.get(...r)}}}function aM(e){if(sM(e)){let r={...e};return Object.freeze(r),r}else return{get:r=>e.get(r)}}var iM=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sM(e){if(e===null||typeof e!="object")return!1;const r=Object.getPrototypeOf(e);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===iM}var M1=new URL("http://localhost");function bg(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),M1)}catch{return M1}}function Um(e,r){return e.origin===r.origin&&(e.origin!=="null"||e.protocol===r.protocol&&e.host===r.host)}function oM(e,r){if(e.startsWith("//"))return!0;let i=r.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?r.host===""||e.slice(i.length).startsWith("//"):!1}function Ws(e,r,i,s){let l=null;try{l=e==null?null:new URL(e,i)}catch{}let c=new URL(r,i),d=l!=null&&!Um(l,i),f=!Um(c,i);if(s==="reject"){if(d||f)throw new Error("External navigation is not allowed")}else if(f&&(l==null||!oM(e,l)||!Um(l,c)))throw new Error("External navigation is not allowed")}var kE=["POST","PUT","PATCH","DELETE"],lM=new Set(kE),cM=["GET",...kE],uM=new Set(cM),_E=new Set([301,302,303,307,308]),dM=new Set([307,308]),Hm={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yl={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},hM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),NE="remix-router-transitions",CE=Symbol("ResetLoaderData"),Zi,Vs,ii,Ys,mM=class{constructor(e){_l(this,Zi),_l(this,Vs),_l(this,ii),_l(this,Ys),Kr(this,Zi,e),Kr(this,Vs,Ju(e))}get stableRoutes(){return fr(this,Zi)}get activeRoutes(){return fr(this,ii)??fr(this,Zi)}get branches(){return fr(this,Ys)??fr(this,Vs)}get hasHMRRoutes(){return fr(this,ii)!=null}setRoutes(e){Kr(this,Zi,e),Kr(this,Vs,Ju(e))}setHmrRoutes(e){Kr(this,ii,e),Kr(this,Ys,Ju(e))}commitHmrRoutes(){fr(this,ii)&&(Kr(this,Zi,fr(this,ii)),Kr(this,Vs,fr(this,Ys)),Kr(this,ii,void 0),Kr(this,Ys,void 0))}};Zi=new WeakMap;Vs=new WeakMap;ii=new WeakMap;Ys=new WeakMap;function pM(e){const r=e.window?e.window:typeof window<"u"?window:void 0,i=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";qe(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s=e.hydrationRouteProperties||[],l=e.mapRouteProperties||hM,c=l;if(e.instrumentations){let A=e.instrumentations;c=D=>({...l(D),...tM(A.map(I=>I.route).filter(Boolean),D)})}let d={},f=new mM(ql(e.routes,c,void 0,d)),m=e.basename||"/";m.startsWith("/")||(m=`/${m}`);let g=e.dataStrategy||xM,v={...e.future},y=null,x=new Set,w=null,E=null,_=null,N=null,H=e.hydrationData!=null,O=Nr(f.activeRoutes,e.history.location,m,!1,f.branches),se=!1,ce=null,K,oe;if(O==null&&!e.patchRoutesOnNavigation){let A=hr(404,{pathname:e.history.location.pathname}),{matches:D,route:I}=Uu(f.activeRoutes);K=!0,oe=!K,O=D,ce={[I.id]:A}}else if(O&&!e.hydrationData&&Or(O,f.activeRoutes,e.history.location.pathname).active&&(O=null),O)if(O.some(A=>A.route.lazy))K=!1,oe=!K;else if(!O.some(A=>xg(A.route)))K=!0,oe=!K;else{let A=e.hydrationData?e.hydrationData.loaderData:null,D=e.hydrationData?e.hydrationData.errors:null,I=O;if(D){let ue=O.findIndex(de=>D[de.route.id]!==void 0);I=I.slice(0,ue+1)}oe=!1,K=!0,I.forEach(ue=>{let de=jE(ue.route,A,D);oe=oe||de.renderFallback,K=K&&!de.shouldLoad})}else{K=!1,oe=!K,O=[];let A=Or(null,f.activeRoutes,e.history.location.pathname);A.active&&A.matches&&(se=!0,O=A.matches)}let R,k={historyAction:e.history.action,location:e.history.location,matches:O,initialized:K,renderFallback:oe,navigation:Hm,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ce,fetchers:new Map,blockers:new Map},z="POP",P=null,F=!1,X,fe=!1,ge=new Map,re=null,Q=!1,Y=!1,ie=new Set,$=new Map,ye=0,He=-1,xe=new Map,Ce=new Set,j=new Map,G=new Map,he=new Set,ee=new Map,je,J=null;function me(){if(y=e.history.listen(({action:A,location:D,delta:I})=>{if(je){je(),je=void 0;return}Ct(ee.size===0||I!=null,"You are trying to use a blocker on a)DELIM" +R"DELIM( POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ue=xo({currentLocation:k.location,nextLocation:D,historyAction:A});if(ue&&I!=null){let de=new Promise(Te=>{je=Te});e.history.go(I*-1),vi(ue,{state:"blocked",location:D,proceed(){vi(ue,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),de.then(()=>e.history.go(I))},reset(){let Te=new Map(k.blockers);Te.set(ue,yl),be({blockers:Te})}}),P?.resolve(),P=null;return}return Be(A,D)}),i){HM(r,ge);let A=()=>PM(r,ge);r.addEventListener("pagehide",A),re=()=>r.removeEventListener("pagehide",A)}return k.initialized||Be("POP",k.location,{initialHydration:!0}),R}function W(){y&&y(),re&&re(),x.clear(),X&&X.abort(),k.fetchers.forEach((A,D)=>es(k.fetchers,D)),k.blockers.forEach((A,D)=>ac(D))}function le(A){if(x.add(A),w){let{newErrors:D}=w;w=null,A(k,{deletedFetchers:[],newErrors:D,viewTransitionOpts:void 0,flushSync:!1})}return()=>x.delete(A)}function be(A,D={}){A.matches&&(A.matches=A.matches.map(de=>{let Te=d[de.route.id],Se=de.route;return Se.element!==Te.element||Se.errorElement!==Te.errorElement||Se.hydrateFallbackElement!==Te.hydrateFallbackElement?{...de,route:Te}:de})),k={...k,...A};let I=[],ue=[];k.fetchers.forEach((de,Te)=>{de.state==="idle"&&(he.has(Te)?I.push(Te):ue.push(Te))}),he.forEach(de=>{!k.fetchers.has(de)&&!$.has(de)&&I.push(de)}),x.size===0&&(w={newErrors:A.errors??null}),[...x].forEach(de=>de(k,{deletedFetchers:I,newErrors:A.errors??null,viewTransitionOpts:D.viewTransitionOpts,flushSync:D.flushSync===!0})),I.forEach(de=>es(k.fetchers,de)),ue.forEach(de=>k.fetchers.delete(de))}function pe(A,D,{flushSync:I}={}){let ue=k.actionData!=null&&k.navigation.formMethod!=null&&Tn(k.navigation.formMethod)&&k.navigation.state==="loading"&&A.state?._isRedirect!==!0,de;D.actionData?Object.keys(D.actionData).length>0?de=D.actionData:de=null:ue?de=k.actionData:de=null;let Te=D.loaderData?Z1(k.loaderData,D.loaderData,D.matches||[],D.errors):k.loaderData,Se=k.blockers;Se.size>0&&(Se=new Map(Se),Se.forEach((Ae,Pe)=>Se.set(Pe,yl)));let Ne=Q?!1:ic(A,D.matches||k.matches),Ee=F===!0||k.navigation.formMethod!=null&&Tn(k.navigation.formMethod)&&A.state?._isRedirect!==!0;f.commitHmrRoutes(),Q||z==="POP"||(z==="PUSH"?e.history.push(A,A.state):z==="REPLACE"&&e.history.replace(A,A.state));let De;if(z==="POP"&&!Q&&A!==k.location){let Ae=ge.get(k.location.pathname);Ae&&Ae.has(A.pathname)?De={currentLocation:k.location,nextLocation:A}:ge.has(A.pathname)&&(De={currentLocation:A,nextLocation:k.location})}else if(fe){let Ae=ge.get(k.location.pathname);Ae?Ae.add(A.pathname):(Ae=new Set([A.pathname]),ge.set(k.location.pathname,Ae)),De={currentLocation:k.location,nextLocation:A}}be({...D,actionData:de,loaderData:Te,historyAction:z,location:A,initialized:!0,renderFallback:!1,navigation:Hm,revalidation:"idle",restoreScrollPosition:Ne,preventScrollReset:Ee,blockers:Se},{viewTransitionOpts:De,flushSync:I===!0}),z="POP",F=!1,fe=!1,Q=!1,Y=!1,P?.resolve(),P=null,J?.resolve(),J=null}async function _e(A,D){if(P?.resolve(),P=null,typeof A=="number"){P||(P=Y1());let mt=P.promise;return e.history.go(A),mt}let I=_p(k.location,k.matches,m,A,D?.fromRouteId,D?.relative),{path:ue,submission:de,error:Te}=z1(!1,I,D),Se;if(D?.mask){let mt=typeof D.mask=="string"?na(D.mask):{...k.location.mask,...D.mask};if(Se={pathname:mt.pathname??"",search:mt.search??"",hash:mt.hash??""},Rd.test(Se.pathname))throw new Error("External navigation is not allowed");Se.pathname.startsWith("\\")&&(Se.pathname=Se.pathname.replace(/^\\+/,"/")),Ws(typeof D.mask=="string"?D.mask:Mn(D.mask),Mn(Se),e.history.createURL("/"),"reject")}let Ne=k.location,Ee=$l(Ne,ue,D&&D.state,void 0,Se);Ee={...Ee,...e.history.encodeLocation(Ee)},Ws(A==null?e.history.createHref(k.location):typeof A=="string"?A:Mn(A),e.history.createHref(Ee.mask||Ee),e.history.createURL("/"),"reject");let De=D&&D.replace!=null?D.replace:void 0,Ae="PUSH";De===!0?Ae="REPLACE":De===!1||de!=null&&Tn(de.formMethod)&&de.formAction===k.location.pathname+k.location.search&&(Ae="REPLACE");let Pe=D&&"preventScrollReset"in D?D.preventScrollReset===!0:void 0,ze=(D&&D.flushSync)===!0,lt=xo({currentLocation:Ne,nextLocation:Ee,historyAction:Ae});if(lt){vi(lt,{state:"blocked",location:Ee,proceed(){vi(lt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),_e(A,D)},reset(){let mt=new Map(k.blockers);mt.set(lt,yl),be({blockers:mt})}});return}await Be(Ae,Ee,{submission:de,pendingError:Te,preventScrollReset:Pe,replace:D&&D.replace,enableViewTransition:D&&D.viewTransition,flushSync:ze,callSiteDefaultShouldRevalidate:D&&D.defaultShouldRevalidate})}function Me(){J||(J=Y1()),Ar(),be({revalidation:"loading"});let A=J.promise;return k.navigation.state==="submitting"?A:k.navigation.state==="idle"?(Be(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),A):(Be(z||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:fe===!0}),A)}async function Be(A,D,I){X&&X.abort(),X=null,z=A,Q=(I&&I.startUninterruptedRevalidation)===!0,Ud(k.location,k.matches),F=(I&&I.preventScrollReset)===!0,fe=(I&&I.enableViewTransition)===!0;let ue=f.activeRoutes,de=I?.initialHydration&&k.matches&&k.matches.length>0&&!se?k.matches:Nr(ue,D,m,!1,f.branches),Te=(I&&I.flushSync)===!0;if(de&&k.initialized&&!Y&&jM(k.location,D)&&!(I&&I.submission&&Tn(I.submission.formMethod))){pe(D,{matches:de},{flushSync:Te});return}let Se=Or(de,ue,D.pathname);if(Se.active&&Se.matches&&(de=Se.matches),!de){let{error:ct,notFoundMatches:tt,route:Wt}=ka(D.pathname);pe(D,{matches:tt,loaderData:{},errors:{[Wt.id]:ct}},{flushSync:Te});return}let Ne=I&&I.overrideNavigation?{...I.overrideNavigation,matches:de,historyAction:A}:void 0;X=new AbortController;let Ee=Gs(e.history,D,X.signal,I&&I.submission),De=e.getContext?await e.getContext():new N1,Ae;if(I&&I.pendingError)Ae=[di(de).route.id,{type:"error",error:I.pendingError}];else if(I&&I.submission&&Tn(I.submission.formMethod)){let ct=await Ue(Ee,D,I.submission,de,A,De,Se.active,I&&I.initialHydration===!0,{replace:I.replace,flushSync:Te});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[tt,Wt]=ct.pendingActionResult;if(Jn(Wt)&&Zl(Wt.error)&&Wt.error.status===404){X=null,pe(D,{matches:ct.matches,loaderData:{},errors:{[tt]:Wt.error}});return}}de=ct.matches||de,Ae=ct.pendingActionResult,Ne=Pm(D,de,A,I.submission),Te=!1,Se.active=!1,Ee=Gs(e.history,Ee.url,Ee.signal)}let{shortCircuited:Pe,matches:ze,loaderData:lt,errors:mt,workingFetchers:Bt}=await dt(Ee,D,de,A,De,Se.active,Ne,I&&I.submission,I&&I.fetcherSubmission,I&&I.replace,I&&I.initialHydration===!0,Te,Ae,I&&I.callSiteDefaultShouldRevalidate);Pe||(X=null,pe(D,{matches:ze||de,...I1(Ae),loaderData:lt,errors:mt,...Bt?{fetchers:Bt}:{}}))}async function Ue(A,D,I,ue,de,Te,Se,Ne,Ee={}){Ar();let De=LM(D,ue,de,I);if(be({navigation:De},{flushSync:Ee.flushSync===!0}),Se){let ze=await Jt(ue,D.pathname,A.signal);if(ze.type==="aborted")return{shortCircuited:!0};if(ze.type==="error"){if(ze.partialMatches.length===0){let{matches:mt,route:Bt}=Uu(f.activeRoutes);return{matches:mt,pendingActionResult:[Bt.id,{type:"error",error:ze.error}]}}let lt=di(ze.partialMatches).route.id;return{matches:ze.partialMatches,pendingActionResult:[lt,{type:"error",error:ze.error}]}}else if(ze.matches)ue=ze.matches;else{let{notFoundMatches:lt,error:mt,route:Bt}=ka(D.pathname);return{matches:lt,pendingActionResult:[Bt.id,{type:"error",error:mt}]}}}let Ae,Pe=Wu(ue,D);if(!Pe.route.action&&!Pe.route.lazy)Ae={type:"error",error:hr(405,{method:A.method,pathname:D.pathname,routeId:Pe.route.id})};else{let ze=eo(c,d,A,D,ue,Pe,Ne?[]:s,Te),lt=await ln(A,D,ze,Te,null);if(Ae=lt[Pe.route.id],!Ae){for(let mt of ue)if(lt[mt.route.id]){Ae=lt[mt.route.id];break}}if(A.signal.)DELIM" +R"DELIM(aborted)return{shortCircuited:!0}}if(Yi(Ae)){let ze;return Ee&&Ee.replace!=null?ze=Ee.replace:ze=P1(Ae.response.headers.get("Location"),new URL(A.url),m,e.history)===k.location.pathname+k.location.search,await wt(A,Ae,!0,{submission:I,replace:ze}),{shortCircuited:!0}}if(Jn(Ae)){let ze=di(ue,Pe.route.id);return(Ee&&Ee.replace)!==!0&&(z="PUSH"),{matches:ue,pendingActionResult:[ze.route.id,Ae,Pe.route.id]}}return{matches:ue,pendingActionResult:[Pe.route.id,Ae]}}async function dt(A,D,I,ue,de,Te,Se,Ne,Ee,De,Ae,Pe,ze,lt){let mt=Se||Pm(D,I,ue,Ne),Bt=Ne||Ee||V1(mt),ct=!Q&&!Ae;if(Te){if(ct){let Kt=qt(ze);be({navigation:mt,...Kt!==void 0?{actionData:Kt}:{}},{flushSync:Pe})}let Ge=await Jt(I,D.pathname,A.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){if(Ge.partialMatches.length===0){let{matches:tn,route:wn}=Uu(f.activeRoutes);return{matches:tn,loaderData:{},errors:{[wn.id]:Ge.error}}}let Kt=di(Ge.partialMatches).route.id;return{matches:Ge.partialMatches,loaderData:{},errors:{[Kt]:Ge.error}}}else if(Ge.matches)I=Ge.matches;else{let{error:Kt,notFoundMatches:tn,route:wn}=ka(D.pathname);return{matches:tn,loaderData:{},errors:{[wn.id]:Kt}}}}let tt=f.activeRoutes,{dsMatches:Wt,revalidatingFetchers:cn}=D1(A,de,c,d,e.history,k,I,Bt,D,Ae?[]:s,Ae===!0,Y,ie,he,j,Ce,tt,m,e.patchRoutesOnNavigation!=null,f.branches,ze,lt);if(He=++ye,!e.dataStrategy&&!Wt.some(Ge=>Ge.shouldLoad)&&!Wt.some(Ge=>Ge.route.middleware&&Ge.route.middleware.length>0)&&cn.length===0){let Ge=new Map(k.fetchers),Kt=nc(Ge);return pe(D,{matches:I,loaderData:{},errors:ze&&Jn(ze[1])?{[ze[0]]:ze[1].error}:null,...I1(ze),...Kt?{fetchers:Ge}:{}},{flushSync:Pe}),{shortCircuited:!0}}if(ct){let Ge={};if(!Te){Ge.navigation=mt;let Kt=qt(ze);Kt!==void 0&&(Ge.actionData=Kt)}cn.length>0&&(Ge.fetchers=Ye(cn)),be(Ge,{flushSync:Pe})}cn.forEach(Ge=>{Zn(Ge.key),Ge.controller&&$.set(Ge.key,Ge.controller)});let _a=()=>cn.forEach(Ge=>Zn(Ge.key));X&&X.signal.addEventListener("abort",_a);let{loaderResults:en,fetcherResults:kt}=await xn(Wt,cn,A,D,de);if(A.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",_a),cn.forEach(Ge=>$.delete(Ge.key));let Rt=Hu(en);if(Rt)return await wt(A,Rt.result,!0,{replace:De}),{shortCircuited:!0};if(Rt=Hu(kt),Rt)return Ce.add(Rt.key),await wt(A,Rt.result,!0,{replace:De}),{shortCircuited:!0};let un=new Map(k.fetchers),{loaderData:ns,errors:Mr}=q1(k,I,en,ze,cn,kt,un);Ae&&k.errors&&(Mr={...k.errors,...Mr});let rs=nc(un),bi=rc(He,un),zr=rs||bi||cn.length>0;return{matches:I,loaderData:ns,errors:Mr,...zr?{workingFetchers:un}:{}}}function qt(A){if(A&&!Jn(A[1]))return{[A[0]]:A[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function Ye(A){let D=new Map(k.fetchers);return A.forEach(I=>{let ue=D.get(I.key),de=vl(void 0,ue?ue.data:void 0);D.set(I.key,de)}),D}async function st(A,D,I,ue){Zn(A);let de=(ue&&ue.flushSync)===!0,Te=f.activeRoutes,Se=_p(k.location,k.matches,m,I,D,ue?.relative),Ne=Nr(Te,Se,m,!1,f.branches),Ee=Or(Ne,Te,Se);if(Ee.active&&Ee.matches&&(Ne=Ee.matches),!Ne){kn(A,D,hr(404,{pathname:Se}),{flushSync:de});return}let{path:De,submission:Ae,error:Pe}=z1(!0,Se,ue);if(Pe){kn(A,D,Pe,{flushSync:de});return}let ze=e.getContext?await e.getContext():new N1,lt=(ue&&ue.preventScrollReset)===!0;if(Ae&&Tn(Ae.formMethod)){await ot(A,D,De,Ne,ze,Ee.active,de,lt,Ae,ue&&ue.defaultShouldRevalidate);return}j.set(A,{routeId:D,path:De}),await at(A,D,De,Ne,ze,Ee.active,de,lt,Ae)}async function ot(A,D,I,ue,de,Te,Se,Ne,Ee,De){Ar(),j.delete(A);let Ae=k.fetchers.get(A);Dt(A,UM(Ee,Ae),{flushSync:Se});let Pe=new AbortController,ze=Gs(e.history,I,Pe.signal,Ee);if(Te){let Ze=await Jt(ue,new URL(ze.url).pathname,ze.signal,A);if(Ze.type==="aborted")return;if(Ze.type==="error"){kn(A,D,Ze.error,{flushSync:Se});return}else if(Ze.matches)ue=Ze.matches;else{kn(A,D,hr(404,{pathname:I}),{flushSync:Se});return}}let lt=Wu(ue,I);if(!lt.route.action&&!lt.route.lazy){let Ze=hr(405,{method:Ee.formMethod,pathname:I,routeId:D});kn(A,D,Ze,{flushSync:Se});return}$.set(A,Pe);let mt=ye,Bt=eo(c,d,ze,I,ue,lt,s,de),ct=await ln(ze,I,Bt,de,A),tt=ct[lt.route.id];if(!tt){for(let Ze of Bt)if(ct[Ze.route.id]){tt=ct[Ze.route.id];break}}if(ze.signal.aborted){$.get(A)===Pe&&$.delete(A);return}if(he.has(A)){if(Yi(tt)||Jn(tt)){Dt(A,Qr(void 0));return}}else{if(Yi(tt))if($.delete(A),He>mt){Dt(A,Qr(void 0));return}else return Ce.add(A),Dt(A,vl(Ee)),wt(ze,tt,!1,{fetcherSubmission:Ee,preventScrollReset:Ne});if(Jn(tt)){kn(A,D,tt.error);return}}let Wt=k.navigation.location||k.location,cn=Gs(e.history,Wt,Pe.signal),_a=f.activeRoutes,en=k.navigation.state!=="idle"?Nr(_a,k.navigation.location,m,!1,f.branches):k.matches;qe(en,"Didn't find any matches after fetcher action");let kt=++ye;xe.set(A,kt);let{dsMatches:Rt,revalidatingFetchers:un}=D1(cn,de,c,d,e.history,k,en,Ee,Wt,s,!1,Y,ie,he,j,Ce,_a,m,e.patchRoutesOnNavigation!=null,f.branches,[lt.route.id,tt],De),ns=vl(Ee,tt.data),Mr=new Map(k.fetchers);Mr.set(A,ns),un.filter(Ze=>Ze.key!==A).forEach(Ze=>{let Br=Ze.key,So=Mr.get(Br),sc=vl(void 0,So?So.data:void 0);Mr.set(Br,sc),Zn(Br),Ze.controller&&$.set(Br,Ze.controller)}),be({fetchers:Mr});let rs=()=>un.forEach(Ze=>Zn(Ze.key));Pe.signal.addEventListener("abort",rs);let{loaderResults:bi,fetcherResults:zr}=await xn(Rt,un,cn,Wt,de);if(Pe.signal.aborted)return;Pe.signal.removeEventListener("abort",rs),xe.delete(A),$.delete(A),un.forEach(Ze=>$.delete(Ze.key));let Ge=k.fetchers.has(A),Kt=Ze=>{if(!Ge)return Ze;let Br=new Map(Ze.fetchers);return Br.set(A,Qr(tt.data)),{...Ze,fetchers:Br}},tn=Hu(bi);if(tn)return k=Kt(k),wt(cn,tn.result,!1,{preventScrollReset:Ne});if(tn=Hu(zr),tn)return Ce.add(tn.key),k=Kt(k),wt(cn,tn.result,!1,{preventScrollReset:Ne});let wn=new Map(k.fetchers);Ge&&wn.set(A,Qr(tt.data));let{loaderData:Na,errors:Dr}=q1(k,en,bi,void 0,un,zr,wn);rc(kt,wn),k.navigation.state==="loading"&&kt>He?(qe(z,"Expected pending action"),X&&X.abort(),pe(k.navigation.location,{matches:en,loaderData:Na,errors:Dr,fetchers:wn})):(be({errors:Dr,loaderData:Z1(k.loaderData,Na,en,Dr),fetchers:wn}),Y=!1)}async function at(A,D,I,ue,de,Te,Se,Ne,Ee){let De=k.fetchers.get(A);Dt(A,vl(Ee,De?De.data:void 0),{flushSync:Se});let Ae=new AbortController,Pe=Gs(e.history,I,Ae.signal);if(Te){let tt=await Jt(ue,new URL(Pe.url).pathname,Pe.signal,A);if(tt.type==="aborted")return;if(tt.type==="error"){kn(A,D,tt.error,{flushSync:Se});return}else if(tt.matches)ue=tt.matches;else{kn(A,D,hr(404,{pathname:I}),{flushSync:Se});return}}let ze=Wu(ue,I);$.set(A,Ae);let lt=ye,mt=eo(c,d,Pe,I,ue,ze,s,de),Bt=await ln(Pe,I,mt,de,A),ct=Bt[ze.route.id];if(!ct){for(let tt of ue)if(Bt[tt.route.id]){ct=Bt[tt.route.id];break}}if($.get(A)===Ae&&$.delete(A),!Pe.signal.aborted){if(he.has(A)){Dt(A,Qr(void 0));return}if(Yi(ct))if(He>lt){Dt(A,Qr(void 0));return}else{Ce.add(A),await wt(Pe,ct,!1,{preventScrollReset:Ne});return}if(Jn(ct)){kn(A,D,ct.error);return}Dt(A,Qr(ct.data))}}async function wt(A,D,I,{submission:ue,fetcherSubmission:de,preventScrollReset:Te,replace:Se}={}){I||(P?.resolve(),P=null),D.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let Ne=D.response.headers.get("Location");qe(Ne,"Expected a Location header on the redirect Response");let Ee=Ne,De=new URL(A.url);Ne=P1(Ne,De,m,e.history),Ws(Ee,Ne,De,"allow-explicit");let Ae=$l(k.location,Ne,{_isRedirect:!0});if(i){let ct=!1;if(D.response.headers.has("X-Remix-Reload-Document"))ct=!0;else if(yg(Ne)){const tt=mE(r,Ne,!0);ct=tt.origin!==r.location.origin||tr(tt.pathname,m)==null}if(ct){Se?r.location.replace(Ne):r.location.assign(Ne);return}}X=null;let Pe=Se===!0||D.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:ze,formAction:lt,formEncType:mt}=k.navigation;!ue&&!de&&ze&<&&mt&&(ue=V1(k.navigation));let Bt=ue||de;if(dM.has(D.response.status)&&Bt&&Tn(Bt.formMethod))await Be(Pe,Ae,{submission:{...Bt,formAction:Ne},preventScrollReset:Te||F,enableViewTransition:I?fe:void 0});else{let ct=Pm(Ae,[],Pe,ue);await Be(Pe,Ae,{overrideNavigation:ct,fetcherSubmission:)DELIM" +R"DELIM(de,preventScrollReset:Te||F,enableViewTransition:I?fe:void 0})}}async function ln(A,D,I,ue,de){let Te,Se={};try{Te=await SM(g,A,D,I,de,ue,!1)}catch(Ne){return I.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{Se[Ee.route.id]={type:"error",error:Ne}}),Se}if(A.signal.aborted)return Se;if(!Tn(A.method))for(let Ne of I){if(Te[Ne.route.id]?.type==="error")break;!Te.hasOwnProperty(Ne.route.id)&&!k.loaderData.hasOwnProperty(Ne.route.id)&&(!k.errors||!k.errors.hasOwnProperty(Ne.route.id))&&Ne.shouldCallHandler()&&(Te[Ne.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Ne.route.id}`)})}for(let[Ne,Ee]of Object.entries(Te))if(MM(Ee)){let De=Ee.result;Se[Ne]={type:"redirect",response:_M(De,A,Ne,I,m)}}else Se[Ne]=await kM(Ee);return Se}async function xn(A,D,I,ue,de){let Te=ln(I,ue,A,de,null),Se=Promise.all(D.map(async De=>{if(De.matches&&De.match&&De.request&&De.controller){let Pe=(await ln(De.request,De.path,De.matches,de,De.key))[De.match.route.id];return{[De.key]:Pe}}else return Promise.resolve({[De.key]:{type:"error",error:hr(404,{pathname:De.path})}})})),Ne=await Te,Ee=(await Se).reduce((De,Ae)=>Object.assign(De,Ae),{});return{loaderResults:Ne,fetcherResults:Ee}}function Ar(){Y=!0,j.forEach((A,D)=>{$.has(D)&&ie.add(D),Zn(D)})}function Dt(A,D,I={}){let ue=new Map(k.fetchers);ue.set(A,D),be({fetchers:ue},{flushSync:(I&&I.flushSync)===!0})}function kn(A,D,I,ue={}){let de=di(k.matches,D),Te=new Map(k.fetchers);es(Te,A),be({errors:{[de.route.id]:I},fetchers:Te},{flushSync:(ue&&ue.flushSync)===!0})}function vo(A){return G.set(A,(G.get(A)||0)+1),he.has(A)&&he.delete(A),k.fetchers.get(A)||fM}function Bd(A,D){Zn(A,D?.reason),Dt(A,Qr(null))}function es(A,D){let I=k.fetchers.get(D);$.has(D)&&!(I&&I.state==="loading"&&xe.has(D))&&Zn(D),j.delete(D),xe.delete(D),Ce.delete(D),he.delete(D),ie.delete(D),A.delete(D)}function bo(A){let D=(G.get(A)||0)-1;D<=0?(G.delete(A),he.add(A)):G.set(A,D),be({fetchers:new Map(k.fetchers)})}function Zn(A,D){let I=$.get(A);I&&(I.abort(D),$.delete(A))}function ts(A,D){for(let I of A){let ue=D.get(I);qe(ue,`Expected fetcher: ${I}`);let de=Qr(ue.data);D.set(I,de)}}function nc(A){let D=[],I=!1;for(let ue of Ce){let de=A.get(ue);qe(de,`Expected fetcher: ${ue}`),de.state==="loading"&&(Ce.delete(ue),D.push(ue),I=!0)}return ts(D,A),I}function rc(A,D){let I=[];for(let[ue,de]of xe)if(de0}function _n(A,D){let I=k.blockers.get(A)||yl;return ee.get(A)!==D&&ee.set(A,D),I}function ac(A){k.blockers.delete(A),ee.delete(A)}function vi(A,D){let I=k.blockers.get(A)||yl;qe(I.state==="unblocked"&&D.state==="blocked"||I.state==="blocked"&&D.state==="blocked"||I.state==="blocked"&&D.state==="proceeding"||I.state==="blocked"&&D.state==="unblocked"||I.state==="proceeding"&&D.state==="unblocked",`Invalid blocker state transition: ${I.state} -> ${D.state}`);let ue=new Map(k.blockers);ue.set(A,D),be({blockers:ue})}function xo({currentLocation:A,nextLocation:D,historyAction:I}){if(ee.size===0)return;ee.size>1&&Ct(!1,"A router only supports one blocker at a time");let ue=Array.from(ee.entries()),[de,Te]=ue[ue.length-1],Se=k.blockers.get(de);if(!(Se&&Se.state==="proceeding")&&Te({currentLocation:A,nextLocation:D,historyAction:I}))return de}function ka(A){let D=hr(404,{pathname:A}),I=f.activeRoutes,{matches:ue,route:de}=Uu(I);return{notFoundMatches:ue,route:de,error:D}}function Ld(A,D,I){if(E=A,N=D,_=I||null,!H&&k.navigation===Hm){H=!0;let ue=ic(k.location,k.matches);ue!=null&&be({restoreScrollPosition:ue})}return()=>{E=null,N=null,_=null}}function wo(A,D){return _&&_(A,D.map(ue=>gE(ue,k.loaderData)))||A.key}function Ud(A,D){if(E&&N){let I=wo(A,D);E[I]=N()}}function ic(A,D){if(E){let I=wo(A,D),ue=E[I];if(typeof ue=="number")return ue}return null}function Or(A,D,I){if(e.patchRoutesOnNavigation){let ue=f.branches;if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:Nr(D,I,m,!0,ue)}}else return{active:!0,matches:Nr(D,I,m,!0,ue)||[]}}return{active:!1,matches:null}}async function Jt(A,D,I,ue){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let de=A;for(;;){let Te=d;try{await e.patchRoutesOnNavigation({signal:I,path:D,matches:de,fetcherKey:ue,patch:(De,Ae)=>{I.aborted||B1(De,Ae,f,Te,c,!1)}})}catch(De){return{type:"error",error:De,partialMatches:de}}if(I.aborted)return{type:"aborted"};let Se=f.branches,Ne=Nr(f.activeRoutes,D,m,!1,Se),Ee=null;if(Ne){if(Object.keys(Ne[0].params).length===0)return{type:"success",matches:Ne};if(Ee=Nr(f.activeRoutes,D,m,!0,Se),!(Ee&&de.lengthI.route.id===D[ue].route.id)}function Nn(A){d={},f.setHmrRoutes(ql(A,c,void 0,d))}function Hd(A,D,I=!1){B1(A,D,f,d,c,I),f.hasHMRRoutes||be({})}return R={get basename(){return m},get future(){return v},get state(){return k},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return d},get window(){return r},initialize:me,subscribe:le,enableScrollRestoration:Ld,navigate:_e,fetch:st,revalidate:Me,createHref:A=>e.history.createHref(A),createURL:A=>e.history.createURL(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:vo,resetFetcher:Bd,deleteFetcher:bo,dispose:W,getBlocker:_n,deleteBlocker:ac,patchRoutes:Hd,_internalFetchControllers:$,_internalSetRoutes:Nn,_internalSetStateDoNotUseOrYouWillBreakYourApp(A){be(A)}},e.instrumentations&&(R=nM(R,e.instrumentations.map(A=>A.router).filter(Boolean))),R}function gM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function _p(e,r,i,s,l,c){let d,f;if(l){d=[];for(let g of r)if(d.push(g),g.route.id===l){f=g;break}}else d=r,f=r[r.length-1];let m=Kl(s||".",Ad(d),tr(e.pathname,i)||e.pathname,c==="path");if(s==null&&(m.search=e.search,m.hash=e.hash),(s==null||s===""||s===".")&&f){let g=Sg(m.search);if(f.route.index&&!g)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&g){let v=new URLSearchParams(m.search),y=v.getAll("index");v.delete("index"),y.filter(w=>w).forEach(w=>v.append("index",w));let x=v.toString();m.search=x?`?${x}`:""}}return i!=="/"&&(m.pathname=KO({basename:i,pathname:m.pathname})),Mn(m)}function z1(e,r,i){if(!i||!gM(i))return{path:r};if(i.formMethod&&!BM(i.formMethod))return{path:r,error:hr(405,{method:i.formMethod})};let s=()=>({path:r,error:hr(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),d=BE(r);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!Tn(c))return s();let y=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((x,[w,E])=>`${x}${w}=${E} +`,""):String(i.body);return{path:r,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:void 0,text:y}}}else if(i.formEncType==="application/json"){if(!Tn(c))return s();try{let y=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:r,submission:{formMethod:c,formAction:d,formEncType:i.formEncType,formData:void 0,json:y,text:void 0}}}catch{return s()}}}qe(typeof FormData=="function","FormData is not available in this environment");let f,m;if(i.formData)f=jp(i.formData),m=i.formData;else if(i.body instanceof FormData)f=jp(i.body),m=i.body;else if(i.body instanceof URLSearchParams)f=i.body,m=$1(f);else if(i.body==null)f=new URLSearchParams,m=new FormData;else try{f=new URLSearchParams(i.body),m=$1(f)}catch{return s()}let g={formMethod:c,formAction:d,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(Tn(g.formMethod))return{path:r,submission:g};let v=na(r);return e&&v.search&&Sg(v.search)&&f.append("index",""),v.search=`?${f}`,{path:Mn(v),submission:g}}function D1(e,r,i,s,l,c,d,f,m,g,v,y,x,w,E,_,N,H,)DELIM" +R"DELIM(O,se,ce,K){let oe=ce?Jn(ce[1])?ce[1].error:ce[1].data:void 0,R=l.createURL(c.location),k=l.createURL(m),z;if(v&&c.errors){let Q=Object.keys(c.errors)[0];z=d.findIndex(Y=>Y.route.id===Q)}else if(ce&&Jn(ce[1])){let Q=ce[0];z=d.findIndex(Y=>Y.route.id===Q)-1}let P=ce?ce[1].statusCode:void 0,F=P&&P>=400,X={currentUrl:R,currentParams:c.matches[0]?.params||{},nextUrl:k,nextParams:d[0].params,...f,actionResult:oe,actionStatus:P},fe=Xl(d),ge=d.map((Q,Y)=>{let{route:ie}=Q,$=null;if(z!=null&&Y>z)$=!1;else if(ie.lazy)$=!0;else if(!xg(ie))$=!1;else if(v){let{shouldLoad:Ce}=jE(ie,c.loaderData,c.errors);$=Ce}else yM(c.loaderData,c.matches[Y],Q)&&($=!0);if($!==null)return Np(i,s,e,m,fe,Q,g,r,$);let ye=!1;typeof K=="boolean"?ye=K:F?ye=!1:(y||R.pathname+R.search===k.pathname+k.search||R.search!==k.search||vM(c.matches[Y],Q))&&(ye=!0);let He={...X,defaultShouldRevalidate:ye},xe=zl(Q,He);return Np(i,s,e,m,fe,Q,g,r,xe,He,K)}),re=[];return E.forEach((Q,Y)=>{if(v||!d.some(G=>G.route.id===Q.routeId)||w.has(Y))return;let ie=c.fetchers.get(Y),$=ie&&ie.state!=="idle"&&ie.data===void 0,ye=Nr(N,Q.path,H??"/",!1,se);if(!ye){if(O&&$)return;re.push({key:Y,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(_.has(Y))return;let He=Wu(ye,Q.path),xe=new AbortController,Ce=Gs(l,Q.path,xe.signal),j=null;if(x.has(Y))x.delete(Y),j=eo(i,s,Ce,Q.path,ye,He,g,r);else if($)y&&(j=eo(i,s,Ce,Q.path,ye,He,g,r));else{let G;typeof K=="boolean"?G=K:F?G=!1:G=y;let he={...X,defaultShouldRevalidate:G};zl(He,he)&&(j=eo(i,s,Ce,Q.path,ye,He,g,r,he))}j&&re.push({key:Y,routeId:Q.routeId,path:Q.path,matches:j,match:He,request:Ce,controller:xe})}),{dsMatches:ge,revalidatingFetchers:re}}function xg(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function jE(e,r,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!xg(e))return{shouldLoad:!1,renderFallback:!1};let s=r!=null&&e.id in r,l=i!=null&&i[e.id]!==void 0;if(!s&&l)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!s};let c=!s&&!l;return{shouldLoad:c,renderFallback:c}}function yM(e,r,i){let s=!r||i.route.id!==r.route.id,l=!e.hasOwnProperty(i.route.id);return s||l}function vM(e,r){let i=e.route.path;return e.pathname!==r.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==r.params["*"]}function zl(e,r){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(r);if(typeof i=="boolean")return i}return r.defaultShouldRevalidate}function B1(e,r,i,s,l,c){let d;if(e){let g=s[e];qe(g,`No route found to patch children into: routeId = ${e}`),g.children||(g.children=[]),d=g.children}else d=i.activeRoutes;let f=[],m=[];if(r.forEach(g=>{let v=d.find(y=>RE(g,y));v?m.push({existingRoute:v,newRoute:g}):f.push(g)}),f.length>0){let g=ql(f,l,[e||"_","patch",String(d?.length||"0")],s);d.push(...g)}if(c&&m.length>0)for(let g=0;gr.children?.some(l=>RE(i,l)))??!1:!1}var L1=new WeakMap,AE=({key:e,route:r,manifest:i,mapRouteProperties:s})=>{let l=i[r.id];if(qe(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let c=l.lazy[e];if(!c)return;let d=L1.get(l);d||(d={},L1.set(l,d));let f=d[e];if(f)return f;let m=(async()=>{let g=zO(e),y=l[e]!==void 0&&e!=="hasErrorBoundary";if(g)Ct(!g,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),d[e]=Promise.resolve();else if(y)Ct(!1,`Route "${l.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let x=await c();x!=null&&(Object.assign(l,{[e]:x}),Object.assign(l,s(l)))}typeof l.lazy=="object"&&(l.lazy[e]=void 0,Object.values(l.lazy).every(x=>x===void 0)&&(l.lazy=void 0))})();return d[e]=m,m},U1=new WeakMap;function bM(e,r,i,s,l){let c=i[e.id];if(qe(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let v=U1.get(c);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let y=(async()=>{qe(typeof e.lazy=="function","No lazy route function found");let x=await e.lazy(),w={};for(let E in x){let _=x[E];if(_===void 0)continue;let N=BO(E),O=c[E]!==void 0&&E!=="hasErrorBoundary";N?Ct(!N,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):O?Ct(!O,`Route "${c.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):w[E]=_}Object.assign(c,w),Object.assign(c,{...s(c),lazy:void 0})})();return U1.set(c,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let d=Object.keys(e.lazy),f=[],m;for(let v of d){if(l&&l.includes(v))continue;let y=AE({key:v,route:e,manifest:i,mapRouteProperties:s});y&&(f.push(y),v===r&&(m=y))}let g=f.length>0?Promise.all(f).then(()=>{}):void 0;return g?.catch(()=>{}),m?.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:m}}async function H1(e){let r=e.matches.filter(l=>l.shouldLoad),i={};return(await Promise.all(r.map(l=>l.resolve()))).forEach((l,c)=>{i[r[c].route.id]=l}),i}async function xM(e){return e.matches.some(r=>r.route.middleware)?OE(e,()=>H1(e)):H1(e)}function OE(e,r){return wM(e,r,s=>{if(DM(s))throw s;return s},AM,i);function i(s,l,c){if(c)return Promise.resolve(Object.assign(c.value,{[l]:{type:"error",result:s}}));{let{matches:d}=e,f=Math.min(Math.max(d.findIndex(g=>g.route.id===l),0),Math.max(d.findIndex(g=>g.shouldCallHandler()),0)),m=di(d,d[f].route.id).route.id;return Promise.resolve({[m]:{type:"error",result:s}})}}}async function wM(e,r,i,s,l){let{matches:c,...d}=e,f=c.flatMap(g=>g.route.middleware?g.route.middleware.map(v=>[g.route.id,v]):[]);return await ME(d,f,r,i,s,l)}async function ME(e,r,i,s,l,c,d=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let m=r[d];if(!m)return await i();let[g,v]=m,y,x=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await ME(e,r,i,s,l,c,d+1)},y.value}catch(w){return y={value:await c(w,g,y)},y.value}};try{let w=await v(e,x),E=w!=null?s(w):void 0;return l(E)?E:y?E??y.value:(y={value:await x()},y.value)}catch(w){return await c(w,g,y)}}function zE(e,r,i,s,l){let c=AE({key:"middleware",route:s.route,manifest:r,mapRouteProperties:e}),d=bM(s.route,Tn(i.method)?"action":"loader",r,e,l);return{middleware:c,route:d.lazyRoutePromise,handler:d.lazyHandlerPromise}}function Np(e,r,i,s,l,c,d,f,m,g=null,v){let y=!1,x=zE(e,r,i,c,d);return{...c,_lazyPromises:x,shouldLoad:m,shouldRevalidateArgs:g,shouldCallHandler(w){return y=!0,g?typeof v=="boolean"?zl(c,{...g,defaultShouldRevalidate:v}):typeof w=="boolean"?zl(c,{...g,defaultShouldRevalidate:w}):zl(c,g):m},resolve(w){let{lazy:E,loader:_,middleware:N}=c.route,H=y||m||w&&!Tn(i.method)&&(E||_),O=N&&N.length>0&&!_&&!E;return H&&(Tn(i.method)||!O)?EM({request:i,path:s,pattern:l,match:c,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:w,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function eo(e,r,i,s,l,c,d,f,m=null){return l.map(g=>g.route.id!==c.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:m,shouldCallHandler:()=>!1,_lazyPromises:zE(e,r,i,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Np(e,r,i,s,Xl(l),g,d,f,!0,m))}async function SM(e,r,i,s,l,c,d){s.some(v=>v._lazyPromises?.middleware)&&await Promise.all(s.map(v=>v._lazyPromise)DELIM" +R"DELIM(s?.middleware));let f={request:r,url:DE(r,i),pattern:Xl(s),params:s[0].params,context:c,matches:s},g=await e({...f,fetcherKey:l,runClientMiddleware:v=>{let y=f;return OE(y,()=>v({...y,fetcherKey:l,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(s.flatMap(v=>[v._lazyPromises?.handler,v._lazyPromises?.route]))}catch{}return g}async function EM({request:e,path:r,pattern:i,match:s,lazyHandlerPromise:l,lazyRoutePromise:c,handlerOverride:d,scopedContext:f}){let m,g,v=Tn(e.method),y=v?"action":"loader",x=w=>{let E,_=new Promise((O,se)=>E=se);g=()=>E(),e.signal.addEventListener("abort",g);let N=O=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${s.route.id}]`)):w({request:e,url:DE(e,r),pattern:i,params:s.params,context:f},...O!==void 0?[O]:[]),H=(async()=>{try{return{type:"data",result:await(d?d(se=>N(se)):N())}}catch(O){return{type:"error",result:O}}})();return Promise.race([H,_])};try{let w=v?s.route.action:s.route.loader;if(l||c)if(w){let E,[_]=await Promise.all([x(w).catch(N=>{E=N}),l,c]);if(E!==void 0)throw E;m=_}else{await l;let E=v?s.route.action:s.route.loader;if(E)[m]=await Promise.all([x(E),c]);else if(y==="action"){let _=new URL(e.url),N=_.pathname+_.search;throw hr(405,{method:e.method,pathname:N,routeId:s.route.id})}else return{type:"data",result:void 0}}else if(w)m=await x(w);else{let E=new URL(e.url),_=E.pathname+E.search;throw hr(404,{pathname:_})}}catch(w){return{type:"error",result:w}}finally{g&&e.signal.removeEventListener("abort",g)}return m}async function TM(e){let r=e.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?e.body==null?null:e.json():e.text()}async function kM(e){let{result:r,type:i}=e;if(wg(r)){let s;try{s=await TM(r)}catch(l){return{type:"error",error:l}}return i==="error"?{type:"error",error:new Ql(r.status,r.statusText,s),statusCode:r.status,headers:r.headers}:{type:"data",data:s,statusCode:r.status,headers:r.headers}}return i==="error"?F1(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:RM(r),statusCode:Zl(r)?r.status:void 0,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:Zl(r)?r.status:void 0}:F1(r)?{type:"data",data:r.data,statusCode:r.init?.status,headers:r.init?.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function _M(e,r,i,s,l){let c=e.headers.get("Location");if(qe(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!yg(c)){let d=s.slice(0,s.findIndex(f=>f.route.id===i)+1);c=_p(new URL(r.url),d,l,c),e.headers.set("Location",c)}return e}var NM=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Cp(e){try{return NM.includes(new URL(e).protocol)}catch{return!1}}function P1(e,r,i,s){if(yg(e)){let l=e,c=Rd.test(l)?new URL(fE(l,r.protocol)):new URL(l);if(Cp(c.toString()))throw new Error("Invalid redirect location");let d=tr(c.pathname,i)!=null;if(c.origin===r.origin&&d)return vg(c.pathname)+c.search+c.hash}try{let l=s.createURL(e);if(Cp(l.toString()))throw new Error("Invalid redirect location")}catch{}return e}function Gs(e,r,i,s){let l=e.createURL(BE(r)).toString(),c={signal:i};if(s&&Tn(s.formMethod)){let{formMethod:d,formEncType:f}=s;c.method=d.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(s.json)):f==="text/plain"?c.body=s.text:f==="application/x-www-form-urlencoded"&&s.formData?c.body=jp(s.formData):c.body=s.formData}return new Request(l,c)}function DE(e,r){let i=new URL(e.url),s=typeof r=="string"?na(r):r;if(i.pathname=s.pathname||"/",s.search){let l=new URLSearchParams(s.search),c=l.getAll("index");l.delete("index");for(let d of c.filter(Boolean))l.append("index",d);i.search=l.size?`?${l.toString()}`:""}else i.search="";return i.hash=s.hash||"",i}function jp(e){let r=new URLSearchParams;for(let[i,s]of e.entries())r.append(i,typeof s=="string"?s:s.name);return r}function $1(e){let r=new FormData;for(let[i,s]of e.entries())r.append(i,s);return r}function CM(e,r,i,s=!1,l=!1){let c={},d=null,f,m=!1,g={},v=i&&Jn(i[1])?i[1].error:void 0;return e.forEach(y=>{if(!(y.route.id in r))return;let x=y.route.id,w=r[x];if(qe(!Yi(w),"Cannot handle redirect results in processLoaderData"),Jn(w)){let E=w.error;if(v!==void 0&&(E=v,v=void 0),d=d||{},l)d[x]=E;else{let _=di(e,x);d[_.route.id]==null&&(d[_.route.id]=E)}s||(c[x]=CE),m||(m=!0,f=Zl(w.error)?w.error.status:500),w.headers&&(g[x]=w.headers)}else c[x]=w.data,w.statusCode&&w.statusCode!==200&&!m&&(f=w.statusCode),w.headers&&(g[x]=w.headers)}),v!==void 0&&i&&(d={[i[0]]:v},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:d,statusCode:f||200,loaderHeaders:g}}function q1(e,r,i,s,l,c,d){let{loaderData:f,errors:m}=CM(r,i,s);return l.filter(g=>!g.matches||g.matches.some(v=>v.shouldLoad)).forEach(g=>{let{key:v,match:y,controller:x}=g;if(x&&x.signal.aborted)return;let w=c[v];if(qe(w,"Did not find corresponding fetcher result"),Jn(w)){let E=di(e.matches,y?.route.id);m&&m[E.route.id]||(m={...m,[E.route.id]:w.error}),d.delete(v)}else if(Yi(w))qe(!1,"Unhandled fetcher revalidation redirect");else{let E=Qr(w.data);d.set(v,E)}}),{loaderData:f,errors:m}}function Z1(e,r,i,s){let l=Object.entries(r).filter(([,c])=>c!==CE).reduce((c,[d,f])=>(c[d]=f,c),{});for(let c of i){let d=c.route.id;if(!r.hasOwnProperty(d)&&e.hasOwnProperty(d)&&c.route.loader&&(l[d]=e[d]),s&&s.hasOwnProperty(d))break}return l}function I1(e){return e?Jn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function di(e,r){return(r?e.slice(0,e.findIndex(s=>s.route.id===r)+1):[...e]).reverse().find(s=>s.route.hasErrorBoundary===!0)||e[0]}function Uu(e){let r=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function hr(e,{pathname:r,routeId:i,method:s,type:l,message:c}={}){let d="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(d="Bad Request",s&&r&&i?f=`You made a ${s} request to "${r}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:l==="invalid-body"&&(f="Unable to encode submission body")):e===403?(d="Forbidden",f=`Route "${i}" does not match URL "${r}"`):e===404?(d="Not Found",f=`No route matches URL "${r}"`):e===405&&(d="Method Not Allowed",s&&r&&i?f=`You made a ${s.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:s&&(f=`Invalid request method "${s.toUpperCase()}"`)),new Ql(e||500,d,new Error(f),!0)}function Hu(e){let r=Object.entries(e);for(let i=r.length-1;i>=0;i--){let[s,l]=r[i];if(Yi(l))return{key:s,result:l}}}function BE(e){let r=typeof e=="string"?na(e):e;return Mn({...r,hash:""})}function jM(e,r){return e.pathname!==r.pathname||e.search!==r.search?!1:e.hash===""?r.hash!=="":e.hash===r.hash?!0:r.hash!==""}function RM(e){return new Ql(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function AM(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([r,i])=>typeof r=="string"&&OM(i))}function OM(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function MM(e){return wg(e.result)&&_E.has(e.result.status)}function Jn(e){return e.type==="error"}function Yi(e){return(e&&e.type)==="redirect"}function F1(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function wg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function zM(e){return _E.has(e)}function DM(e){return wg(e)&&zM(e.status)&&e.headers.has("Location")}function BM(e){ret)DELIM" +R"DELIM(urn uM.has(e.toUpperCase())}function Tn(e){return lM.has(e.toUpperCase())}function Sg(e){return new URLSearchParams(e).getAll("index").some(r=>r==="")}function Wu(e,r){let i=typeof r=="string"?na(r).search:r.search;if(e[e.length-1].route.index&&Sg(i||""))return e[e.length-1];let s=wE(e);return s[s.length-1]}function V1(e){let{formMethod:r,formAction:i,formEncType:s,text:l,formData:c,json:d}=e;if(!(!r||!i||!s)){if(l!=null)return{formMethod:r,formAction:i,formEncType:s,formData:void 0,json:void 0,text:l};if(c!=null)return{formMethod:r,formAction:i,formEncType:s,formData:c,json:void 0,text:void 0};if(d!==void 0)return{formMethod:r,formAction:i,formEncType:s,formData:void 0,json:d,text:void 0}}}function Pm(e,r,i,s){return s?{state:"loading",location:e,matches:r,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}:{state:"loading",location:e,matches:r,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function LM(e,r,i,s){return{state:"submitting",location:e,matches:r,historyAction:i,formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text}}function vl(e,r){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function UM(e,r){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:r?r.data:void 0}}function Qr(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function HM(e,r){try{let i=e.sessionStorage.getItem(NE);if(i){let s=JSON.parse(i);for(let[l,c]of Object.entries(s||{}))c&&Array.isArray(c)&&r.set(l,new Set(c||[]))}}catch{}}function PM(e,r){if(r.size>0){let i={};for(let[s,l]of r)i[s]=[...l];try{e.sessionStorage.setItem(NE,JSON.stringify(i))}catch(s){Ct(!1,`Failed to save applied view transitions in sessionStorage (${s}).`)}}}function Y1(){let e,r,i=new Promise((s,l)=>{e=async c=>{s(c);try{await i}catch{}},r=async c=>{l(c);try{await i}catch{}}});return{promise:i,resolve:e,reject:r}}var Ji=T.createContext(null);Ji.displayName="DataRouter";var go=T.createContext(null);go.displayName="DataRouterState";var LE=T.createContext(!1);function UE(){return T.useContext(LE)}var Eg=T.createContext({isTransitioning:!1});Eg.displayName="ViewTransition";var HE=T.createContext(new Map);HE.displayName="Fetchers";var $M=T.createContext(null);$M.displayName="Await";var Dn=T.createContext(null);Dn.displayName="Navigation";var Jl=T.createContext(null);Jl.displayName="Location";var yr=T.createContext({outlet:null,matches:[],isDataRoute:!1});yr.displayName="Route";var Tg=T.createContext(null);Tg.displayName="RouteError";var PE="REACT_ROUTER_ERROR",qM="REDIRECT",ZM="ROUTE_ERROR_RESPONSE";function IM(e){if(e.startsWith(`${PE}:${qM}:{`))try{let r=JSON.parse(e.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function FM(e){if(e.startsWith(`${PE}:${ZM}:{`))try{let r=JSON.parse(e.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new Ql(r.status,r.statusText,r.data)}catch{}}function VM(e,{relative:r}={}){qe(yo(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:s}=T.useContext(Dn),{hash:l,pathname:c,search:d}=Wl(e,{relative:r}),f=c;return i!=="/"&&(f=c==="/"?i:pr([i,c])),s.createHref({pathname:f,search:d,hash:l})}function yo(){return T.useContext(Jl)!=null}function Xt(){return qe(yo(),"useLocation() may be used only in the context of a component."),T.useContext(Jl).location}function YM(){return T.useContext(Jl).navigationType}var $E="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qE(e){T.useContext(Dn).static||T.useLayoutEffect(e)}function vr(){let{isDataRoute:e}=T.useContext(yr);return e?oz():GM()}function GM(){qe(yo(),"useNavigate() may be used only in the context of a component.");let e=T.useContext(Ji),{basename:r,navigator:i}=T.useContext(Dn),{matches:s}=T.useContext(yr),{pathname:l}=Xt(),c=JSON.stringify(Ad(s)),d=T.useRef(!1);return qE(()=>{d.current=!0}),T.useCallback((m,g={})=>{if(Ct(d.current,$E),!d.current)return;if(typeof m=="number"){i.go(m);return}let v=Kl(m,JSON.parse(c),l,g.relative==="path");e==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:pr([r,v.pathname])),Ws(typeof m=="string"?m:Mn(m),i.createHref(v),bg(i),"reject"),(g.replace?i.replace:i.push)(v,g.state,g)},[r,i,c,l,e])}var KM=T.createContext(null);function QM(e){let r=T.useContext(yr).outlet;return T.useMemo(()=>r&&T.createElement(KM.Provider,{value:e},r),[r,e])}function kg(){let{matches:e}=T.useContext(yr);return e[e.length-1]?.params??{}}function Wl(e,{relative:r}={}){let{matches:i}=T.useContext(yr),{pathname:s}=Xt(),l=JSON.stringify(Ad(i));return T.useMemo(()=>Kl(e,JSON.parse(l),s,r==="path"),[e,l,s,r])}function XM(e,r,i){qe(yo(),"useRoutes() may be used only in the context of a component.");let{navigator:s}=T.useContext(Dn),{matches:l}=T.useContext(yr),c=l[l.length-1],d=c?c.params:{},f=c?c.pathname:"/",m=c?c.pathnameBase:"/",g=c&&c.route;{let N=g&&g.path||"";VE(f,!g||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let v=Xt(),y;y=v;let x=y.pathname||"/",w=x;if(m!=="/"){let N=m.replace(/^\//,"").split("/");w="/"+x.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=i&&i.state.matches.length?i.state.matches.map(N=>Object.assign(N,{route:i.manifest[N.route.id]||N.route})):mE(e,{pathname:w});return Ct(g||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),Ct(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),tz(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:pr([m,s.encodeLocation?s.encodeLocation(N.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?m:pr([m,s.encodeLocation?s.encodeLocation(N.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),l,i)}function XM(){let e=IE(),r=Zl(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:s},c={padding:"2px 4px",backgroundColor:s},d=null;return console.error("Error handled by React Router default ErrorBoundary:",e),d=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:c},"ErrorBoundary")," or"," ",T.createElement("code",{style:c},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},r),i?T.createElement("pre",{style:l},i):null,d)}var JM=T.createElement(XM,null),qE=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}stat)DELIM" -R"DELIM(ic getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=IM(e.digest);i&&(e=i)}let r=e!==void 0?T.createElement(yr.Provider,{value:this.props.routeContext},T.createElement(Eg.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?T.createElement(WM,{error:e},r):r}};qE.contextType=LE;var Pm=new WeakMap;function WM({children:e,error:r}){let{basename:i,navigator:s}=T.useContext(Dn);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let l=ZM(r.digest);if(l){let c=Pm.get(r);if(c)throw c;let d=SE(l.location,i),f=d.absoluteURL||d.to;if(Ws(l.location,f,vg(s),"allow-explicit"),Np(f))throw new Error("Invalid redirect location");if(wE&&!Pm.get(r))if(d.isExternal||l.reloadDocument)window.location.href=f;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:l.replace}));throw Pm.set(r,m),m}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f}`})}}return e}function ez({routeContext:e,match:r,children:i}){let s=T.useContext(Wi);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),T.createElement(yr.Provider,{value:e},i)}function tz(e,r=[],i){let s=i?.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(r.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let l=e,c=s?.errors;if(c!=null){let v=l.findIndex(y=>y.route.id&&c?.[y.route.id]!==void 0);qe(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),l=l.slice(0,Math.min(l.length,v+1))}let d=!1,f=-1;if(i&&s){d=s.renderFallback;for(let v=0;v=0?l=l.slice(0,f+1):l=[l[0]];break}}}}let m=i?.onError,g=s&&m?(v,y)=>{m(v,{location:s.location,params:s.matches?.[0]?.params??{},pattern:Xl(s.matches),errorInfo:y})}:void 0;return l.reduceRight((v,y,x)=>{let w,E=!1,_=null,N=null;s&&(w=c&&y.route.id?c[y.route.id]:void 0,_=y.route.errorElement||JM,d&&(f<0&&x===0?(FE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,N=null):f===x&&(E=!0,N=y.route.hydrateFallbackElement||null)));let H=r.concat(l.slice(0,x+1)),O=()=>{let se;return w?se=_:E?se=N:y.route.Component?se=T.createElement(y.route.Component,null):y.route.element?se=y.route.element:se=v,T.createElement(ez,{match:y,routeContext:{outlet:v,matches:H,isDataRoute:s!=null},children:se})};return s&&(y.route.ErrorBoundary||y.route.errorElement||x===0)?T.createElement(qE,{location:s.location,revalidation:s.revalidation,component:_,error:w,children:O(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:g}):O()},null)}function kg(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function nz(e){let r=T.useContext(Wi);return qe(r,kg(e)),r}function _g(e){let r=T.useContext(go);return qe(r,kg(e)),r}function rz(e){let r=T.useContext(yr);return qe(r,kg(e)),r}function Ng(e){let r=rz(e),i=r.matches[r.matches.length-1];return qe(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function az(){return Ng("useRouteId")}function iz(){let e=_g("useNavigation");return T.useMemo(()=>{let{matches:r,historyAction:i,...s}=e.navigation;return s},[e.navigation])}function ZE(){let{matches:e,loaderData:r}=_g("useMatches");return T.useMemo(()=>e.map(i=>pE(i,r)),[e,r])}function IE(){let e=T.useContext(Eg),r=_g("useRouteError"),i=Ng("useRouteError");return e!==void 0?e:r.errors?.[i]}function sz(){let{router:e}=nz("useNavigate"),r=Ng("useNavigate"),i=T.useRef(!1);return $E(()=>{i.current=!0}),T.useCallback(async(l,c={})=>{Ct(i.current,PE),i.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:r,...c}))},[e,r])}var Y1={};function FE(e,r,i){!r&&!Y1[e]&&(Y1[e]=!0,Ct(!1,i))}var G1={};function K1(e,r){!e&&!G1[r]&&(G1[r]=!0,console.warn(r))}var oz="useOptimistic",Q1=e_[oz],lz=()=>{};function cz(e){return Q1?Q1(e):[e,lz]}function uz(e){let r={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&Ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:T.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&Ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:T.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&Ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:T.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),r}var dz=["HydrateFallback","hydrateFallbackElement"],fz=class{constructor(){this.status="pending",this.promise=new Promise((e,r)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",r(i))}})}};function hz({router:e,flushSync:r,onError:i,useTransitions:s}){s=BE()||s;let[c,d]=T.useState(e.state),[f,m]=cz(c),[g,v]=T.useState(),[y,x]=T.useState({isTransitioning:!1}),[w,E]=T.useState(),[_,N]=T.useState(),[H,O]=T.useState(),se=T.useRef(new Map),ce=T.useCallback((k,{deletedFetchers:z,newErrors:P,flushSync:F,viewTransitionOpts:X})=>{P&&i&&Object.values(P).forEach(ge=>i(ge,{location:k.location,params:k.matches[0]?.params??{},pattern:Xl(k.matches)})),k.fetchers.forEach((ge,re)=>{ge.data!==void 0&&se.current.set(re,ge.data)}),z.forEach(ge=>se.current.delete(ge)),K1(F===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let fe=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(K1(X==null||fe,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!X||!fe){r&&F?r(()=>d(k)):s===!1?d(k):T.startTransition(()=>{s===!0&&m(ge=>X1(ge,k)),d(k)});return}if(r&&F){r(()=>{_&&(w?.resolve(),_.skipTransition()),x({isTransitioning:!0,flushSync:!0,currentLocation:X.currentLocation,nextLocation:X.nextLocation})});let ge=e.window.document.startViewTransition(()=>{r(()=>d(k))});ge.finished.finally(()=>{r(()=>{E(void 0),N(void 0),v(void 0),x({isTransitioning:!1})})}),r(()=>N(ge));return}_?(w?.resolve(),_.skipTransition(),O({state:k,currentLocation:X.currentLocation,nextLocation:X.nextLocation})):(v(k),x({isTransitioning:!0,flushSync:!1,currentLocation:X.currentLocation,nextLocation:X.nextLocation}))},[e.window,r,_,w,s,m,i]);T.useLayoutEffect(()=>e.subscribe(ce),[e,ce]),T.useEffect(()=>{y.isTransitioning&&!y.flushSync&&E(new fz)},[y]),T.useEffect(()=>{if(w&&g&&e.window){let k=g,z=w.promise,P=e.window.document.startViewTransition(async()=>{s===!1?d(k):T.s)DELIM" -R"DELIM(tartTransition(()=>{s===!0&&m(F=>X1(F,k)),d(k)}),await z});P.finished.finally(()=>{E(void 0),N(void 0),v(void 0),x({isTransitioning:!1})}),N(P)}},[g,w,e.window,s,m]),T.useEffect(()=>{w&&g&&f.location.key===g.location.key&&w.resolve()},[w,_,f.location,g]),T.useEffect(()=>{!y.isTransitioning&&H&&(v(H.state),x({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}),O(void 0))},[y.isTransitioning,H]);let K=T.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:k=>e.navigate(k),push:(k,z,P)=>e.navigate(k,{state:z,preventScrollReset:P?.preventScrollReset}),replace:(k,z,P)=>e.navigate(k,{replace:!0,state:z,preventScrollReset:P?.preventScrollReset})}),[e]),oe=e.basename||"/",R=T.useMemo(()=>({router:e,navigator:K,static:!1,basename:oe,onError:i}),[e,K,oe,i]);return T.createElement(T.Fragment,null,T.createElement(Wi.Provider,{value:R},T.createElement(go.Provider,{value:f},T.createElement(UE.Provider,{value:se.current},T.createElement(Sg.Provider,{value:y},T.createElement(vz,{basename:oe,location:f.location,navigationType:f.historyAction,navigator:K,useTransitions:s},T.createElement(mz,{routes:e.routes,manifest:e.manifest,future:e.future,state:f,isStatic:!1,onError:i})))))),null)}function X1(e,r){return{...e,navigation:r.navigation.state!=="idle"?r.navigation:e.navigation,revalidation:r.revalidation!=="idle"?r.revalidation:e.revalidation,actionData:r.navigation.state!=="submitting"?r.actionData:e.actionData,fetchers:r.fetchers}}var mz=T.memo(pz);function pz({routes:e,manifest:r,future:i,state:s,isStatic:l,onError:c}){return QM(e,void 0,{manifest:r,state:s,isStatic:l,onError:c})}function gz({to:e,replace:r,state:i,relative:s}){qe(yo()," may be used only in the context of a component.");let{static:l,navigator:c}=T.useContext(Dn);Ct(!l," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:d}=T.useContext(yr),{pathname:f}=Xt(),m=vr(),g=Kl(e,Rd(d),f,s==="path");Ws(typeof e=="string"?e:Mn(e),c.createHref(g),vg(c),"reject");let v=JSON.stringify(g);return T.useEffect(()=>{m(JSON.parse(v),{replace:r,state:i,relative:s})},[m,v,s,r,i]),null}function yz(e){return KM(e.context)}function Pt(e){qe(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function vz({basename:e="/",children:r=null,location:i,navigationType:s="POP",navigator:l,static:c=!1,useTransitions:d}){qe(!yo(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),m=T.useMemo(()=>({basename:f,navigator:l,static:c,useTransitions:d,future:{}}),[f,l,c,d]);typeof i=="string"&&(i=na(i));let{pathname:g="/",search:v="",hash:y="",state:x=null,key:w="default",mask:E}=i,_=T.useMemo(()=>{let N=tr(g,f);return N==null?null:{location:{pathname:N,search:v,hash:y,state:x,key:w,mask:E},navigationType:s}},[f,g,v,y,x,w,s,E]);return Ct(_!=null,` is not able to match the URL "${g}${v}${y}" because it does not start with the basename, so the won't render anything.`),_==null?null:T.createElement(Dn.Provider,{value:m},T.createElement(Jl.Provider,{children:r,value:_}))}function jp(e,r=[]){let i=[];return T.Children.forEach(e,(s,l)=>{if(!T.isValidElement(s))return;let c=[...r,l];if(s.type===T.Fragment){i.push.apply(i,jp(s.props.children,c));return}qe(s.type===Pt,`[${typeof s.type=="string"?s.type:s.type.name}] is not a component. All component children of must be a or `),qe(!s.props.index||!s.props.children,"An index route cannot have child routes.");let d={id:s.props.id||c.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(d.children=jp(s.props.children,c)),i.push(d)}),i}var bz=jp,Wu="get",ed="application/x-www-form-urlencoded";function Ad(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function xz(e){return Ad(e)&&e.tagName.toLowerCase()==="button"}function wz(e){return Ad(e)&&e.tagName.toLowerCase()==="form"}function Sz(e){return Ad(e)&&e.tagName.toLowerCase()==="input"}function Ez(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Tz(e,r){return e.button===0&&(!r||r==="_self")&&!Ez(e)}function Rp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((r,i)=>{let s=e[i];return r.concat(Array.isArray(s)?s.map(l=>[i,l]):[[i,s]])},[]))}function kz(e,r){let i=Rp(e);return r&&r.forEach((s,l)=>{i.has(l)||r.getAll(l).forEach(c=>{i.append(l,c)})}),i}var Pu=null;function _z(){if(Pu===null)try{new FormData(document.createElement("form"),0),Pu=!1}catch{Pu=!0}return Pu}var Nz=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $m(e){return e!=null&&!Nz.has(e)?(Ct(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${ed}"`),null):e}function Cz(e,r){let i,s,l,c,d;if(wz(e)){let f=e.getAttribute("action");s=f?tr(f,r):null,i=e.getAttribute("method")||Wu,l=$m(e.getAttribute("enctype"))||ed,c=new FormData(e)}else if(xz(e)||Sz(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a