diff --git a/Makefile b/Makefile index 0b59dc3..0c007a6 100644 --- a/Makefile +++ b/Makefile @@ -52,3 +52,7 @@ seed: .PHONY: seed-cleanup seed-cleanup: python hack/seed.py cleanup + +build-dashboard: + rm -rf alphatrion/static/* + cd dashboard && npm install && npm run build \ No newline at end of file diff --git a/README.md b/README.md index 7ead14f..545a5fe 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ HostName: postgres ServerPWD: alphatr1on ``` -### Run a Sample Experiment +### Run a Simple Experiment Below is a simple example with two approaches demonstrating how to create an experiment and log performance metrics. @@ -75,27 +75,25 @@ async with alpha.CraftExperiment.setup(name="my_experiment") as exp: await run.wait() ``` -### View Results +### View Dashboard -The dashboard is under active development. +The dashboard is under active development. You can already run the frontend locally to explore experiments, trials, runs, and metrics through the UI. ### Prerequisites Make sure the following are installed: - **Node.js ≥ 18** -- **npm ≥ 9** +- **npm ≥ 9** - **Vite** -- Backend (`alphatrion server`) running -### Running the Frontend +### Launch Dashboard -Inside the `dashboard` directory: ```bash -npm install -npm run dev +alphatrion server # Start the backend server +alphatrion dashboard # Start the dashboard ``` -Dashboard is available at `http://localhost:5173` +Dashboard is available at `http://localhost:3000` by default. ### Cleanup diff --git a/alphatrion/server/cmd/main.py b/alphatrion/server/cmd/main.py index 29e0d14..5f6cfb5 100644 --- a/alphatrion/server/cmd/main.py +++ b/alphatrion/server/cmd/main.py @@ -1,7 +1,13 @@ import argparse +import os +import webbrowser +from pathlib import Path import uvicorn from dotenv import load_dotenv +from fastapi import FastAPI +from fastapi.responses import FileResponse +from fastapi.staticfiles import StaticFiles from rich.console import Console from rich.text import Text @@ -24,7 +30,11 @@ def main(): ) server.set_defaults(func=run_server) - # Reserve for dashboard command in the future + dashboard = subparsers.add_parser("dashboard", help="Run the AlphaTrion dashboard") + dashboard.add_argument( + "--port", type=int, default=3000, help="Port to run the dashboard on" + ) + dashboard.set_defaults(func=start_dashboard) args = parser.parse_args() args.func(args) @@ -38,3 +48,22 @@ def run_server(args): console.print(msg) graphql_init() uvicorn.run("alphatrion.server.cmd.app:app", host=args.host, port=args.port) + + +def start_dashboard(args): + static_path = Path(__file__).resolve().parents[2] / "static" + + app = FastAPI() + app.mount("/static", StaticFiles(directory=static_path, html=True), name="static") + + @app.get("/{full_path:path}") + def spa_fallback(full_path: str): + index_file = os.path.join(static_path, "index.html") + if os.path.exists(index_file): + return FileResponse(index_file) + return {"error": "index.html not found"} + + url = f"http://localhost:{args.port}" + webbrowser.open(url) + + uvicorn.run(app, host="127.0.0.1", port=args.port) diff --git a/alphatrion/static/alphatrion.png b/alphatrion/static/alphatrion.png new file mode 100644 index 0000000..0e780f9 Binary files /dev/null and b/alphatrion/static/alphatrion.png differ diff --git a/alphatrion/static/assets/index-CZjEehIf.css b/alphatrion/static/assets/index-CZjEehIf.css new file mode 100644 index 0000000..02bacc9 --- /dev/null +++ b/alphatrion/static/assets/index-CZjEehIf.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.relative{position:relative}.left-1\/2{left:50%}.top-1\/2{top:50%}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.block{display:block}.flex{display:flex}.table{display:table}.grid{display:grid}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-full{width:100%}.min-w-full{min-width:100%}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(243 244 246 / var(--tw-divide-opacity, 1))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity, 1))}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity, 1))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-200\/50{border-color:#e5e7eb80}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-indigo-200{--tw-border-opacity: 1;border-color:rgb(199 210 254 / var(--tw-border-opacity, 1))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-t-indigo-600{--tw-border-opacity: 1;border-top-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.bg-amber-50\/80{background-color:#fffbebcc}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-50\/80{background-color:#f9fafbcc}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-50\/80{background-color:#fef2f2cc}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/70{background-color:#ffffffb3}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-50{--tw-bg-opacity: 1;background-color:rgb(254 252 232 / var(--tw-bg-opacity, 1))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-emerald-500{--tw-gradient-from: #10b981 var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-100{--tw-gradient-from: #f3f4f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(243 244 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-900{--tw-gradient-from: #111827 var(--tw-gradient-from-position);--tw-gradient-to: rgb(17 24 39 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-indigo-500{--tw-gradient-from: #6366f1 var(--tw-gradient-from-position);--tw-gradient-to: rgb(99 102 241 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary-500{--tw-gradient-from: #0ea5e9 var(--tw-gradient-from-position);--tw-gradient-to: rgb(14 165 233 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary-600{--tw-gradient-from: #0284c7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(2 132 199 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-500{--tw-gradient-from: #a855f7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(168 85 247 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-accent-500{--tw-gradient-to: #8b5cf6 var(--tw-gradient-to-position)}.to-accent-600{--tw-gradient-to: #7c3aed var(--tw-gradient-to-position)}.to-emerald-600{--tw-gradient-to: #059669 var(--tw-gradient-to-position)}.to-gray-50{--tw-gradient-to: #f9fafb var(--tw-gradient-to-position)}.to-gray-600{--tw-gradient-to: #4b5563 var(--tw-gradient-to-position)}.to-gray-800{--tw-gradient-to: #1f2937 var(--tw-gradient-to-position)}.to-indigo-600{--tw-gradient-to: #4f46e5 var(--tw-gradient-to-position)}.to-purple-600{--tw-gradient-to: #9333ea var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-gray-500{fill:#6b7280}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-wider{letter-spacing:.05em}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-600{--tw-text-opacity: 1;color:rgb(79 70 229 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[1px_0_30px_-15px_rgba\(0\,0\,0\,0\.1\)\]{--tw-shadow: 1px 0 30px -15px rgba(0,0,0,.1);--tw-shadow-colored: 1px 0 30px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-emerald-500\/20{--tw-shadow-color: rgb(16 185 129 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-indigo-500\/20{--tw-shadow-color: rgb(99 102 241 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-indigo-500\/25{--tw-shadow-color: rgb(99 102 241 / .25);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-500\/20{--tw-shadow-color: rgb(168 85 247 / .2);--tw-shadow: var(--tw-shadow-colored)}.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(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}body{min-height:100vh!important;background:linear-gradient(180deg,#fafbfc,#f4f5f7)!important;background-attachment:fixed!important}body:before{content:"";position:fixed;top:0;left:0;width:100%;height:100%;background-image:radial-gradient(circle at 20% 50%,rgba(120,119,198,.05) 0%,transparent 50%),radial-gradient(circle at 80% 80%,rgba(99,102,241,.05) 0%,transparent 50%),radial-gradient(circle at 40% 20%,rgba(168,85,247,.05) 0%,transparent 50%);pointer-events:none;z-index:0}body:after{content:"";position:fixed;top:0;right:0;width:400px;height:400px;background-image:repeating-linear-gradient(0deg,transparent,transparent 30px,rgba(99,102,241,.04) 30px,rgba(99,102,241,.04) 31px),repeating-linear-gradient(90deg,transparent,transparent 30px,rgba(99,102,241,.04) 30px,rgba(99,102,241,.04) 31px);pointer-events:none;z-index:0;opacity:.7}html,#root{height:100%;background:transparent!important;position:relative;z-index:1}*{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-100\/80:hover{background-color:#f3f4f6cc}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-700\/50:hover{background-color:#37415180}.hover\:bg-indigo-50\/50:hover{background-color:#eef2ff80}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-indigo-800:hover{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-gray-200\/50:hover{--tw-shadow-color: rgb(229 231 235 / .5);--tw-shadow: var(--tw-shadow-colored)}.focus\:border-indigo-400:focus{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-indigo-500\/20:focus{--tw-ring-color: rgb(99 102 241 / .2)}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}} diff --git a/alphatrion/static/assets/index-DzgxcILT.js b/alphatrion/static/assets/index-DzgxcILT.js new file mode 100644 index 0000000..9e99006 --- /dev/null +++ b/alphatrion/static/assets/index-DzgxcILT.js @@ -0,0 +1,226 @@ +var uu=e=>{throw TypeError(e)};var gs=(e,t,n)=>t.has(e)||uu("Cannot "+n);var v=(e,t,n)=>(gs(e,t,"read from private field"),n?n.call(e):t.get(e)),I=(e,t,n)=>t.has(e)?uu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_=(e,t,n,r)=>(gs(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),U=(e,t,n)=>(gs(e,t,"access private method"),n);var $i=(e,t,n,r)=>({set _(i){_(e,t,i,n)},get _(){return v(e,t,r)}});function Kh(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Yh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var td={exports:{}},Kl={},nd={exports:{}},b={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var _i=Symbol.for("react.element"),qh=Symbol.for("react.portal"),Gh=Symbol.for("react.fragment"),Xh=Symbol.for("react.strict_mode"),Jh=Symbol.for("react.profiler"),Zh=Symbol.for("react.provider"),ep=Symbol.for("react.context"),tp=Symbol.for("react.forward_ref"),np=Symbol.for("react.suspense"),rp=Symbol.for("react.memo"),ip=Symbol.for("react.lazy"),cu=Symbol.iterator;function lp(e){return e===null||typeof e!="object"?null:(e=cu&&e[cu]||e["@@iterator"],typeof e=="function"?e:null)}var rd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},id=Object.assign,ld={};function Pr(e,t,n){this.props=e,this.context=t,this.refs=ld,this.updater=n||rd}Pr.prototype.isReactComponent={};Pr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Pr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sd(){}sd.prototype=Pr.prototype;function io(e,t,n){this.props=e,this.context=t,this.refs=ld,this.updater=n||rd}var lo=io.prototype=new sd;lo.constructor=io;id(lo,Pr.prototype);lo.isPureReactComponent=!0;var du=Array.isArray,ad=Object.prototype.hasOwnProperty,so={current:null},od={key:!0,ref:!0,__self:!0,__source:!0};function ud(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)ad.call(t,r)&&!od.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,ae=R[te];if(0>>1;tei(vs,F))fni(zi,vs)?(R[te]=zi,R[fn]=F,te=fn):(R[te]=vs,R[dn]=F,te=dn);else if(fni(zi,F))R[te]=zi,R[fn]=F,te=fn;else break e}}return D}function i(R,D){var F=R.sortIndex-D.sortIndex;return F!==0?F:R.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var u=[],c=[],m=1,h=null,g=3,x=!1,S=!1,w=!1,N=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(R){for(var D=n(c);D!==null;){if(D.callback===null)r(c);else if(D.startTime<=R)r(c),D.sortIndex=D.expirationTime,t(u,D);else break;D=n(c)}}function y(R){if(w=!1,p(R),!S)if(n(u)!==null)S=!0,ps(C);else{var D=n(c);D!==null&&ms(y,D.startTime-R)}}function C(R,D){S=!1,w&&(w=!1,f(P),P=-1),x=!0;var F=g;try{for(p(D),h=n(u);h!==null&&(!(h.expirationTime>D)||R&&!L());){var te=h.callback;if(typeof te=="function"){h.callback=null,g=h.priorityLevel;var ae=te(h.expirationTime<=D);D=e.unstable_now(),typeof ae=="function"?h.callback=ae:h===n(u)&&r(u),p(D)}else r(u);h=n(u)}if(h!==null)var Ui=!0;else{var dn=n(c);dn!==null&&ms(y,dn.startTime-D),Ui=!1}return Ui}finally{h=null,g=F,x=!1}}var E=!1,O=null,P=-1,A=5,T=-1;function L(){return!(e.unstable_now()-TR||125te?(R.sortIndex=F,t(c,R),n(u)===null&&R===n(c)&&(w?(f(P),P=-1):w=!0,ms(y,F-te))):(R.sortIndex=ae,t(u,R),S||x||(S=!0,ps(C))),R},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(R){var D=g;return function(){var F=g;g=D;try{return R.apply(this,arguments)}finally{g=F}}}})(md);pd.exports=md;var gp=pd.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var yp=j,be=gp;function k(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ks=Object.prototype.hasOwnProperty,xp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,hu={},pu={};function wp(e){return Ks.call(pu,e)?!0:Ks.call(hu,e)?!1:xp.test(e)?pu[e]=!0:(hu[e]=!0,!1)}function Sp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Np(e,t,n,r){if(t===null||typeof t>"u"||Sp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ke(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){pe[e]=new ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];pe[t]=new ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){pe[e]=new ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){pe[e]=new ke(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){pe[e]=new ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){pe[e]=new ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){pe[e]=new ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){pe[e]=new ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){pe[e]=new ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var oo=/[\-:]([a-z])/g;function uo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(oo,uo);pe[t]=new ke(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(oo,uo);pe[t]=new ke(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(oo,uo);pe[t]=new ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){pe[e]=new ke(e,1,!1,e.toLowerCase(),null,!1,!1)});pe.xlinkHref=new ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){pe[e]=new ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function co(e,t,n,r){var i=pe.hasOwnProperty(t)?pe[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==l[a]){var u=` +`+i[s].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=s&&0<=a);break}}}finally{ws=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Br(e):""}function jp(e){switch(e.tag){case 5:return Br(e.type);case 16:return Br("Lazy");case 13:return Br("Suspense");case 19:return Br("SuspenseList");case 0:case 2:case 15:return e=Ss(e.type,!1),e;case 11:return e=Ss(e.type.render,!1),e;case 1:return e=Ss(e.type,!0),e;default:return""}}function Xs(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bn:return"Fragment";case Qn:return"Portal";case Ys:return"Profiler";case fo:return"StrictMode";case qs:return"Suspense";case Gs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yd:return(e.displayName||"Context")+".Consumer";case gd:return(e._context.displayName||"Context")+".Provider";case ho:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case po:return t=e.displayName||null,t!==null?t:Xs(e.type)||"Memo";case Rt:t=e._payload,e=e._init;try{return Xs(e(t))}catch{}}return null}function Cp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xs(t);case 8:return t===fo?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function rn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kp(e){var t=wd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qi(e){e._valueTracker||(e._valueTracker=kp(e))}function Sd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Js(e,t){var n=t.checked;return X({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Nd(e,t){t=t.checked,t!=null&&co(e,"checked",t,!1)}function Zs(e,t){Nd(e,t);var n=rn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ea(e,t.type,n):t.hasOwnProperty("defaultValue")&&ea(e,t.type,rn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function gu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ea(e,t,n){(t!=="number"||yl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Hr=Array.isArray;function tr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Bi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function li(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ep=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){Ep.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function Ed(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function Pd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Ed(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Pp=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ra(e,t){if(t){if(Pp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function ia(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var la=null;function mo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var sa=null,nr=null,rr=null;function wu(e){if(e=Ii(e)){if(typeof sa!="function")throw Error(k(280));var t=e.stateNode;t&&(t=Jl(t),sa(e.stateNode,e.type,t))}}function Td(e){nr?rr?rr.push(e):rr=[e]:nr=e}function Od(){if(nr){var e=nr,t=rr;if(rr=nr=null,wu(e),t)for(e=0;e>>=0,e===0?32:31-(Up(e)/zp|0)|0}var Hi=64,Vi=4194304;function Vr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Nl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Vr(a):(l&=s,l!==0&&(r=Vr(l)))}else s=n&~i,s!==0?r=Vr(s):l!==0&&(r=Vr(l));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Mi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-et(t),e[t]=n}function Qp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xr),Ou=" ",_u=!1;function qd(e,t){switch(e){case"keyup":return gm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hn=!1;function xm(e,t){switch(e){case"compositionend":return Gd(t);case"keypress":return t.which!==32?null:(_u=!0,Ou);case"textInput":return e=t.data,e===Ou&&_u?null:e;default:return null}}function wm(e,t){if(Hn)return e==="compositionend"||!jo&&qd(e,t)?(e=Kd(),ul=wo=Bt=null,Hn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Du(n)}}function ef(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ef(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function tf(){for(var e=window,t=yl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yl(e.document)}return t}function Co(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Om(e){var t=tf(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ef(n.ownerDocument.documentElement,n)){if(r!==null&&Co(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=Lu(n,l);var s=Lu(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vn=null,fa=null,Zr=null,ha=!1;function Fu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ha||Vn==null||Vn!==yl(r)||(r=Vn,"selectionStart"in r&&Co(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zr&&di(Zr,r)||(Zr=r,r=kl(fa,"onSelect"),0qn||(e.current=xa[qn],xa[qn]=null,qn--)}function H(e,t){qn++,xa[qn]=e.current,e.current=t}var ln={},ye=an(ln),Me=an(!1),Mn=ln;function Sr(e,t){var n=e.type.contextTypes;if(!n)return ln;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Re(e){return e=e.childContextTypes,e!=null}function Pl(){K(Me),K(ye)}function Qu(e,t,n){if(ye.current!==ln)throw Error(k(168));H(ye,t),H(Me,n)}function df(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(k(108,Cp(e)||"Unknown",i));return X({},n,r)}function Tl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,Mn=ye.current,H(ye,e),H(Me,Me.current),!0}function Bu(e,t,n){var r=e.stateNode;if(!r)throw Error(k(169));n?(e=df(e,t,Mn),r.__reactInternalMemoizedMergedChildContext=e,K(Me),K(ye),H(ye,e)):K(Me),H(Me,n)}var vt=null,Zl=!1,Ls=!1;function ff(e){vt===null?vt=[e]:vt.push(e)}function Am(e){Zl=!0,ff(e)}function on(){if(!Ls&&vt!==null){Ls=!0;var e=0,t=B;try{var n=vt;for(B=1;e>=s,i-=s,xt=1<<32-et(t)+i|n<P?(A=O,O=null):A=O.sibling;var T=g(f,O,p[P],y);if(T===null){O===null&&(O=A);break}e&&O&&T.alternate===null&&t(f,O),d=l(T,d,P),E===null?C=T:E.sibling=T,E=T,O=A}if(P===p.length)return n(f,O),Y&&hn(f,P),C;if(O===null){for(;PP?(A=O,O=null):A=O.sibling;var L=g(f,O,T.value,y);if(L===null){O===null&&(O=A);break}e&&O&&L.alternate===null&&t(f,O),d=l(L,d,P),E===null?C=L:E.sibling=L,E=L,O=A}if(T.done)return n(f,O),Y&&hn(f,P),C;if(O===null){for(;!T.done;P++,T=p.next())T=h(f,T.value,y),T!==null&&(d=l(T,d,P),E===null?C=T:E.sibling=T,E=T);return Y&&hn(f,P),C}for(O=r(f,O);!T.done;P++,T=p.next())T=x(O,f,P,T.value,y),T!==null&&(e&&T.alternate!==null&&O.delete(T.key===null?P:T.key),d=l(T,d,P),E===null?C=T:E.sibling=T,E=T);return e&&O.forEach(function(ee){return t(f,ee)}),Y&&hn(f,P),C}function N(f,d,p,y){if(typeof p=="object"&&p!==null&&p.type===Bn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Wi:e:{for(var C=p.key,E=d;E!==null;){if(E.key===C){if(C=p.type,C===Bn){if(E.tag===7){n(f,E.sibling),d=i(E,p.props.children),d.return=f,f=d;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Rt&&Ku(C)===E.type){n(f,E.sibling),d=i(E,p.props),d.ref=br(f,E,p),d.return=f,f=d;break e}n(f,E);break}else t(f,E);E=E.sibling}p.type===Bn?(d=_n(p.props.children,f.mode,y,p.key),d.return=f,f=d):(y=gl(p.type,p.key,p.props,null,f.mode,y),y.ref=br(f,d,p),y.return=f,f=y)}return s(f);case Qn:e:{for(E=p.key;d!==null;){if(d.key===E)if(d.tag===4&&d.stateNode.containerInfo===p.containerInfo&&d.stateNode.implementation===p.implementation){n(f,d.sibling),d=i(d,p.children||[]),d.return=f,f=d;break e}else{n(f,d);break}else t(f,d);d=d.sibling}d=Qs(p,f.mode,y),d.return=f,f=d}return s(f);case Rt:return E=p._init,N(f,d,E(p._payload),y)}if(Hr(p))return S(f,d,p,y);if(Rr(p))return w(f,d,p,y);Zi(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,d!==null&&d.tag===6?(n(f,d.sibling),d=i(d,p),d.return=f,f=d):(n(f,d),d=Ws(p,f.mode,y),d.return=f,f=d),s(f)):n(f,d)}return N}var jr=vf(!0),gf=vf(!1),Ml=an(null),Rl=null,Jn=null,To=null;function Oo(){To=Jn=Rl=null}function _o(e){var t=Ml.current;K(Ml),e._currentValue=t}function Na(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function lr(e,t){Rl=e,To=Jn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_e=!0),e.firstContext=null)}function Ve(e){var t=e._currentValue;if(To!==e)if(e={context:e,memoizedValue:t,next:null},Jn===null){if(Rl===null)throw Error(k(308));Jn=e,Rl.dependencies={lanes:0,firstContext:e}}else Jn=Jn.next=e;return t}var gn=null;function Mo(e){gn===null?gn=[e]:gn.push(e)}function yf(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Mo(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var It=!1;function Ro(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function St(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Xt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,Mo(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,go(e,n)}}function Yu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};l===null?i=l=s:l=l.next=s,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Il(e,t,n,r){var i=e.updateQueue;It=!1;var l=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var u=a,c=u.next;u.next=null,s===null?l=c:s.next=c,s=u;var m=e.alternate;m!==null&&(m=m.updateQueue,a=m.lastBaseUpdate,a!==s&&(a===null?m.firstBaseUpdate=c:a.next=c,m.lastBaseUpdate=u))}if(l!==null){var h=i.baseState;s=0,m=c=u=null,a=l;do{var g=a.lane,x=a.eventTime;if((r&g)===g){m!==null&&(m=m.next={eventTime:x,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var S=e,w=a;switch(g=t,x=n,w.tag){case 1:if(S=w.payload,typeof S=="function"){h=S.call(x,h,g);break e}h=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=w.payload,g=typeof S=="function"?S.call(x,h,g):S,g==null)break e;h=X({},h,g);break e;case 2:It=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else x={eventTime:x,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},m===null?(c=m=x,u=h):m=m.next=x,s|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(m===null&&(u=h),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=m,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else l===null&&(i.shared.lanes=0);Dn|=s,e.lanes=s,e.memoizedState=h}}function qu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=bs.transition;bs.transition={};try{e(!1),t()}finally{B=n,bs.transition=r}}function Ff(){return Ke().memoizedState}function Hm(e,t,n){var r=Zt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},bf(e))Uf(t,n);else if(n=yf(e,t,n,r),n!==null){var i=je();tt(n,e,r,i),zf(n,t,r)}}function Vm(e,t,n){var r=Zt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(bf(e))Uf(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,a=l(s,n);if(i.hasEagerState=!0,i.eagerState=a,rt(a,s)){var u=t.interleaved;u===null?(i.next=i,Mo(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=yf(e,t,i,r),n!==null&&(i=je(),tt(n,e,r,i),zf(n,t,r))}}function bf(e){var t=e.alternate;return e===G||t!==null&&t===G}function Uf(e,t){ei=Ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,go(e,n)}}var Fl={readContext:Ve,useCallback:me,useContext:me,useEffect:me,useImperativeHandle:me,useInsertionEffect:me,useLayoutEffect:me,useMemo:me,useReducer:me,useRef:me,useState:me,useDebugValue:me,useDeferredValue:me,useTransition:me,useMutableSource:me,useSyncExternalStore:me,useId:me,unstable_isNewReconciler:!1},Km={readContext:Ve,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ve,useEffect:Xu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hl(4194308,4,Mf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return hl(4,2,e,t)},useMemo:function(e,t){var n=lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Hm.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:Gu,useDebugValue:$o,useDeferredValue:function(e){return lt().memoizedState=e},useTransition:function(){var e=Gu(!1),t=e[0];return e=Bm.bind(null,e[1]),lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=G,i=lt();if(Y){if(n===void 0)throw Error(k(407));n=n()}else{if(n=t(),ce===null)throw Error(k(349));In&30||jf(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,Xu(kf.bind(null,r,l,e),[e]),r.flags|=2048,xi(9,Cf.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=lt(),t=ce.identifierPrefix;if(Y){var n=wt,r=xt;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ut]=t,e[pi]=r,qf(e,t,!1,!1),t.stateNode=e;e:{switch(s=ia(n,r),n){case"dialog":V("cancel",e),V("close",e),i=r;break;case"iframe":case"object":case"embed":V("load",e),i=r;break;case"video":case"audio":for(i=0;iEr&&(t.flags|=128,r=!0,Ur(l,!1),t.lanes=4194304)}else{if(!r)if(e=Dl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ur(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!Y)return ve(t),null}else 2*ne()-l.renderingStartTime>Er&&n!==1073741824&&(t.flags|=128,r=!0,Ur(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ne(),t.sibling=null,n=q.current,H(q,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return Vo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function tv(e,t){switch(Eo(t),t.tag){case 1:return Re(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cr(),K(Me),K(ye),Lo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Do(t),null;case 13:if(K(q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(k(340));Nr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(q),null;case 4:return Cr(),null;case 10:return _o(t.type._context),null;case 22:case 23:return Vo(),null;case 24:return null;default:return null}}var tl=!1,ge=!1,nv=typeof WeakSet=="function"?WeakSet:Set,M=null;function Zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Z(e,t,r)}else n.current=null}function Ma(e,t,n){try{n()}catch(r){Z(e,t,r)}}var oc=!1;function rv(e,t){if(pa=jl,e=tf(),Co(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,a=-1,u=-1,c=0,m=0,h=e,g=null;t:for(;;){for(var x;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==l||r!==0&&h.nodeType!==3||(u=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(x=h.firstChild)!==null;)g=h,h=x;for(;;){if(h===e)break t;if(g===n&&++c===i&&(a=s),g===l&&++m===r&&(u=s),(x=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=x}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ma={focusedElem:e,selectionRange:n},jl=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var w=S.memoizedProps,N=S.memoizedState,f=t.stateNode,d=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:qe(t.type,w),N);f.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(y){Z(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return S=oc,oc=!1,S}function ti(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&Ma(t,n,l)}i=i.next}while(i!==r)}}function ns(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ra(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jf(e){var t=e.alternate;t!==null&&(e.alternate=null,Jf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ut],delete t[pi],delete t[ya],delete t[zm],delete t[$m])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zf(e){return e.tag===5||e.tag===3||e.tag===4}function uc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ia(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=El));else if(r!==4&&(e=e.child,e!==null))for(Ia(e,t,n),e=e.sibling;e!==null;)Ia(e,t,n),e=e.sibling}function Da(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Da(e,t,n),e=e.sibling;e!==null;)Da(e,t,n),e=e.sibling}var de=null,Je=!1;function Tt(e,t,n){for(n=n.child;n!==null;)eh(e,t,n),n=n.sibling}function eh(e,t,n){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(Yl,n)}catch{}switch(n.tag){case 5:ge||Zn(n,t);case 6:var r=de,i=Je;de=null,Tt(e,t,n),de=r,Je=i,de!==null&&(Je?(e=de,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):de.removeChild(n.stateNode));break;case 18:de!==null&&(Je?(e=de,n=n.stateNode,e.nodeType===8?Ds(e.parentNode,n):e.nodeType===1&&Ds(e,n),ui(e)):Ds(de,n.stateNode));break;case 4:r=de,i=Je,de=n.stateNode.containerInfo,Je=!0,Tt(e,t,n),de=r,Je=i;break;case 0:case 11:case 14:case 15:if(!ge&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&(l&2||l&4)&&Ma(n,t,s),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!ge&&(Zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Z(n,t,a)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(ge=(r=ge)||n.memoizedState!==null,Tt(e,t,n),ge=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function cc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nv),t.forEach(function(r){var i=fv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ye(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~l}if(r=i,r=ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*lv(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,zl=0,$&6)throw Error(k(331));var i=$;for($|=4,M=e.current;M!==null;){var l=M,s=l.child;if(M.flags&16){var a=l.deletions;if(a!==null){for(var u=0;une()-Bo?On(e,0):Qo|=n),Ie(e,t)}function oh(e,t){t===0&&(e.mode&1?(t=Vi,Vi<<=1,!(Vi&130023424)&&(Vi=4194304)):t=1);var n=je();e=kt(e,t),e!==null&&(Mi(e,t,n),Ie(e,n))}function dv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),oh(e,n)}function fv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),oh(e,n)}var uh;uh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Me.current)_e=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _e=!1,Zm(e,t,n);_e=!!(e.flags&131072)}else _e=!1,Y&&t.flags&1048576&&hf(t,_l,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;pl(e,t),e=t.pendingProps;var i=Sr(t,ye.current);lr(t,n),i=bo(null,t,r,e,i,n);var l=Uo();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Re(r)?(l=!0,Tl(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ro(t),i.updater=ts,t.stateNode=i,i._reactInternals=t,Ca(t,r,e,n),t=Pa(null,t,r,!0,l,n)):(t.tag=0,Y&&l&&ko(t),Ne(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(pl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=pv(r),e=qe(r,e),i){case 0:t=Ea(null,t,r,e,n);break e;case 1:t=lc(null,t,r,e,n);break e;case 11:t=rc(null,t,r,e,n);break e;case 14:t=ic(null,t,r,qe(r.type,e),n);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),Ea(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),lc(e,t,r,i,n);case 3:e:{if(Vf(t),e===null)throw Error(k(387));r=t.pendingProps,l=t.memoizedState,i=l.element,xf(e,t),Il(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=kr(Error(k(423)),t),t=sc(e,t,r,n,i);break e}else if(r!==i){i=kr(Error(k(424)),t),t=sc(e,t,r,n,i);break e}else for(Le=Gt(t.stateNode.containerInfo.firstChild),Fe=t,Y=!0,Ze=null,n=gf(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nr(),r===i){t=Et(e,t,n);break e}Ne(e,t,r,n)}t=t.child}return t;case 5:return wf(t),e===null&&Sa(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,va(r,i)?s=null:l!==null&&va(r,l)&&(t.flags|=32),Hf(e,t),Ne(e,t,s,n),t.child;case 6:return e===null&&Sa(t),null;case 13:return Kf(e,t,n);case 4:return Io(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jr(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),rc(e,t,r,i,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,H(Ml,r._currentValue),r._currentValue=s,l!==null)if(rt(l.value,s)){if(l.children===i.children&&!Me.current){t=Et(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(l.tag===1){u=St(-1,n&-n),u.tag=2;var c=l.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?u.next=u:(u.next=m.next,m.next=u),c.pending=u}}l.lanes|=n,u=l.alternate,u!==null&&(u.lanes|=n),Na(l.return,n,t),a.lanes|=n;break}u=u.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(k(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Na(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}Ne(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,lr(t,n),i=Ve(i),r=r(i),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,i=qe(r,t.pendingProps),i=qe(r.type,i),ic(e,t,r,i,n);case 15:return Qf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qe(r,i),pl(e,t),t.tag=1,Re(r)?(e=!0,Tl(t)):e=!1,lr(t,n),$f(t,r,i),Ca(t,r,i,n),Pa(null,t,r,!0,e,n);case 19:return Yf(e,t,n);case 22:return Bf(e,t,n)}throw Error(k(156,t.tag))};function ch(e,t){return Fd(e,t)}function hv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,r){return new hv(e,t,n,r)}function Yo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pv(e){if(typeof e=="function")return Yo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ho)return 11;if(e===po)return 14}return 2}function en(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function gl(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")Yo(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bn:return _n(n.children,i,l,t);case fo:s=8,i|=8;break;case Ys:return e=Be(12,n,t,i|2),e.elementType=Ys,e.lanes=l,e;case qs:return e=Be(13,n,t,i),e.elementType=qs,e.lanes=l,e;case Gs:return e=Be(19,n,t,i),e.elementType=Gs,e.lanes=l,e;case xd:return is(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gd:s=10;break e;case yd:s=9;break e;case ho:s=11;break e;case po:s=14;break e;case Rt:s=16,r=null;break e}throw Error(k(130,e==null?e:typeof e,""))}return t=Be(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function _n(e,t,n,r){return e=Be(7,e,r,t),e.lanes=n,e}function is(e,t,n,r){return e=Be(22,e,r,t),e.elementType=xd,e.lanes=n,e.stateNode={isHidden:!1},e}function Ws(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function Qs(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=js(0),this.expirationTimes=js(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=js(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qo(e,t,n,r,i,l,s,a,u){return e=new mv(e,t,n,a,u),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Be(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ro(l),e}function vv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ph)}catch(e){console.error(e)}}ph(),hd.exports=Ue;var Sv=hd.exports,yc=Sv;Vs.createRoot=yc.createRoot,Vs.hydrateRoot=yc.hydrateRoot;/** + * @remix-run/router v1.23.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Si(){return Si=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function mh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function jv(){return Math.random().toString(36).substr(2,8)}function wc(e,t){return{usr:e.state,key:e.key,idx:t}}function za(e,t,n,r){return n===void 0&&(n=null),Si({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?_r(t):t,{state:n,key:t&&t.key||r||jv()})}function Wl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function _r(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Cv(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:l=!1}=r,s=i.history,a=Vt.Pop,u=null,c=m();c==null&&(c=0,s.replaceState(Si({},s.state,{idx:c}),""));function m(){return(s.state||{idx:null}).idx}function h(){a=Vt.Pop;let N=m(),f=N==null?null:N-c;c=N,u&&u({action:a,location:w.location,delta:f})}function g(N,f){a=Vt.Push;let d=za(w.location,N,f);c=m()+1;let p=wc(d,c),y=w.createHref(d);try{s.pushState(p,"",y)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(y)}l&&u&&u({action:a,location:w.location,delta:1})}function x(N,f){a=Vt.Replace;let d=za(w.location,N,f);c=m();let p=wc(d,c),y=w.createHref(d);s.replaceState(p,"",y),l&&u&&u({action:a,location:w.location,delta:0})}function S(N){let f=i.location.origin!=="null"?i.location.origin:i.location.href,d=typeof N=="string"?N:Wl(N);return d=d.replace(/ $/,"%20"),ie(f,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,f)}let w={get action(){return a},get location(){return e(i,s)},listen(N){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(xc,h),u=N,()=>{i.removeEventListener(xc,h),u=null}},createHref(N){return t(i,N)},createURL:S,encodeLocation(N){let f=S(N);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:g,replace:x,go(N){return s.go(N)}};return w}var Sc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Sc||(Sc={}));function kv(e,t,n){return n===void 0&&(n="/"),Ev(e,t,n)}function Ev(e,t,n,r){let i=typeof t=="string"?_r(t):t,l=Zo(i.pathname||"/",n);if(l==null)return null;let s=vh(e);Pv(s);let a=null;for(let u=0;a==null&&u{let u={relativePath:a===void 0?l.path||"":a,caseSensitive:l.caseSensitive===!0,childrenIndex:s,route:l};u.relativePath.startsWith("/")&&(ie(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=tn([r,u.relativePath]),m=n.concat(u);l.children&&l.children.length>0&&(ie(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),vh(l.children,t,m,c)),!(l.path==null&&!l.index)&&t.push({path:c,score:Dv(c,l.index),routesMeta:m})};return e.forEach((l,s)=>{var a;if(l.path===""||!((a=l.path)!=null&&a.includes("?")))i(l,s);else for(let u of gh(l.path))i(l,s,u)}),t}function gh(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),l=n.replace(/\?$/,"");if(r.length===0)return i?[l,""]:[l];let s=gh(r.join("/")),a=[];return a.push(...s.map(u=>u===""?l:[l,u].join("/"))),i&&a.push(...s),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function Pv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Lv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Tv=/^:[\w-]+$/,Ov=3,_v=2,Mv=1,Rv=10,Iv=-2,Nc=e=>e==="*";function Dv(e,t){let n=e.split("/"),r=n.length;return n.some(Nc)&&(r+=Iv),t&&(r+=_v),n.filter(i=>!Nc(i)).reduce((i,l)=>i+(Tv.test(l)?Ov:l===""?Mv:Rv),r)}function Lv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Fv(e,t,n){let{routesMeta:r}=e,i={},l="/",s=[];for(let a=0;a{let{paramName:g,isOptional:x}=m;if(g==="*"){let w=a[h]||"";s=l.slice(0,l.length-w.length).replace(/(.)\/+$/,"$1")}const S=a[h];return x&&!S?c[g]=void 0:c[g]=(S||"").replace(/%2F/g,"/"),c},{}),pathname:l,pathnameBase:s,pattern:e}}function Uv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),mh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function zv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return mh(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Zo(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $v(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?_r(e):e;return{pathname:n?n.startsWith("/")?n:Av(n,t):t,search:Bv(r),hash:Hv(i)}}function Av(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Bs(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Wv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yh(e,t){let n=Wv(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xh(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=_r(e):(i=Si({},e),ie(!i.pathname||!i.pathname.includes("?"),Bs("?","pathname","search",i)),ie(!i.pathname||!i.pathname.includes("#"),Bs("#","pathname","hash",i)),ie(!i.search||!i.search.includes("#"),Bs("#","search","hash",i)));let l=e===""||i.pathname==="",s=l?"/":i.pathname,a;if(s==null)a=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}a=h>=0?t[h]:"/"}let u=$v(i,a),c=s&&s!=="/"&&s.endsWith("/"),m=(l||s===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||m)&&(u.pathname+="/"),u}const tn=e=>e.join("/").replace(/\/\/+/g,"/"),Qv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Hv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wh=["post","put","patch","delete"];new Set(wh);const Kv=["get",...wh];new Set(Kv);/** + * React Router v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Ni(){return Ni=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),j.useCallback(function(c,m){if(m===void 0&&(m={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let h=xh(c,JSON.parse(s),l,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:tn([t,h.pathname])),(m.replace?r.replace:r.push)(h,m.state,m)},[t,r,s,l,e])}function nu(){let{matches:e}=j.useContext(un),t=e[e.length-1];return t?t.params:{}}function jh(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=j.useContext($n),{matches:i}=j.useContext(un),{pathname:l}=Mr(),s=JSON.stringify(yh(i,r.v7_relativeSplatPath));return j.useMemo(()=>xh(e,JSON.parse(s),l,n==="path"),[e,s,l,n])}function Xv(e,t){return Jv(e,t)}function Jv(e,t,n,r){Li()||ie(!1);let{navigator:i}=j.useContext($n),{matches:l}=j.useContext(un),s=l[l.length-1],a=s?s.params:{};s&&s.pathname;let u=s?s.pathnameBase:"/";s&&s.route;let c=Mr(),m;if(t){var h;let N=typeof t=="string"?_r(t):t;u==="/"||(h=N.pathname)!=null&&h.startsWith(u)||ie(!1),m=N}else m=c;let g=m.pathname||"/",x=g;if(u!=="/"){let N=u.replace(/^\//,"").split("/");x="/"+g.replace(/^\//,"").split("/").slice(N.length).join("/")}let S=kv(e,{pathname:x}),w=rg(S&&S.map(N=>Object.assign({},N,{params:Object.assign({},a,N.params),pathname:tn([u,i.encodeLocation?i.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?u:tn([u,i.encodeLocation?i.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),l,n,r);return t&&w?j.createElement(us.Provider,{value:{location:Ni({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:Vt.Pop}},w):w}function Zv(){let e=ag(),t=Vv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:i},n):null,null)}const eg=j.createElement(Zv,null);class tg extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?j.createElement(un.Provider,{value:this.props.routeContext},j.createElement(Sh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ng(e){let{routeContext:t,match:n,children:r}=e,i=j.useContext(eu);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),j.createElement(un.Provider,{value:t},r)}function rg(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var l;if(!n)return null;if(n.errors)e=n.matches;else if((l=r)!=null&&l.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let m=s.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);m>=0||ie(!1),s=s.slice(0,Math.min(s.length,m+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m=0?s=s.slice(0,c+1):s=[s[0]];break}}}return s.reduceRight((m,h,g)=>{let x,S=!1,w=null,N=null;n&&(x=a&&h.route.id?a[h.route.id]:void 0,w=h.route.errorElement||eg,u&&(c<0&&g===0?(ug("route-fallback"),S=!0,N=null):c===g&&(S=!0,N=h.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,g+1)),d=()=>{let p;return x?p=w:S?p=N:h.route.Component?p=j.createElement(h.route.Component,null):h.route.element?p=h.route.element:p=m,j.createElement(ng,{match:h,routeContext:{outlet:m,matches:f,isDataRoute:n!=null},children:p})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?j.createElement(tg,{location:n.location,revalidation:n.revalidation,component:w,error:x,children:d(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):d()},null)}var Ch=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ch||{}),kh=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(kh||{});function ig(e){let t=j.useContext(eu);return t||ie(!1),t}function lg(e){let t=j.useContext(Yv);return t||ie(!1),t}function sg(e){let t=j.useContext(un);return t||ie(!1),t}function Eh(e){let t=sg(),n=t.matches[t.matches.length-1];return n.route.id||ie(!1),n.route.id}function ag(){var e;let t=j.useContext(Sh),n=lg(),r=Eh();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function og(){let{router:e}=ig(Ch.UseNavigateStable),t=Eh(kh.UseNavigateStable),n=j.useRef(!1);return Nh(()=>{n.current=!0}),j.useCallback(function(i,l){l===void 0&&(l={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ni({fromRouteId:t},l)))},[e,t])}const jc={};function ug(e,t,n){jc[e]||(jc[e]=!0)}function cg(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function _t(e){ie(!1)}function dg(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Vt.Pop,navigator:l,static:s=!1,future:a}=e;Li()&&ie(!1);let u=t.replace(/^\/*/,"/"),c=j.useMemo(()=>({basename:u,navigator:l,static:s,future:Ni({v7_relativeSplatPath:!1},a)}),[u,a,l,s]);typeof r=="string"&&(r=_r(r));let{pathname:m="/",search:h="",hash:g="",state:x=null,key:S="default"}=r,w=j.useMemo(()=>{let N=Zo(m,u);return N==null?null:{location:{pathname:N,search:h,hash:g,state:x,key:S},navigationType:i}},[u,m,h,g,x,S,i]);return w==null?null:j.createElement($n.Provider,{value:c},j.createElement(us.Provider,{children:n,value:w}))}function fg(e){let{children:t,location:n}=e;return Xv($a(t),n)}new Promise(()=>{});function $a(e,t){t===void 0&&(t=[]);let n=[];return j.Children.forEach(e,(r,i)=>{if(!j.isValidElement(r))return;let l=[...t,i];if(r.type===j.Fragment){n.push.apply(n,$a(r.props.children,l));return}r.type!==_t&&ie(!1),!r.props.index||!r.props.children||ie(!1);let s={id:r.props.id||l.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=$a(r.props.children,l)),n.push(s)}),n}/** + * React Router DOM v6.30.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Aa(){return Aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function pg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function mg(e,t){return e.button===0&&(!t||t==="_self")&&!pg(e)}function Wa(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function vg(e,t){let n=Wa(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(l=>{n.append(i,l)})}),n}const gg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],yg="6";try{window.__reactRouterVersion=yg}catch{}const xg="startTransition",Cc=cp[xg];function wg(e){let{basename:t,children:n,future:r,window:i}=e,l=j.useRef();l.current==null&&(l.current=Nv({window:i,v5Compat:!0}));let s=l.current,[a,u]=j.useState({action:s.action,location:s.location}),{v7_startTransition:c}=r||{},m=j.useCallback(h=>{c&&Cc?Cc(()=>u(h)):u(h)},[u,c]);return j.useLayoutEffect(()=>s.listen(m),[s,m]),j.useEffect(()=>cg(r),[r]),j.createElement(dg,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const Sg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ng=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ft=j.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:l,replace:s,state:a,target:u,to:c,preventScrollReset:m,viewTransition:h}=t,g=hg(t,gg),{basename:x}=j.useContext($n),S,w=!1;if(typeof c=="string"&&Ng.test(c)&&(S=c,Sg))try{let p=new URL(window.location.href),y=c.startsWith("//")?new URL(p.protocol+c):new URL(c),C=Zo(y.pathname,x);y.origin===p.origin&&C!=null?c=C+y.search+y.hash:w=!0}catch{}let N=qv(c,{relative:i}),f=jg(c,{replace:s,state:a,target:u,preventScrollReset:m,relative:i,viewTransition:h});function d(p){r&&r(p),p.defaultPrevented||f(p)}return j.createElement("a",Aa({},g,{href:S||N,onClick:w||l?r:d,ref:n,target:u}))});var kc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(kc||(kc={}));var Ec;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ec||(Ec={}));function jg(e,t){let{target:n,replace:r,state:i,preventScrollReset:l,relative:s,viewTransition:a}=t===void 0?{}:t,u=tu(),c=Mr(),m=jh(e,{relative:s});return j.useCallback(h=>{if(mg(h,n)){h.preventDefault();let g=r!==void 0?r:Wl(c)===Wl(m);u(e,{replace:g,state:i,preventScrollReset:l,relative:s,viewTransition:a})}},[c,u,m,r,i,n,e,l,s,a])}function ru(e){let t=j.useRef(Wa(e)),n=j.useRef(!1),r=Mr(),i=j.useMemo(()=>vg(r.search,n.current?null:t.current),[r.search]),l=tu(),s=j.useCallback((a,u)=>{const c=Wa(typeof a=="function"?a(i):a);n.current=!0,l("?"+c,u)},[l,i]);return[i,s]}var Fi=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(){}},Cg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ft,ro,Hc,kg=(Hc=class{constructor(){I(this,Ft,Cg);I(this,ro,!1)}setTimeoutProvider(e){_(this,Ft,e)}setTimeout(e,t){return v(this,Ft).setTimeout(e,t)}clearTimeout(e){v(this,Ft).clearTimeout(e)}setInterval(e,t){return v(this,Ft).setInterval(e,t)}clearInterval(e){v(this,Ft).clearInterval(e)}},Ft=new WeakMap,ro=new WeakMap,Hc),xn=new kg;function Eg(e){setTimeout(e,0)}var Fn=typeof window>"u"||"Deno"in globalThis;function Te(){}function Pg(e,t){return typeof e=="function"?e(t):e}function Qa(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ph(e,t){return Math.max(e+(t||0)-Date.now(),0)}function nn(e,t){return typeof e=="function"?e(t):e}function Ae(e,t){return typeof e=="function"?e(t):e}function Pc(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:l,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==iu(s,t.options))return!1}else if(!Ci(t.queryKey,s))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||l&&!l(t))}function Tc(e,t){const{exact:n,status:r,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(ji(t.options.mutationKey)!==ji(l))return!1}else if(!Ci(t.options.mutationKey,l))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function iu(e,t){return((t==null?void 0:t.queryKeyHashFn)||ji)(e)}function ji(e){return JSON.stringify(e,(t,n)=>Ha(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ci(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ci(e[n],t[n])):!1}var Tg=Object.prototype.hasOwnProperty;function Th(e,t){if(e===t)return e;const n=Oc(e)&&Oc(t);if(!n&&!(Ha(e)&&Ha(t)))return t;const i=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),s=l.length,a=n?new Array(s):{};let u=0;for(let c=0;c{xn.setTimeout(t,e)})}function Va(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Th(e,t):t}function _g(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Mg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var lu=Symbol();function Oh(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lu?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Rg(e,t){return typeof e=="function"?e(...t):!!e}var wn,bt,or,Vc,Ig=(Vc=class extends Fi{constructor(){super();I(this,wn);I(this,bt);I(this,or);_(this,or,t=>{if(!Fn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){v(this,bt)||this.setEventListener(v(this,or))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,bt))==null||t.call(this),_(this,bt,void 0))}setEventListener(t){var n;_(this,or,t),(n=v(this,bt))==null||n.call(this),_(this,bt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){v(this,wn)!==t&&(_(this,wn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof v(this,wn)=="boolean"?v(this,wn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wn=new WeakMap,bt=new WeakMap,or=new WeakMap,Vc),su=new Ig;function Ka(){let e,t;const n=new Promise((i,l)=>{e=i,t=l});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Dg=Eg;function Lg(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=Dg;const l=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(u=>{n(u)})})})};return{batch:a=>{let u;t++;try{u=a()}finally{t--,t||s()}return u},batchCalls:a=>(...u)=>{l(()=>{a(...u)})},schedule:l,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var fe=Lg(),ur,Ut,cr,Kc,Fg=(Kc=class extends Fi{constructor(){super();I(this,ur,!0);I(this,Ut);I(this,cr);_(this,cr,t=>{if(!Fn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){v(this,Ut)||this.setEventListener(v(this,cr))}onUnsubscribe(){var t;this.hasListeners()||((t=v(this,Ut))==null||t.call(this),_(this,Ut,void 0))}setEventListener(t){var n;_(this,cr,t),(n=v(this,Ut))==null||n.call(this),_(this,Ut,t(this.setOnline.bind(this)))}setOnline(t){v(this,ur)!==t&&(_(this,ur,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return v(this,ur)}},ur=new WeakMap,Ut=new WeakMap,cr=new WeakMap,Kc),Ql=new Fg;function bg(e){return Math.min(1e3*2**e,3e4)}function _h(e){return(e??"online")==="online"?Ql.isOnline():!0}var Ya=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mh(e){let t=!1,n=0,r;const i=Ka(),l=()=>i.status!=="pending",s=w=>{var N;if(!l()){const f=new Ya(w);g(f),(N=e.onCancel)==null||N.call(e,f)}},a=()=>{t=!0},u=()=>{t=!1},c=()=>su.isFocused()&&(e.networkMode==="always"||Ql.isOnline())&&e.canRun(),m=()=>_h(e.networkMode)&&e.canRun(),h=w=>{l()||(r==null||r(),i.resolve(w))},g=w=>{l()||(r==null||r(),i.reject(w))},x=()=>new Promise(w=>{var N;r=f=>{(l()||c())&&w(f)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;r=void 0,l()||(w=e.onContinue)==null||w.call(e)}),S=()=>{if(l())return;let w;const N=n===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(f){w=Promise.reject(f)}Promise.resolve(w).then(h).catch(f=>{var E;if(l())return;const d=e.retry??(Fn?0:3),p=e.retryDelay??bg,y=typeof p=="function"?p(n,f):p,C=d===!0||typeof d=="number"&&nc()?void 0:x()).then(()=>{t?g(f):S()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:u,canStart:m,start:()=>(m()?S():x().then(S),i)}}var Sn,Yc,Rh=(Yc=class{constructor(){I(this,Sn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qa(this.gcTime)&&_(this,Sn,xn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Fn?1/0:5*60*1e3))}clearGcTimeout(){v(this,Sn)&&(xn.clearTimeout(v(this,Sn)),_(this,Sn,void 0))}},Sn=new WeakMap,Yc),Nn,dr,$e,jn,oe,ki,Cn,Ge,pt,qc,Ug=(qc=class extends Rh{constructor(t){super();I(this,Ge);I(this,Nn);I(this,dr);I(this,$e);I(this,jn);I(this,oe);I(this,ki);I(this,Cn);_(this,Cn,!1),_(this,ki,t.defaultOptions),this.setOptions(t.options),this.observers=[],_(this,jn,t.client),_(this,$e,v(this,jn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,_(this,Nn,Mc(this.options)),this.state=t.state??v(this,Nn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=v(this,oe))==null?void 0:t.promise}setOptions(t){if(this.options={...v(this,ki),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mc(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),_(this,Nn,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&v(this,$e).remove(this)}setData(t,n){const r=Va(this.state.data,t,this.options);return U(this,Ge,pt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){U(this,Ge,pt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=v(this,oe))==null?void 0:r.promise;return(i=v(this,oe))==null||i.cancel(t),n?n.then(Te).catch(Te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(v(this,Nn))}isActive(){return this.observers.some(t=>Ae(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lu||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>nn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ph(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,oe))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=v(this,oe))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),v(this,$e).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(v(this,oe)&&(v(this,Cn)?v(this,oe).cancel({revert:!0}):v(this,oe).cancelRetry()),this.scheduleGc()),v(this,$e).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||U(this,Ge,pt).call(this,{type:"invalidate"})}async fetch(t,n){var u,c,m,h,g,x,S,w,N,f,d,p;if(this.state.fetchStatus!=="idle"&&((u=v(this,oe))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(v(this,oe))return v(this,oe).continueRetry(),v(this,oe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(C=>C.options.queryFn);y&&this.setOptions(y.options)}const r=new AbortController,i=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(_(this,Cn,!0),r.signal)})},l=()=>{const y=Oh(this.options,n),E=(()=>{const O={client:v(this,jn),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return _(this,Cn,!1),this.options.persister?this.options.persister(y,E,this):y(E)},a=(()=>{const y={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:v(this,jn),state:this.state,fetchFn:l};return i(y),y})();(c=this.options.behavior)==null||c.onFetch(a,this),_(this,dr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=a.fetchOptions)==null?void 0:m.meta))&&U(this,Ge,pt).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta}),_(this,oe,Mh({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:y=>{y instanceof Ya&&y.revert&&this.setState({...v(this,dr),fetchStatus:"idle"}),r.abort()},onFail:(y,C)=>{U(this,Ge,pt).call(this,{type:"failed",failureCount:y,error:C})},onPause:()=>{U(this,Ge,pt).call(this,{type:"pause"})},onContinue:()=>{U(this,Ge,pt).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const y=await v(this,oe).start();if(y===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(y),(x=(g=v(this,$e).config).onSuccess)==null||x.call(g,y,this),(w=(S=v(this,$e).config).onSettled)==null||w.call(S,y,this.state.error,this),y}catch(y){if(y instanceof Ya){if(y.silent)return v(this,oe).promise;if(y.revert){if(this.state.data===void 0)throw y;return this.state.data}}throw U(this,Ge,pt).call(this,{type:"error",error:y}),(f=(N=v(this,$e).config).onError)==null||f.call(N,y,this),(p=(d=v(this,$e).config).onSettled)==null||p.call(d,this.state.data,y,this),y}finally{this.scheduleGc()}}},Nn=new WeakMap,dr=new WeakMap,$e=new WeakMap,jn=new WeakMap,oe=new WeakMap,ki=new WeakMap,Cn=new WeakMap,Ge=new WeakSet,pt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ih(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return _(this,dr,t.manual?i:void 0),i;case"error":const l=t.error;return{...r,error:l,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),v(this,$e).notify({query:this,type:"updated",action:t})})},qc);function Ih(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_h(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Mc(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Pe,z,Ei,we,kn,fr,gt,zt,Pi,hr,pr,En,Pn,$t,mr,W,Yr,qa,Ga,Xa,Ja,Za,eo,to,Dh,Gc,zg=(Gc=class extends Fi{constructor(t,n){super();I(this,W);I(this,Pe);I(this,z);I(this,Ei);I(this,we);I(this,kn);I(this,fr);I(this,gt);I(this,zt);I(this,Pi);I(this,hr);I(this,pr);I(this,En);I(this,Pn);I(this,$t);I(this,mr,new Set);this.options=n,_(this,Pe,t),_(this,zt,null),_(this,gt,Ka()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(v(this,z).addObserver(this),Rc(v(this,z),this.options)?U(this,W,Yr).call(this):this.updateResult(),U(this,W,Ja).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return no(v(this,z),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return no(v(this,z),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,U(this,W,Za).call(this),U(this,W,eo).call(this),v(this,z).removeObserver(this)}setOptions(t){const n=this.options,r=v(this,z);if(this.options=v(this,Pe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ae(this.options.enabled,v(this,z))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");U(this,W,to).call(this),v(this,z).setOptions(this.options),n._defaulted&&!Ba(this.options,n)&&v(this,Pe).getQueryCache().notify({type:"observerOptionsUpdated",query:v(this,z),observer:this});const i=this.hasListeners();i&&Ic(v(this,z),r,this.options,n)&&U(this,W,Yr).call(this),this.updateResult(),i&&(v(this,z)!==r||Ae(this.options.enabled,v(this,z))!==Ae(n.enabled,v(this,z))||nn(this.options.staleTime,v(this,z))!==nn(n.staleTime,v(this,z)))&&U(this,W,qa).call(this);const l=U(this,W,Ga).call(this);i&&(v(this,z)!==r||Ae(this.options.enabled,v(this,z))!==Ae(n.enabled,v(this,z))||l!==v(this,$t))&&U(this,W,Xa).call(this,l)}getOptimisticResult(t){const n=v(this,Pe).getQueryCache().build(v(this,Pe),t),r=this.createResult(n,t);return Ag(this,r)&&(_(this,we,r),_(this,fr,this.options),_(this,kn,v(this,z).state)),r}getCurrentResult(){return v(this,we)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&v(this,gt).status==="pending"&&v(this,gt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){v(this,mr).add(t)}getCurrentQuery(){return v(this,z)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=v(this,Pe).defaultQueryOptions(t),r=v(this,Pe).getQueryCache().build(v(this,Pe),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return U(this,W,Yr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),v(this,we)))}createResult(t,n){var A;const r=v(this,z),i=this.options,l=v(this,we),s=v(this,kn),a=v(this,fr),c=t!==r?t.state:v(this,Ei),{state:m}=t;let h={...m},g=!1,x;if(n._optimisticResults){const T=this.hasListeners(),L=!T&&Rc(t,n),ee=T&&Ic(t,r,n,i);(L||ee)&&(h={...h,...Ih(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:S,errorUpdatedAt:w,status:N}=h;x=h.data;let f=!1;if(n.placeholderData!==void 0&&x===void 0&&N==="pending"){let T;l!=null&&l.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(T=l.data,f=!0):T=typeof n.placeholderData=="function"?n.placeholderData((A=v(this,pr))==null?void 0:A.state.data,v(this,pr)):n.placeholderData,T!==void 0&&(N="success",x=Va(l==null?void 0:l.data,T,n),g=!0)}if(n.select&&x!==void 0&&!f)if(l&&x===(s==null?void 0:s.data)&&n.select===v(this,Pi))x=v(this,hr);else try{_(this,Pi,n.select),x=n.select(x),x=Va(l==null?void 0:l.data,x,n),_(this,hr,x),_(this,zt,null)}catch(T){_(this,zt,T)}v(this,zt)&&(S=v(this,zt),x=v(this,hr),w=Date.now(),N="error");const d=h.fetchStatus==="fetching",p=N==="pending",y=N==="error",C=p&&d,E=x!==void 0,P={status:N,fetchStatus:h.fetchStatus,isPending:p,isSuccess:N==="success",isError:y,isInitialLoading:C,isLoading:C,data:x,dataUpdatedAt:h.dataUpdatedAt,error:S,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:d,isRefetching:d&&!p,isLoadingError:y&&!E,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:y&&E,isStale:au(t,n),refetch:this.refetch,promise:v(this,gt),isEnabled:Ae(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=xe=>{P.status==="error"?xe.reject(P.error):P.data!==void 0&&xe.resolve(P.data)},L=()=>{const xe=_(this,gt,P.promise=Ka());T(xe)},ee=v(this,gt);switch(ee.status){case"pending":t.queryHash===r.queryHash&&T(ee);break;case"fulfilled":(P.status==="error"||P.data!==ee.value)&&L();break;case"rejected":(P.status!=="error"||P.error!==ee.reason)&&L();break}}return P}updateResult(){const t=v(this,we),n=this.createResult(v(this,z),this.options);if(_(this,kn,v(this,z).state),_(this,fr,this.options),v(this,kn).data!==void 0&&_(this,pr,v(this,z)),Ba(n,t))return;_(this,we,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!v(this,mr).size)return!0;const s=new Set(l??v(this,mr));return this.options.throwOnError&&s.add("error"),Object.keys(v(this,we)).some(a=>{const u=a;return v(this,we)[u]!==t[u]&&s.has(u)})};U(this,W,Dh).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&U(this,W,Ja).call(this)}},Pe=new WeakMap,z=new WeakMap,Ei=new WeakMap,we=new WeakMap,kn=new WeakMap,fr=new WeakMap,gt=new WeakMap,zt=new WeakMap,Pi=new WeakMap,hr=new WeakMap,pr=new WeakMap,En=new WeakMap,Pn=new WeakMap,$t=new WeakMap,mr=new WeakMap,W=new WeakSet,Yr=function(t){U(this,W,to).call(this);let n=v(this,z).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Te)),n},qa=function(){U(this,W,Za).call(this);const t=nn(this.options.staleTime,v(this,z));if(Fn||v(this,we).isStale||!Qa(t))return;const r=Ph(v(this,we).dataUpdatedAt,t)+1;_(this,En,xn.setTimeout(()=>{v(this,we).isStale||this.updateResult()},r))},Ga=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(v(this,z)):this.options.refetchInterval)??!1},Xa=function(t){U(this,W,eo).call(this),_(this,$t,t),!(Fn||Ae(this.options.enabled,v(this,z))===!1||!Qa(v(this,$t))||v(this,$t)===0)&&_(this,Pn,xn.setInterval(()=>{(this.options.refetchIntervalInBackground||su.isFocused())&&U(this,W,Yr).call(this)},v(this,$t)))},Ja=function(){U(this,W,qa).call(this),U(this,W,Xa).call(this,U(this,W,Ga).call(this))},Za=function(){v(this,En)&&(xn.clearTimeout(v(this,En)),_(this,En,void 0))},eo=function(){v(this,Pn)&&(xn.clearInterval(v(this,Pn)),_(this,Pn,void 0))},to=function(){const t=v(this,Pe).getQueryCache().build(v(this,Pe),this.options);if(t===v(this,z))return;const n=v(this,z);_(this,z,t),_(this,Ei,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Dh=function(t){fe.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(v(this,we))}),v(this,Pe).getQueryCache().notify({query:v(this,z),type:"observerResultsUpdated"})})},Gc);function $g(e,t){return Ae(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rc(e,t){return $g(e,t)||e.state.data!==void 0&&no(e,t,t.refetchOnMount)}function no(e,t,n){if(Ae(t.enabled,e)!==!1&&nn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&au(e,t)}return!1}function Ic(e,t,n,r){return(e!==t||Ae(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&au(e,n)}function au(e,t){return Ae(t.enabled,e)!==!1&&e.isStaleByTime(nn(t.staleTime,e))}function Ag(e,t){return!Ba(e.getCurrentResult(),t)}function Dc(e){return{onFetch:(t,n)=>{var m,h,g,x,S;const r=t.options,i=(g=(h=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,l=((x=t.state.data)==null?void 0:x.pages)||[],s=((S=t.state.data)==null?void 0:S.pageParams)||[];let a={pages:[],pageParams:[]},u=0;const c=async()=>{let w=!1;const N=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?w=!0:t.signal.addEventListener("abort",()=>{w=!0}),t.signal)})},f=Oh(t.options,t.fetchOptions),d=async(p,y,C)=>{if(w)return Promise.reject();if(y==null&&p.pages.length)return Promise.resolve(p);const O=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:y,direction:C?"backward":"forward",meta:t.options.meta};return N(L),L})(),P=await f(O),{maxPages:A}=t.options,T=C?Mg:_g;return{pages:T(p.pages,P,A),pageParams:T(p.pageParams,y,A)}};if(i&&l.length){const p=i==="backward",y=p?Wg:Lc,C={pages:l,pageParams:s},E=y(r,C);a=await d(C,E,p)}else{const p=e??l.length;do{const y=u===0?s[0]??r.initialPageParam:Lc(r,a);if(u>0&&y==null)break;a=await d(a,y),u++}while(u{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function Lc(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Wg(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Ti,st,Se,Tn,at,Mt,Xc,Qg=(Xc=class extends Rh{constructor(t){super();I(this,at);I(this,Ti);I(this,st);I(this,Se);I(this,Tn);_(this,Ti,t.client),this.mutationId=t.mutationId,_(this,Se,t.mutationCache),_(this,st,[]),this.state=t.state||Bg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){v(this,st).includes(t)||(v(this,st).push(t),this.clearGcTimeout(),v(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){_(this,st,v(this,st).filter(n=>n!==t)),this.scheduleGc(),v(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){v(this,st).length||(this.state.status==="pending"?this.scheduleGc():v(this,Se).remove(this))}continue(){var t;return((t=v(this,Tn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,u,c,m,h,g,x,S,w,N,f,d,p,y,C,E,O,P,A;const n=()=>{U(this,at,Mt).call(this,{type:"continue"})},r={client:v(this,Ti),meta:this.options.meta,mutationKey:this.options.mutationKey};_(this,Tn,Mh({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,L)=>{U(this,at,Mt).call(this,{type:"failed",failureCount:T,error:L})},onPause:()=>{U(this,at,Mt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>v(this,Se).canRun(this)}));const i=this.state.status==="pending",l=!v(this,Tn).canStart();try{if(i)n();else{U(this,at,Mt).call(this,{type:"pending",variables:t,isPaused:l}),await((a=(s=v(this,Se).config).onMutate)==null?void 0:a.call(s,t,this,r));const L=await((c=(u=this.options).onMutate)==null?void 0:c.call(u,t,r));L!==this.state.context&&U(this,at,Mt).call(this,{type:"pending",context:L,variables:t,isPaused:l})}const T=await v(this,Tn).start();return await((h=(m=v(this,Se).config).onSuccess)==null?void 0:h.call(m,T,t,this.state.context,this,r)),await((x=(g=this.options).onSuccess)==null?void 0:x.call(g,T,t,this.state.context,r)),await((w=(S=v(this,Se).config).onSettled)==null?void 0:w.call(S,T,null,this.state.variables,this.state.context,this,r)),await((f=(N=this.options).onSettled)==null?void 0:f.call(N,T,null,t,this.state.context,r)),U(this,at,Mt).call(this,{type:"success",data:T}),T}catch(T){try{throw await((p=(d=v(this,Se).config).onError)==null?void 0:p.call(d,T,t,this.state.context,this,r)),await((C=(y=this.options).onError)==null?void 0:C.call(y,T,t,this.state.context,r)),await((O=(E=v(this,Se).config).onSettled)==null?void 0:O.call(E,void 0,T,this.state.variables,this.state.context,this,r)),await((A=(P=this.options).onSettled)==null?void 0:A.call(P,void 0,T,t,this.state.context,r)),T}finally{U(this,at,Mt).call(this,{type:"error",error:T})}}finally{v(this,Se).runNext(this)}}},Ti=new WeakMap,st=new WeakMap,Se=new WeakMap,Tn=new WeakMap,at=new WeakSet,Mt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),fe.batch(()=>{v(this,st).forEach(r=>{r.onMutationUpdate(t)}),v(this,Se).notify({mutation:this,type:"updated",action:t})})},Xc);function Bg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var yt,Xe,Oi,Jc,Hg=(Jc=class extends Fi{constructor(t={}){super();I(this,yt);I(this,Xe);I(this,Oi);this.config=t,_(this,yt,new Set),_(this,Xe,new Map),_(this,Oi,0)}build(t,n,r){const i=new Qg({client:t,mutationCache:this,mutationId:++$i(this,Oi)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){v(this,yt).add(t);const n=il(t);if(typeof n=="string"){const r=v(this,Xe).get(n);r?r.push(t):v(this,Xe).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(v(this,yt).delete(t)){const n=il(t);if(typeof n=="string"){const r=v(this,Xe).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&v(this,Xe).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=il(t);if(typeof n=="string"){const r=v(this,Xe).get(n),i=r==null?void 0:r.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=il(t);if(typeof n=="string"){const i=(r=v(this,Xe).get(n))==null?void 0:r.find(l=>l!==t&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){fe.batch(()=>{v(this,yt).forEach(t=>{this.notify({type:"removed",mutation:t})}),v(this,yt).clear(),v(this,Xe).clear()})}getAll(){return Array.from(v(this,yt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Tc(n,r))}findAll(t={}){return this.getAll().filter(n=>Tc(t,n))}notify(t){fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return fe.batch(()=>Promise.all(t.map(n=>n.continue().catch(Te))))}},yt=new WeakMap,Xe=new WeakMap,Oi=new WeakMap,Jc);function il(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ot,Zc,Vg=(Zc=class extends Fi{constructor(t={}){super();I(this,ot);this.config=t,_(this,ot,new Map)}build(t,n,r){const i=n.queryKey,l=n.queryHash??iu(i,n);let s=this.get(l);return s||(s=new Ug({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){v(this,ot).has(t.queryHash)||(v(this,ot).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=v(this,ot).get(t.queryHash);n&&(t.destroy(),n===t&&v(this,ot).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){fe.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return v(this,ot).get(t)}getAll(){return[...v(this,ot).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Pc(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Pc(t,r)):n}notify(t){fe.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){fe.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){fe.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ot=new WeakMap,Zc),J,At,Wt,vr,gr,Qt,yr,xr,ed,Kg=(ed=class{constructor(e={}){I(this,J);I(this,At);I(this,Wt);I(this,vr);I(this,gr);I(this,Qt);I(this,yr);I(this,xr);_(this,J,e.queryCache||new Vg),_(this,At,e.mutationCache||new Hg),_(this,Wt,e.defaultOptions||{}),_(this,vr,new Map),_(this,gr,new Map),_(this,Qt,0)}mount(){$i(this,Qt)._++,v(this,Qt)===1&&(_(this,yr,su.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,J).onFocus())})),_(this,xr,Ql.subscribe(async e=>{e&&(await this.resumePausedMutations(),v(this,J).onOnline())})))}unmount(){var e,t;$i(this,Qt)._--,v(this,Qt)===0&&((e=v(this,yr))==null||e.call(this),_(this,yr,void 0),(t=v(this,xr))==null||t.call(this),_(this,xr,void 0))}isFetching(e){return v(this,J).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return v(this,At).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=v(this,J).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=v(this,J).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(nn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return v(this,J).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=v(this,J).get(r.queryHash),l=i==null?void 0:i.state.data,s=Pg(t,l);if(s!==void 0)return v(this,J).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return fe.batch(()=>v(this,J).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=v(this,J).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=v(this,J);fe.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=v(this,J);return fe.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=fe.batch(()=>v(this,J).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Te).catch(Te)}invalidateQueries(e,t={}){return fe.batch(()=>(v(this,J).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=fe.batch(()=>v(this,J).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,n);return n.throwOnError||(l=l.catch(Te)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(r).then(Te)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=v(this,J).build(this,t);return n.isStaleByTime(nn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Te).catch(Te)}fetchInfiniteQuery(e){return e.behavior=Dc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Te).catch(Te)}ensureInfiniteQueryData(e){return e.behavior=Dc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ql.isOnline()?v(this,At).resumePausedMutations():Promise.resolve()}getQueryCache(){return v(this,J)}getMutationCache(){return v(this,At)}getDefaultOptions(){return v(this,Wt)}setDefaultOptions(e){_(this,Wt,e)}setQueryDefaults(e,t){v(this,vr).set(ji(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...v(this,vr).values()],n={};return t.forEach(r=>{Ci(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){v(this,gr).set(ji(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...v(this,gr).values()],n={};return t.forEach(r=>{Ci(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...v(this,Wt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=iu(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===lu&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...v(this,Wt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){v(this,J).clear(),v(this,At).clear()}},J=new WeakMap,At=new WeakMap,Wt=new WeakMap,vr=new WeakMap,gr=new WeakMap,Qt=new WeakMap,yr=new WeakMap,xr=new WeakMap,ed),Lh=j.createContext(void 0),Yg=e=>{const t=j.useContext(Lh);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},qg=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(Lh.Provider,{value:e,children:t})),Fh=j.createContext(!1),Gg=()=>j.useContext(Fh);Fh.Provider;function Xg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jg=j.createContext(Xg()),Zg=()=>j.useContext(Jg),ey=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ty=e=>{j.useEffect(()=>{e.clearReset()},[e])},ny=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Rg(n,[e.error,r])),ry=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iy=(e,t)=>e.isLoading&&e.isFetching&&!t,ly=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Fc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sy(e,t,n){var h,g,x,S,w;const r=Gg(),i=Zg(),l=Yg(),s=l.defaultQueryOptions(e);(g=(h=l.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||g.call(h,s),s._optimisticResults=r?"isRestoring":"optimistic",ry(s),ey(s,i),ty(i);const a=!l.getQueryCache().get(s.queryHash),[u]=j.useState(()=>new t(l,s)),c=u.getOptimisticResult(s),m=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(N=>{const f=m?u.subscribe(fe.batchCalls(N)):Te;return u.updateResult(),f},[u,m]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(s)},[s,u]),ly(s,c))throw Fc(s,u,i);if(ny({result:c,errorResetBoundary:i,throwOnError:s.throwOnError,query:l.getQueryCache().get(s.queryHash),suspense:s.suspense}))throw c.error;if((S=(x=l.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||S.call(x,s,c),s.experimental_prefetchInRender&&!Fn&&iy(c,r)){const N=a?Fc(s,u,i):(w=l.getQueryCache().get(s.queryHash))==null?void 0:w.promise;N==null||N.catch(Te).finally(()=>{u.updateResult()})}return s.notifyOnChangeProps?c:u.trackResult(c)}function Nt(e,t){return sy(e,zg)}const ay=` + query ListProjects($page: Int, $pageSize: Int) { + projects(page: $page, pageSize: $pageSize) { + id + name + description + createdAt + updatedAt + } + } +`,oy=` + query ListExperiments($projectId: String!, $page: Int, $pageSize: Int) { + experiments(projectId: $projectId, page: $page, pageSize: $pageSize) { + id + projectId + name + description + meta + createdAt + updatedAt + } + } +`,uy=` + query GetExperiment($id: String!) { + experiment(id: $id) { + id + projectId + name + description + meta + createdAt + updatedAt + } + } +`,cy=` + query ListTrials($experimentId: String!, $page: Int, $pageSize: Int) { + trials(experimentId: $experimentId, page: $page, pageSize: $pageSize) { + id + experimentId + projectId + name + description + meta + params + duration + status + createdAt + updatedAt + } + } +`,dy=` + query GetTrial($id: String!) { + trial(id: $id) { + id + experimentId + projectId + name + description + meta + params + duration + status + createdAt + updatedAt + } + } +`,fy=` + query ListRuns($trialId: String!, $page: Int, $pageSize: Int) { + runs(trialId: $trialId, page: $page, pageSize: $pageSize) { + id + trialId + projectId + experimentId + meta + status + createdAt + } + } +`,hy=` + query GetRun($id: String!) { + run(id: $id) { + id + trialId + projectId + experimentId + meta + status + createdAt + } + } +`,py=` + query ListTrialMetrics($trialId: String!, $page: Int, $pageSize: Int) { + trialMetrics(trialId: $trialId, page: $page, pageSize: $pageSize) { + id + key + value + projectId + experimentId + trialId + runId + step + createdAt + } + } +`,my="http://127.0.0.1:8000/graphql";async function cn(e,t){const n=await fetch(my,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,variables:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();if(r.errors&&r.errors.length>0)throw new Error(r.errors.map(i=>i.message).join(", "));return r.data}const bh=async e=>(await cn(ay,{page:0,pageSize:100})).projects,vy=async e=>(await cn(oy,{projectId:e.projectId,page:e.page??0,pageSize:e.pageSize??100})).experiments,gy=async e=>(await cn(uy,{id:e})).experiment,Uh=async e=>(await cn(cy,{experimentId:e.experimentId,page:e.page??0,pageSize:e.pageSize??100})).trials,yy=async e=>(await cn(dy,{id:e})).trial,zh=async e=>(await cn(fy,{trialId:e.trialId,page:e.page??0,pageSize:e.pageSize??100})).runs,xy=async e=>(await cn(hy,{id:e})).run,wy=async e=>(await cn(py,{trialId:e.trialId,page:e.page??0,pageSize:e.pageSize??1e3})).trialMetrics;/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ny=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),bc=e=>{const t=Ny(e);return t.charAt(0).toUpperCase()+t.slice(1)},$h=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),jy=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var Cy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ky=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:l,iconNode:s,...a},u)=>j.createElement("svg",{ref:u,...Cy,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:$h("lucide",i),...!l&&!jy(a)&&{"aria-hidden":"true"},...a},[...s.map(([c,m])=>j.createElement(c,m)),...Array.isArray(l)?l:[l]]));/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bi=(e,t)=>{const n=j.forwardRef(({className:r,...i},l)=>j.createElement(ky,{ref:l,iconNode:t,className:$h(`lucide-${Sy(bc(e))}`,`lucide-${e}`,r),...i}));return n.displayName=bc(e),n};/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ey=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Py=bi("calendar",Ey);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ty=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Uc=bi("circle-alert",Ty);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Oy=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],_y=bi("clock",Oy);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const My=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],cs=bi("flask-conical",My);/** + * @license lucide-react v0.555.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ry=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Iy=bi("hash",Ry),Dy="0.1.0",zc={version:Dy};function Ly(e){return Nt({queryKey:["experiments",e],queryFn:()=>vy({projectId:e}),enabled:!!e})}function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function bn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Ee(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function ht(e){Ee(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Bl(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Fy(e,t){Ee(2,arguments);var n=ht(e).getTime(),r=bn(t);return new Date(n+r)}var by={};function ds(){return by}function Uy(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function zy(e){return Ee(1,arguments),e instanceof Date||Bl(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function $y(e){if(Ee(1,arguments),!zy(e)&&typeof e!="number")return!1;var t=ht(e);return!isNaN(Number(t))}function Ay(e,t){Ee(2,arguments);var n=bn(t);return Fy(e,-n)}var Wy=864e5;function Qy(e){Ee(1,arguments);var t=ht(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),i=n-r;return Math.floor(i/Wy)+1}function Hl(e){Ee(1,arguments);var t=1,n=ht(e),r=n.getUTCDay(),i=(r=i.getTime()?n+1:t.getTime()>=s.getTime()?n:n-1}function By(e){Ee(1,arguments);var t=Ah(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=Hl(n);return r}var Hy=6048e5;function Vy(e){Ee(1,arguments);var t=ht(e),n=Hl(t).getTime()-By(t).getTime();return Math.round(n/Hy)+1}function Vl(e,t){var n,r,i,l,s,a,u,c;Ee(1,arguments);var m=ds(),h=bn((n=(r=(i=(l=t==null?void 0:t.weekStartsOn)!==null&&l!==void 0?l:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.weekStartsOn)!==null&&i!==void 0?i:m.weekStartsOn)!==null&&r!==void 0?r:(u=m.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=ht(e),x=g.getUTCDay(),S=(x=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=new Date(0);S.setUTCFullYear(h+1,0,x),S.setUTCHours(0,0,0,0);var w=Vl(S,t),N=new Date(0);N.setUTCFullYear(h,0,x),N.setUTCHours(0,0,0,0);var f=Vl(N,t);return m.getTime()>=w.getTime()?h+1:m.getTime()>=f.getTime()?h:h-1}function Ky(e,t){var n,r,i,l,s,a,u,c;Ee(1,arguments);var m=ds(),h=bn((n=(r=(i=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(s=t.locale)===null||s===void 0||(a=s.options)===null||a===void 0?void 0:a.firstWeekContainsDate)!==null&&i!==void 0?i:m.firstWeekContainsDate)!==null&&r!==void 0?r:(u=m.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:1),g=Wh(e,t),x=new Date(0);x.setUTCFullYear(g,0,h),x.setUTCHours(0,0,0,0);var S=Vl(x,t);return S}var Yy=6048e5;function qy(e,t){Ee(1,arguments);var n=ht(e),r=Vl(n,t).getTime()-Ky(n,t).getTime();return Math.round(r/Yy)+1}function Q(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?r:1-r;return Q(n==="yy"?i%100:i,n.length)},M:function(t,n){var r=t.getUTCMonth();return n==="M"?String(r+1):Q(r+1,2)},d:function(t,n){return Q(t.getUTCDate(),n.length)},a:function(t,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(t,n){return Q(t.getUTCHours()%12||12,n.length)},H:function(t,n){return Q(t.getUTCHours(),n.length)},m:function(t,n){return Q(t.getUTCMinutes(),n.length)},s:function(t,n){return Q(t.getUTCSeconds(),n.length)},S:function(t,n){var r=n.length,i=t.getUTCMilliseconds(),l=Math.floor(i*Math.pow(10,r-3));return Q(l,n.length)}},Wn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Gy={G:function(t,n,r){var i=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});case"GGGG":default:return r.era(i,{width:"wide"})}},y:function(t,n,r){if(n==="yo"){var i=t.getUTCFullYear(),l=i>0?i:1-i;return r.ordinalNumber(l,{unit:"year"})}return Ot.y(t,n)},Y:function(t,n,r,i){var l=Wh(t,i),s=l>0?l:1-l;if(n==="YY"){var a=s%100;return Q(a,2)}return n==="Yo"?r.ordinalNumber(s,{unit:"year"}):Q(s,n.length)},R:function(t,n){var r=Ah(t);return Q(r,n.length)},u:function(t,n){var r=t.getUTCFullYear();return Q(r,n.length)},Q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(i);case"QQ":return Q(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,n,r){var i=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(i);case"qq":return Q(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,n,r){var i=t.getUTCMonth();switch(n){case"M":case"MM":return Ot.M(t,n);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(t,n,r){var i=t.getUTCMonth();switch(n){case"L":return String(i+1);case"LL":return Q(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(t,n,r,i){var l=qy(t,i);return n==="wo"?r.ordinalNumber(l,{unit:"week"}):Q(l,n.length)},I:function(t,n,r){var i=Vy(t);return n==="Io"?r.ordinalNumber(i,{unit:"week"}):Q(i,n.length)},d:function(t,n,r){return n==="do"?r.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ot.d(t,n)},D:function(t,n,r){var i=Qy(t);return n==="Do"?r.ordinalNumber(i,{unit:"dayOfYear"}):Q(i,n.length)},E:function(t,n,r){var i=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});case"EEEE":default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(t,n,r,i){var l=t.getUTCDay(),s=(l-i.weekStartsOn+8)%7||7;switch(n){case"e":return String(s);case"ee":return Q(s,2);case"eo":return r.ordinalNumber(s,{unit:"day"});case"eee":return r.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(l,{width:"short",context:"formatting"});case"eeee":default:return r.day(l,{width:"wide",context:"formatting"})}},c:function(t,n,r,i){var l=t.getUTCDay(),s=(l-i.weekStartsOn+8)%7||7;switch(n){case"c":return String(s);case"cc":return Q(s,n.length);case"co":return r.ordinalNumber(s,{unit:"day"});case"ccc":return r.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(l,{width:"narrow",context:"standalone"});case"cccccc":return r.day(l,{width:"short",context:"standalone"});case"cccc":default:return r.day(l,{width:"wide",context:"standalone"})}},i:function(t,n,r){var i=t.getUTCDay(),l=i===0?7:i;switch(n){case"i":return String(l);case"ii":return Q(l,n.length);case"io":return r.ordinalNumber(l,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});case"iiii":default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(t,n,r){var i=t.getUTCHours(),l=i/12>=1?"pm":"am";switch(n){case"a":case"aa":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(t,n,r){var i=t.getUTCHours(),l;switch(i===12?l=Wn.noon:i===0?l=Wn.midnight:l=i/12>=1?"pm":"am",n){case"b":case"bb":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(t,n,r){var i=t.getUTCHours(),l;switch(i>=17?l=Wn.evening:i>=12?l=Wn.afternoon:i>=4?l=Wn.morning:l=Wn.night,n){case"B":case"BB":case"BBB":return r.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(t,n,r){if(n==="ho"){var i=t.getUTCHours()%12;return i===0&&(i=12),r.ordinalNumber(i,{unit:"hour"})}return Ot.h(t,n)},H:function(t,n,r){return n==="Ho"?r.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ot.H(t,n)},K:function(t,n,r){var i=t.getUTCHours()%12;return n==="Ko"?r.ordinalNumber(i,{unit:"hour"}):Q(i,n.length)},k:function(t,n,r){var i=t.getUTCHours();return i===0&&(i=24),n==="ko"?r.ordinalNumber(i,{unit:"hour"}):Q(i,n.length)},m:function(t,n,r){return n==="mo"?r.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Ot.m(t,n)},s:function(t,n,r){return n==="so"?r.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Ot.s(t,n)},S:function(t,n){return Ot.S(t,n)},X:function(t,n,r,i){var l=i._originalDate||t,s=l.getTimezoneOffset();if(s===0)return"Z";switch(n){case"X":return Ac(s);case"XXXX":case"XX":return mn(s);case"XXXXX":case"XXX":default:return mn(s,":")}},x:function(t,n,r,i){var l=i._originalDate||t,s=l.getTimezoneOffset();switch(n){case"x":return Ac(s);case"xxxx":case"xx":return mn(s);case"xxxxx":case"xxx":default:return mn(s,":")}},O:function(t,n,r,i){var l=i._originalDate||t,s=l.getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+$c(s,":");case"OOOO":default:return"GMT"+mn(s,":")}},z:function(t,n,r,i){var l=i._originalDate||t,s=l.getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+$c(s,":");case"zzzz":default:return"GMT"+mn(s,":")}},t:function(t,n,r,i){var l=i._originalDate||t,s=Math.floor(l.getTime()/1e3);return Q(s,n.length)},T:function(t,n,r,i){var l=i._originalDate||t,s=l.getTime();return Q(s,n.length)}};function $c(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),l=r%60;if(l===0)return n+String(i);var s=t;return n+String(i)+s+Q(l,2)}function Ac(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Q(Math.abs(e)/60,2)}return mn(e,t)}function mn(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e),l=Q(Math.floor(i/60),2),s=Q(i%60,2);return r+l+n+s}var Wc=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},Qh=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},Xy=function(t,n){var r=t.match(/(P+)(p+)?/)||[],i=r[1],l=r[2];if(!l)return Wc(t,n);var s;switch(i){case"P":s=n.dateTime({width:"short"});break;case"PP":s=n.dateTime({width:"medium"});break;case"PPP":s=n.dateTime({width:"long"});break;case"PPPP":default:s=n.dateTime({width:"full"});break}return s.replace("{{date}}",Wc(i,n)).replace("{{time}}",Qh(l,n))},Jy={p:Qh,P:Xy},Zy=["D","DD"],e0=["YY","YYYY"];function t0(e){return Zy.indexOf(e)!==-1}function n0(e){return e0.indexOf(e)!==-1}function Qc(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var r0={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},i0=function(t,n,r){var i,l=r0[t];return typeof l=="string"?i=l:n===1?i=l.one:i=l.other.replace("{{count}}",n.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+i:i+" ago":i};function Hs(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,r=e.formats[n]||e.formats[e.defaultWidth];return r}}var l0={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},s0={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},a0={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},o0={date:Hs({formats:l0,defaultWidth:"full"}),time:Hs({formats:s0,defaultWidth:"full"}),dateTime:Hs({formats:a0,defaultWidth:"full"})},u0={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},c0=function(t,n,r,i){return u0[t]};function $r(e){return function(t,n){var r=n!=null&&n.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):l;i=e.formattingValues[s]||e.formattingValues[l]}else{var a=e.defaultWidth,u=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[u]||e.values[a]}var c=e.argumentCallback?e.argumentCallback(t):t;return i[c]}}var d0={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},f0={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},h0={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},p0={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},m0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},v0={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},g0=function(t,n){var r=Number(t),i=r%100;if(i>20||i<10)switch(i%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},y0={ordinalNumber:g0,era:$r({values:d0,defaultWidth:"wide"}),quarter:$r({values:f0,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:$r({values:h0,defaultWidth:"wide"}),day:$r({values:p0,defaultWidth:"wide"}),dayPeriod:$r({values:m0,defaultWidth:"wide",formattingValues:v0,defaultFormattingWidth:"wide"})};function Ar(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],l=t.match(i);if(!l)return null;var s=l[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(a)?w0(a,function(h){return h.test(s)}):x0(a,function(h){return h.test(s)}),c;c=e.valueCallback?e.valueCallback(u):u,c=n.valueCallback?n.valueCallback(c):c;var m=t.slice(s.length);return{value:c,rest:m}}}function x0(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function w0(e,t){for(var n=0;n1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],l=t.match(e.parsePattern);if(!l)return null;var s=e.valueCallback?e.valueCallback(l[0]):l[0];s=n.valueCallback?n.valueCallback(s):s;var a=t.slice(i.length);return{value:s,rest:a}}}var N0=/^(\d+)(th|st|nd|rd)?/i,j0=/\d+/i,C0={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},k0={any:[/^b/i,/^(a|c)/i]},E0={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},P0={any:[/1/i,/2/i,/3/i,/4/i]},T0={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},O0={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_0={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},M0={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},R0={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},I0={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},D0={ordinalNumber:S0({matchPattern:N0,parsePattern:j0,valueCallback:function(t){return parseInt(t,10)}}),era:Ar({matchPatterns:C0,defaultMatchWidth:"wide",parsePatterns:k0,defaultParseWidth:"any"}),quarter:Ar({matchPatterns:E0,defaultMatchWidth:"wide",parsePatterns:P0,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Ar({matchPatterns:T0,defaultMatchWidth:"wide",parsePatterns:O0,defaultParseWidth:"any"}),day:Ar({matchPatterns:_0,defaultMatchWidth:"wide",parsePatterns:M0,defaultParseWidth:"any"}),dayPeriod:Ar({matchPatterns:R0,defaultMatchWidth:"any",parsePatterns:I0,defaultParseWidth:"any"})},L0={code:"en-US",formatDistance:i0,formatLong:o0,formatRelative:c0,localize:y0,match:D0,options:{weekStartsOn:0,firstWeekContainsDate:1}},F0=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,b0=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,U0=/^'([^]*?)'?$/,z0=/''/g,$0=/[a-zA-Z]/;function nt(e,t,n){var r,i,l,s,a,u,c,m,h,g,x,S,w,N;Ee(2,arguments);var f=String(t),d=ds(),p=(r=(i=void 0)!==null&&i!==void 0?i:d.locale)!==null&&r!==void 0?r:L0,y=bn((l=(s=(a=(u=void 0)!==null&&u!==void 0?u:void 0)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&s!==void 0?s:(c=d.locale)===null||c===void 0||(m=c.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=bn((h=(g=(x=(S=void 0)!==null&&S!==void 0?S:void 0)!==null&&x!==void 0?x:d.weekStartsOn)!==null&&g!==void 0?g:(w=d.locale)===null||w===void 0||(N=w.options)===null||N===void 0?void 0:N.weekStartsOn)!==null&&h!==void 0?h:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!p.localize)throw new RangeError("locale must contain localize property");if(!p.formatLong)throw new RangeError("locale must contain formatLong property");var E=ht(e);if(!$y(E))throw new RangeError("Invalid time value");var O=Uy(E),P=Ay(E,O),A={firstWeekContainsDate:y,weekStartsOn:C,locale:p,_originalDate:E},T=f.match(b0).map(function(L){var ee=L[0];if(ee==="p"||ee==="P"){var xe=Jy[ee];return xe(L,p.formatLong)}return L}).join("").match(F0).map(function(L){if(L==="''")return"'";var ee=L[0];if(ee==="'")return A0(L);var xe=Gy[ee];if(xe)return n0(L)&&Qc(L,t,String(e)),t0(L)&&Qc(L,t,String(e)),xe(P,L,p.localize,A);if(ee.match($0))throw new RangeError("Format string contains an unescaped latin alphabet character `"+ee+"`");return L}).join("");return T}function A0(e){var t=e.match(U0);return t?t[1].replace(z0,"'"):e}function fs({tabs:e,active:t,onChange:n}){return o.jsx("div",{className:"border-b border-gray-200 mb-6",children:o.jsx("nav",{className:"flex gap-4",children:e.map(r=>{const i=t===r.id;return o.jsx("button",{onClick:()=>n(r.id),className:`py-2 px-4 border-b-2 font-medium text-sm transition-colors ${i?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:r.label},r.id)})})})}function hs({items:e}){return o.jsx("div",{className:"flex items-center gap-2 text-sm text-gray-500 mb-4",children:e.map((t,n)=>{const r=n===e.length-1;return o.jsxs("div",{className:"flex items-center gap-2",children:[r?t.label:o.jsx(ft,{to:t.href,className:"hover:text-blue-600",children:t.label}),!r&&o.jsx("span",{className:"text-gray-400",children:"/"})]},n)})})}function W0(){const[e]=ru(),t=e.get("projectId"),[n,r]=j.useState("overview"),{data:i,isLoading:l,error:s}=Ly(t);return t?l?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"w-12 h-12 border-4 border-indigo-200 rounded-full animate-spin border-t-indigo-600"}),o.jsx(cs,{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-5 h-5 text-indigo-600"})]})}):s?o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"bg-red-50/80 backdrop-blur border border-red-200 p-5 rounded-xl flex items-start gap-3",children:[o.jsx(Uc,{className:"w-5 h-5 text-red-500 mt-0.5 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-red-800 font-medium",children:"Error loading experiments"}),o.jsx("p",{className:"text-red-600 text-sm mt-1",children:s.message})]})]})}):o.jsxs("div",{className:"p-6",children:[o.jsx(hs,{items:[{label:"Experiments"}]}),o.jsx(fs,{tabs:[{id:"overview",label:"Overview"},{id:"list",label:`Experiments (${(i==null?void 0:i.length)??0})`}],active:n,onChange:a=>r(a)}),n==="overview"?o.jsx(Q0,{experiments:i??[]}):o.jsx(B0,{experiments:i??[]})]}):o.jsx("div",{className:"p-6",children:o.jsxs("div",{className:"bg-amber-50/80 backdrop-blur border border-amber-200 p-5 rounded-xl flex items-start gap-3",children:[o.jsx(Uc,{className:"w-5 h-5 text-amber-500 mt-0.5 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-amber-800 font-medium",children:"No project selected"}),o.jsx("p",{className:"text-amber-700 text-sm mt-1",children:"Please select a project from the sidebar to view experiments."})]})]})})}function Q0({experiments:e}){const t=e[0]??null,n=e[e.length-1]??null,r=e.slice(0,5),i=[{label:"Total Experiments",value:String(e.length),icon:Iy,color:"indigo",link:null},{label:"Latest Experiment",value:(t==null?void 0:t.name)||"Unnamed",icon:cs,color:"emerald",link:t?`/experiments/${t.id}`:null},{label:"Oldest Experiment",value:(n==null?void 0:n.name)||"Unnamed",icon:Py,color:"purple",link:n?`/experiments/${n.id}`:null}],l={indigo:{bg:"from-indigo-500 to-indigo-600",shadow:"shadow-indigo-500/20"},emerald:{bg:"from-emerald-500 to-emerald-600",shadow:"shadow-emerald-500/20"},purple:{bg:"from-purple-500 to-purple-600",shadow:"shadow-purple-500/20"}};return o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:i.map((s,a)=>{const u=s.icon,c=l[s.color],m=o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex items-start justify-between mb-4",children:o.jsx("div",{className:`w-11 h-11 rounded-xl bg-gradient-to-br ${c.bg} flex items-center justify-center shadow-lg ${c.shadow}`,children:o.jsx(u,{className:"w-5 h-5 text-white"})})}),o.jsx("p",{className:"text-sm text-gray-500 mb-1",children:s.label}),o.jsx("p",{className:"text-xl font-bold text-gray-900 break-words",title:s.value,children:s.value})]});return s.link?o.jsx(ft,{to:s.link,className:"group bg-white/70 backdrop-blur-sm border border-gray-200/50 rounded-2xl p-6 hover:shadow-xl hover:shadow-gray-200/50 transition-all duration-300 hover:-translate-y-1 block",children:m},a):o.jsx("div",{className:"bg-white/70 backdrop-blur-sm border border-gray-200/50 rounded-2xl p-6",children:m},a)})}),o.jsxs("div",{className:"bg-white/70 backdrop-blur-sm border border-gray-200/50 rounded-2xl overflow-hidden",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-gray-200/50 flex items-center gap-2",children:[o.jsx(_y,{className:"w-4 h-4 text-gray-400"}),o.jsx("h3",{className:"font-semibold text-gray-900",children:"Recent Experiments"}),o.jsx("span",{className:"text-xs text-gray-400",children:"(Latest 5)"})]}),r.length===0?o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No experiments yet"}):o.jsxs("table",{className:"min-w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-gray-100",children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase",children:"ID"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase",children:"Name"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase",children:"Description"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-semibold text-gray-500 uppercase",children:"Created"}),o.jsx("th",{className:"px-6 py-3"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-100",children:r.map(s=>o.jsxs("tr",{className:"group hover:bg-indigo-50/50 transition-colors cursor-pointer",onClick:()=>window.location.href=`/experiments/${s.id}`,children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm font-mono text-indigo-600",children:s.id})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("span",{className:"text-sm font-medium text-gray-900",children:s.name||"Unnamed Experiment"})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("span",{className:"text-sm text-gray-500 line-clamp-1",children:s.description||"-"})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-500",children:nt(new Date(s.createdAt),"MMM d, yyyy")})})]},s.id))})]})]})]})}function B0({experiments:e}){return e.length===0?o.jsxs("div",{className:"bg-white/70 backdrop-blur-sm border border-gray-200/50 rounded-2xl p-12 text-center",children:[o.jsx("div",{className:"w-16 h-16 rounded-2xl bg-gray-100 flex items-center justify-center mx-auto mb-4",children:o.jsx(cs,{className:"w-8 h-8 text-gray-400"})}),o.jsx("p",{className:"text-gray-500 font-medium",children:"No experiments found"}),o.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Create your first experiment to get started"})]}):o.jsx("div",{className:"bg-white/70 backdrop-blur-sm border border-gray-200/50 rounded-2xl overflow-hidden",children:o.jsxs("table",{className:"min-w-full",children:[o.jsx("thead",{children:o.jsxs("tr",{className:"border-b border-gray-200/50",children:[o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"ID"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"Name"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"Description"}),o.jsx("th",{className:"px-6 py-4 text-left text-xs font-semibold text-gray-500 uppercase",children:"Created"}),o.jsx("th",{className:"px-6 py-4"})]})}),o.jsx("tbody",{className:"divide-y divide-gray-100",children:e.map(t=>o.jsxs("tr",{className:"group hover:bg-indigo-50/50 transition-colors",children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(ft,{to:`/experiments/${t.id}`,className:"text-sm font-mono text-indigo-600 hover:text-indigo-800 transition-colors",children:t.id})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm font-medium text-gray-900",children:t.name||"Unnamed Experiment"})}),o.jsx("td",{className:"px-6 py-4",children:o.jsx("span",{className:"text-sm text-gray-500 line-clamp-1 max-w-xs",children:t.description||"-"})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-500",children:nt(new Date(t.createdAt),"MMM d, yyyy")})})]},t.id))})]})})}function H0(e){const t=Nt({queryKey:["experiment",e],queryFn:()=>gy(e),enabled:!!e}),n=Nt({queryKey:["trials",e],queryFn:()=>Uh({experimentId:e}),enabled:!!e});return{experiment:t.data,trials:n.data??[],isLoading:t.isLoading||n.isLoading,error:t.error||n.error}}function ar(e){return e.length<=12?e:`${e.slice(0,6)}...${e.slice(-4)}`}const V0=({status:e})=>{const t={COMPLETED:"bg-green-100 text-green-800",RUNNING:"bg-blue-100 text-blue-800",PENDING:"bg-yellow-100 text-yellow-800",FAILED:"bg-red-100 text-red-800",CANCELLED:"bg-gray-100 text-gray-800",UNKNOWN:"bg-gray-100 text-gray-500"};return o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t[e]||t.UNKNOWN}`,children:e})};function K0(){const{id:e}=nu(),{experiment:t,trials:n,isLoading:r,error:i}=H0(e??null),{setExperimentId:l}=Hh(),[s,a]=j.useState("overview");return j.useEffect(()=>{t&&l(t.id)},[t,l]),r?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):i?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-red-50 p-4 rounded",children:o.jsxs("p",{className:"text-red-600",children:["Error: ",i.message]})})}):t?o.jsxs("div",{className:"p-6",children:[o.jsx(hs,{items:[{label:"Experiments",href:`/experiments?projectId=${t.projectId}`},{label:ar(t.id)}]}),o.jsxs("div",{className:"mb-6",children:[t.name&&o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t.name}),t.description&&o.jsx("p",{className:"text-gray-600 mt-1",children:t.description})]}),o.jsx(fs,{tabs:[{id:"overview",label:"Overview"},{id:"trials",label:`Trials (${n.length})`}],active:s,onChange:u=>a(u)}),s==="overview"?o.jsx(Y0,{experiment:t}):o.jsx(q0,{trials:n})]}):o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-yellow-50 p-4 rounded",children:o.jsx("p",{className:"text-yellow-800",children:"Experiment not found."})})})}function Y0({experiment:e}){return o.jsxs("div",{className:"bg-white rounded-lg shadow p-6",children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Experiment Info"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[o.jsx(ll,{label:"ID",value:e.id,mono:!0}),o.jsx(ll,{label:"Project ID",value:e.projectId,mono:!0}),o.jsx(ll,{label:"Created",value:nt(new Date(e.createdAt),"MMM d, yyyy HH:mm")}),o.jsx(ll,{label:"Updated",value:nt(new Date(e.updatedAt),"MMM d, yyyy HH:mm")})]}),e.meta&&Object.keys(e.meta).length>0&&o.jsxs("div",{className:"mt-4",children:[o.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Metadata"}),o.jsx("pre",{className:"text-xs bg-gray-50 p-3 rounded overflow-auto",children:JSON.stringify(e.meta,null,2)})]})]})}function ll({label:e,value:t,mono:n=!1}){return o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:e}),o.jsx("p",{className:`text-sm ${n?"font-mono":""}`,children:t})]})}function q0({trials:e}){return o.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:e.length===0?o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No trials found for this experiment."}):o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx(Wr,{children:"ID"}),o.jsx(Wr,{children:"Name"}),o.jsx(Wr,{children:"Status"}),o.jsx(Wr,{children:"Duration"}),o.jsx(Wr,{children:"Created"})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(t=>o.jsxs("tr",{className:"group hover:bg-indigo-50/50",children:[o.jsx(Qr,{children:o.jsx(ft,{to:`/trials/${t.id}`,className:"text-sm font-mono text-indigo-600 hover:text-indigo-800",children:t.id})}),o.jsx(Qr,{children:t.name}),o.jsx(Qr,{children:o.jsx(V0,{status:t.status})}),o.jsxs(Qr,{children:[t.duration.toFixed(2),"s"]}),o.jsx(Qr,{children:nt(new Date(t.createdAt),"MMM d, yyyy")})]},t.id))})]})})}function Wr({children:e}){return o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:e})}function Qr({children:e}){return o.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm",children:e})}function G0(e){return Nt({queryKey:["trials",e],queryFn:()=>Uh({experimentId:e}),enabled:!!e})}const X0=({status:e})=>{const t={COMPLETED:"bg-green-100 text-green-800",RUNNING:"bg-blue-100 text-blue-800",PENDING:"bg-yellow-100 text-yellow-800",FAILED:"bg-red-100 text-red-800",CANCELLED:"bg-gray-100 text-gray-800",UNKNOWN:"bg-gray-100 text-gray-500"};return o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t[e]||t.UNKNOWN}`,children:e})};function J0(){const[e]=ru(),t=e.get("experimentId"),[n,r]=j.useState("overview"),{data:i,isLoading:l,error:s}=G0(t);return t?l?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-red-50 p-4 rounded",children:o.jsxs("p",{className:"text-red-600",children:["Error loading trials: ",s.message]})})}):o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Trials"}),o.jsxs("p",{className:"text-gray-600",children:["Experiment ID: ",o.jsx("span",{className:"font-mono text-sm",children:t})]})]}),o.jsx("div",{className:"border-b border-gray-200 mb-6",children:o.jsxs("nav",{className:"flex gap-4",children:[o.jsx("button",{onClick:()=>r("overview"),className:`py-2 px-4 border-b-2 font-medium text-sm ${n==="overview"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Overview"}),o.jsxs("button",{onClick:()=>r("list"),className:`py-2 px-4 border-b-2 font-medium text-sm ${n==="list"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:["List (",(i==null?void 0:i.length)??0,")"]})]})}),n==="overview"?o.jsx(Z0,{trials:i??[]}):o.jsx(ex,{trials:i??[]})]}):o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-yellow-50 p-4 rounded",children:o.jsxs("p",{className:"text-yellow-800",children:["No experiment selected. Please select an experiment from the"," ",o.jsx(ft,{to:"/experiments",className:"text-blue-600 underline",children:"Experiments page"}),"."]})})})}function Z0({trials:e}){const t=e.length,n=e.filter(s=>s.status==="COMPLETED").length,r=e.filter(s=>s.status==="RUNNING").length,i=e.filter(s=>s.status==="FAILED").length,l=e.length>0?e.reduce((s,a)=>s+a.duration,0)/e.length:0;return o.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Metric"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Value"})]})}),o.jsxs("tbody",{className:"bg-white divide-y divide-gray-200",children:[o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Total Trials"}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900",children:t})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Completed"}),o.jsx("td",{className:"px-6 py-4 text-sm text-green-600",children:n})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Running"}),o.jsx("td",{className:"px-6 py-4 text-sm text-blue-600",children:r})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Failed"}),o.jsx("td",{className:"px-6 py-4 text-sm text-red-600",children:i})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Average Duration"}),o.jsxs("td",{className:"px-6 py-4 text-sm text-gray-900",children:[l.toFixed(2),"s"]})]})]})]})})}function ex({trials:e}){return e.length===0?o.jsx("div",{className:"bg-white rounded-lg shadow p-6 text-center text-gray-500",children:"No trials found for this experiment."}):o.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"ID"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Name"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Status"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Duration"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Created"})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(t=>o.jsxs("tr",{className:"hover:bg-gray-50",children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(ft,{to:`/trials/${t.id}`,className:"text-sm font-mono text-blue-600 hover:text-blue-900",children:t.id})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-900",children:t.name})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(X0,{status:t.status})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsxs("span",{className:"text-sm text-gray-900",children:[t.duration.toFixed(2),"s"]})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-500",children:nt(new Date(t.createdAt),"MMM d, yyyy")})})]},t.id))})]})})}function tx(e){const t=Nt({queryKey:["trial",e],queryFn:()=>yy(e),enabled:!!e}),n=Nt({queryKey:["runs",e],queryFn:()=>zh({trialId:e}),enabled:!!e}),r=Nt({queryKey:["trialMetrics",e],queryFn:()=>wy({trialId:e}),enabled:!!e});return{trial:t.data,runs:n.data??[],metrics:r.data??[],isLoading:t.isLoading||n.isLoading||r.isLoading,error:t.error||n.error||r.error}}const Bc=({status:e})=>{const t={COMPLETED:"bg-green-100 text-green-800",RUNNING:"bg-blue-100 text-blue-800",PENDING:"bg-yellow-100 text-yellow-800",FAILED:"bg-red-100 text-red-800",CANCELLED:"bg-gray-100 text-gray-800",UNKNOWN:"bg-gray-100 text-gray-500"};return o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t[e]||t.UNKNOWN}`,children:e})};function nx({metrics:e}){if(e.length===0)return o.jsx("div",{className:"text-center text-gray-500 py-8",children:"No metrics data available."});const t={};e.forEach(r=>{const i=r.key||"unknown";t[i]||(t[i]=[]),t[i].push(r)}),Object.values(t).forEach(r=>r.sort((i,l)=>i.step-l.step));const n=Object.keys(t);return o.jsxs("div",{children:[o.jsxs("div",{className:"mb-4 text-sm text-gray-600",children:["Found ",e.length," metric points across ",n.length," metric(s): ",n.join(", ")]}),n.map(r=>{var c;const i=t[r],l=i.map(m=>m.value??0),s=Math.min(...l),a=Math.max(...l),u=a-s||1;return o.jsxs("div",{className:"mb-6",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-700 mb-2",children:r}),o.jsxs("div",{className:"bg-gray-50 p-4 rounded",children:[o.jsxs("svg",{viewBox:"0 0 400 100",className:"w-full h-32",children:[o.jsx("line",{x1:"40",y1:"10",x2:"40",y2:"90",stroke:"#e5e7eb",strokeWidth:"1"}),o.jsx("line",{x1:"40",y1:"90",x2:"390",y2:"90",stroke:"#e5e7eb",strokeWidth:"1"}),o.jsx("text",{x:"35",y:"15",textAnchor:"end",className:"text-xs fill-gray-500",children:a.toFixed(2)}),o.jsx("text",{x:"35",y:"92",textAnchor:"end",className:"text-xs fill-gray-500",children:s.toFixed(2)}),o.jsx("polyline",{fill:"none",stroke:"#3b82f6",strokeWidth:"2",points:i.map((m,h)=>{const g=40+h/(i.length-1||1)*350,x=90-((m.value??0)-s)/u*80;return`${g},${x}`}).join(" ")}),i.map((m,h)=>{const g=40+h/(i.length-1||1)*350,x=90-((m.value??0)-s)/u*80;return o.jsx("circle",{cx:g,cy:x,r:"3",fill:"#3b82f6"},h)})]}),o.jsxs("div",{className:"flex gap-4 mt-2 text-xs text-gray-500",children:[o.jsxs("span",{children:["Steps: ",i.length]}),o.jsxs("span",{children:["Min: ",s.toFixed(4)]}),o.jsxs("span",{children:["Max: ",a.toFixed(4)]}),o.jsxs("span",{children:["Latest: ",(((c=i[i.length-1])==null?void 0:c.value)??0).toFixed(4)]})]})]})]},r)})]})}function rx(){const{id:e}=nu(),{trial:t,runs:n,metrics:r,isLoading:i,error:l}=tx(e??null),{setExperimentId:s,setTrialId:a}=Hh(),[u,c]=j.useState("overview");return j.useEffect(()=>{t&&(s(t.experimentId),a(t.id))},[t,s,a]),i?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):l?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-red-50 p-4 rounded",children:o.jsxs("p",{className:"text-red-600",children:["Error: ",l.message]})})}):t?o.jsxs("div",{className:"p-6",children:[o.jsx(hs,{items:[{label:"Experiments",href:`/experiments?projectId=${t.projectId}`},{label:ar(t.experimentId),href:`/experiments/${t.experimentId}`},{label:"Trials"},{label:ar(t.id)}]}),o.jsxs("div",{className:"mb-6",children:[o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:t.name}),o.jsx(Bc,{status:t.status})]}),t.description&&o.jsx("p",{className:"text-gray-600 mt-1",children:t.description})]}),o.jsx(fs,{tabs:[{id:"overview",label:"Overview"},{id:"runs",label:`Runs (${n.length})`}],active:u,onChange:m=>c(m)}),u==="overview"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"bg-white rounded-lg shadow p-6 mb-6",children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Trial Info"}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"ID"}),o.jsx("p",{className:"text-sm font-mono",children:t.id})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Duration"}),o.jsxs("p",{className:"text-sm",children:[t.duration.toFixed(2),"s"]})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Created"}),o.jsx("p",{className:"text-sm",children:nt(new Date(t.createdAt),"MMM d, yyyy HH:mm")})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Updated"}),o.jsx("p",{className:"text-sm",children:nt(new Date(t.updatedAt),"MMM d, yyyy HH:mm")})]})]}),t.params&&Object.keys(t.params).length>0&&o.jsxs("div",{className:"mt-4",children:[o.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Parameters"}),o.jsx("pre",{className:"text-xs bg-gray-50 p-3 rounded overflow-auto",children:JSON.stringify(t.params,null,2)})]}),t.meta&&Object.keys(t.meta).length>0&&o.jsxs("div",{className:"mt-4",children:[o.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Metadata"}),o.jsx("pre",{className:"text-xs bg-gray-50 p-3 rounded overflow-auto",children:JSON.stringify(t.meta,null,2)})]})]}),o.jsxs("div",{className:"bg-white rounded-lg shadow p-6 mb-6",children:[o.jsxs("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:["Metrics (",r.length," points)"]}),o.jsx(nx,{metrics:r})]})]}),u==="runs"&&o.jsxs("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:[o.jsx("div",{className:"px-6 py-4 border-b",children:o.jsxs("h2",{className:"text-lg font-semibold text-gray-900",children:["Runs (",n.length,")"]})}),n.length===0?o.jsx("div",{className:"p-6 text-center text-gray-500",children:"No runs found for this trial."}):o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"ID"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Status"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Created"})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:n.map(m=>o.jsxs("tr",{className:"hover:bg-gray-50",children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(ft,{to:`/runs/${m.id}`,className:"text-sm font-mono text-blue-600 hover:text-blue-900",children:m.id})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(Bc,{status:m.status})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-500",children:nt(new Date(m.createdAt),"MMM d, yyyy HH:mm")})})]},m.id))})]})]})]}):o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-yellow-50 p-4 rounded",children:o.jsx("p",{className:"text-yellow-800",children:"Trial not found."})})})}function ix(e){return Nt({queryKey:["runs",e],queryFn:()=>zh({trialId:e}),enabled:!!e})}function lx(e){return Nt({queryKey:["run",e],queryFn:()=>xy(e),enabled:!!e})}const sx=({status:e})=>{const t={COMPLETED:"bg-green-100 text-green-800",RUNNING:"bg-blue-100 text-blue-800",PENDING:"bg-yellow-100 text-yellow-800",FAILED:"bg-red-100 text-red-800",CANCELLED:"bg-gray-100 text-gray-800",UNKNOWN:"bg-gray-100 text-gray-500"};return o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t[e]||t.UNKNOWN}`,children:e})};function ax(){const[e]=ru(),t=e.get("trialId"),[n,r]=j.useState("overview"),{data:i,isLoading:l,error:s}=ix(t);return t?l?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):s?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-red-50 p-4 rounded",children:o.jsxs("p",{className:"text-red-600",children:["Error loading runs: ",s.message]})})}):o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Runs"}),o.jsxs("p",{className:"text-gray-600",children:["Trial ID: ",o.jsx("span",{className:"font-mono text-sm",children:t})]})]}),o.jsx("div",{className:"border-b border-gray-200 mb-6",children:o.jsxs("nav",{className:"flex gap-4",children:[o.jsx("button",{onClick:()=>r("overview"),className:`py-2 px-4 border-b-2 font-medium text-sm ${n==="overview"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:"Overview"}),o.jsxs("button",{onClick:()=>r("list"),className:`py-2 px-4 border-b-2 font-medium text-sm ${n==="list"?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"}`,children:["List (",(i==null?void 0:i.length)??0,")"]})]})}),n==="overview"?o.jsx(ox,{runs:i??[]}):o.jsx(ux,{runs:i??[]})]}):o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-yellow-50 p-4 rounded",children:o.jsxs("p",{className:"text-yellow-800",children:["No trial selected. Please select a trial from the"," ",o.jsx(ft,{to:"/trials",className:"text-blue-600 underline",children:"Trials page"}),"."]})})})}function ox({runs:e}){const t=e.length,n=e.filter(s=>s.status==="COMPLETED").length,r=e.filter(s=>s.status==="RUNNING").length,i=e.filter(s=>s.status==="FAILED").length,l=e.filter(s=>s.status==="PENDING").length;return o.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Metric"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Value"})]})}),o.jsxs("tbody",{className:"bg-white divide-y divide-gray-200",children:[o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Total Runs"}),o.jsx("td",{className:"px-6 py-4 text-sm text-gray-900",children:t})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Completed"}),o.jsx("td",{className:"px-6 py-4 text-sm text-green-600",children:n})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Running"}),o.jsx("td",{className:"px-6 py-4 text-sm text-blue-600",children:r})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Pending"}),o.jsx("td",{className:"px-6 py-4 text-sm text-yellow-600",children:l})]}),o.jsxs("tr",{children:[o.jsx("td",{className:"px-6 py-4 text-sm font-medium text-gray-900",children:"Failed"}),o.jsx("td",{className:"px-6 py-4 text-sm text-red-600",children:i})]})]})]})})}function ux({runs:e}){return e.length===0?o.jsx("div",{className:"bg-white rounded-lg shadow p-6 text-center text-gray-500",children:"No runs found for this trial."}):o.jsx("div",{className:"bg-white rounded-lg shadow overflow-hidden",children:o.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[o.jsx("thead",{className:"bg-gray-50",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"ID"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Status"}),o.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase",children:"Created"})]})}),o.jsx("tbody",{className:"bg-white divide-y divide-gray-200",children:e.map(t=>o.jsxs("tr",{className:"hover:bg-gray-50",children:[o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(ft,{to:`/runs/${t.id}`,className:"text-sm font-mono text-blue-600 hover:text-blue-900",children:t.id})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx(sx,{status:t.status})}),o.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:o.jsx("span",{className:"text-sm text-gray-500",children:nt(new Date(t.createdAt),"MMM d, yyyy HH:mm")})})]},t.id))})]})})}const cx=({status:e})=>{const t={COMPLETED:"bg-green-100 text-green-800",RUNNING:"bg-blue-100 text-blue-800",PENDING:"bg-yellow-100 text-yellow-800",FAILED:"bg-red-100 text-red-800",CANCELLED:"bg-gray-100 text-gray-800",UNKNOWN:"bg-gray-100 text-gray-500"};return o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${t[e]||t.UNKNOWN}`,children:e})};function dx(){const{id:e}=nu(),{data:t,isLoading:n,error:r}=lx(e??null),[i,l]=j.useState("overview");return n?o.jsx("div",{className:"flex justify-center items-center h-full",children:o.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"})}):r?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-red-50 p-4 rounded",children:o.jsxs("p",{className:"text-red-600",children:["Error: ",r.message]})})}):t?o.jsxs("div",{className:"p-6",children:[o.jsx(hs,{items:[{label:"Experiments",href:`/experiments?projectId=${t.projectId}`},{label:ar(t.experimentId),href:`/experiments/${t.experimentId}`},{label:"Trials"},{label:ar(t.trialId),href:`/trials/${t.trialId}`},{label:"Runs"},{label:ar(t.id)}]}),o.jsxs("div",{className:"mb-6 flex items-center gap-4",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Run Detail"}),o.jsx(cx,{status:t.status})]}),o.jsx(fs,{tabs:[{id:"overview",label:"Overview"}],active:i,onChange:s=>l(s)}),o.jsx(fx,{run:t})]}):o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"bg-yellow-50 p-4 rounded",children:o.jsx("p",{className:"text-yellow-800",children:"Run not found."})})})}function fx({run:e}){return o.jsxs("div",{className:"bg-white rounded-lg shadow p-6 mb-6",children:[o.jsx("h2",{className:"text-lg font-semibold text-gray-900 mb-4",children:"Run Info"}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"ID"}),o.jsx("p",{className:"text-sm font-mono",children:e.id})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Trial ID"}),o.jsx("p",{className:"text-sm font-mono",children:e.trialId})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Experiment ID"}),o.jsx("p",{className:"text-sm font-mono",children:e.experimentId})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-gray-500",children:"Created"}),o.jsx("p",{className:"text-sm",children:nt(new Date(e.createdAt),"MMM d, yyyy HH:mm")})]})]}),e.meta&&Object.keys(e.meta).length>0&&o.jsxs("div",{className:"mt-4",children:[o.jsx("p",{className:"text-sm text-gray-500 mb-2",children:"Metadata"}),o.jsx("pre",{className:"text-xs bg-gray-50 p-3 rounded overflow-auto",children:JSON.stringify(e.meta,null,2)})]})]})}const Bh=j.createContext(null);function Hh(){const e=j.useContext(Bh);if(!e)throw new Error("useSelection must be used within App");return e}function hx(){var N;const e=Mr(),t=tu(),[n,r]=j.useState(!0),[i,l]=j.useState([]),[s,a]=j.useState(null),[u,c]=j.useState(!0),[m,h]=j.useState(null),[g,x]=j.useState(null);j.useEffect(()=>{bh().then(f=>{l(f),f.length>0&&a(f[0].id),c(!1)}).catch(f=>{console.error("Failed to load projects:",f),c(!1)})},[]),j.useEffect(()=>{s&&e.pathname==="/"&&t(`/experiments?projectId=${s}`)},[s]),j.useEffect(()=>{const f=new URLSearchParams(e.search),d=f.get("projectId"),p=f.get("experimentId"),y=f.get("trialId");d&&a(d),p&&h(p),y&&x(y);const C=e.pathname.split("/");C[1]==="experiments"&&C[2]&&h(C[2]),C[1]==="trials"&&C[2]&&x(C[2])},[e]);const S=i.find(f=>f.id===s)||null;if(u)return o.jsx("div",{className:"flex justify-center items-center h-screen",children:o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"w-16 h-16 border-4 border-indigo-200 rounded-full animate-spin border-t-indigo-600"}),o.jsx("img",{src:"/static/logo.png",alt:"Loading",className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-6 h-6"})]})});const w=[{key:"experiments",label:"Experiments",icon:cs,path:`/experiments?projectId=${s||""}`,active:e.pathname.startsWith("/experiments"),enabled:!0}];return o.jsx(Bh.Provider,{value:{projectId:s,experimentId:m,trialId:g,setProjectId:a,setExperimentId:h,setTrialId:x},children:o.jsxs("div",{className:"flex h-screen",children:[o.jsx("div",{className:`${n?"w-64":"w-19"} + transition-all duration-300 flex-shrink-0 + bg-white/70 backdrop-blur-xl + border-r border-gray-200/50 + shadow-[1px_0_30px_-15px_rgba(0,0,0,0.1)]`,children:o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsx("div",{className:"flex items-center justify-between h-16 px-3 border-b border-gray-200/50",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("img",{src:"/static/logo.png",alt:"AlphaTrion",className:"w-9 h-9 rounded-xl flex-shrink-0"}),n&&o.jsx("span",{className:"font-bold text-lg bg-gradient-to-r from-gray-900 to-gray-600 bg-clip-text text-transparent",children:"AlphaTrion"})]})}),o.jsx("div",{className:"px-3 py-4 border-b border-gray-200/50",children:n?o.jsxs("div",{children:[o.jsx("label",{className:"text-[10px] font-semibold text-gray-400 uppercase tracking-wider",children:"Project"}),o.jsx("select",{value:s||"",onChange:f=>{const d=f.target.value;a(d),h(null),x(null),t(`/experiments?projectId=${d}`)},className:`mt-2 block w-full px-3 py-2 text-sm bg-gray-50/80 border border-gray-200 rounded-lg + focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-400 + transition-all cursor-pointer hover:bg-gray-100/80`,children:i.map(f=>o.jsx("option",{value:f.id,children:f.name||f.id.slice(0,8)},f.id))})]}):o.jsx("div",{className:`w-10 h-10 bg-gradient-to-br from-gray-100 to-gray-50 rounded-lg flex items-center justify-center + text-indigo-600 text-sm font-semibold cursor-pointer border border-gray-200 + hover:shadow-md transition-all mx-auto`,title:(S==null?void 0:S.name)||"Select Project",children:((N=S==null?void 0:S.name)==null?void 0:N.charAt(0).toUpperCase())||"P"})}),o.jsx("nav",{className:"flex-1 py-4 px-3 space-y-1",children:w.map(f=>{const d=f.icon;return o.jsxs(ft,{to:f.path,className:`flex items-center gap-3 h-11 px-3 rounded-lg transition-all duration-200 + ${!n&&"justify-center"} + ${f.active?"bg-gradient-to-r from-indigo-500 to-indigo-600 text-white shadow-lg shadow-indigo-500/25":"text-gray-600 hover:bg-gray-100/80 hover:text-gray-900"}`,children:[o.jsx(d,{size:20}),n&&o.jsx("span",{className:"font-medium text-sm",children:f.label})]},f.key)})}),o.jsx("div",{className:"border-t border-gray-200/50 p-4",children:n?o.jsxs("span",{className:"text-xs text-gray-400",children:["v",zc.version]}):o.jsxs("span",{className:"text-xs text-gray-400 block text-center",children:["v",zc.version.split(".")[0]]})})]})}),o.jsx("div",{className:"flex-1 overflow-auto",children:o.jsxs(fg,{children:[o.jsx(_t,{path:"/",element:o.jsx("div",{})}),o.jsx(_t,{path:"/experiments",element:o.jsx(W0,{})}),o.jsx(_t,{path:"/experiments/:id",element:o.jsx(K0,{})}),o.jsx(_t,{path:"/trials",element:o.jsx(J0,{})}),o.jsx(_t,{path:"/trials/:id",element:o.jsx(rx,{})}),o.jsx(_t,{path:"/runs",element:o.jsx(ax,{})}),o.jsx(_t,{path:"/runs/:id",element:o.jsx(dx,{})})]})})]})})}bh().then(console.log).catch(console.error);const px=new Kg;Vs.createRoot(document.getElementById("root")).render(o.jsx(dd.StrictMode,{children:o.jsx(qg,{client:px,children:o.jsx(wg,{children:o.jsx(hx,{})})})})); diff --git a/alphatrion/static/index.html b/alphatrion/static/index.html new file mode 100644 index 0000000..26bb067 --- /dev/null +++ b/alphatrion/static/index.html @@ -0,0 +1,17 @@ + + + + + + + LLM Observatory + + + + + +
+ + + + \ No newline at end of file diff --git a/alphatrion/static/logo.png b/alphatrion/static/logo.png new file mode 100644 index 0000000..6f0b12d Binary files /dev/null and b/alphatrion/static/logo.png differ diff --git a/dashboard/src/pages/App.tsx b/dashboard/src/pages/App.tsx index ee03cdc..593979d 100644 --- a/dashboard/src/pages/App.tsx +++ b/dashboard/src/pages/App.tsx @@ -95,7 +95,7 @@ function App() {
- Loading + Loading
); @@ -127,9 +127,9 @@ function App() {
{/* Sidebar */}
@@ -137,7 +137,7 @@ function App() { {/* Logo */}
- Alphatrion + AlphaTrion {sidebarOpen && ( AlphaTrion @@ -170,7 +170,7 @@ function App() { setSelectedTrialId(null); navigate(`/experiments?projectId=${id}`); }} - className="mt-2 block w-full px-3 py-2 text-sm bg-gray-50/80 border border-gray-200 rounded-lg + className="mt-2 block w-full px-3 py-2 text-sm bg-gray-50/80 border border-gray-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500/20 focus:border-indigo-400 transition-all cursor-pointer hover:bg-gray-100/80" > @@ -183,7 +183,7 @@ function App() {
) : (