From a1a75a1cda8e0b818a7300e62b33d6cfd21dc3a2 Mon Sep 17 00:00:00 2001 From: legop3 Date: Tue, 12 May 2026 15:12:26 -0400 Subject: [PATCH] ploo spacing and bigger title --- .../{index-6rdN_Ndl.css => index-C3xhm2jz.css} | 2 +- .../assets/{index-DgXpu1o2.js => index-DxPd8pHQ.js} | 2 +- server/public/index.html | 4 ++-- webui/src/components/VideoTile/index.jsx | 12 ++++++++++-- 4 files changed, 14 insertions(+), 6 deletions(-) rename server/public/assets/{index-6rdN_Ndl.css => index-C3xhm2jz.css} (59%) rename server/public/assets/{index-DgXpu1o2.js => index-DxPd8pHQ.js} (96%) diff --git a/server/public/assets/index-6rdN_Ndl.css b/server/public/assets/index-C3xhm2jz.css similarity index 59% rename from server/public/assets/index-6rdN_Ndl.css rename to server/public/assets/index-C3xhm2jz.css index 3fb426ab..66b8c268 100644 --- a/server/public/assets/index-6rdN_Ndl.css +++ b/server/public/assets/index-C3xhm2jz.css @@ -1 +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}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.panel{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));padding:0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.panel-section{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity));padding:0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.panel-muted{border-radius:.375rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.surface{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.surface-muted{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity))}.field-input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.field-input::-moz-placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.field-input::placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.field-input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(14 165 233 / var(--tw-ring-opacity))}.button-dark{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity));padding:.125rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.button-dark:hover{--tw-border-opacity: 1;border-color:rgb(14 165 233 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity))}.button-danger{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity));padding:.125rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-0\.5{bottom:.125rem}.bottom-1{bottom:.25rem}.bottom-2{bottom:.5rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-10{top:2.5rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[120\]{z-index:120}.order-1{order:1}.order-2{order:2}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mr-0{margin-right:0}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-64{height:16rem}.h-\[14rem\]{height:14rem}.h-\[2px\]{height:2px}.h-\[3\.5rem\]{height:3.5rem}.h-\[70\%\]{height:70%}.h-\[7rem\]{height:7rem}.h-\[min\(100svh\,32rem\)\]{height:min(100svh,32rem)}.h-\[min\(60svh\,24rem\)\]{height:min(60svh,24rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-52{max-height:13rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[1\.5rem\]{min-height:1.5rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[16rem\]{min-height:16rem}.min-h-\[3\.5rem\]{min-height:3.5rem}.min-h-\[5rem\]{min-height:5rem}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-\[12\.5rem\]{width:12.5rem}.w-\[12rem\]{width:12rem}.w-\[20rem\]{width:20rem}.w-\[2px\]{width:2px}.w-\[9rem\]{width:9rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[0\]{min-width:0}.min-w-\[10rem\]{min-width:10rem}.min-w-\[12rem\]{min-width:12rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[70vw\]{max-width:70vw}.max-w-\[80vw\]{max-width:80vw}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.1\]{flex:1.1}.flex-\[1\.22\]{flex:1.22}.flex-\[1_1_12rem\]{flex:1 1 12rem}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.-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))}.rotate-180{--tw-rotate: 180deg;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))}.transform{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 pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,0\.7fr\)_minmax\(0\,2\.1fr\)_minmax\(0\,0\.7fr\)\]{grid-template-columns:minmax(0,.7fr) minmax(0,2.1fr) minmax(0,.7fr)}.grid-cols-\[minmax\(0\,1\.2fr\)_repeat\(4\,minmax\(0\,1fr\)\)\]{grid-template-columns:minmax(0,1.2fr) repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(0\,0\.95fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr)}.grid-cols-\[minmax\(0\,1\.3fr\)_minmax\(0\,0\.22fr\)\]{grid-template-columns:minmax(0,1.3fr) minmax(0,.22fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,0\.7fr\)_minmax\(0\,1\.9fr\)_minmax\(0\,0\.7fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,1.9fr) minmax(0,.7fr)}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,0\.9fr\)_minmax\(0\,0\.75fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,.75fr)}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.grid-rows-\[auto_auto_1fr\]{grid-template-rows:auto auto 1fr}.grid-rows-\[auto_auto_1fr_auto\]{grid-template-rows:auto auto 1fr auto}.grid-rows-\[minmax\(0\,1fr\)_auto\]{grid-template-rows:minmax(0,1fr) auto}.grid-rows-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-rows:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * 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))}.self-start{align-self:flex-start}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.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))}.border-amber-200\/30{border-color:#fde68a4d}.border-amber-200\/70{border-color:#fde68ab3}.border-amber-300\/70{border-color:#fcd34db3}.border-amber-300\/80{border-color:#fcd34dcc}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-400\/60{border-color:#fbbf2499}.border-amber-600\/60{border-color:#d9770699}.border-amber-700\/60{border-color:#b4530999}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity))}.border-cyan-300\/70{border-color:#67e8f9b3}.border-cyan-500\/40{border-color:#06b6d466}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity))}.border-emerald-200\/70{border-color:#a7f3d0b3}.border-emerald-300\/70{border-color:#6ee7b7b3}.border-emerald-400\/60{border-color:#34d39999}.border-emerald-500\/40{border-color:#10b98166}.border-emerald-700{--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity))}.border-emerald-700\/60{border-color:#04785799}.border-fuchsia-300\/70{border-color:#f0abfcb3}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity))}.border-indigo-200\/70{border-color:#c7d2feb3}.border-indigo-300\/70{border-color:#a5b4fcb3}.border-indigo-400\/30{border-color:#818cf84d}.border-indigo-700{--tw-border-opacity: 1;border-color:rgb(67 56 202 / var(--tw-border-opacity))}.border-indigo-700\/60{border-color:#4338ca99}.border-pink-200{--tw-border-opacity: 1;border-color:rgb(251 207 232 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-red-300\/90{border-color:#fca5a5e6}.border-red-400\/60{border-color:#f8717199}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity))}.border-rose-800{--tw-border-opacity: 1;border-color:rgb(159 18 57 / var(--tw-border-opacity))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity))}.border-sky-400\/50{border-color:#38bdf880}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-slate-200\/30{border-color:#e2e8f04d}.border-slate-400\/60{border-color:#94a3b899}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}.border-slate-600\/40{border-color:#47556966}.border-slate-600\/60{border-color:#47556999}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-slate-700\/60{border-color:#33415599}.border-slate-700\/70{border-color:#334155b3}.border-slate-700\/80{border-color:#334155cc}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/60{border-color:#1e293b99}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-white\/40{border-color:#fff6}.border-white\/60{border-color:#fff9}.bg-amber-100\/95{background-color:#fef3c7f2}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity))}.bg-amber-400\/80{background-color:#fbbf24cc}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-amber-500\/30{background-color:#f59e0b4d}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.bg-amber-600\/70{background-color:#d97706b3}.bg-amber-700\/20{background-color:#b4530933}.bg-amber-700\/30{background-color:#b453094d}.bg-amber-700\/35{background-color:#b4530959}.bg-amber-900{--tw-bg-opacity: 1;background-color:rgb(120 53 15 / var(--tw-bg-opacity))}.bg-amber-900\/40{background-color:#78350f66}.bg-amber-900\/60{background-color:#78350f99}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/75{background-color:#000000bf}.bg-black\/80{background-color:#000c}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-cyan-300\/80{background-color:#67e8f9cc}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-500\/80{background-color:#06b6d4cc}.bg-cyan-900{--tw-bg-opacity: 1;background-color:rgb(22 78 99 / var(--tw-bg-opacity))}.bg-cyan-900\/45{background-color:#164e6373}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-emerald-500\/45{background-color:#10b98173}.bg-emerald-500\/80{background-color:#10b981cc}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-emerald-600\/70{background-color:#059669b3}.bg-emerald-700\/20{background-color:#04785733}.bg-emerald-700\/60{background-color:#04785799}.bg-emerald-800{--tw-bg-opacity: 1;background-color:rgb(6 95 70 / var(--tw-bg-opacity))}.bg-emerald-900{--tw-bg-opacity: 1;background-color:rgb(6 78 59 / var(--tw-bg-opacity))}.bg-emerald-900\/15{background-color:#064e3b26}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-900\/80{background-color:#064e3bcc}.bg-fuchsia-200{--tw-bg-opacity: 1;background-color:rgb(245 208 254 / var(--tw-bg-opacity))}.bg-fuchsia-600{--tw-bg-opacity: 1;background-color:rgb(192 38 211 / var(--tw-bg-opacity))}.bg-fuchsia-700{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity))}.bg-fuchsia-800{--tw-bg-opacity: 1;background-color:rgb(134 25 143 / var(--tw-bg-opacity))}.bg-fuchsia-900\/45{background-color:#701a7573}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-indigo-600\/70{background-color:#4f46e5b3}.bg-indigo-900{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.bg-indigo-900\/20{background-color:#312e8133}.bg-indigo-900\/60{background-color:#312e8199}.bg-indigo-950\/90{background-color:#1e1b4be6}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-500\/45{background-color:#ef444473}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-red-600\/70{background-color:#dc2626b3}.bg-red-700\/20{background-color:#b91c1c33}.bg-red-700\/60{background-color:#b91c1c99}.bg-red-900\/35{background-color:#7f1d1d59}.bg-red-900\/40{background-color:#7f1d1d66}.bg-red-900\/45{background-color:#7f1d1d73}.bg-red-900\/50{background-color:#7f1d1d80}.bg-red-900\/80{background-color:#7f1d1dcc}.bg-rose-600{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity))}.bg-rose-900\/80{background-color:#881337cc}.bg-sky-600{--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity))}.bg-sky-700\/20{background-color:#0369a133}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity))}.bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-slate-700\/30{background-color:#3341554d}.bg-slate-700\/60{background-color:#33415599}.bg-slate-700\/70{background-color:#334155b3}.bg-slate-700\/80{background-color:#334155cc}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-800\/70{background-color:#1e293bb3}.bg-slate-800\/80{background-color:#1e293bcc}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-slate-900\/35{background-color:#0f172a59}.bg-slate-900\/40{background-color:#0f172a66}.bg-slate-900\/70{background-color:#0f172ab3}.bg-slate-950\/80{background-color:#020617cc}.bg-slate-950\/90{background-color:#020617e6}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/10{background-color:#ffffff1a}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-900\/90{background-color:#18181be6}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-cover{background-size:cover}.fill-slate-200{fill:#e2e8f0}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pr-0{padding-right:0}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.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-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.45rem\]{font-size:.45rem}.text-\[0\.55em\]{font-size:.55em}.text-\[0\.55rem\]{font-size:.55rem}.text-\[0\.5rem\]{font-size:.5rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.68rem\]{font-size:.68rem}.text-\[0\.6rem\]{font-size:.6rem}.text-\[0\.72rem\]{font-size:.72rem}.text-\[0\.75rem\]{font-size:.75rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.85rem\]{font-size:.85rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[1\.1rem\]{font-size:1.1rem}.text-base{font-size:1rem;line-height:1.5rem}.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}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity))}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.text-amber-200\/80{color:#fde68acc}.text-amber-200\/85{color:#fde68ad9}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity))}.text-amber-50{--tw-text-opacity: 1;color:rgb(255 251 235 / var(--tw-text-opacity))}.text-amber-50\/90{color:#fffbebe6}.text-amber-950{--tw-text-opacity: 1;color:rgb(69 26 3 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity))}.text-cyan-50{--tw-text-opacity: 1;color:rgb(236 254 255 / var(--tw-text-opacity))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity))}.text-emerald-200{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity))}.text-emerald-50{--tw-text-opacity: 1;color:rgb(236 253 245 / var(--tw-text-opacity))}.text-emerald-50\/90{color:#ecfdf5e6}.text-emerald-950{--tw-text-opacity: 1;color:rgb(2 44 34 / var(--tw-text-opacity))}.text-fuchsia-50{--tw-text-opacity: 1;color:rgb(253 244 255 / var(--tw-text-opacity))}.text-fuchsia-900{--tw-text-opacity: 1;color:rgb(112 26 117 / var(--tw-text-opacity))}.text-indigo-100\/80{color:#e0e7ffcc}.text-indigo-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity))}.text-indigo-50{--tw-text-opacity: 1;color:rgb(238 242 255 / var(--tw-text-opacity))}.text-indigo-50\/90{color:#eef2ffe6}.text-lime-200{--tw-text-opacity: 1;color:rgb(217 249 157 / var(--tw-text-opacity))}.text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.text-lime-400{--tw-text-opacity: 1;color:rgb(163 230 53 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}.text-red-100\/90{color:#fee2e2e6}.text-red-100\/95{color:#fee2e2f2}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-50{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity))}.text-rose-50{--tw-text-opacity: 1;color:rgb(255 241 242 / var(--tw-text-opacity))}.text-sky-200{--tw-text-opacity: 1;color:rgb(186 230 253 / var(--tw-text-opacity))}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-400\/60{color:#94a3b899}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white\/90{color:#ffffffe6}.underline{text-decoration-line:underline}.accent-cyan-400{accent-color:#22d3ee}.accent-cyan-500{accent-color:#06b6d4}.accent-emerald-400{accent-color:#34d399}.accent-emerald-500{accent-color:#10b981}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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-md{--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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/30{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-black\/40{--tw-shadow-color: rgb(0 0 0 / .4);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-cyan-400\/60{outline-color:#22d3ee99}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-amber-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 211 77 / var(--tw-ring-opacity))}.ring-emerald-300\/70{--tw-ring-color: rgb(110 231 183 / .7)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\]{transition-property:width,height;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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes batteryTickWarn{0%,49%{background-color:#fffffff2}50%,to{background-color:#ef4444f2}}.battery-tick-warn{animation:batteryTickWarn .4s steps(2,end) infinite}@keyframes batteryUrgentFlash{0%,49%{opacity:1}50%,to{opacity:.25}}.battery-urgent-flash{animation:batteryUrgentFlash .4s steps(2,end) infinite}.no-touch-select{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.\[clip-path\:circle\(50\%\)\]{clip-path:circle(50%)}.\[writing-mode\:vertical-rl\]{writing-mode:vertical-rl}:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}body{margin:0;min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}html,body,*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.55) transparent}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*::-webkit-scrollbar{width:2px;height:2px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:#94a3b88c;border-radius:9999px}@supports (scrollbar-width: thin){@media(pointer:coarse){html,body,*{scrollbar-width:none}}}.ha-hue-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red);cursor:pointer}.ha-hue-slider:disabled{opacity:.6;cursor:not-allowed}.ha-hue-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.75rem;height:.75rem;border-radius:9999px;border:1px solid rgba(255,255,255,.7);background:#fff}.ha-hue-slider::-webkit-slider-runnable-track{height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.ha-hue-slider::-moz-range-thumb{width:.75rem;height:.75rem;border-radius:9999px;border:1px solid rgba(255,255,255,.7);background:#fff}.ha-hue-slider::-moz-range-track{height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.placeholder\:text-slate-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.placeholder\:text-slate-400::placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;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\:border-green-100:hover{--tw-border-opacity: 1;border-color:rgb(220 252 231 / var(--tw-border-opacity))}.hover\:border-rose-500:hover{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.hover\:border-sky-500:hover{--tw-border-opacity: 1;border-color:rgb(14 165 233 / var(--tw-border-opacity))}.hover\:bg-amber-400:hover{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity))}.hover\:bg-amber-800:hover{--tw-bg-opacity: 1;background-color:rgb(146 64 14 / var(--tw-bg-opacity))}.hover\:bg-cyan-400:hover{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity))}.hover\:bg-cyan-800:hover{--tw-bg-opacity: 1;background-color:rgb(21 94 117 / var(--tw-bg-opacity))}.hover\:bg-emerald-400:hover{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.hover\:bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity))}.hover\:bg-emerald-800:hover{--tw-bg-opacity: 1;background-color:rgb(6 95 70 / var(--tw-bg-opacity))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity: 1;background-color:rgb(217 70 239 / var(--tw-bg-opacity))}.hover\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:bg-indigo-800:hover{--tw-bg-opacity: 1;background-color:rgb(55 48 163 / var(--tw-bg-opacity))}.hover\:bg-pink-400:hover{--tw-bg-opacity: 1;background-color:rgb(244 114 182 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-rose-500:hover{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.hover\:bg-rose-800:hover{--tw-bg-opacity: 1;background-color:rgb(159 18 57 / var(--tw-bg-opacity))}.hover\:bg-sky-500:hover{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:bg-zinc-900:hover{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.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\:brightness-110:hover{--tw-brightness: brightness(1.1);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)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-emerald-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(16 185 129 / var(--tw-ring-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-1:focus-visible{outline-width:1px}.focus-visible\:outline-offset-1:focus-visible{outline-offset:1px}.focus-visible\:outline-slate-500:focus-visible{outline-color:#64748b}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-amber-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 211 77 / var(--tw-ring-opacity))}.focus-visible\:ring-emerald-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(110 231 183 / var(--tw-ring-opacity))}.focus-visible\:ring-indigo-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 180 252 / var(--tw-ring-opacity))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.active\:scale-\[0\.99\]:active{--tw-scale-x: .99;--tw-scale-y: .99;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))}.active\:brightness-125:active{--tw-brightness: brightness(1.25);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)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-inherit:hover:disabled{background-color:inherit}@media(min-width:640px){.sm\:block{display:block}.sm\:min-h-\[18rem\]{min-height:18rem}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media(min-width:768px){.md\:h-full{height:100%}.md\:h-screen{height:100vh}.md\:min-h-0{min-height:0px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1\.4fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_18rem\]{grid-template-columns:minmax(0,1fr) 18rem}.md\:overflow-hidden{overflow:hidden}.md\:overflow-y-auto{overflow-y:auto}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media(min-width:1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,0\.95fr\)_minmax\(0\,1\.05fr\)\]{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}.lg\:grid-cols-\[minmax\(0\,1\.25fr\)_minmax\(0\,0\.9fr\)\]{grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr)}.lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\]{grid-template-columns:minmax(0,1fr) 20rem}}@media(min-width:1280px){.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(13rem\,15rem\)\]{grid-template-columns:minmax(0,1fr) minmax(13rem,15rem)}} +*,: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}.\!container{width:100%!important}.container{width:100%}@media(min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media(min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media(min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media(min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media(min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.panel{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));padding:0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.panel-section{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity));padding:0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.panel-muted{border-radius:.375rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.surface{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.surface-muted{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(245 245 245 / var(--tw-text-opacity))}.field-input{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity));padding:.125rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.field-input::-moz-placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.field-input::placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.field-input:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-opacity: 1;--tw-ring-color: rgb(14 165 233 / var(--tw-ring-opacity))}.button-dark{border-radius:.375rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity));padding:.125rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.button-dark:hover{--tw-border-opacity: 1;border-color:rgb(14 165 233 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity))}.button-danger{border-radius:.375rem;--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity));padding:.125rem;font-size:.875rem;line-height:1.25rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.button-danger:hover{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.inset-x-0{left:0;right:0}.bottom-0{bottom:0}.bottom-0\.5{bottom:.125rem}.bottom-1{bottom:.25rem}.bottom-2{bottom:.5rem}.left-0{left:0}.left-0\.5{left:.125rem}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.right-0{right:0}.right-0\.5{right:.125rem}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-0\.5{top:.125rem}.top-1{top:.25rem}.top-1\/2{top:50%}.top-10{top:2.5rem}.top-6{top:1.5rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[120\]{z-index:120}.order-1{order:1}.order-2{order:2}.col-span-full{grid-column:1 / -1}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.-mt-0\.5{margin-top:-.125rem}.mr-0{margin-right:0}.mt-0{margin-top:0}.mt-0\.5{margin-top:.125rem}.mt-auto{margin-top:auto}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.aspect-\[4\/3\]{aspect-ratio:4/3}.aspect-square{aspect-ratio:1 / 1}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-28{height:7rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-64{height:16rem}.h-\[14rem\]{height:14rem}.h-\[2px\]{height:2px}.h-\[3\.5rem\]{height:3.5rem}.h-\[70\%\]{height:70%}.h-\[7rem\]{height:7rem}.h-\[min\(100svh\,32rem\)\]{height:min(100svh,32rem)}.h-\[min\(60svh\,24rem\)\]{height:min(60svh,24rem)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-52{max-height:13rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[1\.5rem\]{min-height:1.5rem}.min-h-\[14rem\]{min-height:14rem}.min-h-\[16rem\]{min-height:16rem}.min-h-\[3\.5rem\]{min-height:3.5rem}.min-h-\[5rem\]{min-height:5rem}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-7{width:1.75rem}.w-\[12\.5rem\]{width:12.5rem}.w-\[12rem\]{width:12rem}.w-\[20rem\]{width:20rem}.w-\[2px\]{width:2px}.w-\[9rem\]{width:9rem}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[0\]{min-width:0}.min-w-\[10rem\]{min-width:10rem}.min-w-\[12rem\]{min-width:12rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-\[18rem\]{max-width:18rem}.max-w-\[70vw\]{max-width:70vw}.max-w-\[80vw\]{max-width:80vw}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-\[1\.1\]{flex:1.1}.flex-\[1\.22\]{flex:1.22}.flex-\[1_1_12rem\]{flex:1 1 12rem}.shrink-0{flex-shrink:0}.basis-full{flex-basis:100%}.-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))}.rotate-180{--tw-rotate: 180deg;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))}.transform{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 pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,0\.7fr\)_minmax\(0\,2\.1fr\)_minmax\(0\,0\.7fr\)\]{grid-template-columns:minmax(0,.7fr) minmax(0,2.1fr) minmax(0,.7fr)}.grid-cols-\[minmax\(0\,1\.2fr\)_repeat\(4\,minmax\(0\,1fr\)\)\]{grid-template-columns:minmax(0,1.2fr) repeat(4,minmax(0,1fr))}.grid-cols-\[minmax\(0\,1\.35fr\)_minmax\(0\,0\.95fr\)\]{grid-template-columns:minmax(0,1.35fr) minmax(0,.95fr)}.grid-cols-\[minmax\(0\,1\.3fr\)_minmax\(0\,0\.22fr\)\]{grid-template-columns:minmax(0,1.3fr) minmax(0,.22fr)}.grid-cols-\[minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,0\.7fr\)_minmax\(0\,1\.9fr\)_minmax\(0\,0\.7fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,.7fr) minmax(0,1.9fr) minmax(0,.7fr)}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,0\.9fr\)_minmax\(0\,0\.75fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,.9fr) minmax(0,.75fr)}.grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,1.4fr)}.grid-rows-2{grid-template-rows:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr}.grid-rows-\[auto_auto_1fr\]{grid-template-rows:auto auto 1fr}.grid-rows-\[auto_auto_1fr_auto\]{grid-template-rows:auto auto 1fr auto}.grid-rows-\[minmax\(0\,1fr\)_auto\]{grid-template-rows:minmax(0,1fr) auto}.grid-rows-\[minmax\(0\,1fr\)_minmax\(0\,1fr\)_minmax\(0\,1fr\)\]{grid-template-rows:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-center{align-content:center}.content-start{align-content:flex-start}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * 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))}.self-start{align-self:flex-start}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-none{border-radius:0}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.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))}.border-amber-200\/30{border-color:#fde68a4d}.border-amber-200\/70{border-color:#fde68ab3}.border-amber-300\/70{border-color:#fcd34db3}.border-amber-300\/80{border-color:#fcd34dcc}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-400\/60{border-color:#fbbf2499}.border-amber-600\/60{border-color:#d9770699}.border-amber-700\/60{border-color:#b4530999}.border-blue-600{--tw-border-opacity: 1;border-color:rgb(37 99 235 / var(--tw-border-opacity))}.border-cyan-300{--tw-border-opacity: 1;border-color:rgb(103 232 249 / var(--tw-border-opacity))}.border-cyan-300\/70{border-color:#67e8f9b3}.border-cyan-500\/40{border-color:#06b6d466}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity))}.border-emerald-200\/70{border-color:#a7f3d0b3}.border-emerald-300\/70{border-color:#6ee7b7b3}.border-emerald-400\/60{border-color:#34d39999}.border-emerald-500\/40{border-color:#10b98166}.border-emerald-700{--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity))}.border-emerald-700\/60{border-color:#04785799}.border-fuchsia-300\/70{border-color:#f0abfcb3}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity))}.border-indigo-200\/70{border-color:#c7d2feb3}.border-indigo-300\/70{border-color:#a5b4fcb3}.border-indigo-400\/30{border-color:#818cf84d}.border-indigo-700{--tw-border-opacity: 1;border-color:rgb(67 56 202 / var(--tw-border-opacity))}.border-indigo-700\/60{border-color:#4338ca99}.border-pink-200{--tw-border-opacity: 1;border-color:rgb(251 207 232 / var(--tw-border-opacity))}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity))}.border-red-300\/90{border-color:#fca5a5e6}.border-red-400\/60{border-color:#f8717199}.border-rose-300{--tw-border-opacity: 1;border-color:rgb(253 164 175 / var(--tw-border-opacity))}.border-rose-800{--tw-border-opacity: 1;border-color:rgb(159 18 57 / var(--tw-border-opacity))}.border-sky-300{--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity))}.border-sky-400\/50{border-color:#38bdf880}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity))}.border-slate-200\/30{border-color:#e2e8f04d}.border-slate-400\/60{border-color:#94a3b899}.border-slate-600{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity))}.border-slate-600\/40{border-color:#47556966}.border-slate-600\/60{border-color:#47556999}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity))}.border-slate-700\/60{border-color:#33415599}.border-slate-700\/70{border-color:#334155b3}.border-slate-700\/80{border-color:#334155cc}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity))}.border-slate-800\/60{border-color:#1e293b99}.border-transparent{border-color:transparent}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-white\/40{border-color:#fff6}.border-white\/60{border-color:#fff9}.bg-amber-100\/95{background-color:#fef3c7f2}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity))}.bg-amber-400\/80{background-color:#fbbf24cc}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity))}.bg-amber-500\/30{background-color:#f59e0b4d}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity))}.bg-amber-600\/70{background-color:#d97706b3}.bg-amber-700\/20{background-color:#b4530933}.bg-amber-700\/30{background-color:#b453094d}.bg-amber-700\/35{background-color:#b4530959}.bg-amber-900{--tw-bg-opacity: 1;background-color:rgb(120 53 15 / var(--tw-bg-opacity))}.bg-amber-900\/40{background-color:#78350f66}.bg-amber-900\/60{background-color:#78350f99}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\/20{background-color:#0003}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/55{background-color:#0000008c}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/75{background-color:#000000bf}.bg-black\/80{background-color:#000c}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.bg-cyan-300\/80{background-color:#67e8f9cc}.bg-cyan-400\/10{background-color:#22d3ee1a}.bg-cyan-500{--tw-bg-opacity: 1;background-color:rgb(6 182 212 / var(--tw-bg-opacity))}.bg-cyan-500\/80{background-color:#06b6d4cc}.bg-cyan-900{--tw-bg-opacity: 1;background-color:rgb(22 78 99 / var(--tw-bg-opacity))}.bg-cyan-900\/45{background-color:#164e6373}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.bg-emerald-500\/45{background-color:#10b98173}.bg-emerald-500\/80{background-color:#10b981cc}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity))}.bg-emerald-600\/70{background-color:#059669b3}.bg-emerald-700\/20{background-color:#04785733}.bg-emerald-700\/60{background-color:#04785799}.bg-emerald-800{--tw-bg-opacity: 1;background-color:rgb(6 95 70 / var(--tw-bg-opacity))}.bg-emerald-900{--tw-bg-opacity: 1;background-color:rgb(6 78 59 / var(--tw-bg-opacity))}.bg-emerald-900\/15{background-color:#064e3b26}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-900\/80{background-color:#064e3bcc}.bg-fuchsia-200{--tw-bg-opacity: 1;background-color:rgb(245 208 254 / var(--tw-bg-opacity))}.bg-fuchsia-600{--tw-bg-opacity: 1;background-color:rgb(192 38 211 / var(--tw-bg-opacity))}.bg-fuchsia-700{--tw-bg-opacity: 1;background-color:rgb(162 28 175 / var(--tw-bg-opacity))}.bg-fuchsia-800{--tw-bg-opacity: 1;background-color:rgb(134 25 143 / var(--tw-bg-opacity))}.bg-fuchsia-900\/45{background-color:#701a7573}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity))}.bg-indigo-600\/70{background-color:#4f46e5b3}.bg-indigo-900{--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity))}.bg-indigo-900\/20{background-color:#312e8133}.bg-indigo-900\/60{background-color:#312e8199}.bg-indigo-950\/90{background-color:#1e1b4be6}.bg-pink-500{--tw-bg-opacity: 1;background-color:rgb(236 72 153 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-500\/45{background-color:#ef444473}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-red-600\/70{background-color:#dc2626b3}.bg-red-700\/20{background-color:#b91c1c33}.bg-red-700\/60{background-color:#b91c1c99}.bg-red-900\/35{background-color:#7f1d1d59}.bg-red-900\/40{background-color:#7f1d1d66}.bg-red-900\/45{background-color:#7f1d1d73}.bg-red-900\/50{background-color:#7f1d1d80}.bg-red-900\/80{background-color:#7f1d1dcc}.bg-rose-600{--tw-bg-opacity: 1;background-color:rgb(225 29 72 / var(--tw-bg-opacity))}.bg-rose-900\/80{background-color:#881337cc}.bg-sky-600{--tw-bg-opacity: 1;background-color:rgb(2 132 199 / var(--tw-bg-opacity))}.bg-sky-700\/20{background-color:#0369a133}.bg-slate-500{--tw-bg-opacity: 1;background-color:rgb(100 116 139 / var(--tw-bg-opacity))}.bg-slate-600{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-slate-700\/30{background-color:#3341554d}.bg-slate-700\/60{background-color:#33415599}.bg-slate-700\/70{background-color:#334155b3}.bg-slate-700\/80{background-color:#334155cc}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity))}.bg-slate-800\/70{background-color:#1e293bb3}.bg-slate-800\/80{background-color:#1e293bcc}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity))}.bg-slate-900\/35{background-color:#0f172a59}.bg-slate-900\/40{background-color:#0f172a66}.bg-slate-900\/70{background-color:#0f172ab3}.bg-slate-950\/80{background-color:#020617cc}.bg-slate-950\/90{background-color:#020617e6}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\/10{background-color:#ffffff1a}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity))}.bg-zinc-900{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.bg-zinc-900\/90{background-color:#18181be6}.bg-zinc-950{--tw-bg-opacity: 1;background-color:rgb(9 9 11 / var(--tw-bg-opacity))}.bg-cover{background-size:cover}.fill-slate-200{fill:#e2e8f0}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-0{padding-left:0;padding-right:0}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-\[1px\]{padding-top:1px;padding-bottom:1px}.py-\[2px\]{padding-top:2px;padding-bottom:2px}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pr-0{padding-right:0}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.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-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.45rem\]{font-size:.45rem}.text-\[0\.55em\]{font-size:.55em}.text-\[0\.55rem\]{font-size:.55rem}.text-\[0\.5rem\]{font-size:.5rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[0\.68rem\]{font-size:.68rem}.text-\[0\.6rem\]{font-size:.6rem}.text-\[0\.72rem\]{font-size:.72rem}.text-\[0\.75rem\]{font-size:.75rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.82rem\]{font-size:.82rem}.text-\[0\.85rem\]{font-size:.85rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[1\.1rem\]{font-size:1.1rem}.text-base{font-size:1rem;line-height:1.5rem}.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}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity))}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity))}.text-amber-200\/80{color:#fde68acc}.text-amber-200\/85{color:#fde68ad9}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity))}.text-amber-50{--tw-text-opacity: 1;color:rgb(255 251 235 / var(--tw-text-opacity))}.text-amber-50\/90{color:#fffbebe6}.text-amber-950{--tw-text-opacity: 1;color:rgb(69 26 3 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity))}.text-cyan-50{--tw-text-opacity: 1;color:rgb(236 254 255 / var(--tw-text-opacity))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity))}.text-emerald-200{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity))}.text-emerald-50{--tw-text-opacity: 1;color:rgb(236 253 245 / var(--tw-text-opacity))}.text-emerald-50\/90{color:#ecfdf5e6}.text-emerald-950{--tw-text-opacity: 1;color:rgb(2 44 34 / var(--tw-text-opacity))}.text-fuchsia-50{--tw-text-opacity: 1;color:rgb(253 244 255 / var(--tw-text-opacity))}.text-fuchsia-900{--tw-text-opacity: 1;color:rgb(112 26 117 / var(--tw-text-opacity))}.text-indigo-100\/80{color:#e0e7ffcc}.text-indigo-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity))}.text-indigo-50{--tw-text-opacity: 1;color:rgb(238 242 255 / var(--tw-text-opacity))}.text-indigo-50\/90{color:#eef2ffe6}.text-lime-200{--tw-text-opacity: 1;color:rgb(217 249 157 / var(--tw-text-opacity))}.text-lime-300{--tw-text-opacity: 1;color:rgb(190 242 100 / var(--tw-text-opacity))}.text-lime-400{--tw-text-opacity: 1;color:rgb(163 230 53 / var(--tw-text-opacity))}.text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity))}.text-red-100\/90{color:#fee2e2e6}.text-red-100\/95{color:#fee2e2f2}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-50{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity))}.text-rose-50{--tw-text-opacity: 1;color:rgb(255 241 242 / var(--tw-text-opacity))}.text-sky-200{--tw-text-opacity: 1;color:rgb(186 230 253 / var(--tw-text-opacity))}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.text-slate-400\/60{color:#94a3b899}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white\/90{color:#ffffffe6}.underline{text-decoration-line:underline}.accent-cyan-400{accent-color:#22d3ee}.accent-cyan-500{accent-color:#06b6d4}.accent-emerald-400{accent-color:#34d399}.accent-emerald-500{accent-color:#10b981}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.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-md{--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)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-black\/30{--tw-shadow-color: rgb(0 0 0 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-black\/40{--tw-shadow-color: rgb(0 0 0 / .4);--tw-shadow: var(--tw-shadow-colored)}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-cyan-400\/60{outline-color:#22d3ee99}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-amber-300{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 211 77 / var(--tw-ring-opacity))}.ring-emerald-300\/70{--tw-ring-color: rgb(110 231 183 / .7)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\]{transition-property:width,height;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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}@keyframes batteryTickWarn{0%,49%{background-color:#fffffff2}50%,to{background-color:#ef4444f2}}.battery-tick-warn{animation:batteryTickWarn .4s steps(2,end) infinite}@keyframes batteryUrgentFlash{0%,49%{opacity:1}50%,to{opacity:.25}}.battery-urgent-flash{animation:batteryUrgentFlash .4s steps(2,end) infinite}.no-touch-select{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.\[clip-path\:circle\(50\%\)\]{clip-path:circle(50%)}.\[writing-mode\:vertical-rl\]{writing-mode:vertical-rl}:root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}body{margin:0;min-height:100vh;--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity))}html,body,*{scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.55) transparent}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}*::-webkit-scrollbar{width:2px;height:2px}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:#94a3b88c;border-radius:9999px}@supports (scrollbar-width: thin){@media(pointer:coarse){html,body,*{scrollbar-width:none}}}.ha-hue-slider{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red);cursor:pointer}.ha-hue-slider:disabled{opacity:.6;cursor:not-allowed}.ha-hue-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:.75rem;height:.75rem;border-radius:9999px;border:1px solid rgba(255,255,255,.7);background:#fff}.ha-hue-slider::-webkit-slider-runnable-track{height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.ha-hue-slider::-moz-range-thumb{width:.75rem;height:.75rem;border-radius:9999px;border:1px solid rgba(255,255,255,.7);background:#fff}.ha-hue-slider::-moz-range-track{height:.45rem;border-radius:9999px;background:linear-gradient(90deg,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}.placeholder\:text-slate-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.placeholder\:text-slate-400::placeholder{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity))}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;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\:border-green-100:hover{--tw-border-opacity: 1;border-color:rgb(220 252 231 / var(--tw-border-opacity))}.hover\:border-rose-500:hover{--tw-border-opacity: 1;border-color:rgb(244 63 94 / var(--tw-border-opacity))}.hover\:border-sky-500:hover{--tw-border-opacity: 1;border-color:rgb(14 165 233 / var(--tw-border-opacity))}.hover\:bg-amber-400:hover{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity))}.hover\:bg-amber-800:hover{--tw-bg-opacity: 1;background-color:rgb(146 64 14 / var(--tw-bg-opacity))}.hover\:bg-cyan-400:hover{--tw-bg-opacity: 1;background-color:rgb(34 211 238 / var(--tw-bg-opacity))}.hover\:bg-cyan-800:hover{--tw-bg-opacity: 1;background-color:rgb(21 94 117 / var(--tw-bg-opacity))}.hover\:bg-emerald-400:hover{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity))}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity))}.hover\:bg-emerald-700:hover{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity))}.hover\:bg-emerald-800:hover{--tw-bg-opacity: 1;background-color:rgb(6 95 70 / var(--tw-bg-opacity))}.hover\:bg-fuchsia-500:hover{--tw-bg-opacity: 1;background-color:rgb(217 70 239 / var(--tw-bg-opacity))}.hover\:bg-green-400:hover{--tw-bg-opacity: 1;background-color:rgb(74 222 128 / var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity))}.hover\:bg-indigo-800:hover{--tw-bg-opacity: 1;background-color:rgb(55 48 163 / var(--tw-bg-opacity))}.hover\:bg-pink-400:hover{--tw-bg-opacity: 1;background-color:rgb(244 114 182 / var(--tw-bg-opacity))}.hover\:bg-red-600:hover{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.hover\:bg-rose-500:hover{--tw-bg-opacity: 1;background-color:rgb(244 63 94 / var(--tw-bg-opacity))}.hover\:bg-rose-800:hover{--tw-bg-opacity: 1;background-color:rgb(159 18 57 / var(--tw-bg-opacity))}.hover\:bg-sky-500:hover{--tw-bg-opacity: 1;background-color:rgb(14 165 233 / var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:bg-zinc-900:hover{--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity))}.hover\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.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\:brightness-110:hover{--tw-brightness: brightness(1.1);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)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-emerald-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(16 185 129 / var(--tw-ring-opacity))}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-1:focus-visible{outline-width:1px}.focus-visible\:outline-offset-1:focus-visible{outline-offset:1px}.focus-visible\:outline-slate-500:focus-visible{outline-color:#64748b}.focus-visible\:ring-2:focus-visible{--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-visible\:ring-amber-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(252 211 77 / var(--tw-ring-opacity))}.focus-visible\:ring-emerald-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(110 231 183 / var(--tw-ring-opacity))}.focus-visible\:ring-indigo-300:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(165 180 252 / var(--tw-ring-opacity))}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.active\:scale-\[0\.99\]:active{--tw-scale-x: .99;--tw-scale-y: .99;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))}.active\:brightness-125:active{--tw-brightness: brightness(1.25);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)}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-inherit:hover:disabled{background-color:inherit}@media(min-width:640px){.sm\:block{display:block}.sm\:min-h-\[18rem\]{min-height:18rem}.sm\:basis-auto{flex-basis:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}}@media(min-width:768px){.md\:h-full{height:100%}.md\:h-screen{height:100vh}.md\:min-h-0{min-height:0px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1\.4fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.4fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,1\.5fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}.md\:grid-cols-\[minmax\(0\,1fr\)_18rem\]{grid-template-columns:minmax(0,1fr) 18rem}.md\:overflow-hidden{overflow:hidden}.md\:overflow-y-auto{overflow-y:auto}.md\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media(min-width:1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,0\.95fr\)_minmax\(0\,1\.05fr\)\]{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)}.lg\:grid-cols-\[minmax\(0\,1\.25fr\)_minmax\(0\,0\.9fr\)\]{grid-template-columns:minmax(0,1.25fr) minmax(0,.9fr)}.lg\:grid-cols-\[minmax\(0\,1fr\)_20rem\]{grid-template-columns:minmax(0,1fr) 20rem}}@media(min-width:1280px){.xl\:grid-cols-\[minmax\(0\,1fr\)_minmax\(13rem\,15rem\)\]{grid-template-columns:minmax(0,1fr) minmax(13rem,15rem)}} diff --git a/server/public/assets/index-DgXpu1o2.js b/server/public/assets/index-DxPd8pHQ.js similarity index 96% rename from server/public/assets/index-DgXpu1o2.js rename to server/public/assets/index-DxPd8pHQ.js index 686b7e2b..1f54f60c 100644 --- a/server/public/assets/index-DgXpu1o2.js +++ b/server/public/assets/index-DxPd8pHQ.js @@ -14,7 +14,7 @@ Please change the parent to r&&r>o){const u=Cr/100,f=1-u;if(n<=o)return 0;if(n<=r){const h=(n-o)/(r-o);return Math.round(Math.max(0,Math.min(1,h))*Cr)}if(n>=s)return 100;const p=(n-r)/(s-r);return Math.round((u+Math.max(0,Math.min(1,p))*f)*100)}return null}const YN=1600,XN=800;function An(...n){return n.filter(Boolean).join(" ")}function QN({visual:n,orientation:s="horizontal",variant:r="inline",compact:o=!1,showLabel:u,className:f=""}){const p=r==="background",h=s==="vertical",x=u??!p;if(!n?.available){if(p){const J=Cr,ce=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),ie=h?{bottom:`${J}%`}:{left:`${J}%`},V=An("absolute inset-0 pointer-events-none",f);return l.jsxs("div",{className:V,children:[l.jsx("div",{className:"absolute inset-0 bg-slate-900/35"}),l.jsx("div",{className:ce,style:ie})]})}return h?null:l.jsx("p",{className:"text-xs text-slate-500",children:"Battery telemetry unavailable"})}const g=n.percentDisplay??0,b=Math.max(0,Math.min(100,g)),v=n.warnDisplayPercent??Cr,N=!!n.urgentActive,M=!!n.warnActive,k=N?`${XN}ms`:M?`${YN}ms`:void 0,w=p?N||M?"bg-red-500/45":"bg-emerald-500/45":N||M?"bg-red-500":"bg-emerald-500",j=N||M?"bg-red-900/35":"bg-slate-900/35",q=N||M?"bg-red-900/45":"bg-slate-900/35",E=An(p?"absolute inset-0 pointer-events-none":"relative pointer-events-auto",h&&!p?"flex flex-col items-center justify-center":"w-full",f);if(p){const J=h?{height:`${b}%`}:{width:`${b}%`},ce=An("absolute",h?"bottom-0 left-0 right-0":"left-0 top-0 bottom-0",w,"transition-[width,height]",N&&"battery-urgent-flash"),ie=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),V=h?{bottom:`${v}%`}:{left:`${v}%`};return l.jsxs("div",{className:E,children:[l.jsx("div",{className:An("absolute inset-0",j,N&&"battery-urgent-flash")}),l.jsx("div",{className:ce,style:{...J,animationDuration:k}}),l.jsx("div",{className:ie,style:V})]})}const C=An("relative overflow-hidden rounded-sm border border-slate-800",N||M?q:"bg-zinc-900/90",N&&"battery-urgent-flash",h?"w-full flex-1":o?"h-4":"h-5"),L=h?{height:`${b}%`}:{width:`${b}%`},$=An("absolute",h?"bottom-0 left-0 right-0":"left-0 top-0 bottom-0",w,"transition-[width,height]",N&&"battery-urgent-flash"),O=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),z=h?{bottom:`${v}%`}:{left:`${v}%`},Q=`Battery ${g}%`,G=An("pointer-events-none absolute inset-0 flex items-center justify-center text-center font-semibold",h?o?"text-[0.55rem]":"text-[0.65rem]":"text-xs"),Y=An("rounded px-1.5 py-0.5",p?"bg-black/30 text-slate-100":"bg-black/50 text-slate-100");return l.jsxs("div",{className:E,children:[l.jsxs("div",{className:C,children:[l.jsx("div",{className:$,style:{...L,animationDuration:k}}),l.jsx("div",{className:O,style:z})]}),x&&!h?l.jsx("div",{className:G,children:l.jsx("span",{className:Y,children:Q})}):null,x&&h?l.jsx("div",{className:"mt-0.5 text-[0.65rem] font-semibold text-slate-100",children:l.jsxs("span",{className:Y,children:[g,"%"]})}):null]})}const Yd=an.memo(QN);function KN({mobileHud:n=!1,isActiveDriver:s=!1,idleSkipSeconds:r=null}){const o=n?"text-3xl":"text-5xl",u=n?"text-xs":"text-sm",f=n?"text-[0.55rem]":"text-[0.75rem]",p=n?"px-4 py-3":"px-6 py-4",h=s&&typeof r=="number";return l.jsx("div",{className:"pointer-events-none absolute inset-0 z-30 flex items-center justify-center bg-black/55",children:l.jsxs("div",{className:`flex flex-col items-center gap-0.5 rounded border border-amber-300/80 bg-black/70 ${p}`,children:[l.jsx("div",{className:`font-semibold text-amber-200 ${o}`,children:"IT IS YOUR TURN!"}),l.jsx("div",{className:`text-amber-200/80 ${u}`,children:"Start driving!"}),h?l.jsxs("div",{className:`text-red-100/90 ${f}`,children:["Idle skip in ",r,"s"]}):null]})})}function zo(n){return Math.max(0,Math.min(1,n))}function Gg(n){return(n-90)*Math.PI/180}function vr(n,s,r,o){const u=Gg(o);return{x:n+r*Math.cos(u),y:s+r*Math.sin(u)}}function IN(n,s,r,o,u){let f=o,p=u;p<=f&&(p+=360);const h=vr(n,s,r,f),x=vr(n,s,r,p);return["M",h.x,h.y,"A",r,r,0,0,1,x.x,x.y].join(" ")}function Sf(n,s){if(s)return"#ef4444";const r=Math.abs(n);return r>900?"#f59e0b":r>300?"#22c55e":"#64748b"}function ZN(n,s){if(n==null||n<=0)return"hsl(200 60% 18%)";const o=zo(n/(s||1));return`hsl(${(200+Math.pow(o,.45)*360)%360} 100% 60%)`}function JN(n,s){if(s)return"#ef4444";const r=zo(n==null?0:n/4095),o=[47,55,69],u=[245,158,11],[f,p,h]=o.map((x,g)=>Math.round(x+(u[g]-x)*r));return`rgb(${f}, ${p}, ${h})`}function PN({count:n,totalSpan:s,gap:r,startAngle:o}){const f=(s-r*(n-1))/n,p=[];let h=o;for(let x=0;x0?.65:null;return l.jsxs("g",{style:{transformOrigin:`${n}px ${s}px`,animation:h?`spin ${h}s linear infinite`:"none",animationDirection:h?"reverse":"normal"},children:[l.jsx("circle",{cx:n,cy:s,r:10,fill:"#64748b",stroke:"#64748b",strokeWidth:"1"}),[0,120,240].map(g=>{const b=Gg(g),v=n+p*Math.cos(b),N=s+p*Math.sin(b);return l.jsx("line",{x1:n,y1:s,x2:v,y2:N,stroke:f,strokeWidth:"4",strokeLinecap:"round"},g)}),o?l.jsx("circle",{cx:n,cy:s,r:p+8,stroke:"#ef4444",strokeWidth:"3",fill:"none",className:"animate-pulse"}):null]})}function tw({cx:n,cy:s,current:r,overcurrent:o,variant:u,dirtLeft:f,dirtRight:p}){const h=Math.abs(r),x=Sf(r,o),g=1,b=96,v=12,N=`main-brush-pattern-a-${u}`,M=`main-brush-pattern-b-${u}`,k=h>0?.6:null,S=r>=0?1:-1;return l.jsxs("g",{children:[l.jsx("defs",{children:[N,M].map((w,j)=>l.jsxs("pattern",{id:w,patternUnits:"userSpaceOnUse",width:"6",height:"6",children:[l.jsx("rect",{width:"6",height:"6",fill:x,opacity:g}),l.jsx("path",{d:"M0 6 L6 0",stroke:"#0f172a",strokeWidth:"1"}),k?l.jsx("animateTransform",{attributeName:"patternTransform",type:"translate",from:"0 0",to:`0 ${S*(j===0?6:-6)}`,dur:`${k}s`,repeatCount:"indefinite"}):null]},w))}),l.jsx("rect",{x:n-b/2,y:s-14,width:b,height:v,rx:"3",fill:`url(#${N})`,stroke:"#64748b",strokeWidth:"1"}),l.jsx("rect",{x:n-b/2,y:s+4,width:b,height:v,rx:"3",fill:`url(#${M})`,stroke:"#64748b",strokeWidth:"1"}),l.jsx("circle",{cx:n-b/4,cy:s-8,r:3.5,fill:"#fbbf24"}),l.jsx("circle",{cx:n+b/4,cy:s+8,r:3.5,fill:"#fbbf24"}),o?l.jsx("rect",{x:n-b/2-4,y:s-16,width:b+8,height:v*2+16,rx:"6",stroke:"#ef4444",strokeWidth:"3",fill:"none",className:"animate-pulse"}):null]})}function nw({sensors:n={},variant:s="full",size:r,overlay:o=!1}){const u=r||(s==="mini"?190:260),f=u/2,p=u*.07,h=f,x=f+p,g=f*.8,b=g-4,v=g+4,N=g-14,M=g-6,k=g*.65,S=n?.bumpsAndWheelDrops||{},w=n?.wheelOvercurrents||{},j=n?.wheelLeftCurrentMa??0,q=n?.wheelRightCurrentMa??0,E=n?.sideBrushCurrentMa??0,C=n?.mainBrushCurrentMa??0,L=6,$=S.bumpLeft?L:0,O=S.bumpRight?L:0,z=PN({count:6,totalSpan:140,gap:6,startAngle:-70}),Q=["L","FL","CL","CR","FR","R"],G=[n?.lightBumpLeftSignal,n?.lightBumpFrontLeftSignal,n?.lightBumpCenterLeftSignal,n?.lightBumpCenterRightSignal,n?.lightBumpFrontRightSignal,n?.lightBumpRightSignal],Y=z.map((V,T)=>({label:Q[T],start:V.start,end:V.end,value:G[T]})),J=[{label:"Cliff L",start:-60,end:-46,value:n?.cliffLeftSignal,active:n?.cliffLeft},{label:"Cliff FL",start:-32,end:-16,value:n?.cliffFrontLeftSignal,active:n?.cliffFrontLeft},{label:"Cliff FR",start:16,end:32,value:n?.cliffFrontRightSignal,active:n?.cliffFrontRight},{label:"Cliff R",start:46,end:60,value:n?.cliffRightSignal,active:n?.cliffRight}],ce=G.filter(V=>V!=null),ie=ce.length?Math.max(...ce,1200):1200;return l.jsxs("div",{className:`${o?"relative":"surface relative p-1"}`,style:o?{width:`${u}px`,height:`${u}px`}:{height:"100%",width:"100%",aspectRatio:"1 / 1"},children:[o?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"absolute left-1 top-1 text-xs text-slate-400",children:"Top-down"}),l.jsxs("div",{className:"absolute right-1 top-1 text-[0.65rem] text-slate-500",children:["0–",ie]})]}),l.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${u} ${u}`,preserveAspectRatio:"xMidYMid meet",className:"mx-auto block",children:[l.jsx("circle",{cx:h,cy:x,r:g,fill:"#0f172a",stroke:"#334155",strokeWidth:"2"}),l.jsx(dx,{cx:h-k,cy:x,current:j,drop:S.wheelDropLeft,overcurrent:w.leftWheel,label:"L"}),l.jsx(dx,{cx:h+k,cy:x,current:q,drop:S.wheelDropRight,overcurrent:w.rightWheel,label:"R"}),l.jsx(ew,{cx:h+g*.65,cy:x-g*.55,current:E,overcurrent:w.sideBrush}),l.jsx(tw,{cx:h,cy:x,current:C,overcurrent:w.mainBrush,variant:s,dirtLeft:n?.dirtDetectLeft,dirtRight:n?.dirtDetect}),Y.map(V=>{const T=ZN(V.value,ie),U=v+4,P=U+28;return l.jsx(WN,{cx:h,cy:x,rBase:P,rTip:U,startDeg:V.start,endDeg:V.end,color:T,value:V.value,max:ie},V.label)}),J.map(V=>l.jsx(wd,{cx:h,cy:x,rInner:N,rOuter:M,startDeg:V.start,endDeg:V.end,color:JN(V.value,V.active),opacity:1,pulse:!!V.active},V.label)),l.jsx(wd,{cx:h,cy:x,rInner:b-$,rOuter:v-$,startDeg:-70,endDeg:-6,color:S.bumpLeft?"#ef4444":"#475569",opacity:1,pulse:!!S.bumpLeft}),l.jsx(wd,{cx:h,cy:x,rInner:b-O,rOuter:v-O,startDeg:6,endDeg:70,color:S.bumpRight?"#ef4444":"#475569",opacity:1,pulse:!!S.bumpRight})]})]})}const Xd=an.memo(nw);function aw({sensors:n,label:s,roverColor:r=null,status:o,audioStatus:u,levelStatus:f,layoutFormat:p="desktop",variant:h="default",driverLabel:x=null,showTopDown:g=!1,mobileHud:b=!1,mapPosition:v="top-center",turnTimerText:N=null,turnTimerFlashActive:M=!1,labelScale:k=1}){const S=b,w=p==="mobile-portrait",j=S?"text-[0.45rem]":"text-[0.65rem]",q=S?"px-0.25 py-0.25":"px-1 py-0.5",E=S?"px-0.25 py-0.25":"px-0.5 py-0.5",C=S?"text-[0.55rem]":"text-[0.8rem]",L=S?"left-0.5 top-0.5":"left-1 top-1",$=S?"text-[0.5rem]":"text-[0.7rem]",O=S?"px-0.5 py-0.25":"px-1 py-0.5",z=S?"left-0.5 top-1/2":"left-1 top-1/2",Q="bottom-0.5",G={transform:`translateX(-50%) scale(${k})`,transformOrigin:"center bottom"},Y="240px",J=w?.3:S?.33:.7,ie={width:Y,height:Y,opacity:S?.6:.7,transform:v==="top-center"?`translateX(-50%) scale(${J})`:`scale(${J})`,transformOrigin:v==="bottom-left"?"bottom left":v==="top-center"?"top center":"top right",...v==="bottom-left"?{left:"0.25rem",bottom:"0.25rem"}:v==="top-center"?{left:"50%",top:"0.25rem"}:{right:"0.25rem",top:"0.25rem"}};if(h==="none")return null;if(h==="spectator"){const V=[["Voltage",n?.voltageMv!=null?`${(n.voltageMv/1e3).toFixed(2)} V`:"--"],["Current",n?.currentMa!=null?`${n.currentMa} mA`:"--"],["Charge",n?.batteryChargeMah!=null?`${n.batteryChargeMah}`:"--"],["OI",n?.oiMode?.label||"--"]],T=!!n?.chargingSources?.homeBase,U=n?.chargingState?.label||"",P=!!(U&&U.toLowerCase()!=="not charging"),te=n?.oiMode?.label||"Unknown",de=te.toLowerCase(),R=de==="full"?"bg-emerald-500/80 text-emerald-50":de==="safe"?"bg-amber-400/80 text-amber-950":de==="passive"?"bg-slate-700/80 text-slate-100":"bg-slate-700/60 text-slate-200",_=T?"bg-emerald-500/80 text-emerald-50":"bg-slate-700/70 text-slate-200",I=P?"bg-emerald-500/80 text-emerald-50":T?"bg-amber-400/80 text-amber-950":"bg-slate-700/70 text-slate-200";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:`absolute ${L} font-medium text-slate-100 ${j}`,children:l.jsxs("div",{className:"flex flex-col gap-0.5 leading-none",children:[l.jsxs("span",{children:["Status: ",o]}),u?l.jsxs("span",{children:["Audio: ",u]}):null,f?l.jsx("span",{className:"text-cyan-300",children:f}):null]})}),l.jsx("div",{className:`absolute ${z} flex -translate-y-1/2 flex-col gap-0.5 bg-black/70 text-slate-100 ${j} ${q}`,children:l.jsxs("div",{className:"space-y-0.5 leading-tight",children:[l.jsxs("div",{className:"flex flex-col gap-0.5 text-[0.75rem] font-semibold uppercase tracking-wide",children:[l.jsx("span",{className:`rounded px-1.5 py-0.5 ${_}`,children:T?"Docked":"Undocked"}),l.jsx("span",{className:`rounded px-1.5 py-0.5 ${I}`,children:P?"Charging":"Not charging"}),l.jsxs("span",{className:`rounded px-1.5 py-0.5 ${R}`,children:["OI: ",te]})]}),V.map(([W,fe])=>l.jsxs("span",{className:"flex items-center justify-between gap-0.5",children:[l.jsx("span",{className:"text-slate-400",children:W}),l.jsx("span",{className:"font-semibold text-white",children:fe})]},W))]})}),l.jsx("div",{className:`absolute ${Q} left-1/2`,style:G,children:l.jsxs("div",{className:`flex items-center gap-0.5 bg-black/80 text-slate-100 ${E} ${C}`,children:[l.jsx("span",{className:"font-semibold text-white rounded px-1 py-[1px] border border-transparent",style:ca(r,.18),children:s||"Unnamed Rover"}),x?l.jsxs("span",{className:"text-slate-300",children:["• ",x]}):null]})})]}),g?l.jsx("div",{className:"pointer-events-none absolute rounded",style:{...ie},children:l.jsx(Xd,{sensors:n,size:240,overlay:!0})}):null]})}return l.jsxs("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:`absolute ${L} font-medium text-slate-100 ${j}`,children:l.jsxs("div",{className:"flex flex-col gap-0.5 leading-none",children:[l.jsxs("span",{children:["Status: ",o]}),u?l.jsxs("span",{children:["Audio: ",u]}):null,f?l.jsx("span",{className:"text-cyan-300",children:f}):null]})}),N?l.jsx("div",{className:`absolute right-1 top-1 rounded border ${M?"border-red-300/90 bg-red-900/80 text-red-100":"border-amber-300/80 bg-black/75 text-amber-200"} ${O} ${$}`,children:N}):null,l.jsx("div",{className:`absolute ${Q} left-1/2`,style:G,children:l.jsx("div",{className:`flex gap-0.5 bg-black/80 text-slate-100 ${E} ${C}`,children:l.jsxs("span",{children:["Rover:"," ",l.jsxs("span",{className:"rounded px-1 py-[1px] border border-transparent",style:ca(r,.18),children:['"',s||"Unnamed Rover",'"']})]})})}),g&&h!=="spectator"?l.jsx("div",{className:"pointer-events-none absolute rounded",style:{...ie},children:l.jsx(Xd,{sensors:n,size:240,overlay:!0})}):null]})}const sw=an.memo(aw),fx=2e3,lw=3e3,rw=3e3,iw=40,ow=1e3,cw={leftWheel:"Left wheel",rightWheel:"Right wheel",mainBrush:"Main brush",sideBrush:"Side brush",limiter:"Overcurrent limit"};function uw({motors:n,fill:s=0,compact:r=!1}){if(!n?.length)return null;const o=n.map(b=>cw[b]||b),u=r?"w-[12rem] h-[3.5rem]":"w-[20rem] h-[7rem]",f=r?"px-2 py-1":"px-4 py-2",p=r?"text-lg":"text-4xl",h=r?"text-xs":"text-xl",x=Math.max(0,Math.min(1,s)),g=`${Math.round(x*100)}%`;return l.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center bg-red-900/50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${u}`,children:l.jsxs("div",{className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute inset-0 overflow-hidden",children:l.jsx("div",{className:"h-full bg-red-700/60",style:{width:g}})}),l.jsxs("div",{className:`relative z-10 flex h-full w-full flex-col items-center justify-center text-center font-semibold text-white animate-pulse ${p} ${f}`,children:[l.jsx("div",{children:"OVERCURRENT"}),l.jsx("div",{className:`mt-0 font-medium text-white ${h}`,children:o.join(", ")})]})]})})}const dw=an.memo(uw);function fw({battery:n,compact:s=!1}){if(!n?.available||!n.warnActive&&!n.urgentActive)return null;const r=n.urgentActive?"BATTERY VERY LOW, DOCK THE ROVER AND CHARGE IMMEDIATELY!!":"Battery low! please dock and charge the rover soon.",o=s?"p-2 top-6":"p-4 top-10",u=s?"text-sm":"text-2xl";return l.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center bg-amber-900/60 left-1/2 -translate-x-1/2 ${o}`,children:l.jsx("div",{className:`text-center font-semibold text-white animate-pulse ${u}`,children:l.jsx("div",{children:r})})})}const mw=an.memo(fw);function hw({sensors:n}){const s=[n?.lightBumpLeftSignal,n?.lightBumpFrontLeftSignal,n?.lightBumpCenterLeftSignal,n?.lightBumpCenterRightSignal,n?.lightBumpFrontRightSignal,n?.lightBumpRightSignal],r=s.filter(h=>h!=null).reduce((h,x)=>Math.max(h,x),1200),o=h=>Math.pow(Math.max(0,Math.min(1,(h??0)/r)),.35),u=h=>h==null||h<=0?"hsl(200 60% 18%)":`hsl(${(200+o(h)*360)%360} 100% 60%)`,f=6,p=12;return l.jsx("div",{className:"flex w-full items-center justify-center gap-0.5",children:s.map((h,x)=>{const g=o(h),b=xz.session?.role||null),r=pe(z=>z.session?.assignment?.roverId||null),o=pe(z=>z.session?.roster||[]),{sendMessage:u,onInputFocus:f,onInputBlur:p,blurChat:h,registerInputRef:x,setTypingActive:g}=pf(),{value:b}=Xe("tts",{engine:"flite",voice:"rms",pitch:50}),[v,N]=m.useState(""),[M,k]=m.useState(!1),S=s!=="spectator",w=s==="spectator",q=!!m.useMemo(()=>o.find(z=>String(z.id)===String(r))||null,[r,o])?.audio?.ttsEnabled,E=m.useMemo(()=>{if(!q)return null;const z=b?.engine==="espeak"?"espeak":"flite";if(z==="espeak"){let G=Number.isFinite(b?.pitch)?Math.round(b.pitch):void 0;return typeof G=="number"&&(G=Math.max(0,Math.min(99,G))),{speak:!0,engine:z,pitch:G}}const Q=typeof b?.voice=="string"?b.voice:void 0;return{speak:!0,engine:z,voice:Q}},[b?.engine,b?.pitch,b?.voice,q]),C=n?"pointer-events-auto absolute bottom-0.5 right-0.5 flex w-[9rem] max-w-[70vw] items-center gap-0.5 rounded bg-black/70 px-0.4 py-0.2":"pointer-events-auto absolute bottom-1 right-1 flex w-[12rem] max-w-[70vw] items-center gap-0.5 rounded bg-black/70 px-0.5 py-0.25",L=n?"min-w-0 flex-1 bg-transparent text-[0.55rem] text-slate-100 placeholder:text-slate-400 focus:outline-none":"min-w-0 flex-1 bg-transparent text-[0.7rem] text-slate-100 placeholder:text-slate-400 focus:outline-none",$=n?"rounded bg-cyan-500/80 px-0.35 py-0.2 text-[0.55rem] font-semibold text-black disabled:opacity-50":"rounded bg-cyan-500/80 px-0.5 py-0.25 text-[0.7rem] font-semibold text-black disabled:opacity-50";async function O(z){if(z.preventDefault(),!S)return;const Q=v.trim();if(Q){k(!0);try{await u(Q,E),N(""),h(),g(!1)}catch(G){alert(G.message)}finally{k(!1)}}}return w?null:l.jsxs("form",{onSubmit:O,className:C,children:[l.jsx("input",{className:L,value:v,onChange:z=>{const Q=z.target.value;N(Q),g(!!Q.trim())},onFocus:z=>{f(z),g(!!v.trim())},onBlur:z=>{p(z),g(!1)},onKeyDown:z=>{z.key==="Enter"&&!v.trim()&&(z.preventDefault(),h(),g(!1))},ref:z=>x(z,{target:"hud"}),placeholder:S?"Chat (TTS)":"Spectator",disabled:!S}),l.jsx("button",{type:"submit",disabled:!S||M,className:$,children:"Speak"})]})}const gw=m.memo(xw);function kr({sessionInfo:n,audioSessionInfo:s,videoMode:r="whep",snapshotFeed:o=null,qualityNotice:u=null,label:f,roverColor:p=null,forceMute:h=!1,telemetryFrame:x,batteryConfig:g,layoutFormat:b="desktop",hudVariant:v="default",driverLabel:N=null,hudForceMap:M=!1,hudMapPosition:k="top-center",hudLabelScale:S=1,fitParent:w=!1,overcurrentLimiter:j=null,showTurnCue:q=!1,turnTimerText:E=null,isActiveDriver:C=!1,idleSkipSeconds:L=null,showNotTurnNotice:$=!1,notTurnCountdownText:O=null,showPreviewReason:z=!1,notTurnFlashAt:Q=0}){const G=pe(ve=>(ve.session?.socials||[]).find(je=>String(je?.id||je?.label||"").toLowerCase()==="discord")?.url||null||ve.session?.discord?.invite||null),Y=m.useRef(null),J=m.useRef(null),ce=m.useRef(null),ie=m.useRef(null),V=m.useRef(null),T=m.useRef(null),U=m.useRef(null),P=m.useRef(null),[te,de]=m.useState("idle"),[R,_]=m.useState(null),[I,W]=m.useState("idle"),[fe,oe]=m.useState(null),[ue,Se]=m.useState(0),[ge,be]=m.useState(0),[Qe,Ge]=m.useState(!0),[Me,Oe]=m.useState(!1),_e=!!s?.url,ft=r==="snapshot",le=x?.sensors,{value:se}=Xe("audio",it),Ce=Number.isFinite(se?.masterVolume)?se.masterVolume:it.masterVolume,he=Number.isFinite(se?.roverVolume)?se.roverVolume:it.roverVolume,we=typeof se?.mainBrushDuckEnabled=="boolean"?se.mainBrushDuckEnabled:typeof se?.autoLevelEnabled=="boolean"?se.autoLevelEnabled:it.mainBrushDuckEnabled,Ae=Number.isFinite(se?.mainBrushDuckAmount)?Math.max(0,Math.min(1,se.mainBrushDuckAmount)):it.mainBrushDuckAmount,nt=Math.max(0,Math.min(1,Ce*he)),re=le?.batteryChargeMah??null,Ee=!(b==="desktop"),Ot=Ee?"top-right":k,[qt]=Vg(),xl=M||Ee?!0:qt,Bt=$g({charge:re,config:g}),Ln=le?.wheelOvercurrents||null,ds=m.useMemo(()=>Ln==null?[]:Object.entries(Ln).filter(([,ve])=>!!ve).map(([ve])=>ve),[Ln]),zt=j?.caps||null,Tt=j?.overcurrent?.groups||null,yn=m.useMemo(()=>{if(typeof window>"u")return{debugAudio:!1,debugHud:!1};const ve=new URLSearchParams(window.location.search);return{debugAudio:ve.has("debugAudio"),debugHud:ve.has("debugHud")}},[]),Dt=yn.debugAudio,gl=yn.debugHud,zr=m.useMemo(()=>{if(!zt)return null;const ve=Number.isFinite(zt?.drive?.cap)?zt.drive.cap:1,Ie=Number.isFinite(zt?.aux?.cap)?zt.aux.cap:1;return Math.max(0,Math.min(1,1-Math.min(ve,Ie)))},[zt]),fs=!!j?.isActive,Ut=m.useMemo(()=>{const ve=ds.length?ds:fs?["limiter"]:[],Ie=zr??(ds.length?1:0);return{motors:ve,fill:Ie,visible:!!ve.length}},[ds,fs,zr]),Sn=!!((Number(le?.mainBrushCurrentMa)||0)>iw||le?.wheelOvercurrents?.mainBrush),ms=we&&Sn?1-Ae:1,ln=Math.max(0,Math.min(1,nt*ms)),hs=we&&Sn&&Ae>0?`Volume decreased ${Math.round(Ae*1e3)/10}%`:null,da=m.useRef({hasDedicatedAudio:!1,audioUrl:null,mainBrushDuckEnabled:!1,mainBrushDuckAmount:0,mainBrushActive:!1,baseRoverGain:0,effectiveRoverGain:0});m.useEffect(()=>{da.current={hasDedicatedAudio:_e,audioUrl:s?.url||null,mainBrushDuckEnabled:we,mainBrushDuckAmount:Ae,mainBrushActive:Sn,baseRoverGain:nt,effectiveRoverGain:ln}},[_e,s?.url,we,Ae,Sn,nt,ln]);const rt=m.useCallback((ve,Ie={})=>{if(!Dt)return;const $e=J.current,je=da.current,qe={event:ve,ts:Date.now(),roverLabel:f||null,hasDedicatedAudio:je.hasDedicatedAudio,audioUrl:je.audioUrl,mainBrushDuckEnabled:je.mainBrushDuckEnabled,mainBrushDuckAmount:je.mainBrushDuckAmount,mainBrushActive:je.mainBrushActive,baseRoverGain:je.baseRoverGain,effectiveRoverGain:je.effectiveRoverGain,element:$e?{muted:$e.muted,volume:$e.volume,paused:$e.paused,ended:$e.ended,readyState:$e.readyState,networkState:$e.networkState}:null,...Ie};try{console.log(`[AudioDebug] ${ve} ${JSON.stringify(qe)}`)}catch{console.log("[AudioDebug]",ve,qe)}},[Dt,f]);m.useEffect(()=>{gl&&console.log("[OvercurrentHUD]",{overlayVisible:Ut.visible,overlayMotors:Ut.motors,overlayFill:Ut.fill,limiterActive:fs,limiterCaps:zt,limiterGroups:Tt,wheelOvercurrents:Ln})},[gl,Ut,fs,zt,Tt,Ln]),m.useEffect(()=>{rt("settings/update")},[rt]);const fa=m.useCallback(()=>{clearTimeout(ce.current),ce.current=setTimeout(()=>Se(Date.now()),fx)},[]),Ua=m.useCallback(()=>{clearTimeout(ie.current),ie.current=setTimeout(()=>be(Date.now()),fx)},[]),En=m.useCallback(async()=>{const ve=Y.current;if(ve)try{ve.muted=!0,await ve.play()}catch{}},[]),Ur=m.useCallback((ve=0)=>{if(h||_e)return;clearTimeout(T.current);const Ie=()=>{clearTimeout(T.current),T.current=setTimeout(()=>{h||$e()},lw)},$e=async()=>{const je=Y.current;if(je)try{await En(),je.muted=!1,await je.play(),Ge(!1)}catch{je.muted=!0,Ge(!0),Ie()}};T.current=setTimeout($e,ve)},[En,h,_e]);m.useEffect(()=>()=>{clearTimeout(ce.current),clearTimeout(ie.current),clearTimeout(T.current),clearInterval(V.current),U.current&&(cancelAnimationFrame(U.current),U.current=null)},[]),m.useEffect(()=>{if(!$||!Q)return;Oe(!0);const ve=setTimeout(()=>Oe(!1),650);return()=>clearTimeout(ve)},[$,Q]),m.useEffect(()=>{te==="playing"&&Ur(0)},[te,Ur]),m.useEffect(()=>{ft&&(de("snapshot"),_(null))},[ft]),m.useEffect(()=>{if(ft||!n?.url||!Y.current)return;let ve=!0,Ie;const $e=setTimeout(()=>Ge(!0),0),je=(qe,mt)=>{ve&&(rt("video/status",{nextStatus:qe,info:mt||null}),de(qe),_(mt||null),qe==="playing"&&En(),["error","failed","disconnected","closed"].includes(qe)&&fa())};return Ie=new ux({url:n.url,token:n.token,video:Y.current,receiveAudio:!_e,onStatus:je}),Ie.start().catch(qe=>{ve&&(de("error"),_(qe.message),fa())}),()=>{ve=!1,clearTimeout($e),Ie?.stop()}},[ft,n?.url,n?.token,ue,fa,En,_e,rt]),m.useEffect(()=>{te==="stopped"&&n?.url&&fa()},[te,n?.url,fa]),m.useEffect(()=>{const ve=J.current;if(!ve||!s?.url){rt("route/no-audio-url"),P.current=null;return}const Ie=Math.max(0,Math.min(1,ln)),$e=P.current==null?Math.max(0,Math.min(1,ve.volume)):P.current;if(U.current&&(cancelAnimationFrame(U.current),U.current=null),Ie>$e){const je=performance.now(),qe=$e,mt=Ie-qe,zn=xs=>{const St=Math.min(1,(xs-je)/ow),ma=qe+mt*St;ve.volume=ma,P.current=ma,St<1?U.current=requestAnimationFrame(zn):U.current=null};U.current=requestAnimationFrame(zn)}else ve.volume=Ie,P.current=Ie;rt("route/direct",{elementVolume:Ie,duckEnabled:we,mainBrushActive:Sn,duckAmount:Ae})},[s?.url,ln,we,Sn,Ae,rt]),m.useEffect(()=>{if(!s?.url||!J.current)return;let ve=!0,Ie;const $e=(je,qe)=>{ve&&(rt("audio/status",{nextStatus:je,info:qe||null}),oe(qe||(je==="connected"?"connected":null)),W(mt=>je==="connected"&&(mt==="playing"||mt==="connecting")||je==="new"?mt:je),["error","failed"].includes(je)&&Ua())};return Ie=new ux({url:s.url,token:s.token,video:J.current,audioOnly:!0,onStatus:$e}),Ie.start().catch(je=>{ve&&(W("error"),oe(je.message),Ua())}),()=>{ve=!1,Ie?.stop()}},[s?.url,s?.token,ge,Ua,rt]),m.useEffect(()=>{const ve=J.current;if(!s?.url||!ve){clearInterval(V.current);return}if(!["connecting","connected","playing","paused"].includes(I)){clearInterval(V.current);return}const $e=async()=>{const je=J.current;je&&(je.muted=!1,!(!je.paused&&!je.ended)&&(rt("retry/play-attempt"),je.play().then(()=>{rt("retry/play-ok"),W(qe=>qe==="connected"?"playing":qe),oe(qe=>qe==="paused"?null:qe)}).catch(qe=>{rt("retry/play-fail",{error:qe?.message}),oe(mt=>mt||qe?.message||"autoplay blocked")})))};return $e(),V.current=setInterval($e,rw),()=>clearInterval(V.current)},[s?.url,I,rt]),m.useEffect(()=>{const ve=J.current;if(!ve)return;const Ie=()=>{rt("element/play"),W(St=>St==="error"?St:"playing"),oe(null)},$e=()=>{rt("element/pause"),W(St=>["error","failed","disconnected","closed","stopped"].includes(St)?St:"paused"),oe(St=>St||"paused")},je=()=>{rt("element/ended"),W(St=>St==="error"?St:"stopped"),oe(St=>St||"ended")},qe=()=>{const{error:St}=ve,ma=St?.message||"audio error";rt("element/error",{error:ma}),W("error"),oe(ma)},mt=()=>rt("element/waiting"),zn=()=>rt("element/canplay"),xs=()=>rt("element/stalled");return ve.addEventListener("play",Ie),ve.addEventListener("pause",$e),ve.addEventListener("ended",je),ve.addEventListener("error",qe),ve.addEventListener("waiting",mt),ve.addEventListener("canplay",zn),ve.addEventListener("stalled",xs),()=>{ve.removeEventListener("play",Ie),ve.removeEventListener("pause",$e),ve.removeEventListener("ended",je),ve.removeEventListener("error",qe),ve.removeEventListener("waiting",mt),ve.removeEventListener("canplay",zn),ve.removeEventListener("stalled",xs)}},[s?.url,rt]);const Hr=o?.error?`Error: ${o.error}`:o?.objectUrl?"snapshot":o?.status||"waiting",Vr=ft?Hr:n?.url?te==="error"?`Error: ${R||"unknown"}`:R?`${te} (${R})`:te:"waiting",$r=s?.error?`Error: ${s.error}`:s?.url?I==="error"?`Error: ${fe||"unknown"}`:fe?`${I} (${fe})`:I:null,ps=v==="spectator",Ht=v==="none";return l.jsxs("div",{className:`flex flex-col gap-0.5 ${w?"h-full":""}`,children:[l.jsxs("div",{className:`relative w-full overflow-hidden bg-black ${w?"h-full flex-1":"aspect-[4/3]"}`,children:[ft?o?.objectUrl?l.jsx("img",{src:o.objectUrl,alt:f,className:"h-full w-full object-contain",draggable:!1}):l.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-slate-300",children:"Waiting for frame…"}):l.jsx("video",{ref:Y,muted:h||Qe||_e,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),l.jsx("audio",{ref:J,autoPlay:!0,hidden:!0}),!Ht&&q?l.jsx(KN,{mobileHud:Ee,isActiveDriver:C,idleSkipSeconds:L}):null,Ht?null:l.jsx(sw,{sensors:le,label:f,roverColor:p,status:Vr,audioStatus:$r,levelStatus:hs,layoutFormat:b,variant:v,driverLabel:N,showTopDown:xl,mobileHud:Ee,mapPosition:Ot,turnTimerText:E,turnTimerFlashActive:Me,labelScale:S}),Ht?null:l.jsx(gw,{compact:Ee}),!Ht&&gl?l.jsx("div",{className:"pointer-events-none absolute left-1 top-1 z-40 rounded bg-black/80 px-1 py-0.5 text-[0.6rem] text-lime-200",children:`OC vis:${Ut.visible?1:0} motors:${Ut.motors.length} fill:${Math.round(Ut.fill*100)}%`}):null,Ht?null:l.jsx(dw,{motors:Ut.motors,fill:Ut.fill,compact:Ee}),Ht?null:l.jsx(mw,{battery:Bt,compact:Ee}),!Ht&&ps&&Bt.available?l.jsx("div",{className:"pointer-events-none absolute right-1 top-1/2 flex h-[70%] -translate-y-1/2 flex-col items-center justify-center rounded bg-black/60 px-0.5 pb-1 pt-1",children:l.jsx(Yd,{visual:Bt,orientation:"vertical",variant:"inline",compact:Ee,className:"h-full w-4"})}):null,!Ht&&u?l.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2",children:l.jsxs("div",{className:`mx-auto w-fit rounded border border-amber-300/80 bg-black/75 text-amber-200 ${Ee?"px-2 py-1 text-[0.6rem]":"px-3 py-1.5 text-sm"}`,children:[l.jsx("div",{className:"text-center",children:u}),l.jsx("div",{className:"pointer-events-auto mt-0",children:l.jsx(Ar,{id:"discord",label:"Join our Discord server while you wait!",url:G})})]})}):null,!Ht&&$?l.jsx("div",{className:"pointer-events-none absolute right-1 top-1 z-40",children:l.jsxs("div",{className:`max-w-[18rem] rounded border ${Me?"border-red-300/90 bg-red-900/80 text-red-100":"border-amber-300/80 bg-black/75 text-amber-200"} ${Ee?"px-2 py-1 text-[0.6rem]":"px-2.5 py-1.5 text-[0.72rem]"}`,children:[l.jsx("div",{className:Me?"font-semibold text-red-50":"font-semibold text-white",children:"Not your turn to drive!"}),O?l.jsx("div",{className:Me?"text-red-100/95":"text-amber-100",children:O}):null,z?l.jsx("div",{className:Me?"text-red-100/90":"text-amber-200/85",children:"Video switched to preview mode to save bandwidth."}):null,l.jsx("div",{className:"pointer-events-auto mt-0.5",children:l.jsx(Ar,{id:"discord",label:"Join our Discord while you wait!",url:G})})]})}):null]}),!Ht&&!ps&&l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(pw,{sensors:le}),l.jsx("div",{className:"panel-section space-y-0.5 text-sm",children:l.jsx(Yd,{visual:Bt,compact:Ee})})]})]})}function bw(n=[]){const s=new Set;return n.forEach(r=>{if(String(r?.role||"")==="spectator")return;const u=String(r?.roverId||"").trim(),f=String(r?.socketId||"").trim();!u||!f||s.add(f)}),s.size}function jf({layoutFormat:n="desktop"}){const s=pe(se=>se.session?.mode||null),r=pe(se=>se.session?.assignment?.roverId??null),o=pe(se=>se.session?.roster??[]),u=pe(se=>se.session?.users??[]),f=pe(se=>se.session?.turnQueues??{}),p=pe(se=>se.session?.socketId||null),h=pe(se=>se.session?.activeDrivers??{}),{state:{song:x,lastControlIntentAt:g},overcurrentLimiter:b}=At(),[v,N]=m.useState(()=>Date.now()),[M,k]=m.useState(!1),[S,w]=m.useState(null),[j,q]=m.useState(0),E=m.useRef({active:!1,roverId:null}),C=m.useRef(g||0);m.useEffect(()=>{if(s!=="turns")return;const se=setInterval(()=>N(Date.now()),250);return()=>clearInterval(se)},[s]);const $=!!(r&&o?o.find(se=>String(se.id)===String(r)):null)?.media?.audioPublishUrl,O=r?f?.[r]:null,z=r?h?.[r]:null,Q=!!(p&&z===p),G=m.useMemo(()=>{const se=O?.queue||[];if(!se.length||!O?.current||se.length<=1)return null;const Ce=se.findIndex(he=>he===O.current);return Ce===-1?se[0]||null:se[(Ce+1)%se.length]||null},[O?.queue,O?.current]),Y=!!(p&&G===p),J=O?.deadline||null,ce=O?.idleDeadline||null,ie=J?J-v:null,V=ce?ce-v:null,T=s==="turns",U=o.length,P=m.useMemo(()=>bw(u),[u]),te=T&&P>U,de=T&&Y&&ie!=null&&ie<=5e3&&ie>0,R=T&&!Q,_=R&&!de&&te,I=!_,W=ie!=null&&Number.isFinite(ie)?Math.max(0,Math.ceil(ie/1e3)):null,fe=V!=null&&Number.isFinite(V)?Math.max(0,Math.ceil(V/1e3)):null,oe=m.useMemo(()=>!T||!Q?null:W!=null?`${W}s left`:"Your turn",[T,Q,W]),ue=m.useMemo(()=>!R||!Y||W==null?null:`${W} seconds until your turn.`,[R,Y,W]),Se=r?[...I?[{type:"rover",id:r,key:r}]:[],...$?[{type:"rover",id:`${r}-audio`,key:`${r}-audio`}]:[]]:[],ge=wr(Se),be=r&&I?ge[r]:null,Qe=r&&$?ge[`${r}-audio`]:null,Ge=yf(r?[r]:[],{enabled:!!r,version:s}),Me=r&&Ge[r]||null,Oe=pl(r),_e=r&&o?o.find(se=>String(se.id)===String(r)):null,ft=_e?.battery??null,le=_e?.name||(r?`Rover ${r}`:"");return m.useEffect(()=>{if(s!=="turns"){k(!1),w(null),E.current={active:!1,roverId:null};return}const se=E.current,Ce=Q&&!se.active,he=Q&&r&&r!==se.roverId;Ce||he?(k(!0),w(Date.now())):!Q&&se.active&&(k(!1),w(null)),E.current={active:Q,roverId:r}},[Q,r,s]),m.useEffect(()=>{!M||!S||g>S&&k(!1)},[g,S,M]),m.useEffect(()=>{const se=Number(C.current)||0,Ce=Number(g)||0;Ce>se&&R&&q(Date.now()),C.current=Ce},[R,g]),l.jsx("section",{className:"panel",children:r?l.jsx(kr,{sessionInfo:be,videoMode:I?"whep":"snapshot",snapshotFeed:Me,audioSessionInfo:Qe,label:le,roverColor:_e?.color||null,telemetryFrame:Oe,batteryConfig:ft,layoutFormat:n,overcurrentLimiter:b,songNote:x?.note,qualityNotice:null,showTurnCue:M,turnTimerText:oe,turnSeconds:W,isActiveDriver:Q,idleSkipSeconds:fe,showNotTurnNotice:R,notTurnCountdownText:ue,showPreviewReason:_,notTurnFlashAt:j}):l.jsxs("div",{className:"panel-muted content-center text-center text-sm text-slate-400 aspect-[4/3]",children:[l.jsx("p",{children:"You are not assigned to a rover."}),l.jsx("p",{className:"mt-0",children:l.jsx("a",{href:"/spectate",className:"text-blue-400 underline hover:text-blue-500",children:"Click here to visit the spectator page."})})]})})}function Ro({label:n,tone:s="muted"}){const r=s==="success"?"bg-emerald-900 text-emerald-100":s==="warn"?"bg-amber-900 text-amber-100":"bg-slate-800 text-slate-200";return l.jsx("span",{className:`rounded px-1 py-0.5 text-xs font-semibold leading-none ${r}`,children:n})}function Uo(n){if(!Number.isFinite(n))return 0;const s=n%360;return s<0?s+360:s}function vw(n){if(!Array.isArray(n)||n.length<3)return 0;const[s,r,o]=n,u=Math.max(0,Math.min(255,Number(s)))/255,f=Math.max(0,Math.min(255,Number(r)))/255,p=Math.max(0,Math.min(255,Number(o)))/255,h=Math.max(u,f,p),x=Math.min(u,f,p),g=h-x;if(g===0)return 0;let b=0;return h===u?b=(f-p)/g%6:h===f?b=(p-u)/g+2:b=(u-f)/g+4,Uo(Math.round(b*60))}function mx(n){const s=Uo(n),r=1,o=1-Math.abs(s/60%2-1);let u=0,f=0,p=0;return s<60?(u=r,f=o):s<120?(u=o,f=r):s<180?(f=r,p=o):s<240?(f=o,p=r):s<300?(u=o,p=r):(u=r,p=o),[Math.round(u*255),Math.round(f*255),Math.round(p*255)]}function hx(n){return n?Array.isArray(n.hsColor)?Uo(Number(n.hsColor[0])):Array.isArray(n.rgbColor)?vw(n.rgbColor):0:0}function yw({entity:n,connected:s,controlsLocked:r,onToggle:o,onSetColor:u,onSetWhite:f}){const p=n.state==="unavailable"||!n.available,h=n.state==="on",x=n.type==="light"&&n.supportsColor,g=p?"warn":h?"success":"muted",b=p?"Unavailable":h?"On":"Off",v=r||!s||p,N=v||!x,[M,k]=m.useState(()=>hx(n)),S=m.useRef(M),w=m.useRef(!1),j=p?"border-slate-800 bg-slate-900 text-slate-400 cursor-not-allowed":r?"border-slate-800 bg-slate-900 text-slate-300 cursor-not-allowed":h?"border-emerald-700 bg-emerald-900/80 text-emerald-50 hover:bg-emerald-800":"border-rose-800 bg-rose-900/80 text-rose-50 hover:bg-rose-800";m.useEffect(()=>{if(!x||w.current)return;const z=hx(n);S.current=z,k(z)},[n.rgbColor,n.hsColor,x]);const q=z=>{const Q=Uo(Number(z.target.value));S.current=Q,k(Q)},E=()=>{N||!u||u(n.id,mx(S.current))},C=z=>{z.stopPropagation()},L=z=>{C(z),!(N||!f)&&f(n.id)},O=`rgb(${(x?mx(S.current):[255,255,255]).join(",")})`;return l.jsxs("button",{type:"button",onClick:()=>o(n.id),disabled:v,className:`relative flex min-w-[12rem] flex-[1_1_12rem] items-start justify-between gap-0.5 rounded px-1 py-0.5 text-left transition-colors ${j} disabled:opacity-60 disabled:hover:bg-inherit`,children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-0.5 text-sm leading-normal",children:[l.jsx("span",{className:"truncate font-semibold text-white",children:n.name||n.id}),x&&l.jsxs(l.Fragment,{children:[l.jsx(Ro,{label:b,tone:g}),!s&&l.jsx("span",{className:"text-xs text-amber-200",children:"Offline"})]})]}),x?l.jsx("div",{className:"-mt-0.5 w-full",onClick:C,onPointerDown:z=>{C(z),w.current=!0},onPointerUp:z=>{C(z),w.current=!1,E()},onPointerCancel:z=>{C(z),w.current=!1,E()},onKeyUp:z=>{C(z),E()},onBlur:E,children:l.jsx("div",{className:"relative w-full",children:l.jsx("input",{type:"range",min:"0",max:"360",step:"1",value:M,onChange:q,disabled:N,"aria-label":`Set color for ${n.name||n.id}`,className:"ha-hue-slider w-full"})})}):l.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-slate-400",children:[l.jsx(Ro,{label:b,tone:g}),!s&&l.jsx("span",{className:"text-amber-200",children:" · Offline"})]})]}),x&&l.jsxs("div",{className:"absolute right-1 top-1 flex items-center gap-0.5",children:[l.jsx("span",{role:"button",tabIndex:N?-1:0,onClick:L,onPointerDown:C,onKeyDown:z=>{N||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),L(z))},title:"Set white color temperature","aria-label":`Set ${n.name||n.id} to white`,"aria-disabled":N,className:`inline-flex items-center justify-center rounded border border-slate-200 bg-white px-1 py-0.5 text-xs font-semibold leading-none text-slate-900 ${N?"cursor-not-allowed opacity-60":"cursor-pointer hover:bg-slate-100"}`,children:"white"}),l.jsx("span",{className:"pointer-events-none h-2.5 w-2.5 rounded-full border border-white/60",style:{backgroundColor:O}})]}),!x&&l.jsx("div",{className:"self-center text-xs font-semibold text-white/90",children:h?"Turn off":"Turn on"})]})}function Fg(){const{state:{keymap:n}}=At(),s=pe(N=>N.session?.homeAssistant||null),{homeAssistantToggle:r,homeAssistantSetLightColor:o,homeAssistantSetLightWhite:u}=Qt(),f=m.useMemo(()=>s?.entities||[],[s?.entities]),p=s?.lightPolicy||null,h=!!(p?.locked||p?.lockedOn),x=p?.lockState||(p?.lockedOn?"on":null),g=Rt(n?.homeAssistantOn?.[0]),b=Rt(n?.homeAssistantOff?.[0]);if(!s?.enabled)return l.jsxs("section",{className:"panel-section space-y-0.5 text-sm text-slate-400",children:[l.jsx("p",{className:"text-slate-300",children:"Room Controls"}),l.jsx("p",{className:"text-slate-500",children:"Not configured on the server."})]});if(f.length===0)return l.jsxs("section",{className:"panel-section space-y-0.5 text-sm text-slate-400",children:[l.jsx("p",{className:"text-slate-300",children:"Room Controls"}),l.jsx("p",{className:"text-slate-500",children:"No lights or switches configured."})]});const v=!!s?.connected;return l.jsxs("section",{className:"panel-section space-y-0.5 text-base",children:[l.jsxs("header",{className:"flex items-center justify-between gap-0.5 text-sm text-slate-400",children:[l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx("p",{children:"Room Controls"}),l.jsx("span",{className:"text-xs text-slate-500",children:f.length}),h?l.jsx(Ro,{label:x==="off"?"Locked Off":"Locked On",tone:"warn"}):null,l.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-slate-300 background-black",children:[l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx("span",{children:"On"}),g?l.jsx(px,{label:g}):null]}),l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx("span",{children:"Off"}),b?l.jsx(px,{label:b}):null]})]})]}),l.jsx(Ro,{label:v?"Connected":"Offline",tone:v?"success":"warn"})]}),h?l.jsx("p",{className:"rounded border border-amber-600/60 bg-amber-900/40 px-1 py-0.5 text-xs text-amber-100",children:x==="off"?"Lights are locked off. Room controls are disabled.":"Lights are locked on. Room controls are disabled."}):null,l.jsx("div",{className:"flex flex-wrap gap-0.5",children:f.map(N=>l.jsx(yw,{entity:N,connected:v,controlsLocked:h,onToggle:r,onSetColor:o,onSetWhite:u},N.id))})]})}function px({label:n}){return n?l.jsx("span",{className:"rounded border border-white/40 px-1 text-[0.7rem] text-white",children:n}):null}function Yg(){const{login:n,setRole:s}=Qt(),[r,o]=m.useState(""),[u,f]=m.useState(""),[p,h]=m.useState(!1);async function x(g){g.preventDefault(),h(!0);try{await n(r,u),o(""),f("")}catch(b){alert(b.message)}finally{h(!1)}}return l.jsxs("div",{className:"panel-section space-y-0.5 text-base",children:[l.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),l.jsxs("form",{className:"flex flex-col gap-0.5",onSubmit:x,children:[l.jsx("input",{className:"field-input",placeholder:"Username",value:r,onChange:g=>o(g.target.value)}),l.jsx("input",{className:"field-input",placeholder:"Password",type:"password",value:u,onChange:g=>f(g.target.value)}),l.jsx("button",{type:"submit",disabled:p,className:"button-dark w-full disabled:opacity-50",children:p?"Logging in…":"Login"})]})]})}function xx(...n){return n.filter(Boolean).join(" ")}function Sw(n){const s=n?.batteryState?.percentDisplay;return s==null?"--":`${s}%`}function jw(n){return n?.batteryState?n.batteryState.urgentActive?"text-red-400":n.batteryState.warnActive?"text-amber-300":"text-emerald-300":"text-slate-400"}function Nw({title:n,roster:s=[],emptyText:r="No roster data.",renderActions:o=null}){return l.jsxs("div",{className:"space-y-0.5 text-sm",children:[n&&l.jsx("p",{className:"text-sm text-slate-400",children:n}),s.length===0?l.jsx("p",{className:"text-sm text-slate-500",children:r}):l.jsx("ul",{className:"space-y-0.5 text-sm",children:s.map(u=>{const f=!!(u?.private?.enabled&&u?.private?.open),p=!!u?.locked;return l.jsxs("li",{className:xx("surface flex flex-wrap items-center justify-between gap-0.5",p?"bg-red-900/40":f?"bg-amber-700/35 border border-amber-200/30":null),children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-slate-200",children:l.jsx("span",{className:"rounded px-1 py-[1px] border border-transparent",style:ca(u.color,.16),children:u.name})}),l.jsxs("p",{className:"text-xs text-slate-500 flex flex-wrap items-center gap-0.5",children:[l.jsx("span",{children:u.locked?"locked":"free"}),u.lockReason&&l.jsx("span",{className:"rounded bg-black/30 px-1",children:u.lockReason}),l.jsxs("span",{className:xx("font-semibold",jw(u)),children:["Battery ",Sw(u)]})]})]}),o?o(u):null]},u.id)})})]})}function ww(n){const s=n?.runtime||{},r=n?.output||{},o=n?.errors||{};return s.inFlight?{label:"IN FLIGHT",detail:s.reason||"Generating commentary now",className:"border-amber-400/60 bg-amber-700/20 text-amber-200"}:s.outcome==="posted"?{label:"POSTED",detail:r.posted?`Last: ${r.posted}`:"Commentary posted",className:"border-emerald-400/60 bg-emerald-700/20 text-emerald-200"}:s.outcome==="skipped"?{label:"SKIPPED",detail:s.reason||"Model chose to skip",className:"border-slate-400/60 bg-slate-700/30 text-slate-200"}:s.outcome==="failed"?{label:"FAILED",detail:o.message||s.reason||"Tick failed",className:"border-red-400/60 bg-red-700/20 text-red-200"}:{label:s.running?"IDLE":"STOPPED",detail:s.reason||"Waiting for next tick",className:"border-sky-400/50 bg-sky-700/20 text-sky-200"}}function Aw(n,s){const r=Date.now(),u=(Array.isArray(n)?n:[]).map((f,p)=>{const h=String(f?.role||"").toLowerCase(),x=typeof f?.content=="string"?f.content:JSON.stringify(f?.content??null,null,2),g=h==="system"?"LLM System":h==="assistant"?"LLM Context":h==="user"?"LLM Input":"LLM Message";return{id:`llm-msg-${p}`,message:{ts:r+p,nickname:g,text:x,role:"spectator",system:h==="system"}}});if(s!=null){const f=String(s);u.push({id:"llm-output",message:{ts:r+u.length+1,nickname:"LLM Output",text:f.trim()?f:"",role:"spectator",system:!0}})}return u}function Cw({state:n,onClearHistory:s,clearingHistory:r}){const[o,u]=m.useState(null);if(!n)return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"LLM Commentary"}),l.jsx("div",{className:"surface text-xs text-slate-300",children:"No status received yet."})]});const f=n.runtime||{},p=n.counters||{},h=n.timings||{},x=n.input||{},g=n.output||{},b=n.errors||{},v=Array.isArray(n.history)?n.history:[],N=v.find(w=>w.runId===o)||(v.length?v[v.length-1]:null),M=ww(n),k=Aw(x.modelMessages,g.raw),S=[{label:"running",value:f.running?"yes":"no"},{label:"in flight",value:f.inFlight?"yes":"no"},{label:"phase",value:f.phase||"--"},{label:"run id",value:f.currentRunId??"--"},{label:"tick count",value:f.tickCount??0},{label:"last tick",value:f.lastTickAt?new Date(f.lastTickAt).toLocaleString():"never"},{label:"next run",value:f.nextRunAt?new Date(f.nextRunAt).toLocaleString():"n/a"},{label:"outcome",value:f.outcome||"--"},{label:"reason",value:f.reason||"--"},{label:"skip streak",value:p.skipStreak??0},{label:"clear count",value:p.clearCount??0},{label:"last gen",value:h.lastGenerationMs!=null?`${h.lastGenerationMs} ms`:"--"},{label:"avg gen",value:h.avgGenerationMs!=null?`${h.avgGenerationMs} ms`:"--"},{label:"gen count",value:h.generationCount??0},{label:"prompt chars",value:p.promptChars??0},{label:"active drivers",value:p.snapshotSummary?.activeDrivers??0},{label:"snapshot rovers",value:p.snapshotSummary?.rovers??0},{label:"snapshot chat",value:p.snapshotSummary?.chatMessages??0}];return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"LLM Commentary"}),l.jsx("div",{className:"flex gap-0.5 text-xs",children:l.jsx("button",{type:"button",onClick:s,disabled:!!r,className:"button-danger disabled:cursor-not-allowed disabled:opacity-60",children:r?"Clearing...":"Clear LLM History"})}),l.jsxs("div",{className:`surface border text-center ${M.className}`,children:[l.jsx("div",{className:"text-[1.1rem] font-bold tracking-wide",children:M.label}),l.jsx("div",{className:"text-xs text-slate-200",children:M.detail})]}),l.jsx("div",{className:"surface flex flex-wrap gap-0.5 text-xs",children:S.map(w=>l.jsxs("span",{className:"rounded border border-slate-600/60 bg-slate-800/70 px-0.5 py-0.25 text-[0.72rem] leading-tight text-slate-200",children:[w.label,": ",w.value]},w.label))}),b.message?l.jsxs("div",{className:"surface text-xs text-red-300 break-words",children:["Error: ",b.message]}):null,b.details?l.jsxs("details",{className:"surface text-xs text-red-200",children:[l.jsx("summary",{className:"cursor-pointer select-none text-red-300",children:"Failure details"}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-red-200",children:JSON.stringify(b.details,null,2)})]}):null,g.generated?l.jsxs("div",{className:"surface text-xs text-slate-200 break-words",children:["Generated: ",g.generated]}):null,g.posted?l.jsxs("div",{className:"surface text-xs text-emerald-200 break-words",children:["Posted: ",g.posted]}):null,l.jsxs("div",{className:"grid gap-0.5 md:grid-cols-2",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Live Input Conversation"}),l.jsx("div",{className:"surface max-h-72 space-y-0.5 overflow-y-auto",children:k.length?k.map(w=>l.jsx(ff,{message:w.message},w.id)):l.jsx("div",{className:"text-xs text-slate-300",children:"No model conversation captured yet."})})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Output + Error"}),l.jsxs("div",{className:"surface space-y-0.5 text-xs text-slate-200",children:[l.jsxs("div",{children:["Raw output: ",g.raw?.trim()?g.raw:""]}),l.jsxs("div",{children:["Posted: ",g.posted||""]}),l.jsxs("div",{children:["Output at: ",g.modelOutputAt?new Date(g.modelOutputAt).toLocaleString():"n/a"]}),l.jsxs("div",{children:["Failed at: ",b.failedAt?new Date(b.failedAt).toLocaleString():"n/a"]})]})]})]}),l.jsxs("details",{className:"surface text-xs text-slate-200",children:[l.jsx("summary",{className:"cursor-pointer select-none text-slate-300",children:"Full Monitor Payload"}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-slate-200",children:JSON.stringify(n,null,2)})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Recent Runs"}),l.jsx("div",{className:"surface max-h-52 space-y-0.5 overflow-y-auto text-xs",children:v.length?v.slice().reverse().map(w=>l.jsxs("button",{type:"button",onClick:()=>u(w.runId),className:`w-full text-left surface ${N?.runId===w.runId?"border border-sky-400/50":""}`,children:[l.jsxs("span",{className:"text-slate-300",children:["#",w.runId]})," ",l.jsx("span",{className:"text-slate-200",children:w.outcome||w.phase||"--"})," ",l.jsx("span",{className:"text-slate-400",children:w.durationMs!=null?`${w.durationMs}ms`:"--"})," ",l.jsx("span",{className:"text-slate-500",children:w.reason||""})]},w.runId)):l.jsx("div",{className:"text-slate-300",children:"No runs recorded yet."})})]}),N?l.jsxs("details",{className:"surface text-xs text-slate-200",open:!0,children:[l.jsxs("summary",{className:"cursor-pointer select-none text-slate-300",children:["Run #",N.runId," details"]}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-slate-200",children:JSON.stringify(N,null,2)})]}):null]})}function kw({state:n,onClearHistory:s,clearingHistory:r}){const[o,u]=m.useState(!1);if(!n)return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Overseer Control"}),l.jsx("div",{className:"surface text-xs text-slate-300",children:"No status received yet."})]});const f=n.runtime||{},p=n.config||{},h=n.output||{},x=n.timings||{},g=n.input||{},b=n.errors||{},v=()=>{const N=Array.isArray(g.modelMessages)?g.modelMessages:[];return N.length?N.map((M,k)=>{const S=String(M?.role||"unknown").toUpperCase(),w=String(M?.content||"");return`#${k+1} ${S} + `,document.head.appendChild(s)},[])}function GN(n,s){return typeof n=="string"&&n.trim()?n.trim().toLowerCase():typeof s=="string"&&s.trim()?s.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""):""}function Ar({id:n,label:s,url:r,className:o=""}){if(!r)return null;$N();const u=GN(n,s),f=HN[u]||wj,p=VN[u]||null,h=s||n||"Link";return l.jsxs("a",{href:r,target:"_blank",rel:"noopener noreferrer","aria-label":h,className:`inline-flex items-center w-full px-0.5 py-0.5 text-sm font-medium text-white transition justify-center gap-1 rounded-md ${p?"":"bg-slate-700 hover:bg-slate-600"} ${o}`,style:p||void 0,children:[l.jsx(f,{className:"mr-0"}),h]})}const Cr=10;function $g({batteryState:n=null,charge:s=null,config:r=null}){const o=n?.percentDisplay!=null&&Number.isFinite(n.percentDisplay)?Math.round(n.percentDisplay):null,u=n?.warnActive??null,f=n?.urgentActive??null,p=r?.Full??null,h=r?.Warn??null,x=r?.Urgent??null,g=s??n?.charge??null;let b=o;if(b==null&&(b=FN({charge:g,full:p,warn:h,urgent:x})),b==null)return{available:!1};const v=Math.max(0,Math.min(1,b/100)),N=u??(h!=null&&g!=null&&g<=h),M=f??(x!=null&&g!=null&&g<=x);return{available:!0,percent:v,percentDisplay:b,warnActive:N,urgentActive:M,warnDisplayPercent:Cr}}function FN({charge:n,full:s,warn:r,urgent:o}){if(n!=null&&s!=null&&r!=null&&o!=null&&s>r&&r>o){const u=Cr/100,f=1-u;if(n<=o)return 0;if(n<=r){const h=(n-o)/(r-o);return Math.round(Math.max(0,Math.min(1,h))*Cr)}if(n>=s)return 100;const p=(n-r)/(s-r);return Math.round((u+Math.max(0,Math.min(1,p))*f)*100)}return null}const YN=1600,XN=800;function An(...n){return n.filter(Boolean).join(" ")}function QN({visual:n,orientation:s="horizontal",variant:r="inline",compact:o=!1,showLabel:u,className:f=""}){const p=r==="background",h=s==="vertical",x=u??!p;if(!n?.available){if(p){const J=Cr,ce=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),ie=h?{bottom:`${J}%`}:{left:`${J}%`},V=An("absolute inset-0 pointer-events-none",f);return l.jsxs("div",{className:V,children:[l.jsx("div",{className:"absolute inset-0 bg-slate-900/35"}),l.jsx("div",{className:ce,style:ie})]})}return h?null:l.jsx("p",{className:"text-xs text-slate-500",children:"Battery telemetry unavailable"})}const g=n.percentDisplay??0,b=Math.max(0,Math.min(100,g)),v=n.warnDisplayPercent??Cr,N=!!n.urgentActive,M=!!n.warnActive,k=N?`${XN}ms`:M?`${YN}ms`:void 0,w=p?N||M?"bg-red-500/45":"bg-emerald-500/45":N||M?"bg-red-500":"bg-emerald-500",j=N||M?"bg-red-900/35":"bg-slate-900/35",q=N||M?"bg-red-900/45":"bg-slate-900/35",E=An(p?"absolute inset-0 pointer-events-none":"relative pointer-events-auto",h&&!p?"flex flex-col items-center justify-center":"w-full",f);if(p){const J=h?{height:`${b}%`}:{width:`${b}%`},ce=An("absolute",h?"bottom-0 left-0 right-0":"left-0 top-0 bottom-0",w,"transition-[width,height]",N&&"battery-urgent-flash"),ie=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),V=h?{bottom:`${v}%`}:{left:`${v}%`};return l.jsxs("div",{className:E,children:[l.jsx("div",{className:An("absolute inset-0",j,N&&"battery-urgent-flash")}),l.jsx("div",{className:ce,style:{...J,animationDuration:k}}),l.jsx("div",{className:ie,style:V})]})}const C=An("relative overflow-hidden rounded-sm border border-slate-800",N||M?q:"bg-zinc-900/90",N&&"battery-urgent-flash",h?"w-full flex-1":o?"h-4":"h-5"),L=h?{height:`${b}%`}:{width:`${b}%`},$=An("absolute",h?"bottom-0 left-0 right-0":"left-0 top-0 bottom-0",w,"transition-[width,height]",N&&"battery-urgent-flash"),O=An("absolute z-10",h?"left-0 right-0 h-[2px]":"top-0 bottom-0 w-[2px]","bg-black/70",M&&!N&&"battery-tick-warn"),z=h?{bottom:`${v}%`}:{left:`${v}%`},Q=`Battery ${g}%`,G=An("pointer-events-none absolute inset-0 flex items-center justify-center text-center font-semibold",h?o?"text-[0.55rem]":"text-[0.65rem]":"text-xs"),Y=An("rounded px-1.5 py-0.5",p?"bg-black/30 text-slate-100":"bg-black/50 text-slate-100");return l.jsxs("div",{className:E,children:[l.jsxs("div",{className:C,children:[l.jsx("div",{className:$,style:{...L,animationDuration:k}}),l.jsx("div",{className:O,style:z})]}),x&&!h?l.jsx("div",{className:G,children:l.jsx("span",{className:Y,children:Q})}):null,x&&h?l.jsx("div",{className:"mt-0.5 text-[0.65rem] font-semibold text-slate-100",children:l.jsxs("span",{className:Y,children:[g,"%"]})}):null]})}const Yd=an.memo(QN);function KN({mobileHud:n=!1,isActiveDriver:s=!1,idleSkipSeconds:r=null}){const o=n?"text-3xl":"text-5xl",u=n?"text-xs":"text-sm",f=n?"text-[0.55rem]":"text-[0.75rem]",p=n?"px-4 py-3":"px-6 py-4",h=s&&typeof r=="number";return l.jsx("div",{className:"pointer-events-none absolute inset-0 z-30 flex items-center justify-center bg-black/55",children:l.jsxs("div",{className:`flex flex-col items-center gap-0.5 rounded border border-amber-300/80 bg-black/70 ${p}`,children:[l.jsx("div",{className:`font-semibold text-amber-200 ${o}`,children:"IT IS YOUR TURN!"}),l.jsx("div",{className:`text-amber-200/80 ${u}`,children:"Start driving!"}),h?l.jsxs("div",{className:`text-red-100/90 ${f}`,children:["Idle skip in ",r,"s"]}):null]})})}function zo(n){return Math.max(0,Math.min(1,n))}function Gg(n){return(n-90)*Math.PI/180}function vr(n,s,r,o){const u=Gg(o);return{x:n+r*Math.cos(u),y:s+r*Math.sin(u)}}function IN(n,s,r,o,u){let f=o,p=u;p<=f&&(p+=360);const h=vr(n,s,r,f),x=vr(n,s,r,p);return["M",h.x,h.y,"A",r,r,0,0,1,x.x,x.y].join(" ")}function Sf(n,s){if(s)return"#ef4444";const r=Math.abs(n);return r>900?"#f59e0b":r>300?"#22c55e":"#64748b"}function ZN(n,s){if(n==null||n<=0)return"hsl(200 60% 18%)";const o=zo(n/(s||1));return`hsl(${(200+Math.pow(o,.45)*360)%360} 100% 60%)`}function JN(n,s){if(s)return"#ef4444";const r=zo(n==null?0:n/4095),o=[47,55,69],u=[245,158,11],[f,p,h]=o.map((x,g)=>Math.round(x+(u[g]-x)*r));return`rgb(${f}, ${p}, ${h})`}function PN({count:n,totalSpan:s,gap:r,startAngle:o}){const f=(s-r*(n-1))/n,p=[];let h=o;for(let x=0;x0?.65:null;return l.jsxs("g",{style:{transformOrigin:`${n}px ${s}px`,animation:h?`spin ${h}s linear infinite`:"none",animationDirection:h?"reverse":"normal"},children:[l.jsx("circle",{cx:n,cy:s,r:10,fill:"#64748b",stroke:"#64748b",strokeWidth:"1"}),[0,120,240].map(g=>{const b=Gg(g),v=n+p*Math.cos(b),N=s+p*Math.sin(b);return l.jsx("line",{x1:n,y1:s,x2:v,y2:N,stroke:f,strokeWidth:"4",strokeLinecap:"round"},g)}),o?l.jsx("circle",{cx:n,cy:s,r:p+8,stroke:"#ef4444",strokeWidth:"3",fill:"none",className:"animate-pulse"}):null]})}function tw({cx:n,cy:s,current:r,overcurrent:o,variant:u,dirtLeft:f,dirtRight:p}){const h=Math.abs(r),x=Sf(r,o),g=1,b=96,v=12,N=`main-brush-pattern-a-${u}`,M=`main-brush-pattern-b-${u}`,k=h>0?.6:null,S=r>=0?1:-1;return l.jsxs("g",{children:[l.jsx("defs",{children:[N,M].map((w,j)=>l.jsxs("pattern",{id:w,patternUnits:"userSpaceOnUse",width:"6",height:"6",children:[l.jsx("rect",{width:"6",height:"6",fill:x,opacity:g}),l.jsx("path",{d:"M0 6 L6 0",stroke:"#0f172a",strokeWidth:"1"}),k?l.jsx("animateTransform",{attributeName:"patternTransform",type:"translate",from:"0 0",to:`0 ${S*(j===0?6:-6)}`,dur:`${k}s`,repeatCount:"indefinite"}):null]},w))}),l.jsx("rect",{x:n-b/2,y:s-14,width:b,height:v,rx:"3",fill:`url(#${N})`,stroke:"#64748b",strokeWidth:"1"}),l.jsx("rect",{x:n-b/2,y:s+4,width:b,height:v,rx:"3",fill:`url(#${M})`,stroke:"#64748b",strokeWidth:"1"}),l.jsx("circle",{cx:n-b/4,cy:s-8,r:3.5,fill:"#fbbf24"}),l.jsx("circle",{cx:n+b/4,cy:s+8,r:3.5,fill:"#fbbf24"}),o?l.jsx("rect",{x:n-b/2-4,y:s-16,width:b+8,height:v*2+16,rx:"6",stroke:"#ef4444",strokeWidth:"3",fill:"none",className:"animate-pulse"}):null]})}function nw({sensors:n={},variant:s="full",size:r,overlay:o=!1}){const u=r||(s==="mini"?190:260),f=u/2,p=u*.07,h=f,x=f+p,g=f*.8,b=g-4,v=g+4,N=g-14,M=g-6,k=g*.65,S=n?.bumpsAndWheelDrops||{},w=n?.wheelOvercurrents||{},j=n?.wheelLeftCurrentMa??0,q=n?.wheelRightCurrentMa??0,E=n?.sideBrushCurrentMa??0,C=n?.mainBrushCurrentMa??0,L=6,$=S.bumpLeft?L:0,O=S.bumpRight?L:0,z=PN({count:6,totalSpan:140,gap:6,startAngle:-70}),Q=["L","FL","CL","CR","FR","R"],G=[n?.lightBumpLeftSignal,n?.lightBumpFrontLeftSignal,n?.lightBumpCenterLeftSignal,n?.lightBumpCenterRightSignal,n?.lightBumpFrontRightSignal,n?.lightBumpRightSignal],Y=z.map((V,T)=>({label:Q[T],start:V.start,end:V.end,value:G[T]})),J=[{label:"Cliff L",start:-60,end:-46,value:n?.cliffLeftSignal,active:n?.cliffLeft},{label:"Cliff FL",start:-32,end:-16,value:n?.cliffFrontLeftSignal,active:n?.cliffFrontLeft},{label:"Cliff FR",start:16,end:32,value:n?.cliffFrontRightSignal,active:n?.cliffFrontRight},{label:"Cliff R",start:46,end:60,value:n?.cliffRightSignal,active:n?.cliffRight}],ce=G.filter(V=>V!=null),ie=ce.length?Math.max(...ce,1200):1200;return l.jsxs("div",{className:`${o?"relative":"surface relative p-1"}`,style:o?{width:`${u}px`,height:`${u}px`}:{height:"100%",width:"100%",aspectRatio:"1 / 1"},children:[o?null:l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"absolute left-1 top-1 text-xs text-slate-400",children:"Top-down"}),l.jsxs("div",{className:"absolute right-1 top-1 text-[0.65rem] text-slate-500",children:["0–",ie]})]}),l.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${u} ${u}`,preserveAspectRatio:"xMidYMid meet",className:"mx-auto block",children:[l.jsx("circle",{cx:h,cy:x,r:g,fill:"#0f172a",stroke:"#334155",strokeWidth:"2"}),l.jsx(dx,{cx:h-k,cy:x,current:j,drop:S.wheelDropLeft,overcurrent:w.leftWheel,label:"L"}),l.jsx(dx,{cx:h+k,cy:x,current:q,drop:S.wheelDropRight,overcurrent:w.rightWheel,label:"R"}),l.jsx(ew,{cx:h+g*.65,cy:x-g*.55,current:E,overcurrent:w.sideBrush}),l.jsx(tw,{cx:h,cy:x,current:C,overcurrent:w.mainBrush,variant:s,dirtLeft:n?.dirtDetectLeft,dirtRight:n?.dirtDetect}),Y.map(V=>{const T=ZN(V.value,ie),U=v+4,P=U+28;return l.jsx(WN,{cx:h,cy:x,rBase:P,rTip:U,startDeg:V.start,endDeg:V.end,color:T,value:V.value,max:ie},V.label)}),J.map(V=>l.jsx(wd,{cx:h,cy:x,rInner:N,rOuter:M,startDeg:V.start,endDeg:V.end,color:JN(V.value,V.active),opacity:1,pulse:!!V.active},V.label)),l.jsx(wd,{cx:h,cy:x,rInner:b-$,rOuter:v-$,startDeg:-70,endDeg:-6,color:S.bumpLeft?"#ef4444":"#475569",opacity:1,pulse:!!S.bumpLeft}),l.jsx(wd,{cx:h,cy:x,rInner:b-O,rOuter:v-O,startDeg:6,endDeg:70,color:S.bumpRight?"#ef4444":"#475569",opacity:1,pulse:!!S.bumpRight})]})]})}const Xd=an.memo(nw);function aw({sensors:n,label:s,roverColor:r=null,status:o,audioStatus:u,levelStatus:f,layoutFormat:p="desktop",variant:h="default",driverLabel:x=null,showTopDown:g=!1,mobileHud:b=!1,mapPosition:v="top-center",turnTimerText:N=null,turnTimerFlashActive:M=!1,labelScale:k=1}){const S=b,w=p==="mobile-portrait",j=S?"text-[0.45rem]":"text-[0.65rem]",q=S?"px-0.25 py-0.25":"px-1 py-0.5",E=S?"px-0.25 py-0.25":"px-0.5 py-0.5",C=S?"text-[0.55rem]":"text-[0.8rem]",L=S?"left-0.5 top-0.5":"left-1 top-1",$=S?"text-[0.5rem]":"text-[0.7rem]",O=S?"px-0.5 py-0.25":"px-1 py-0.5",z=S?"left-0.5 top-1/2":"left-1 top-1/2",Q="bottom-0.5",G={transform:`translateX(-50%) scale(${k})`,transformOrigin:"center bottom"},Y="240px",J=w?.3:S?.33:.7,ie={width:Y,height:Y,opacity:S?.6:.7,transform:v==="top-center"?`translateX(-50%) scale(${J})`:`scale(${J})`,transformOrigin:v==="bottom-left"?"bottom left":v==="top-center"?"top center":"top right",...v==="bottom-left"?{left:"0.25rem",bottom:"0.25rem"}:v==="top-center"?{left:"50%",top:"0.25rem"}:{right:"0.25rem",top:"0.25rem"}};if(h==="none")return null;if(h==="spectator"){const V=[["Voltage",n?.voltageMv!=null?`${(n.voltageMv/1e3).toFixed(2)} V`:"--"],["Current",n?.currentMa!=null?`${n.currentMa} mA`:"--"],["Charge",n?.batteryChargeMah!=null?`${n.batteryChargeMah}`:"--"],["OI",n?.oiMode?.label||"--"]],T=!!n?.chargingSources?.homeBase,U=n?.chargingState?.label||"",P=!!(U&&U.toLowerCase()!=="not charging"),te=n?.oiMode?.label||"Unknown",de=te.toLowerCase(),R=de==="full"?"bg-emerald-500/80 text-emerald-50":de==="safe"?"bg-amber-400/80 text-amber-950":de==="passive"?"bg-slate-700/80 text-slate-100":"bg-slate-700/60 text-slate-200",_=T?"bg-emerald-500/80 text-emerald-50":"bg-slate-700/70 text-slate-200",I=P?"bg-emerald-500/80 text-emerald-50":T?"bg-amber-400/80 text-amber-950":"bg-slate-700/70 text-slate-200";return l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:`absolute ${L} font-medium text-slate-100 ${j}`,children:l.jsxs("div",{className:"flex flex-col gap-0.5 leading-none",children:[l.jsxs("span",{children:["Status: ",o]}),u?l.jsxs("span",{children:["Audio: ",u]}):null,f?l.jsx("span",{className:"text-cyan-300",children:f}):null]})}),l.jsx("div",{className:`absolute ${z} flex -translate-y-1/2 flex-col gap-0.5 bg-black/70 text-slate-100 ${j} ${q}`,children:l.jsxs("div",{className:"space-y-0.5 leading-tight",children:[l.jsxs("div",{className:"flex flex-col gap-0.5 text-[0.75rem] font-semibold uppercase tracking-wide",children:[l.jsx("span",{className:`rounded px-1.5 py-0.5 ${_}`,children:T?"Docked":"Undocked"}),l.jsx("span",{className:`rounded px-1.5 py-0.5 ${I}`,children:P?"Charging":"Not charging"}),l.jsxs("span",{className:`rounded px-1.5 py-0.5 ${R}`,children:["OI: ",te]})]}),V.map(([W,fe])=>l.jsxs("span",{className:"flex items-center justify-between gap-0.5",children:[l.jsx("span",{className:"text-slate-400",children:W}),l.jsx("span",{className:"font-semibold text-white",children:fe})]},W))]})}),l.jsx("div",{className:`absolute ${Q} left-1/2`,style:G,children:l.jsxs("div",{className:`flex items-center gap-0.5 bg-black/80 text-slate-100 ${E} ${C}`,children:[l.jsx("span",{className:"font-semibold text-white rounded px-1 py-[1px] border border-transparent",style:ca(r,.18),children:s||"Unnamed Rover"}),x?l.jsxs("span",{className:"text-slate-300",children:["• ",x]}):null]})})]}),g?l.jsx("div",{className:"pointer-events-none absolute rounded",style:{...ie},children:l.jsx(Xd,{sensors:n,size:240,overlay:!0})}):null]})}return l.jsxs("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:[l.jsx("div",{className:`absolute ${L} font-medium text-slate-100 ${j}`,children:l.jsxs("div",{className:"flex flex-col gap-0.5 leading-none",children:[l.jsxs("span",{children:["Status: ",o]}),u?l.jsxs("span",{children:["Audio: ",u]}):null,f?l.jsx("span",{className:"text-cyan-300",children:f}):null]})}),N?l.jsx("div",{className:`absolute right-1 top-1 rounded border ${M?"border-red-300/90 bg-red-900/80 text-red-100":"border-amber-300/80 bg-black/75 text-amber-200"} ${O} ${$}`,children:N}):null,l.jsx("div",{className:`absolute ${Q} left-1/2`,style:G,children:l.jsx("div",{className:`flex gap-0.5 bg-black/80 text-slate-100 ${E} ${C}`,children:l.jsxs("span",{children:["Rover:"," ",l.jsxs("span",{className:"rounded px-1 py-[1px] border border-transparent",style:ca(r,.18),children:['"',s||"Unnamed Rover",'"']})]})})}),g&&h!=="spectator"?l.jsx("div",{className:"pointer-events-none absolute rounded",style:{...ie},children:l.jsx(Xd,{sensors:n,size:240,overlay:!0})}):null]})}const sw=an.memo(aw),fx=2e3,lw=3e3,rw=3e3,iw=40,ow=1e3,cw={leftWheel:"Left wheel",rightWheel:"Right wheel",mainBrush:"Main brush",sideBrush:"Side brush",limiter:"Overcurrent limit"};function uw({motors:n,fill:s=0,compact:r=!1}){if(!n?.length)return null;const o=n.map(b=>cw[b]||b),u=r?"w-[12rem] h-[3.5rem]":"w-[20rem] h-[7rem]",f=r?"px-2 py-1":"px-4 py-2",p=r?"text-lg":"text-4xl",h=r?"text-xs":"text-xl",x=Math.max(0,Math.min(1,s)),g=`${Math.round(x*100)}%`;return l.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center bg-red-900/50 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 ${u}`,children:l.jsxs("div",{className:"relative h-full w-full",children:[l.jsx("div",{className:"absolute inset-0 overflow-hidden",children:l.jsx("div",{className:"h-full bg-red-700/60",style:{width:g}})}),l.jsxs("div",{className:`relative z-10 flex h-full w-full flex-col items-center justify-center text-center font-semibold text-white animate-pulse ${p} ${f}`,children:[l.jsx("div",{children:"OVERCURRENT"}),l.jsx("div",{className:`mt-0 font-medium text-white ${h}`,children:o.join(", ")})]})]})})}const dw=an.memo(uw);function fw({battery:n,compact:s=!1}){if(!n?.available||!n.warnActive&&!n.urgentActive)return null;const r=n.urgentActive?"BATTERY VERY LOW, DOCK THE ROVER AND CHARGE IMMEDIATELY!!":"Battery low! please dock and charge the rover soon.",o=s?"p-2 top-6":"p-4 top-10",u=s?"text-sm":"text-2xl";return l.jsx("div",{className:`pointer-events-none absolute flex items-center justify-center bg-amber-900/60 left-1/2 -translate-x-1/2 ${o}`,children:l.jsx("div",{className:`text-center font-semibold text-white animate-pulse ${u}`,children:l.jsx("div",{children:r})})})}const mw=an.memo(fw);function hw({sensors:n}){const s=[n?.lightBumpLeftSignal,n?.lightBumpFrontLeftSignal,n?.lightBumpCenterLeftSignal,n?.lightBumpCenterRightSignal,n?.lightBumpFrontRightSignal,n?.lightBumpRightSignal],r=s.filter(h=>h!=null).reduce((h,x)=>Math.max(h,x),1200),o=h=>Math.pow(Math.max(0,Math.min(1,(h??0)/r)),.35),u=h=>h==null||h<=0?"hsl(200 60% 18%)":`hsl(${(200+o(h)*360)%360} 100% 60%)`,f=6,p=12;return l.jsx("div",{className:"flex w-full items-center justify-center gap-0.5",children:s.map((h,x)=>{const g=o(h),b=xz.session?.role||null),r=pe(z=>z.session?.assignment?.roverId||null),o=pe(z=>z.session?.roster||[]),{sendMessage:u,onInputFocus:f,onInputBlur:p,blurChat:h,registerInputRef:x,setTypingActive:g}=pf(),{value:b}=Xe("tts",{engine:"flite",voice:"rms",pitch:50}),[v,N]=m.useState(""),[M,k]=m.useState(!1),S=s!=="spectator",w=s==="spectator",q=!!m.useMemo(()=>o.find(z=>String(z.id)===String(r))||null,[r,o])?.audio?.ttsEnabled,E=m.useMemo(()=>{if(!q)return null;const z=b?.engine==="espeak"?"espeak":"flite";if(z==="espeak"){let G=Number.isFinite(b?.pitch)?Math.round(b.pitch):void 0;return typeof G=="number"&&(G=Math.max(0,Math.min(99,G))),{speak:!0,engine:z,pitch:G}}const Q=typeof b?.voice=="string"?b.voice:void 0;return{speak:!0,engine:z,voice:Q}},[b?.engine,b?.pitch,b?.voice,q]),C=n?"pointer-events-auto absolute bottom-0.5 right-0.5 flex w-[9rem] max-w-[70vw] items-center gap-0.5 rounded bg-black/70 px-0.4 py-0.2":"pointer-events-auto absolute bottom-1 right-1 flex w-[12rem] max-w-[70vw] items-center gap-0.5 rounded bg-black/70 px-0.5 py-0.25",L=n?"min-w-0 flex-1 bg-transparent text-[0.55rem] text-slate-100 placeholder:text-slate-400 focus:outline-none":"min-w-0 flex-1 bg-transparent text-[0.7rem] text-slate-100 placeholder:text-slate-400 focus:outline-none",$=n?"rounded bg-cyan-500/80 px-0.35 py-0.2 text-[0.55rem] font-semibold text-black disabled:opacity-50":"rounded bg-cyan-500/80 px-0.5 py-0.25 text-[0.7rem] font-semibold text-black disabled:opacity-50";async function O(z){if(z.preventDefault(),!S)return;const Q=v.trim();if(Q){k(!0);try{await u(Q,E),N(""),h(),g(!1)}catch(G){alert(G.message)}finally{k(!1)}}}return w?null:l.jsxs("form",{onSubmit:O,className:C,children:[l.jsx("input",{className:L,value:v,onChange:z=>{const Q=z.target.value;N(Q),g(!!Q.trim())},onFocus:z=>{f(z),g(!!v.trim())},onBlur:z=>{p(z),g(!1)},onKeyDown:z=>{z.key==="Enter"&&!v.trim()&&(z.preventDefault(),h(),g(!1))},ref:z=>x(z,{target:"hud"}),placeholder:S?"Chat (TTS)":"Spectator",disabled:!S}),l.jsx("button",{type:"submit",disabled:!S||M,className:$,children:"Speak"})]})}const gw=m.memo(xw);function kr({sessionInfo:n,audioSessionInfo:s,videoMode:r="whep",snapshotFeed:o=null,qualityNotice:u=null,label:f,roverColor:p=null,forceMute:h=!1,telemetryFrame:x,batteryConfig:g,layoutFormat:b="desktop",hudVariant:v="default",driverLabel:N=null,hudForceMap:M=!1,hudMapPosition:k="top-center",hudLabelScale:S=1,fitParent:w=!1,overcurrentLimiter:j=null,showTurnCue:q=!1,turnTimerText:E=null,isActiveDriver:C=!1,idleSkipSeconds:L=null,showNotTurnNotice:$=!1,notTurnCountdownText:O=null,showPreviewReason:z=!1,notTurnFlashAt:Q=0}){const G=pe(ve=>(ve.session?.socials||[]).find(je=>String(je?.id||je?.label||"").toLowerCase()==="discord")?.url||null||ve.session?.discord?.invite||null),Y=m.useRef(null),J=m.useRef(null),ce=m.useRef(null),ie=m.useRef(null),V=m.useRef(null),T=m.useRef(null),U=m.useRef(null),P=m.useRef(null),[te,de]=m.useState("idle"),[R,_]=m.useState(null),[I,W]=m.useState("idle"),[fe,oe]=m.useState(null),[ue,Se]=m.useState(0),[ge,be]=m.useState(0),[Qe,Ge]=m.useState(!0),[Me,Oe]=m.useState(!1),_e=!!s?.url,ft=r==="snapshot",le=x?.sensors,{value:se}=Xe("audio",it),Ce=Number.isFinite(se?.masterVolume)?se.masterVolume:it.masterVolume,he=Number.isFinite(se?.roverVolume)?se.roverVolume:it.roverVolume,we=typeof se?.mainBrushDuckEnabled=="boolean"?se.mainBrushDuckEnabled:typeof se?.autoLevelEnabled=="boolean"?se.autoLevelEnabled:it.mainBrushDuckEnabled,Ae=Number.isFinite(se?.mainBrushDuckAmount)?Math.max(0,Math.min(1,se.mainBrushDuckAmount)):it.mainBrushDuckAmount,nt=Math.max(0,Math.min(1,Ce*he)),re=le?.batteryChargeMah??null,Ee=!(b==="desktop"),Ot=Ee?"top-right":k,[qt]=Vg(),xl=M||Ee?!0:qt,Bt=$g({charge:re,config:g}),Ln=le?.wheelOvercurrents||null,ds=m.useMemo(()=>Ln==null?[]:Object.entries(Ln).filter(([,ve])=>!!ve).map(([ve])=>ve),[Ln]),zt=j?.caps||null,Tt=j?.overcurrent?.groups||null,yn=m.useMemo(()=>{if(typeof window>"u")return{debugAudio:!1,debugHud:!1};const ve=new URLSearchParams(window.location.search);return{debugAudio:ve.has("debugAudio"),debugHud:ve.has("debugHud")}},[]),Dt=yn.debugAudio,gl=yn.debugHud,zr=m.useMemo(()=>{if(!zt)return null;const ve=Number.isFinite(zt?.drive?.cap)?zt.drive.cap:1,Ie=Number.isFinite(zt?.aux?.cap)?zt.aux.cap:1;return Math.max(0,Math.min(1,1-Math.min(ve,Ie)))},[zt]),fs=!!j?.isActive,Ut=m.useMemo(()=>{const ve=ds.length?ds:fs?["limiter"]:[],Ie=zr??(ds.length?1:0);return{motors:ve,fill:Ie,visible:!!ve.length}},[ds,fs,zr]),Sn=!!((Number(le?.mainBrushCurrentMa)||0)>iw||le?.wheelOvercurrents?.mainBrush),ms=we&&Sn?1-Ae:1,ln=Math.max(0,Math.min(1,nt*ms)),hs=we&&Sn&&Ae>0?`Volume decreased ${Math.round(Ae*1e3)/10}%`:null,da=m.useRef({hasDedicatedAudio:!1,audioUrl:null,mainBrushDuckEnabled:!1,mainBrushDuckAmount:0,mainBrushActive:!1,baseRoverGain:0,effectiveRoverGain:0});m.useEffect(()=>{da.current={hasDedicatedAudio:_e,audioUrl:s?.url||null,mainBrushDuckEnabled:we,mainBrushDuckAmount:Ae,mainBrushActive:Sn,baseRoverGain:nt,effectiveRoverGain:ln}},[_e,s?.url,we,Ae,Sn,nt,ln]);const rt=m.useCallback((ve,Ie={})=>{if(!Dt)return;const $e=J.current,je=da.current,qe={event:ve,ts:Date.now(),roverLabel:f||null,hasDedicatedAudio:je.hasDedicatedAudio,audioUrl:je.audioUrl,mainBrushDuckEnabled:je.mainBrushDuckEnabled,mainBrushDuckAmount:je.mainBrushDuckAmount,mainBrushActive:je.mainBrushActive,baseRoverGain:je.baseRoverGain,effectiveRoverGain:je.effectiveRoverGain,element:$e?{muted:$e.muted,volume:$e.volume,paused:$e.paused,ended:$e.ended,readyState:$e.readyState,networkState:$e.networkState}:null,...Ie};try{console.log(`[AudioDebug] ${ve} ${JSON.stringify(qe)}`)}catch{console.log("[AudioDebug]",ve,qe)}},[Dt,f]);m.useEffect(()=>{gl&&console.log("[OvercurrentHUD]",{overlayVisible:Ut.visible,overlayMotors:Ut.motors,overlayFill:Ut.fill,limiterActive:fs,limiterCaps:zt,limiterGroups:Tt,wheelOvercurrents:Ln})},[gl,Ut,fs,zt,Tt,Ln]),m.useEffect(()=>{rt("settings/update")},[rt]);const fa=m.useCallback(()=>{clearTimeout(ce.current),ce.current=setTimeout(()=>Se(Date.now()),fx)},[]),Ua=m.useCallback(()=>{clearTimeout(ie.current),ie.current=setTimeout(()=>be(Date.now()),fx)},[]),En=m.useCallback(async()=>{const ve=Y.current;if(ve)try{ve.muted=!0,await ve.play()}catch{}},[]),Ur=m.useCallback((ve=0)=>{if(h||_e)return;clearTimeout(T.current);const Ie=()=>{clearTimeout(T.current),T.current=setTimeout(()=>{h||$e()},lw)},$e=async()=>{const je=Y.current;if(je)try{await En(),je.muted=!1,await je.play(),Ge(!1)}catch{je.muted=!0,Ge(!0),Ie()}};T.current=setTimeout($e,ve)},[En,h,_e]);m.useEffect(()=>()=>{clearTimeout(ce.current),clearTimeout(ie.current),clearTimeout(T.current),clearInterval(V.current),U.current&&(cancelAnimationFrame(U.current),U.current=null)},[]),m.useEffect(()=>{if(!$||!Q)return;Oe(!0);const ve=setTimeout(()=>Oe(!1),650);return()=>clearTimeout(ve)},[$,Q]),m.useEffect(()=>{te==="playing"&&Ur(0)},[te,Ur]),m.useEffect(()=>{ft&&(de("snapshot"),_(null))},[ft]),m.useEffect(()=>{if(ft||!n?.url||!Y.current)return;let ve=!0,Ie;const $e=setTimeout(()=>Ge(!0),0),je=(qe,mt)=>{ve&&(rt("video/status",{nextStatus:qe,info:mt||null}),de(qe),_(mt||null),qe==="playing"&&En(),["error","failed","disconnected","closed"].includes(qe)&&fa())};return Ie=new ux({url:n.url,token:n.token,video:Y.current,receiveAudio:!_e,onStatus:je}),Ie.start().catch(qe=>{ve&&(de("error"),_(qe.message),fa())}),()=>{ve=!1,clearTimeout($e),Ie?.stop()}},[ft,n?.url,n?.token,ue,fa,En,_e,rt]),m.useEffect(()=>{te==="stopped"&&n?.url&&fa()},[te,n?.url,fa]),m.useEffect(()=>{const ve=J.current;if(!ve||!s?.url){rt("route/no-audio-url"),P.current=null;return}const Ie=Math.max(0,Math.min(1,ln)),$e=P.current==null?Math.max(0,Math.min(1,ve.volume)):P.current;if(U.current&&(cancelAnimationFrame(U.current),U.current=null),Ie>$e){const je=performance.now(),qe=$e,mt=Ie-qe,zn=xs=>{const St=Math.min(1,(xs-je)/ow),ma=qe+mt*St;ve.volume=ma,P.current=ma,St<1?U.current=requestAnimationFrame(zn):U.current=null};U.current=requestAnimationFrame(zn)}else ve.volume=Ie,P.current=Ie;rt("route/direct",{elementVolume:Ie,duckEnabled:we,mainBrushActive:Sn,duckAmount:Ae})},[s?.url,ln,we,Sn,Ae,rt]),m.useEffect(()=>{if(!s?.url||!J.current)return;let ve=!0,Ie;const $e=(je,qe)=>{ve&&(rt("audio/status",{nextStatus:je,info:qe||null}),oe(qe||(je==="connected"?"connected":null)),W(mt=>je==="connected"&&(mt==="playing"||mt==="connecting")||je==="new"?mt:je),["error","failed"].includes(je)&&Ua())};return Ie=new ux({url:s.url,token:s.token,video:J.current,audioOnly:!0,onStatus:$e}),Ie.start().catch(je=>{ve&&(W("error"),oe(je.message),Ua())}),()=>{ve=!1,Ie?.stop()}},[s?.url,s?.token,ge,Ua,rt]),m.useEffect(()=>{const ve=J.current;if(!s?.url||!ve){clearInterval(V.current);return}if(!["connecting","connected","playing","paused"].includes(I)){clearInterval(V.current);return}const $e=async()=>{const je=J.current;je&&(je.muted=!1,!(!je.paused&&!je.ended)&&(rt("retry/play-attempt"),je.play().then(()=>{rt("retry/play-ok"),W(qe=>qe==="connected"?"playing":qe),oe(qe=>qe==="paused"?null:qe)}).catch(qe=>{rt("retry/play-fail",{error:qe?.message}),oe(mt=>mt||qe?.message||"autoplay blocked")})))};return $e(),V.current=setInterval($e,rw),()=>clearInterval(V.current)},[s?.url,I,rt]),m.useEffect(()=>{const ve=J.current;if(!ve)return;const Ie=()=>{rt("element/play"),W(St=>St==="error"?St:"playing"),oe(null)},$e=()=>{rt("element/pause"),W(St=>["error","failed","disconnected","closed","stopped"].includes(St)?St:"paused"),oe(St=>St||"paused")},je=()=>{rt("element/ended"),W(St=>St==="error"?St:"stopped"),oe(St=>St||"ended")},qe=()=>{const{error:St}=ve,ma=St?.message||"audio error";rt("element/error",{error:ma}),W("error"),oe(ma)},mt=()=>rt("element/waiting"),zn=()=>rt("element/canplay"),xs=()=>rt("element/stalled");return ve.addEventListener("play",Ie),ve.addEventListener("pause",$e),ve.addEventListener("ended",je),ve.addEventListener("error",qe),ve.addEventListener("waiting",mt),ve.addEventListener("canplay",zn),ve.addEventListener("stalled",xs),()=>{ve.removeEventListener("play",Ie),ve.removeEventListener("pause",$e),ve.removeEventListener("ended",je),ve.removeEventListener("error",qe),ve.removeEventListener("waiting",mt),ve.removeEventListener("canplay",zn),ve.removeEventListener("stalled",xs)}},[s?.url,rt]);const Hr=o?.error?`Error: ${o.error}`:o?.objectUrl?"snapshot":o?.status||"waiting",Vr=ft?Hr:n?.url?te==="error"?`Error: ${R||"unknown"}`:R?`${te} (${R})`:te:"waiting",$r=s?.error?`Error: ${s.error}`:s?.url?I==="error"?`Error: ${fe||"unknown"}`:fe?`${I} (${fe})`:I:null,ps=v==="spectator",Ht=v==="none";return l.jsxs("div",{className:`flex flex-col gap-0.5 ${w?"h-full":""}`,children:[l.jsxs("div",{className:`relative w-full overflow-hidden bg-black ${w?"h-full flex-1":"aspect-[4/3]"}`,children:[ft?o?.objectUrl?l.jsx("img",{src:o.objectUrl,alt:f,className:"h-full w-full object-contain",draggable:!1}):l.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-slate-300",children:"Waiting for frame…"}):l.jsx("video",{ref:Y,muted:h||Qe||_e,playsInline:!0,autoPlay:!0,controls:!1,className:"h-full w-full object-contain"}),l.jsx("audio",{ref:J,autoPlay:!0,hidden:!0}),!Ht&&q?l.jsx(KN,{mobileHud:Ee,isActiveDriver:C,idleSkipSeconds:L}):null,Ht?null:l.jsx(sw,{sensors:le,label:f,roverColor:p,status:Vr,audioStatus:$r,levelStatus:hs,layoutFormat:b,variant:v,driverLabel:N,showTopDown:xl,mobileHud:Ee,mapPosition:Ot,turnTimerText:E,turnTimerFlashActive:Me,labelScale:S}),Ht?null:l.jsx(gw,{compact:Ee}),!Ht&&gl?l.jsx("div",{className:"pointer-events-none absolute left-1 top-1 z-40 rounded bg-black/80 px-1 py-0.5 text-[0.6rem] text-lime-200",children:`OC vis:${Ut.visible?1:0} motors:${Ut.motors.length} fill:${Math.round(Ut.fill*100)}%`}):null,Ht?null:l.jsx(dw,{motors:Ut.motors,fill:Ut.fill,compact:Ee}),Ht?null:l.jsx(mw,{battery:Bt,compact:Ee}),!Ht&&ps&&Bt.available?l.jsx("div",{className:"pointer-events-none absolute right-1 top-1/2 flex h-[70%] -translate-y-1/2 flex-col items-center justify-center rounded bg-black/60 px-0.5 pb-1 pt-1",children:l.jsx(Yd,{visual:Bt,orientation:"vertical",variant:"inline",compact:Ee,className:"h-full w-4"})}):null,!Ht&&u?l.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-1/2 -translate-y-1/2",children:l.jsxs("div",{className:`mx-auto w-fit rounded border border-amber-300/80 bg-black/75 text-amber-200 ${Ee?"px-2 py-1 text-[0.6rem]":"px-3 py-1.5 text-sm"}`,children:[l.jsx("div",{className:"text-center",children:u}),l.jsx("div",{className:"pointer-events-auto mt-0",children:l.jsx(Ar,{id:"discord",label:"Join our Discord server while you wait!",url:G})})]})}):null,!Ht&&$?l.jsx("div",{className:"pointer-events-none absolute right-1 top-1 z-40",children:l.jsxs("div",{className:`max-w-[18rem] rounded border ${Me?"border-red-300/90 bg-red-900/80 text-red-100":"border-amber-300/80 bg-black/75 text-amber-200"} ${Ee?"px-2 py-1 text-[0.6rem]":"px-2.5 py-1.5 text-[0.72rem]"}`,children:[l.jsx("div",{className:Me?"text-[0.82rem] font-semibold text-red-50":"text-[0.82rem] font-semibold text-white",children:"Not your turn to drive!"}),O?l.jsx("div",{className:Me?"text-red-100/95":"text-amber-100",children:O}):null,z?l.jsx("div",{className:Me?"text-red-100/90":"text-amber-200/85",children:"Video switched to preview mode to save bandwidth."}):null,l.jsx("div",{className:"pointer-events-auto mt-0.5",children:l.jsx(Ar,{id:"discord",label:"Join our Discord while you wait!",url:G})})]})}):null]}),!Ht&&!ps&&l.jsxs("div",{className:"space-y-0.5",children:[l.jsx(pw,{sensors:le}),l.jsx("div",{className:"panel-section space-y-0.5 text-sm",children:l.jsx(Yd,{visual:Bt,compact:Ee})})]})]})}function bw(n=[]){const s=new Set;return n.forEach(r=>{if(String(r?.role||"")==="spectator")return;const u=String(r?.roverId||"").trim(),f=String(r?.socketId||"").trim();!u||!f||s.add(f)}),s.size}function jf({layoutFormat:n="desktop"}){const s=pe(se=>se.session?.mode||null),r=pe(se=>se.session?.assignment?.roverId??null),o=pe(se=>se.session?.roster??[]),u=pe(se=>se.session?.users??[]),f=pe(se=>se.session?.turnQueues??{}),p=pe(se=>se.session?.socketId||null),h=pe(se=>se.session?.activeDrivers??{}),{state:{song:x,lastControlIntentAt:g},overcurrentLimiter:b}=At(),[v,N]=m.useState(()=>Date.now()),[M,k]=m.useState(!1),[S,w]=m.useState(null),[j,q]=m.useState(0),E=m.useRef({active:!1,roverId:null}),C=m.useRef(g||0);m.useEffect(()=>{if(s!=="turns")return;const se=setInterval(()=>N(Date.now()),250);return()=>clearInterval(se)},[s]);const $=!!(r&&o?o.find(se=>String(se.id)===String(r)):null)?.media?.audioPublishUrl,O=r?f?.[r]:null,z=r?h?.[r]:null,Q=!!(p&&z===p),G=m.useMemo(()=>{const se=O?.queue||[];if(!se.length||!O?.current||se.length<=1)return null;const Ce=se.findIndex(he=>he===O.current);return Ce===-1?se[0]||null:se[(Ce+1)%se.length]||null},[O?.queue,O?.current]),Y=!!(p&&G===p),J=O?.deadline||null,ce=O?.idleDeadline||null,ie=J?J-v:null,V=ce?ce-v:null,T=s==="turns",U=o.length,P=m.useMemo(()=>bw(u),[u]),te=T&&P>U,de=T&&Y&&ie!=null&&ie<=5e3&&ie>0,R=T&&!Q,_=R&&!de&&te,I=!_,W=ie!=null&&Number.isFinite(ie)?Math.max(0,Math.ceil(ie/1e3)):null,fe=V!=null&&Number.isFinite(V)?Math.max(0,Math.ceil(V/1e3)):null,oe=m.useMemo(()=>!T||!Q?null:W!=null?`${W}s left`:"Your turn",[T,Q,W]),ue=m.useMemo(()=>!R||!Y||W==null?null:`${W} seconds until your turn.`,[R,Y,W]),Se=r?[...I?[{type:"rover",id:r,key:r}]:[],...$?[{type:"rover",id:`${r}-audio`,key:`${r}-audio`}]:[]]:[],ge=wr(Se),be=r&&I?ge[r]:null,Qe=r&&$?ge[`${r}-audio`]:null,Ge=yf(r?[r]:[],{enabled:!!r,version:s}),Me=r&&Ge[r]||null,Oe=pl(r),_e=r&&o?o.find(se=>String(se.id)===String(r)):null,ft=_e?.battery??null,le=_e?.name||(r?`Rover ${r}`:"");return m.useEffect(()=>{if(s!=="turns"){k(!1),w(null),E.current={active:!1,roverId:null};return}const se=E.current,Ce=Q&&!se.active,he=Q&&r&&r!==se.roverId;Ce||he?(k(!0),w(Date.now())):!Q&&se.active&&(k(!1),w(null)),E.current={active:Q,roverId:r}},[Q,r,s]),m.useEffect(()=>{!M||!S||g>S&&k(!1)},[g,S,M]),m.useEffect(()=>{const se=Number(C.current)||0,Ce=Number(g)||0;Ce>se&&R&&q(Date.now()),C.current=Ce},[R,g]),l.jsx("section",{className:"panel",children:r?l.jsx(kr,{sessionInfo:be,videoMode:I?"whep":"snapshot",snapshotFeed:Me,audioSessionInfo:Qe,label:le,roverColor:_e?.color||null,telemetryFrame:Oe,batteryConfig:ft,layoutFormat:n,overcurrentLimiter:b,songNote:x?.note,qualityNotice:null,showTurnCue:M,turnTimerText:oe,turnSeconds:W,isActiveDriver:Q,idleSkipSeconds:fe,showNotTurnNotice:R,notTurnCountdownText:ue,showPreviewReason:_,notTurnFlashAt:j}):l.jsxs("div",{className:"panel-muted content-center text-center text-sm text-slate-400 aspect-[4/3]",children:[l.jsx("p",{children:"You are not assigned to a rover."}),l.jsx("p",{className:"mt-0",children:l.jsx("a",{href:"/spectate",className:"text-blue-400 underline hover:text-blue-500",children:"Click here to visit the spectator page."})})]})})}function Ro({label:n,tone:s="muted"}){const r=s==="success"?"bg-emerald-900 text-emerald-100":s==="warn"?"bg-amber-900 text-amber-100":"bg-slate-800 text-slate-200";return l.jsx("span",{className:`rounded px-1 py-0.5 text-xs font-semibold leading-none ${r}`,children:n})}function Uo(n){if(!Number.isFinite(n))return 0;const s=n%360;return s<0?s+360:s}function vw(n){if(!Array.isArray(n)||n.length<3)return 0;const[s,r,o]=n,u=Math.max(0,Math.min(255,Number(s)))/255,f=Math.max(0,Math.min(255,Number(r)))/255,p=Math.max(0,Math.min(255,Number(o)))/255,h=Math.max(u,f,p),x=Math.min(u,f,p),g=h-x;if(g===0)return 0;let b=0;return h===u?b=(f-p)/g%6:h===f?b=(p-u)/g+2:b=(u-f)/g+4,Uo(Math.round(b*60))}function mx(n){const s=Uo(n),r=1,o=1-Math.abs(s/60%2-1);let u=0,f=0,p=0;return s<60?(u=r,f=o):s<120?(u=o,f=r):s<180?(f=r,p=o):s<240?(f=o,p=r):s<300?(u=o,p=r):(u=r,p=o),[Math.round(u*255),Math.round(f*255),Math.round(p*255)]}function hx(n){return n?Array.isArray(n.hsColor)?Uo(Number(n.hsColor[0])):Array.isArray(n.rgbColor)?vw(n.rgbColor):0:0}function yw({entity:n,connected:s,controlsLocked:r,onToggle:o,onSetColor:u,onSetWhite:f}){const p=n.state==="unavailable"||!n.available,h=n.state==="on",x=n.type==="light"&&n.supportsColor,g=p?"warn":h?"success":"muted",b=p?"Unavailable":h?"On":"Off",v=r||!s||p,N=v||!x,[M,k]=m.useState(()=>hx(n)),S=m.useRef(M),w=m.useRef(!1),j=p?"border-slate-800 bg-slate-900 text-slate-400 cursor-not-allowed":r?"border-slate-800 bg-slate-900 text-slate-300 cursor-not-allowed":h?"border-emerald-700 bg-emerald-900/80 text-emerald-50 hover:bg-emerald-800":"border-rose-800 bg-rose-900/80 text-rose-50 hover:bg-rose-800";m.useEffect(()=>{if(!x||w.current)return;const z=hx(n);S.current=z,k(z)},[n.rgbColor,n.hsColor,x]);const q=z=>{const Q=Uo(Number(z.target.value));S.current=Q,k(Q)},E=()=>{N||!u||u(n.id,mx(S.current))},C=z=>{z.stopPropagation()},L=z=>{C(z),!(N||!f)&&f(n.id)},O=`rgb(${(x?mx(S.current):[255,255,255]).join(",")})`;return l.jsxs("button",{type:"button",onClick:()=>o(n.id),disabled:v,className:`relative flex min-w-[12rem] flex-[1_1_12rem] items-start justify-between gap-0.5 rounded px-1 py-0.5 text-left transition-colors ${j} disabled:opacity-60 disabled:hover:bg-inherit`,children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex items-center gap-0.5 text-sm leading-normal",children:[l.jsx("span",{className:"truncate font-semibold text-white",children:n.name||n.id}),x&&l.jsxs(l.Fragment,{children:[l.jsx(Ro,{label:b,tone:g}),!s&&l.jsx("span",{className:"text-xs text-amber-200",children:"Offline"})]})]}),x?l.jsx("div",{className:"-mt-0.5 w-full",onClick:C,onPointerDown:z=>{C(z),w.current=!0},onPointerUp:z=>{C(z),w.current=!1,E()},onPointerCancel:z=>{C(z),w.current=!1,E()},onKeyUp:z=>{C(z),E()},onBlur:E,children:l.jsx("div",{className:"relative w-full",children:l.jsx("input",{type:"range",min:"0",max:"360",step:"1",value:M,onChange:q,disabled:N,"aria-label":`Set color for ${n.name||n.id}`,className:"ha-hue-slider w-full"})})}):l.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-slate-400",children:[l.jsx(Ro,{label:b,tone:g}),!s&&l.jsx("span",{className:"text-amber-200",children:" · Offline"})]})]}),x&&l.jsxs("div",{className:"absolute right-1 top-1 flex items-center gap-0.5",children:[l.jsx("span",{role:"button",tabIndex:N?-1:0,onClick:L,onPointerDown:C,onKeyDown:z=>{N||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),L(z))},title:"Set white color temperature","aria-label":`Set ${n.name||n.id} to white`,"aria-disabled":N,className:`inline-flex items-center justify-center rounded border border-slate-200 bg-white px-1 py-0.5 text-xs font-semibold leading-none text-slate-900 ${N?"cursor-not-allowed opacity-60":"cursor-pointer hover:bg-slate-100"}`,children:"white"}),l.jsx("span",{className:"pointer-events-none h-2.5 w-2.5 rounded-full border border-white/60",style:{backgroundColor:O}})]}),!x&&l.jsx("div",{className:"self-center text-xs font-semibold text-white/90",children:h?"Turn off":"Turn on"})]})}function Fg(){const{state:{keymap:n}}=At(),s=pe(N=>N.session?.homeAssistant||null),{homeAssistantToggle:r,homeAssistantSetLightColor:o,homeAssistantSetLightWhite:u}=Qt(),f=m.useMemo(()=>s?.entities||[],[s?.entities]),p=s?.lightPolicy||null,h=!!(p?.locked||p?.lockedOn),x=p?.lockState||(p?.lockedOn?"on":null),g=Rt(n?.homeAssistantOn?.[0]),b=Rt(n?.homeAssistantOff?.[0]);if(!s?.enabled)return l.jsxs("section",{className:"panel-section space-y-0.5 text-sm text-slate-400",children:[l.jsx("p",{className:"text-slate-300",children:"Room Controls"}),l.jsx("p",{className:"text-slate-500",children:"Not configured on the server."})]});if(f.length===0)return l.jsxs("section",{className:"panel-section space-y-0.5 text-sm text-slate-400",children:[l.jsx("p",{className:"text-slate-300",children:"Room Controls"}),l.jsx("p",{className:"text-slate-500",children:"No lights or switches configured."})]});const v=!!s?.connected;return l.jsxs("section",{className:"panel-section space-y-0.5 text-base",children:[l.jsxs("header",{className:"flex items-center justify-between gap-0.5 text-sm text-slate-400",children:[l.jsxs("div",{className:"flex items-center gap-0.5",children:[l.jsx("p",{children:"Room Controls"}),l.jsx("span",{className:"text-xs text-slate-500",children:f.length}),h?l.jsx(Ro,{label:x==="off"?"Locked Off":"Locked On",tone:"warn"}):null,l.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-slate-300 background-black",children:[l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx("span",{children:"On"}),g?l.jsx(px,{label:g}):null]}),l.jsxs("span",{className:"flex items-center gap-0.5",children:[l.jsx("span",{children:"Off"}),b?l.jsx(px,{label:b}):null]})]})]}),l.jsx(Ro,{label:v?"Connected":"Offline",tone:v?"success":"warn"})]}),h?l.jsx("p",{className:"rounded border border-amber-600/60 bg-amber-900/40 px-1 py-0.5 text-xs text-amber-100",children:x==="off"?"Lights are locked off. Room controls are disabled.":"Lights are locked on. Room controls are disabled."}):null,l.jsx("div",{className:"flex flex-wrap gap-0.5",children:f.map(N=>l.jsx(yw,{entity:N,connected:v,controlsLocked:h,onToggle:r,onSetColor:o,onSetWhite:u},N.id))})]})}function px({label:n}){return n?l.jsx("span",{className:"rounded border border-white/40 px-1 text-[0.7rem] text-white",children:n}):null}function Yg(){const{login:n,setRole:s}=Qt(),[r,o]=m.useState(""),[u,f]=m.useState(""),[p,h]=m.useState(!1);async function x(g){g.preventDefault(),h(!0);try{await n(r,u),o(""),f("")}catch(b){alert(b.message)}finally{h(!1)}}return l.jsxs("div",{className:"panel-section space-y-0.5 text-base",children:[l.jsx("p",{className:"text-sm text-slate-400",children:"Admin login"}),l.jsxs("form",{className:"flex flex-col gap-0.5",onSubmit:x,children:[l.jsx("input",{className:"field-input",placeholder:"Username",value:r,onChange:g=>o(g.target.value)}),l.jsx("input",{className:"field-input",placeholder:"Password",type:"password",value:u,onChange:g=>f(g.target.value)}),l.jsx("button",{type:"submit",disabled:p,className:"button-dark w-full disabled:opacity-50",children:p?"Logging in…":"Login"})]})]})}function xx(...n){return n.filter(Boolean).join(" ")}function Sw(n){const s=n?.batteryState?.percentDisplay;return s==null?"--":`${s}%`}function jw(n){return n?.batteryState?n.batteryState.urgentActive?"text-red-400":n.batteryState.warnActive?"text-amber-300":"text-emerald-300":"text-slate-400"}function Nw({title:n,roster:s=[],emptyText:r="No roster data.",renderActions:o=null}){return l.jsxs("div",{className:"space-y-0.5 text-sm",children:[n&&l.jsx("p",{className:"text-sm text-slate-400",children:n}),s.length===0?l.jsx("p",{className:"text-sm text-slate-500",children:r}):l.jsx("ul",{className:"space-y-0.5 text-sm",children:s.map(u=>{const f=!!(u?.private?.enabled&&u?.private?.open),p=!!u?.locked;return l.jsxs("li",{className:xx("surface flex flex-wrap items-center justify-between gap-0.5",p?"bg-red-900/40":f?"bg-amber-700/35 border border-amber-200/30":null),children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-slate-200",children:l.jsx("span",{className:"rounded px-1 py-[1px] border border-transparent",style:ca(u.color,.16),children:u.name})}),l.jsxs("p",{className:"text-xs text-slate-500 flex flex-wrap items-center gap-0.5",children:[l.jsx("span",{children:u.locked?"locked":"free"}),u.lockReason&&l.jsx("span",{className:"rounded bg-black/30 px-1",children:u.lockReason}),l.jsxs("span",{className:xx("font-semibold",jw(u)),children:["Battery ",Sw(u)]})]})]}),o?o(u):null]},u.id)})})]})}function ww(n){const s=n?.runtime||{},r=n?.output||{},o=n?.errors||{};return s.inFlight?{label:"IN FLIGHT",detail:s.reason||"Generating commentary now",className:"border-amber-400/60 bg-amber-700/20 text-amber-200"}:s.outcome==="posted"?{label:"POSTED",detail:r.posted?`Last: ${r.posted}`:"Commentary posted",className:"border-emerald-400/60 bg-emerald-700/20 text-emerald-200"}:s.outcome==="skipped"?{label:"SKIPPED",detail:s.reason||"Model chose to skip",className:"border-slate-400/60 bg-slate-700/30 text-slate-200"}:s.outcome==="failed"?{label:"FAILED",detail:o.message||s.reason||"Tick failed",className:"border-red-400/60 bg-red-700/20 text-red-200"}:{label:s.running?"IDLE":"STOPPED",detail:s.reason||"Waiting for next tick",className:"border-sky-400/50 bg-sky-700/20 text-sky-200"}}function Aw(n,s){const r=Date.now(),u=(Array.isArray(n)?n:[]).map((f,p)=>{const h=String(f?.role||"").toLowerCase(),x=typeof f?.content=="string"?f.content:JSON.stringify(f?.content??null,null,2),g=h==="system"?"LLM System":h==="assistant"?"LLM Context":h==="user"?"LLM Input":"LLM Message";return{id:`llm-msg-${p}`,message:{ts:r+p,nickname:g,text:x,role:"spectator",system:h==="system"}}});if(s!=null){const f=String(s);u.push({id:"llm-output",message:{ts:r+u.length+1,nickname:"LLM Output",text:f.trim()?f:"",role:"spectator",system:!0}})}return u}function Cw({state:n,onClearHistory:s,clearingHistory:r}){const[o,u]=m.useState(null);if(!n)return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"LLM Commentary"}),l.jsx("div",{className:"surface text-xs text-slate-300",children:"No status received yet."})]});const f=n.runtime||{},p=n.counters||{},h=n.timings||{},x=n.input||{},g=n.output||{},b=n.errors||{},v=Array.isArray(n.history)?n.history:[],N=v.find(w=>w.runId===o)||(v.length?v[v.length-1]:null),M=ww(n),k=Aw(x.modelMessages,g.raw),S=[{label:"running",value:f.running?"yes":"no"},{label:"in flight",value:f.inFlight?"yes":"no"},{label:"phase",value:f.phase||"--"},{label:"run id",value:f.currentRunId??"--"},{label:"tick count",value:f.tickCount??0},{label:"last tick",value:f.lastTickAt?new Date(f.lastTickAt).toLocaleString():"never"},{label:"next run",value:f.nextRunAt?new Date(f.nextRunAt).toLocaleString():"n/a"},{label:"outcome",value:f.outcome||"--"},{label:"reason",value:f.reason||"--"},{label:"skip streak",value:p.skipStreak??0},{label:"clear count",value:p.clearCount??0},{label:"last gen",value:h.lastGenerationMs!=null?`${h.lastGenerationMs} ms`:"--"},{label:"avg gen",value:h.avgGenerationMs!=null?`${h.avgGenerationMs} ms`:"--"},{label:"gen count",value:h.generationCount??0},{label:"prompt chars",value:p.promptChars??0},{label:"active drivers",value:p.snapshotSummary?.activeDrivers??0},{label:"snapshot rovers",value:p.snapshotSummary?.rovers??0},{label:"snapshot chat",value:p.snapshotSummary?.chatMessages??0}];return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"LLM Commentary"}),l.jsx("div",{className:"flex gap-0.5 text-xs",children:l.jsx("button",{type:"button",onClick:s,disabled:!!r,className:"button-danger disabled:cursor-not-allowed disabled:opacity-60",children:r?"Clearing...":"Clear LLM History"})}),l.jsxs("div",{className:`surface border text-center ${M.className}`,children:[l.jsx("div",{className:"text-[1.1rem] font-bold tracking-wide",children:M.label}),l.jsx("div",{className:"text-xs text-slate-200",children:M.detail})]}),l.jsx("div",{className:"surface flex flex-wrap gap-0.5 text-xs",children:S.map(w=>l.jsxs("span",{className:"rounded border border-slate-600/60 bg-slate-800/70 px-0.5 py-0.25 text-[0.72rem] leading-tight text-slate-200",children:[w.label,": ",w.value]},w.label))}),b.message?l.jsxs("div",{className:"surface text-xs text-red-300 break-words",children:["Error: ",b.message]}):null,b.details?l.jsxs("details",{className:"surface text-xs text-red-200",children:[l.jsx("summary",{className:"cursor-pointer select-none text-red-300",children:"Failure details"}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-red-200",children:JSON.stringify(b.details,null,2)})]}):null,g.generated?l.jsxs("div",{className:"surface text-xs text-slate-200 break-words",children:["Generated: ",g.generated]}):null,g.posted?l.jsxs("div",{className:"surface text-xs text-emerald-200 break-words",children:["Posted: ",g.posted]}):null,l.jsxs("div",{className:"grid gap-0.5 md:grid-cols-2",children:[l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Live Input Conversation"}),l.jsx("div",{className:"surface max-h-72 space-y-0.5 overflow-y-auto",children:k.length?k.map(w=>l.jsx(ff,{message:w.message},w.id)):l.jsx("div",{className:"text-xs text-slate-300",children:"No model conversation captured yet."})})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Output + Error"}),l.jsxs("div",{className:"surface space-y-0.5 text-xs text-slate-200",children:[l.jsxs("div",{children:["Raw output: ",g.raw?.trim()?g.raw:""]}),l.jsxs("div",{children:["Posted: ",g.posted||""]}),l.jsxs("div",{children:["Output at: ",g.modelOutputAt?new Date(g.modelOutputAt).toLocaleString():"n/a"]}),l.jsxs("div",{children:["Failed at: ",b.failedAt?new Date(b.failedAt).toLocaleString():"n/a"]})]})]})]}),l.jsxs("details",{className:"surface text-xs text-slate-200",children:[l.jsx("summary",{className:"cursor-pointer select-none text-slate-300",children:"Full Monitor Payload"}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-slate-200",children:JSON.stringify(n,null,2)})]}),l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Recent Runs"}),l.jsx("div",{className:"surface max-h-52 space-y-0.5 overflow-y-auto text-xs",children:v.length?v.slice().reverse().map(w=>l.jsxs("button",{type:"button",onClick:()=>u(w.runId),className:`w-full text-left surface ${N?.runId===w.runId?"border border-sky-400/50":""}`,children:[l.jsxs("span",{className:"text-slate-300",children:["#",w.runId]})," ",l.jsx("span",{className:"text-slate-200",children:w.outcome||w.phase||"--"})," ",l.jsx("span",{className:"text-slate-400",children:w.durationMs!=null?`${w.durationMs}ms`:"--"})," ",l.jsx("span",{className:"text-slate-500",children:w.reason||""})]},w.runId)):l.jsx("div",{className:"text-slate-300",children:"No runs recorded yet."})})]}),N?l.jsxs("details",{className:"surface text-xs text-slate-200",open:!0,children:[l.jsxs("summary",{className:"cursor-pointer select-none text-slate-300",children:["Run #",N.runId," details"]}),l.jsx("pre",{className:"mt-0.5 whitespace-pre-wrap break-words text-[0.72rem] text-slate-200",children:JSON.stringify(N,null,2)})]}):null]})}function kw({state:n,onClearHistory:s,clearingHistory:r}){const[o,u]=m.useState(!1);if(!n)return l.jsxs("div",{className:"space-y-0.5",children:[l.jsx("div",{className:"panel-muted text-xs uppercase",children:"Overseer Control"}),l.jsx("div",{className:"surface text-xs text-slate-300",children:"No status received yet."})]});const f=n.runtime||{},p=n.config||{},h=n.output||{},x=n.timings||{},g=n.input||{},b=n.errors||{},v=()=>{const N=Array.isArray(g.modelMessages)?g.modelMessages:[];return N.length?N.map((M,k)=>{const S=String(M?.role||"unknown").toUpperCase(),w=String(M?.content||"");return`#${k+1} ${S} ${w}`}).join(` ---------------------------------------- diff --git a/server/public/index.html b/server/public/index.html index 13cad9f9..07947cf8 100644 --- a/server/public/index.html +++ b/server/public/index.html @@ -11,8 +11,8 @@ Roomba Rover - - + +
diff --git a/webui/src/components/VideoTile/index.jsx b/webui/src/components/VideoTile/index.jsx index b62dea77..5cf974ec 100644 --- a/webui/src/components/VideoTile/index.jsx +++ b/webui/src/components/VideoTile/index.jsx @@ -698,11 +698,19 @@ export default function VideoTile({ : 'border-amber-300/80 bg-black/75 text-amber-200' } ${mobileHud ? 'px-2 py-1 text-[0.6rem]' : 'px-2.5 py-1.5 text-[0.72rem]'}`} > -
+
Not your turn to drive!
{notTurnCountdownText ? ( -
{notTurnCountdownText}
+
+ {notTurnCountdownText} +
) : null} {showPreviewReason ? (