From c83da30d3d85d27c2335b33f9c2448386d58da5f Mon Sep 17 00:00:00 2001 From: Finessse Date: Mon, 12 Jan 2026 07:37:52 +0700 Subject: [PATCH] build(webui): rebuild embedded assets with rate limits component --- cmd/proxypilotui/assets/assets/index.css | 2 +- cmd/proxypilotui/assets/assets/index.js | 58 ++++++++++++------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cmd/proxypilotui/assets/assets/index.css b/cmd/proxypilotui/assets/assets/index.css index eb8b4f42..01e30c6a 100644 --- a/cmd/proxypilotui/assets/assets/index.css +++ b/cmd/proxypilotui/assets/assets/index.css @@ -1 +1 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"JetBrains Mono","Fira Code",monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-900:oklch(39.8% .07 227.392);--color-cyan-950:oklch(30.2% .056 229.695);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:"JetBrains Mono","Fira Code",monospace;--font-display:"Space Grotesk",system-ui,sans-serif;--font-body:"IBM Plex Sans",system-ui,sans-serif;--bg-void:var(--bg-void);--bg-panel:var(--bg-panel);--bg-elevated:var(--bg-elevated);--bg-active:var(--bg-active);--accent-primary:var(--accent-primary);--accent-secondary:var(--accent-secondary);--accent-glow:var(--accent-glow);--status-online:var(--status-online);--status-offline:var(--status-offline);--status-warning:var(--status-warning);--status-processing:var(--status-processing);--text-primary:var(--text-primary);--text-secondary:var(--text-secondary);--text-muted:var(--text-muted);--text-accent:var(--text-accent);--border-subtle:var(--border-subtle);--border-default:var(--border-default);--border-accent:var(--border-accent)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-body)}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-4{inset:calc(var(--spacing)*4)}.inset-8{inset:calc(var(--spacing)*8)}.inset-12{inset:calc(var(--spacing)*12)}.-top-8{top:calc(var(--spacing)*-8)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.left-1{left:calc(var(--spacing)*1)}.left-1\/2{left:50%}.left-7{left:calc(var(--spacing)*7)}.left-full{left:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-0\.5{margin-left:calc(var(--spacing)*-.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-0\.5{height:calc(var(--spacing)*.5)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-\[1\.15rem\]{height:1.15rem}.h-\[2px\]{height:2px}.h-\[30px\]{height:30px}.h-\[500px\]{height:500px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:calc(var(--spacing)*0)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-56{max-height:calc(var(--spacing)*56)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[80vh\]{max-height:80vh}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-48{width:calc(var(--spacing)*48)}.w-80{width:calc(var(--spacing)*80)}.w-\[5px\]{width:5px}.w-\[160px\]{width:160px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[1\.5rem\]{min-width:1.5rem}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[200px\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.auto-rows-min{grid-auto-rows:min-content}.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-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\[3px\]{gap:3px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[var\(--border-subtle\)\]\/30>:not(:last-child)){border-color:var(--border-subtle)}@supports (color:color-mix(in lab,red,red)){:where(.divide-\[var\(--border-subtle\)\]\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--border-subtle)30%,transparent)}}:where(.divide-border\/40>:not(:last-child)){border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/40>:not(:last-child)){border-color:color-mix(in oklab,var(--border)40%,transparent)}}:where(.divide-orange-500\/10>:not(:last-child)){border-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){:where(.divide-orange-500\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}:where(.divide-purple-500\/10>:not(:last-child)){border-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){:where(.divide-purple-500\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-sm{border-top-left-radius:calc(var(--radius) - 4px);border-top-right-radius:calc(var(--radius) - 4px)}.rounded-r-sm{border-top-right-radius:calc(var(--radius) - 4px);border-bottom-right-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[hsl\(var\(--border-primary\)\)\]{border-color:hsl(var(--border-primary))}.border-\[oklch\(0\.30_0\.05_260\)\]{border-color:#1f2e47}.border-\[oklch\(0\.35_0\.05_260\)\]{border-color:#2b3b55}.border-\[oklch\(0\.40_0\.15_25\)\]{border-color:#861118}.border-\[oklch\(0\.72_0\.19_145\/0\.4\)\]{border-color:#43c25166}.border-\[oklch\(0\.75_0\.18_55\)\]{border-color:#ff8b26;border-color:oklch(75% .18 55)}.border-\[var\(--accent-glow\)\]{border-color:var(--accent-glow)}.border-\[var\(--accent-primary\)\],.border-\[var\(--accent-primary\)\]\/30{border-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--accent-primary\)\]\/30{border-color:color-mix(in oklab,var(--accent-primary)30%,transparent)}}.border-\[var\(--border-default\)\]{border-color:var(--border-default)}.border-\[var\(--border-subtle\)\],.border-\[var\(--border-subtle\)\]\/50{border-color:var(--border-subtle)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--border-subtle\)\]\/50{border-color:color-mix(in oklab,var(--border-subtle)50%,transparent)}}.border-\[var\(--status-error\)\]{border-color:var(--status-error)}.border-\[var\(--status-offline\)\],.border-\[var\(--status-offline\)\]\/20{border-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-offline\)\]\/20{border-color:color-mix(in oklab,var(--status-offline)20%,transparent)}}.border-\[var\(--status-online\)\],.border-\[var\(--status-online\)\]\/20{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/20{border-color:color-mix(in oklab,var(--status-online)20%,transparent)}}.border-\[var\(--status-online\)\]\/30{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/30{border-color:color-mix(in oklab,var(--status-online)30%,transparent)}}.border-\[var\(--status-online\)\]\/50{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/50{border-color:color-mix(in oklab,var(--status-online)50%,transparent)}}.border-\[var\(--status-processing\)\]{border-color:var(--status-processing)}.border-\[var\(--status-warning\)\],.border-\[var\(--status-warning\)\]\/20{border-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-warning\)\]\/20{border-color:color-mix(in oklab,var(--status-warning)20%,transparent)}}.border-\[var\(--text-muted\)\]{border-color:var(--text-muted)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border)50%,transparent)}}.border-current{border-color:currentColor}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500)30%,transparent)}}.border-cyan-500\/40{border-color:#00b7d766}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/40{border-color:color-mix(in oklab,var(--color-cyan-500)40%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500)30%,transparent)}}.border-orange-500\/20{border-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/20{border-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.border-orange-500\/40{border-color:#fe6e0066}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/40{border-color:color-mix(in oklab,var(--color-orange-500)40%,transparent)}}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.border-transparent{border-color:#0000}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-\[var\(--accent-glow\)\]{border-left-color:var(--accent-glow)}.border-l-\[var\(--status-offline\)\]{border-left-color:var(--status-offline)}.border-l-\[var\(--status-warning\)\]{border-left-color:var(--status-warning)}.border-l-\[var\(--text-muted\)\]{border-left-color:var(--text-muted)}.bg-\[color-mix\(in_oklch\,var\(--accent-glow\)_10\%\,transparent\)\]{background-color:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_oklch\,var\(--accent-glow\)_10\%\,transparent\)\]{background-color:color-mix(in oklch,var(--accent-glow)10%,transparent)}}.bg-\[hsl\(var\(--accent-primary\)\)\]{background-color:hsl(var(--accent-primary))}.bg-\[hsl\(var\(--bg-primary\)\)\]{background-color:hsl(var(--bg-primary))}.bg-\[hsl\(var\(--bg-secondary\)\)\]{background-color:hsl(var(--bg-secondary))}.bg-\[hsl\(var\(--status-offline\)\)\]{background-color:hsl(var(--status-offline))}.bg-\[hsl\(var\(--status-online\)\)\]{background-color:hsl(var(--status-online))}.bg-\[hsl\(var\(--status-processing\)\)\]{background-color:hsl(var(--status-processing))}.bg-\[hsl\(var\(--status-warning\)\)\]{background-color:hsl(var(--status-warning))}.bg-\[hsl\(var\(--text-secondary\)\)\]{background-color:hsl(var(--text-secondary))}.bg-\[oklch\(0\.18_0\.04_260\)\]{background-color:#071123}.bg-\[oklch\(0\.20_0\.05_260\)\]{background-color:#08152c}.bg-\[oklch\(0\.35_0\.12_25\)\]{background-color:#6c1517}.bg-\[oklch\(0\.72_0\.19_145\)\]{background-color:#43c251}.bg-\[oklch\(0\.72_0\.19_145\/0\.3\)\]{background-color:#43c2514d}.bg-\[oklch\(0\.72_0\.19_145\/0\.08\)\]{background-color:#43c25114}.bg-\[oklch\(0\.72_0\.19_145\/0\.15\)\]{background-color:#43c25126}.bg-\[oklch\(0\.75_0\.18_55\)\]{background-color:#ff8b26;background-color:oklch(75% .18 55)}.bg-\[var\(--accent-glow\)\],.bg-\[var\(--accent-glow\)\]\/20{background-color:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-glow\)\]\/20{background-color:color-mix(in oklab,var(--accent-glow)20%,transparent)}}.bg-\[var\(--accent-primary\)\],.bg-\[var\(--accent-primary\)\]\/10{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-primary\)\]\/10{background-color:color-mix(in oklab,var(--accent-primary)10%,transparent)}}.bg-\[var\(--accent-primary\)\]\/20{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-primary\)\]\/20{background-color:color-mix(in oklab,var(--accent-primary)20%,transparent)}}.bg-\[var\(--bg-elevated\)\],.bg-\[var\(--bg-elevated\)\]\/50{background-color:var(--bg-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-elevated\)\]\/50{background-color:color-mix(in oklab,var(--bg-elevated)50%,transparent)}}.bg-\[var\(--bg-panel\)\],.bg-\[var\(--bg-panel\)\]\/30{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-panel\)\]\/30{background-color:color-mix(in oklab,var(--bg-panel)30%,transparent)}}.bg-\[var\(--bg-panel\)\]\/50{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-panel\)\]\/50{background-color:color-mix(in oklab,var(--bg-panel)50%,transparent)}}.bg-\[var\(--bg-void\)\],.bg-\[var\(--bg-void\)\]\/30{background-color:var(--bg-void)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-void\)\]\/30{background-color:color-mix(in oklab,var(--bg-void)30%,transparent)}}.bg-\[var\(--border-subtle\)\]{background-color:var(--border-subtle)}.bg-\[var\(--status-error\)\]\/10{background-color:var(--status-error)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-error\)\]\/10{background-color:color-mix(in oklab,var(--status-error)10%,transparent)}}.bg-\[var\(--status-offline\)\],.bg-\[var\(--status-offline\)\]\/10{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-offline\)\]\/10{background-color:color-mix(in oklab,var(--status-offline)10%,transparent)}}.bg-\[var\(--status-offline\)\]\/20{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-offline\)\]\/20{background-color:color-mix(in oklab,var(--status-offline)20%,transparent)}}.bg-\[var\(--status-online\)\],.bg-\[var\(--status-online\)\]\/5{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/5{background-color:color-mix(in oklab,var(--status-online)5%,transparent)}}.bg-\[var\(--status-online\)\]\/10{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/10{background-color:color-mix(in oklab,var(--status-online)10%,transparent)}}.bg-\[var\(--status-online\)\]\/15{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/15{background-color:color-mix(in oklab,var(--status-online)15%,transparent)}}.bg-\[var\(--status-processing\)\]\/10{background-color:var(--status-processing)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-processing\)\]\/10{background-color:color-mix(in oklab,var(--status-processing)10%,transparent)}}.bg-\[var\(--status-warning\)\],.bg-\[var\(--status-warning\)\]\/10{background-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-warning\)\]\/10{background-color:color-mix(in oklab,var(--status-warning)10%,transparent)}}.bg-\[var\(--status-warning\)\]\/20{background-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-warning\)\]\/20{background-color:color-mix(in oklab,var(--status-warning)20%,transparent)}}.bg-\[var\(--text-muted\)\],.bg-\[var\(--text-muted\)\]\/15{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--text-muted\)\]\/15{background-color:color-mix(in oklab,var(--text-muted)15%,transparent)}}.bg-\[var\(--text-muted\)\]\/20{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--text-muted\)\]\/20{background-color:color-mix(in oklab,var(--text-muted)20%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-amber-600\/80{background-color:#dd7400cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-600\/80{background-color:color-mix(in oklab,var(--color-amber-600)80%,transparent)}}.bg-background,.bg-background\/50{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,var(--background)50%,transparent)}}.bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\/40{background-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/40{background-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.bg-blue-500\/50{background-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/50{background-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.bg-border{background-color:var(--border)}.bg-card\/60{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/60{background-color:color-mix(in oklab,var(--card)60%,transparent)}}.bg-card\/80{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--card)80%,transparent)}}.bg-current{background-color:currentColor}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.bg-emerald-500\/60{background-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/60{background-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-muted,.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted)30%,transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--muted)40%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/5{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/5{background-color:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-orange-500\/50{background-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/50{background-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-500\/60{background-color:#fb2c3699}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/60{background-color:color-mix(in oklab,var(--color-red-500)60%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500)5%,transparent)}}.bg-yellow-500\/15{background-color:#edb20026}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/15{background-color:color-mix(in oklab,var(--color-yellow-500)15%,transparent)}}.bg-zinc-700\/50{background-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\/50{background-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(ellipse_at_top_right\,_var\(--tw-gradient-stops\)\)\]{background-image:radial-gradient(ellipse at top right,var(--tw-gradient-stops))}.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-from:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-from:color-mix(in oklab,var(--accent-glow)7%,transparent)}}.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[var\(--accent-primary\)\]{--tw-gradient-from:var(--accent-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[var\(--bg-elevated\)\]{--tw-gradient-from:var(--bg-elevated);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-950\/80{--tw-gradient-from:#053345cc}@supports (color:color-mix(in lab,red,red)){.from-cyan-950\/80{--tw-gradient-from:color-mix(in oklab,var(--color-cyan-950)80%,transparent)}}.from-cyan-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-400\/10{--tw-gradient-from:#00d2941a}@supports (color:color-mix(in lab,red,red)){.from-emerald-400\/10{--tw-gradient-from:color-mix(in oklab,var(--color-emerald-400)10%,transparent)}}.from-emerald-400\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500\/10{--tw-gradient-from:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.from-emerald-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.from-emerald-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-500\/5{--tw-gradient-from:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.from-orange-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.from-orange-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-950\/80{--tw-gradient-from:#441306cc}@supports (color:color-mix(in lab,red,red)){.from-orange-950\/80{--tw-gradient-from:color-mix(in oklab,var(--color-orange-950)80%,transparent)}}.from-orange-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500\/5{--tw-gradient-from:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)5%,transparent)}}.from-purple-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-zinc-900{--tw-gradient-from:var(--color-zinc-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-\[var\(--accent-primary\)\]{--tw-gradient-via:var(--accent-primary);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[var\(--border-default\)\]{--tw-gradient-via:var(--border-default);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via:var(--status-processing)}@supports (color:color-mix(in lab,red,red)){.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via:color-mix(in oklab,var(--status-processing)30%,transparent)}}.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-900\/60{--tw-gradient-via:#104e6499}@supports (color:color-mix(in lab,red,red)){.via-cyan-900\/60{--tw-gradient-via:color-mix(in oklab,var(--color-cyan-900)60%,transparent)}}.via-cyan-900\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-300{--tw-gradient-via:var(--color-orange-300);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-900\/60{--tw-gradient-via:#7e2a0c99}@supports (color:color-mix(in lab,red,red)){.via-orange-900\/60{--tw-gradient-via:color-mix(in oklab,var(--color-orange-900)60%,transparent)}}.via-orange-900\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500\/5{--tw-gradient-via:#00baa70d}@supports (color:color-mix(in lab,red,red)){.via-teal-500\/5{--tw-gradient-via:color-mix(in oklab,var(--color-teal-500)5%,transparent)}}.via-teal-500\/5{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[var\(--accent-secondary\)\]{--tw-gradient-to:var(--accent-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[var\(--bg-active\)\]{--tw-gradient-to:var(--bg-active);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[var\(--bg-panel\)\]{--tw-gradient-to:var(--bg-panel);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-black{--tw-gradient-to:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-500\/10{--tw-gradient-to:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.to-cyan-500\/10{--tw-gradient-to:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.to-cyan-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-950\/80{--tw-gradient-to:#053345cc}@supports (color:color-mix(in lab,red,red)){.to-cyan-950\/80{--tw-gradient-to:color-mix(in oklab,var(--color-cyan-950)80%,transparent)}}.to-cyan-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-orange-950\/80{--tw-gradient-to:#441306cc}@supports (color:color-mix(in lab,red,red)){.to-orange-950\/80{--tw-gradient-to:color-mix(in oklab,var(--color-orange-950)80%,transparent)}}.to-orange-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-red-500{fill:var(--color-red-500)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-display{font-family:Space Grotesk,system-ui,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[10px\]{font-size:10px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-\[var\(--font-display\)\]{--tw-font-weight:var(--font-display);font-weight:var(--font-display)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[hsl\(var\(--bg-primary\)\)\]{color:hsl(var(--bg-primary))}.text-\[hsl\(var\(--text-secondary\)\)\]{color:hsl(var(--text-secondary))}.text-\[oklch\(0\.15_0\.02_55\)\]{color:#120904}.text-\[oklch\(0\.72_0\.19_145\)\]{color:#43c251}.text-\[oklch\(0\.72_0\.19_145\/0\.8\)\]{color:#43c251cc}.text-\[oklch\(0\.75_0\.18_55\)\]{color:#ff8b26;color:oklch(75% .18 55)}.text-\[oklch\(0\.85_0\.02_260\)\]{color:#c6cedb}.text-\[oklch\(0\.90_0\.02_25\)\]{color:#ebd9d7}.text-\[var\(--accent-glow\)\]{color:var(--accent-glow)}.text-\[var\(--accent-primary\)\]{color:var(--accent-primary)}.text-\[var\(--border-default\)\]{color:var(--border-default)}.text-\[var\(--primary-foreground\)\]{color:var(--primary-foreground)}.text-\[var\(--status-error\)\]{color:var(--status-error)}.text-\[var\(--status-offline\)\]{color:var(--status-offline)}.text-\[var\(--status-online\)\]{color:var(--status-online)}.text-\[var\(--status-processing\)\]{color:var(--status-processing)}.text-\[var\(--status-warning\)\]{color:var(--status-warning)}.text-\[var\(--text-accent\)\]{color:var(--text-accent)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-background{color:var(--background)}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-card-foreground{color:var(--card-foreground)}.text-cyan-200{color:var(--color-cyan-200)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-500\/60{color:#00b7d799}@supports (color:color-mix(in lab,red,red)){.text-cyan-500\/60{color:color-mix(in oklab,var(--color-cyan-500)60%,transparent)}}.text-destructive{color:var(--destructive)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-300\/60{color:#5ee9b599}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/60{color:color-mix(in oklab,var(--color-emerald-300)60%,transparent)}}.text-emerald-300\/70{color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/70{color:color-mix(in oklab,var(--color-emerald-300)70%,transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-foreground,.text-foreground\/90{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,var(--foreground)90%,transparent)}}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-muted{color:var(--muted)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-200{color:var(--color-orange-200)}.text-orange-200\/70{color:#ffd7a8b3}@supports (color:color-mix(in lab,red,red)){.text-orange-200\/70{color:color-mix(in oklab,var(--color-orange-200)70%,transparent)}}.text-orange-200\/80{color:#ffd7a8cc}@supports (color:color-mix(in lab,red,red)){.text-orange-200\/80{color:color-mix(in oklab,var(--color-orange-200)80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-orange-300\/80{color:#ffb96dcc}@supports (color:color-mix(in lab,red,red)){.text-orange-300\/80{color:color-mix(in oklab,var(--color-orange-300)80%,transparent)}}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-500\/30{color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/30{color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.text-orange-500\/50{color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/50{color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.text-orange-500\/60{color:#fe6e0099}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/60{color:color-mix(in oklab,var(--color-orange-500)60%,transparent)}}.text-orange-500\/70{color:#fe6e00b3}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/70{color:color-mix(in oklab,var(--color-orange-500)70%,transparent)}}.text-purple-200{color:var(--color-purple-200)}.text-purple-200\/80{color:#e9d5ffcc}@supports (color:color-mix(in lab,red,red)){.text-purple-200\/80{color:color-mix(in oklab,var(--color-purple-200)80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-500\/60{color:#ac4bff99}@supports (color:color-mix(in lab,red,red)){.text-purple-500\/60{color:color-mix(in oklab,var(--color-purple-500)60%,transparent)}}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\/70{color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-zinc-300{color:var(--color-zinc-300)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.opacity-\[0\.03\]{opacity:.03}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_0_oklch\(0\.72_0\.19_145\)\]{--tw-shadow:0 0 8px 0 var(--tw-shadow-color,oklch(72% .19 145));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_var\(--status-online\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_var\(--accent-primary\)\/20\]{--tw-shadow:0 0 10px var(--tw-shadow-color,var(--accent-primary)/20);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_16px_0_oklch\(0\.72_0\.19_145\/0\.25\)\,inset_0_1px_0_0_oklch\(0\.72_0\.19_145\/0\.1\)\]{--tw-shadow:0 0 16px 0 var(--tw-shadow-color,oklch(72% .19 145/.25)),inset 0 1px 0 0 var(--tw-shadow-color,oklch(72% .19 145/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_20px_0_var\(--accent-glow\)\]{--tw-shadow:0 0 20px 0 var(--tw-shadow-color,var(--accent-glow));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_30px_var\(--status-online\)\]{--tw-shadow:0 0 30px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0\.75_0\.18_55\/0\.4\)\,0_0_12px_0_oklch\(0\.75_0\.18_55\/0\.2\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(75% .18 55/.4)),0 0 12px 0 var(--tw-shadow-color,oklch(75% .18 55/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.1\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.2\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.3\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.3));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.25\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_0_var\(--border-subtle\)\,inset_0_-1px_0_0_oklch\(0_0_0\/0\.2\)\,0_2px_0_0_oklch\(0_0_0\/0\.1\)\]{--tw-shadow:inset 0 1px 0 0 var(--tw-shadow-color,var(--border-subtle)),inset 0 -1px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.2)),0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgba\(255\,255\,255\,0\.1\)\,0_2px_4px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff1a),0 2px 4px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-cyan-500\/10{--tw-shadow-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.shadow-cyan-500\/10{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-500)10%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-500)5%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-orange-500\/10{--tw-shadow-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.shadow-orange-500\/10{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-500)10%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-emerald-500\/30{--tw-ring-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.ring-emerald-500\/30{--tw-ring-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.grayscale{--tw-grayscale:grayscale(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,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,box-shadow\]{transition-property:transform,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-50{--tw-duration:50ms;transition-duration:50ms}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.fade-in{--tw-enter-opacity:0}.running{animation-play-state:running}.slide-in-from-right{--tw-enter-translate-x:100%}.slide-in-from-top-2{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}@media(hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:text-\[var\(--text-primary\)\]:is(:where(.group):hover *){color:var(--text-primary)}.group-hover\:text-orange-500:is(:where(.group):hover *){color:var(--color-orange-500)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-purple-500\/30 ::selection{background-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.selection\:bg-purple-500\/30 ::selection{background-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.selection\:bg-purple-500\/30::selection{background-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.selection\:bg-purple-500\/30::selection{background-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.placeholder\:text-muted-foreground\/50::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.before\:pointer-events-none:before{content:var(--tw-content);pointer-events:none}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-0:before{content:var(--tw-content);inset:calc(var(--spacing)*0)}.before\:bg-gradient-to-b:before{content:var(--tw-content);--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.before\:from-white\/\[0\.02\]:before{content:var(--tw-content);--tw-gradient-from:#ffffff05}@supports (color:color-mix(in lab,red,red)){.before\:from-white\/\[0\.02\]:before{--tw-gradient-from:color-mix(in oklab,var(--color-white)2%,transparent)}}.before\:from-white\/\[0\.02\]:before{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.before\:to-transparent:before{content:var(--tw-content);--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}@media(hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:translate-y-\[-2px\]:hover{--tw-translate-y:-2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-\[oklch\(0\.50_0\.18_25\)\]:hover{border-color:#b32228}.hover\:border-\[oklch\(0\.65_0\.2_55\)\]:hover{border-color:#d76f00;border-color:oklch(65% .2 55)}.hover\:border-\[oklch\(0\.75_0\.18_55\)\]:hover{border-color:#ff8b26;border-color:oklch(75% .18 55)}.hover\:border-\[var\(--accent-primary\)\]:hover{border-color:var(--accent-primary)}.hover\:border-\[var\(--border-accent\)\]:hover{border-color:var(--border-accent)}.hover\:border-\[var\(--border-default\)\]:hover{border-color:var(--border-default)}.hover\:border-\[var\(--text-muted\)\]:hover{border-color:var(--text-muted)}.hover\:border-border:hover{border-color:var(--border)}.hover\:border-orange-500\/50:hover{border-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.hover\:border-orange-500\/50:hover{border-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.hover\:border-transparent:hover{border-color:#0000}.hover\:bg-\[oklch\(0\.22_0\.05_260\)\]:hover{background-color:#0c1a32}.hover\:bg-\[oklch\(0\.25_0\.04_260\)\]:hover{background-color:#162235}.hover\:bg-\[oklch\(0\.25_0\.06_260\)\]:hover{background-color:#10213e}.hover\:bg-\[oklch\(0\.40_0\.14_25\)\]:hover{background-color:#831a1d}.hover\:bg-\[oklch\(0\.78_0\.19_55\)\]:hover{background-color:#ff9b51;background-color:oklch(78% .19 55)}.hover\:bg-\[var\(--accent-primary\)\]:hover,.hover\:bg-\[var\(--accent-primary\)\]\/20:hover{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--accent-primary\)\]\/20:hover{background-color:color-mix(in oklab,var(--accent-primary)20%,transparent)}}.hover\:bg-\[var\(--bg-active\)\]:hover{background-color:var(--bg-active)}.hover\:bg-\[var\(--bg-elevated\)\]:hover{background-color:var(--bg-elevated)}.hover\:bg-\[var\(--bg-panel\)\]\/50:hover{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--bg-panel\)\]\/50:hover{background-color:color-mix(in oklab,var(--bg-panel)50%,transparent)}}.hover\:bg-\[var\(--bg-void\)\]:hover{background-color:var(--bg-void)}.hover\:bg-\[var\(--status-error\)\]\/20:hover{background-color:var(--status-error)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--status-error\)\]\/20:hover{background-color:color-mix(in oklab,var(--status-error)20%,transparent)}}.hover\:bg-\[var\(--status-offline\)\]\/10:hover{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--status-offline\)\]\/10:hover{background-color:color-mix(in oklab,var(--status-offline)10%,transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-blue-500\/60:hover{background-color:#3080ff99}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/60:hover{background-color:color-mix(in oklab,var(--color-blue-500)60%,transparent)}}.hover\:bg-card:hover{background-color:var(--card)}.hover\:bg-cyan-500\/20:hover{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cyan-500\/20:hover{background-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/20:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/20:hover{background-color:color-mix(in oklab,var(--muted)20%,transparent)}}.hover\:bg-orange-500\/5:hover{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/5:hover{background-color:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.hover\:bg-orange-500\/10:hover{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/10:hover{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.hover\:bg-orange-500\/20:hover{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/20:hover{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.hover\:bg-orange-500\/30:hover{background-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/30:hover{background-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-purple-500\/5:hover{background-color:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-500\/5:hover{background-color:color-mix(in oklab,var(--color-purple-500)5%,transparent)}}.hover\:bg-purple-500\/10:hover{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-500\/10:hover{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-red-500\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\:text-\[oklch\(0\.75_0\.18_55\)\]:hover{color:#ff8b26;color:oklch(75% .18 55)}.hover\:text-\[oklch\(0\.80_0\.20_55\)\]:hover{color:#ffa566;color:oklch(80% .2 55)}.hover\:text-\[oklch\(0\.85_0\.02_260\)\]:hover{color:#c6cedb}.hover\:text-\[var\(--accent-primary\)\]:hover{color:var(--accent-primary)}.hover\:text-\[var\(--bg-panel\)\]:hover{color:var(--bg-panel)}.hover\:text-\[var\(--status-offline\)\]:hover{color:var(--status-offline)}.hover\:text-\[var\(--text-primary\)\]:hover{color:var(--text-primary)}.hover\:text-\[var\(--text-secondary\)\]:hover{color:var(--text-secondary)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-orange-300:hover{color:var(--color-orange-300)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-\[0_0_0_1px_var\(--accent-primary\)\,0_0_20px_oklch\(0\.75_0\.18_55\/0\.2\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent-primary)),0 0 20px var(--tw-shadow-color,oklch(75% .18 55/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_10px_var\(--accent-primary\)\]:hover{--tw-shadow:0 0 10px var(--tw-shadow-color,var(--accent-primary));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--accent-primary\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--accent-primary));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--status-offline\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--status-offline));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--status-online\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_20px_var\(--accent-primary\)\/15\]:hover{--tw-shadow:0 0 20px var(--tw-shadow-color,var(--accent-primary)/15);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_2px_0_0_oklch\(0\.75_0\.18_55\/0\.6\)\,0_0_20px_0_oklch\(0\.75_0\.18_55\/0\.35\)\]:hover{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(75% .18 55/.6)),0 0 20px 0 var(--tw-shadow-color,oklch(75% .18 55/.35));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-orange-500\/50:focus{border-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.focus\:border-orange-500\/50:focus{border-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-orange-500\/30:focus{--tw-ring-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-orange-500\/30:focus{--tw-ring-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[hsl\(var\(--status-offline\)\)\]\/20:focus-visible{--tw-ring-color:hsl(var(--status-offline))}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-\[hsl\(var\(--status-offline\)\)\]\/20:focus-visible{--tw-ring-color:color-mix(in oklab,hsl(var(--status-offline))20%,transparent)}}.focus-visible\:ring-\[oklch\(0\.45_0\.08_260\)\]:focus-visible{--tw-ring-color:oklch(45% .08 260)}.focus-visible\:ring-\[oklch\(0\.45_0\.15_25\)\]:focus-visible{--tw-ring-color:oklch(45% .15 25)}.focus-visible\:ring-\[oklch\(0\.75_0\.18_55\)\]:focus-visible{--tw-ring-color:oklch(75% .18 55)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-\[var\(--bg-panel\)\]:focus-visible{--tw-ring-offset-color:var(--bg-panel)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-y-0:active{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.active\:translate-y-0\.5:active{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.active\:bg-\[oklch\(0\.20_0\.04_260\)\]:active{background-color:#0b1628}.active\:shadow-\[0_0_8px_0_oklch\(0\.75_0\.18_55\/0\.4\)\]:active{--tw-shadow:0 0 8px 0 var(--tw-shadow-color,oklch(75% .18 55/.4));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.active\:shadow-none:active{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:active\:translate-y-0:disabled:active{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-\[var\(--accent-glow\)\][data-state=checked]{background-color:var(--accent-glow)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:block{display:block}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}@media(hover:hover){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--accent-primary\)\)\]\/90:hover{background-color:hsl(var(--accent-primary))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--accent-primary\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--accent-primary))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--bg-tertiary\)\)\]:hover{background-color:hsl(var(--bg-tertiary))}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-offline\)\)\]\/90:hover{background-color:hsl(var(--status-offline))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-offline\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-offline))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-online\)\)\]\/90:hover{background-color:hsl(var(--status-online))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-online\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-online))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-processing\)\)\]\/90:hover{background-color:hsl(var(--status-processing))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-processing\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-processing))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-warning\)\)\]\/90:hover{background-color:hsl(var(--status-warning))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-warning\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-warning))90%,transparent)}}a.\[a\&\]\:hover\:text-\[hsl\(var\(--text-primary\)\)\]:hover{color:hsl(var(--text-primary))}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.5rem;--bg-void:oklch(97% .01 240);--bg-panel:oklch(100% 0 0);--bg-elevated:oklch(98% .01 240);--bg-active:oklch(94% .02 240);--accent-primary:oklch(50% .18 250);--accent-secondary:oklch(45% .15 255);--accent-glow:oklch(75% .12 220);--status-online:oklch(60% .18 145);--status-offline:oklch(50% .12 25);--status-warning:oklch(70% .16 85);--status-processing:oklch(65% .15 250);--text-primary:oklch(20% .03 250);--text-secondary:oklch(40% .02 250);--text-muted:oklch(55% .02 250);--text-accent:oklch(45% .16 250);--border-subtle:oklch(92% .01 240);--border-default:oklch(85% .02 240);--border-accent:oklch(50% .12 250);--background:oklch(97% .01 240);--foreground:oklch(20% .03 250);--card:oklch(100% 0 0);--card-foreground:oklch(20% .03 250);--popover:oklch(100% 0 0);--popover-foreground:oklch(20% .03 250);--primary:oklch(50% .18 250);--primary-foreground:oklch(98% .01 240);--secondary:oklch(94% .02 240);--secondary-foreground:oklch(30% .03 250);--muted:oklch(94% .02 240);--muted-foreground:oklch(50% .02 250);--accent:oklch(94% .03 220);--accent-foreground:oklch(40% .15 250);--destructive:oklch(55% .2 25);--border:oklch(92% .01 240);--input:oklch(92% .01 240);--ring:oklch(50% .18 250);--chart-1:oklch(50% .18 250);--chart-2:oklch(60% .18 145);--chart-3:oklch(65% .15 220);--chart-4:oklch(70% .16 85);--chart-5:oklch(45% .15 255);--sidebar:oklch(98% .01 240);--sidebar-foreground:oklch(20% .03 250);--sidebar-primary:oklch(50% .18 250);--sidebar-primary-foreground:oklch(98% 0 0);--sidebar-accent:oklch(94% .03 220);--sidebar-accent-foreground:oklch(40% .15 250);--sidebar-border:oklch(92% .01 240);--sidebar-ring:oklch(50% .18 250)}.dark{--bg-void:oklch(12% .03 250);--bg-panel:oklch(16% .04 250);--bg-elevated:oklch(20% .05 250);--bg-active:oklch(25% .06 250);--accent-primary:oklch(65% .18 250);--accent-secondary:oklch(55% .15 255);--accent-glow:oklch(80% .14 220);--status-online:oklch(72% .19 145);--status-offline:oklch(55% .12 25);--status-warning:oklch(80% .16 85);--status-processing:oklch(70% .15 250);--text-primary:oklch(96% .01 90);--text-secondary:oklch(75% .02 240);--text-muted:oklch(55% .03 250);--text-accent:oklch(80% .14 220);--border-subtle:oklch(25% .04 250);--border-default:oklch(32% .05 250);--border-accent:oklch(55% .12 250);--background:oklch(12% .03 250);--foreground:oklch(96% .01 90);--card:oklch(16% .04 250);--card-foreground:oklch(96% .01 90);--popover:oklch(16% .04 250);--popover-foreground:oklch(96% .01 90);--primary:oklch(65% .18 250);--primary-foreground:oklch(12% .03 250);--secondary:oklch(20% .05 250);--secondary-foreground:oklch(96% .01 90);--muted:oklch(20% .05 250);--muted-foreground:oklch(55% .03 250);--accent:oklch(25% .06 250);--accent-foreground:oklch(80% .14 220);--destructive:oklch(55% .18 25);--destructive-foreground:oklch(96% .01 90);--border:oklch(25% .04 250);--input:oklch(25% .04 250);--ring:oklch(65% .18 250);--chart-1:oklch(65% .18 250);--chart-2:oklch(72% .19 145);--chart-3:oklch(70% .15 220);--chart-4:oklch(80% .16 85);--chart-5:oklch(55% .15 255);--sidebar:oklch(14% .035 250);--sidebar-foreground:oklch(96% .01 90);--sidebar-primary:oklch(65% .18 250);--sidebar-primary-foreground:oklch(12% .03 250);--sidebar-accent:oklch(25% .06 250);--sidebar-accent-foreground:oklch(80% .14 220);--sidebar-border:oklch(25% .04 250);--sidebar-ring:oklch(65% .18 250)}@keyframes statusPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}@keyframes slideInFromRight{0%{opacity:0;transform:translate(1rem)}to{opacity:1;transform:translate(0)}}@keyframes scanLine{0%{background-position:-100% 0}to{background-position:200% 0}}.animate-status-pulse{animation:2s ease-in-out infinite statusPulse}.animate-slide-in-right{animation:.3s ease-out forwards slideInFromRight}.animate-scan-line{background:linear-gradient(90deg,transparent 0%,var(--accent-glow)50%,transparent 100%);background-size:200% 100%;animation:1.5s ease-in-out infinite scanLine}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in-up{animation:.4s ease-out forwards fadeInUp}.stagger-children>*{opacity:0;animation:.3s ease-out forwards fadeInUp}.stagger-children>:first-child{animation-delay:50ms}.stagger-children>:nth-child(2){animation-delay:.1s}.stagger-children>:nth-child(3){animation-delay:.15s}.stagger-children>:nth-child(4){animation-delay:.2s}.stagger-children>:nth-child(5){animation-delay:.25s}.stagger-children>:nth-child(6){animation-delay:.3s}@keyframes radarPulse{0%{opacity:.6;transform:scale(1)}to{opacity:0;transform:scale(2.5)}}@keyframes radarSweep{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes dataFlow{0%{stroke-dashoffset:100px}to{stroke-dashoffset:0}}@keyframes signalPulse{0%,to{opacity:1;transform:scaleY(1)}50%{opacity:.7;transform:scaleY(.95)}}@keyframes scanline{0%{opacity:0;top:-10%}10%{opacity:.5}90%{opacity:.5}to{opacity:0;top:110%}}@keyframes glowPulse{0%,to{box-shadow:0 0 8px var(--accent-glow)}50%{box-shadow:0 0 20px var(--accent-glow),0 0 40px var(--accent-primary)}}@keyframes flightPath{0%{stroke-dashoffset:1000px;opacity:0}10%{opacity:1}to{stroke-dashoffset:0;opacity:1}}@keyframes connectingPulse{0%,to{box-shadow:0 0 8px var(--status-processing);border-color:var(--status-processing);opacity:1}50%{box-shadow:0 0 15px var(--status-processing),0 0 30px var(--status-processing);border-color:var(--accent-primary);opacity:.8}}.animate-radar-pulse{animation:2s ease-out infinite radarPulse}.animate-radar-sweep{animation:4s linear infinite radarSweep}.animate-data-flow{animation:1.5s ease-in-out forwards dataFlow}.animate-signal-pulse{animation:1.5s ease-in-out infinite signalPulse}.animate-scanline{animation:3s linear infinite scanline}.animate-glow-pulse{animation:2s ease-in-out infinite glowPulse}.animate-connecting-pulse{animation:1s ease-in-out infinite connectingPulse}.animate-flight-path{animation:2s ease-out forwards flightPath}.delay-0{animation-delay:0s}.delay-75{animation-delay:75ms}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.delay-200{animation-delay:.2s}.delay-300{animation-delay:.3s}.delay-400{animation-delay:.4s}.delay-500{animation-delay:.5s}.aviation-grid{background-image:linear-gradient(rgba(var(--accent-glow-rgb),.03)1px,transparent 1px),linear-gradient(90deg,rgba(var(--accent-glow-rgb),.03)1px,transparent 1px);background-size:20px 20px}.btn-cockpit{border-radius:calc(var(--radius) - 2px);padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*2);font-family:JetBrains Mono,Fira Code,monospace;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider);text-transform:uppercase;background:linear-gradient(to bottom,var(--bg-elevated),var(--bg-panel));border:1px solid var(--border-default);position:relative;box-shadow:inset 0 1px #ffffff1a,0 2px 4px #0000004d}.btn-cockpit:active{transform:translateY(1px);box-shadow:inset 0 2px 4px #0000004d}.instrument-segment{border-right-style:var(--tw-border-style);border-right-width:1px;border-color:var(--border-subtle);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1);font-family:JetBrains Mono,Fira Code,monospace;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));background:linear-gradient(#0000,#0000001a)}.instrument-segment:last-child{border-right:none}.card-glow{transition:box-shadow .2s ease-out,border-color .2s ease-out}.card-glow:hover{box-shadow:0 0 20px var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.card-glow:hover{box-shadow:0 0 20px color-mix(in oklch,var(--accent-primary)15%,transparent)}}.card-glow:hover{border-color:var(--accent-primary)}.btn-mechanical{transition:transform .1s ease-out,box-shadow .1s ease-out}.btn-mechanical:active{box-shadow:none;transform:translateY(2px)}.dark ::-webkit-scrollbar{width:8px;height:8px}.dark ::-webkit-scrollbar-track{background:var(--bg-panel)}.dark ::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:4px}.dark ::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.focus-ring:focus{--tw-outline-style:none;outline-style:none}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:var(--ring);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-offset-color:var(--background)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:"JetBrains Mono","Fira Code",monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-teal-500:oklch(70.4% .14 182.503);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-900:oklch(39.8% .07 227.392);--color-cyan-950:oklch(30.2% .056 229.695);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-900:oklch(21% .006 285.885);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:"JetBrains Mono","Fira Code",monospace;--font-display:"Space Grotesk",system-ui,sans-serif;--font-body:"IBM Plex Sans",system-ui,sans-serif;--bg-void:var(--bg-void);--bg-panel:var(--bg-panel);--bg-elevated:var(--bg-elevated);--bg-active:var(--bg-active);--accent-primary:var(--accent-primary);--accent-secondary:var(--accent-secondary);--accent-glow:var(--accent-glow);--status-online:var(--status-online);--status-offline:var(--status-offline);--status-warning:var(--status-warning);--status-processing:var(--status-processing);--text-primary:var(--text-primary);--text-secondary:var(--text-secondary);--text-muted:var(--text-muted);--text-accent:var(--text-accent);--border-subtle:var(--border-subtle);--border-default:var(--border-default);--border-accent:var(--border-accent)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring)50%,transparent)}}body{background-color:var(--background);color:var(--foreground);font-family:var(--font-body)}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.inset-4{inset:calc(var(--spacing)*4)}.inset-8{inset:calc(var(--spacing)*8)}.inset-12{inset:calc(var(--spacing)*12)}.-top-8{top:calc(var(--spacing)*-8)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.right-full{right:100%}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.left-0{left:calc(var(--spacing)*0)}.left-1{left:calc(var(--spacing)*1)}.left-1\/2{left:50%}.left-7{left:calc(var(--spacing)*7)}.left-full{left:100%}.z-10{z-index:10}.z-20{z-index:20}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.-ml-0\.5{margin-left:calc(var(--spacing)*-.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-2\.5{width:calc(var(--spacing)*2.5);height:calc(var(--spacing)*2.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-8{width:calc(var(--spacing)*8);height:calc(var(--spacing)*8)}.size-9{width:calc(var(--spacing)*9);height:calc(var(--spacing)*9)}.size-10{width:calc(var(--spacing)*10);height:calc(var(--spacing)*10)}.h-0\.5{height:calc(var(--spacing)*.5)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-48{height:calc(var(--spacing)*48)}.h-64{height:calc(var(--spacing)*64)}.h-\[1\.15rem\]{height:1.15rem}.h-\[2px\]{height:2px}.h-\[30px\]{height:30px}.h-\[500px\]{height:500px}.h-full{height:100%}.h-px{height:1px}.max-h-0{max-height:calc(var(--spacing)*0)}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-56{max-height:calc(var(--spacing)*56)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-\[80vh\]{max-height:80vh}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-48{width:calc(var(--spacing)*48)}.w-80{width:calc(var(--spacing)*80)}.w-\[5px\]{width:5px}.w-\[160px\]{width:160px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\[1\.5rem\]{min-width:1.5rem}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[200px\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.auto-rows-min{grid-auto-rows:min-content}.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-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\[3px\]{gap:3px}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-\[var\(--border-subtle\)\]\/30>:not(:last-child)){border-color:var(--border-subtle)}@supports (color:color-mix(in lab,red,red)){:where(.divide-\[var\(--border-subtle\)\]\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--border-subtle)30%,transparent)}}:where(.divide-border\/40>:not(:last-child)){border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/40>:not(:last-child)){border-color:color-mix(in oklab,var(--border)40%,transparent)}}:where(.divide-orange-500\/10>:not(:last-child)){border-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){:where(.divide-orange-500\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}:where(.divide-purple-500\/10>:not(:last-child)){border-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){:where(.divide-purple-500\/10>:not(:last-child)){border-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-t-sm{border-top-left-radius:calc(var(--radius) - 4px);border-top-right-radius:calc(var(--radius) - 4px)}.rounded-r-sm{border-top-right-radius:calc(var(--radius) - 4px);border-bottom-right-radius:calc(var(--radius) - 4px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[hsl\(var\(--border-primary\)\)\]{border-color:hsl(var(--border-primary))}.border-\[oklch\(0\.30_0\.05_260\)\]{border-color:#1f2e47}.border-\[oklch\(0\.35_0\.05_260\)\]{border-color:#2b3b55}.border-\[oklch\(0\.40_0\.15_25\)\]{border-color:#861118}.border-\[oklch\(0\.72_0\.19_145\/0\.4\)\]{border-color:#43c25166}.border-\[oklch\(0\.75_0\.18_55\)\]{border-color:#ff8b26;border-color:oklch(75% .18 55)}.border-\[var\(--accent-glow\)\]{border-color:var(--accent-glow)}.border-\[var\(--accent-primary\)\],.border-\[var\(--accent-primary\)\]\/30{border-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--accent-primary\)\]\/30{border-color:color-mix(in oklab,var(--accent-primary)30%,transparent)}}.border-\[var\(--border-default\)\]{border-color:var(--border-default)}.border-\[var\(--border-subtle\)\],.border-\[var\(--border-subtle\)\]\/50{border-color:var(--border-subtle)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--border-subtle\)\]\/50{border-color:color-mix(in oklab,var(--border-subtle)50%,transparent)}}.border-\[var\(--status-error\)\]{border-color:var(--status-error)}.border-\[var\(--status-offline\)\],.border-\[var\(--status-offline\)\]\/20{border-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-offline\)\]\/20{border-color:color-mix(in oklab,var(--status-offline)20%,transparent)}}.border-\[var\(--status-online\)\],.border-\[var\(--status-online\)\]\/20{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/20{border-color:color-mix(in oklab,var(--status-online)20%,transparent)}}.border-\[var\(--status-online\)\]\/30{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/30{border-color:color-mix(in oklab,var(--status-online)30%,transparent)}}.border-\[var\(--status-online\)\]\/50{border-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-online\)\]\/50{border-color:color-mix(in oklab,var(--status-online)50%,transparent)}}.border-\[var\(--status-processing\)\]{border-color:var(--status-processing)}.border-\[var\(--status-warning\)\],.border-\[var\(--status-warning\)\]\/20{border-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--status-warning\)\]\/20{border-color:color-mix(in oklab,var(--status-warning)20%,transparent)}}.border-\[var\(--text-muted\)\]{border-color:var(--text-muted)}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-500\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border)50%,transparent)}}.border-current{border-color:currentColor}.border-cyan-500\/20{border-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/20{border-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.border-cyan-500\/30{border-color:#00b7d74d}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/30{border-color:color-mix(in oklab,var(--color-cyan-500)30%,transparent)}}.border-cyan-500\/40{border-color:#00b7d766}@supports (color:color-mix(in lab,red,red)){.border-cyan-500\/40{border-color:color-mix(in oklab,var(--color-cyan-500)40%,transparent)}}.border-emerald-500\/30{border-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/30{border-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.border-green-500\/30{border-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.border-green-500\/30{border-color:color-mix(in oklab,var(--color-green-500)30%,transparent)}}.border-orange-500\/20{border-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/20{border-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.border-orange-500\/30{border-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/30{border-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.border-orange-500\/40{border-color:#fe6e0066}@supports (color:color-mix(in lab,red,red)){.border-orange-500\/40{border-color:color-mix(in oklab,var(--color-orange-500)40%,transparent)}}.border-purple-500\/20{border-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/20{border-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.border-purple-500\/30{border-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.border-purple-500\/30{border-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.border-transparent{border-color:#0000}.border-yellow-500\/30{border-color:#edb2004d}@supports (color:color-mix(in lab,red,red)){.border-yellow-500\/30{border-color:color-mix(in oklab,var(--color-yellow-500)30%,transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-\[var\(--accent-glow\)\]{border-left-color:var(--accent-glow)}.border-l-\[var\(--status-offline\)\]{border-left-color:var(--status-offline)}.border-l-\[var\(--status-warning\)\]{border-left-color:var(--status-warning)}.border-l-\[var\(--text-muted\)\]{border-left-color:var(--text-muted)}.bg-\[color-mix\(in_oklch\,var\(--accent-glow\)_10\%\,transparent\)\]{background-color:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.bg-\[color-mix\(in_oklch\,var\(--accent-glow\)_10\%\,transparent\)\]{background-color:color-mix(in oklch,var(--accent-glow)10%,transparent)}}.bg-\[hsl\(var\(--accent-primary\)\)\]{background-color:hsl(var(--accent-primary))}.bg-\[hsl\(var\(--bg-primary\)\)\]{background-color:hsl(var(--bg-primary))}.bg-\[hsl\(var\(--bg-secondary\)\)\]{background-color:hsl(var(--bg-secondary))}.bg-\[hsl\(var\(--status-offline\)\)\]{background-color:hsl(var(--status-offline))}.bg-\[hsl\(var\(--status-online\)\)\]{background-color:hsl(var(--status-online))}.bg-\[hsl\(var\(--status-processing\)\)\]{background-color:hsl(var(--status-processing))}.bg-\[hsl\(var\(--status-warning\)\)\]{background-color:hsl(var(--status-warning))}.bg-\[hsl\(var\(--text-secondary\)\)\]{background-color:hsl(var(--text-secondary))}.bg-\[oklch\(0\.18_0\.04_260\)\]{background-color:#071123}.bg-\[oklch\(0\.20_0\.05_260\)\]{background-color:#08152c}.bg-\[oklch\(0\.35_0\.12_25\)\]{background-color:#6c1517}.bg-\[oklch\(0\.72_0\.19_145\)\]{background-color:#43c251}.bg-\[oklch\(0\.72_0\.19_145\/0\.3\)\]{background-color:#43c2514d}.bg-\[oklch\(0\.72_0\.19_145\/0\.08\)\]{background-color:#43c25114}.bg-\[oklch\(0\.72_0\.19_145\/0\.15\)\]{background-color:#43c25126}.bg-\[oklch\(0\.75_0\.18_55\)\]{background-color:#ff8b26;background-color:oklch(75% .18 55)}.bg-\[var\(--accent-glow\)\],.bg-\[var\(--accent-glow\)\]\/20{background-color:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-glow\)\]\/20{background-color:color-mix(in oklab,var(--accent-glow)20%,transparent)}}.bg-\[var\(--accent-primary\)\],.bg-\[var\(--accent-primary\)\]\/10{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-primary\)\]\/10{background-color:color-mix(in oklab,var(--accent-primary)10%,transparent)}}.bg-\[var\(--accent-primary\)\]\/20{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--accent-primary\)\]\/20{background-color:color-mix(in oklab,var(--accent-primary)20%,transparent)}}.bg-\[var\(--bg-elevated\)\],.bg-\[var\(--bg-elevated\)\]\/50{background-color:var(--bg-elevated)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-elevated\)\]\/50{background-color:color-mix(in oklab,var(--bg-elevated)50%,transparent)}}.bg-\[var\(--bg-panel\)\],.bg-\[var\(--bg-panel\)\]\/30{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-panel\)\]\/30{background-color:color-mix(in oklab,var(--bg-panel)30%,transparent)}}.bg-\[var\(--bg-panel\)\]\/50{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-panel\)\]\/50{background-color:color-mix(in oklab,var(--bg-panel)50%,transparent)}}.bg-\[var\(--bg-void\)\],.bg-\[var\(--bg-void\)\]\/30{background-color:var(--bg-void)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--bg-void\)\]\/30{background-color:color-mix(in oklab,var(--bg-void)30%,transparent)}}.bg-\[var\(--border-subtle\)\]{background-color:var(--border-subtle)}.bg-\[var\(--status-error\)\]\/10{background-color:var(--status-error)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-error\)\]\/10{background-color:color-mix(in oklab,var(--status-error)10%,transparent)}}.bg-\[var\(--status-offline\)\],.bg-\[var\(--status-offline\)\]\/10{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-offline\)\]\/10{background-color:color-mix(in oklab,var(--status-offline)10%,transparent)}}.bg-\[var\(--status-offline\)\]\/20{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-offline\)\]\/20{background-color:color-mix(in oklab,var(--status-offline)20%,transparent)}}.bg-\[var\(--status-online\)\],.bg-\[var\(--status-online\)\]\/5{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/5{background-color:color-mix(in oklab,var(--status-online)5%,transparent)}}.bg-\[var\(--status-online\)\]\/10{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/10{background-color:color-mix(in oklab,var(--status-online)10%,transparent)}}.bg-\[var\(--status-online\)\]\/15{background-color:var(--status-online)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-online\)\]\/15{background-color:color-mix(in oklab,var(--status-online)15%,transparent)}}.bg-\[var\(--status-processing\)\]\/10{background-color:var(--status-processing)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-processing\)\]\/10{background-color:color-mix(in oklab,var(--status-processing)10%,transparent)}}.bg-\[var\(--status-warning\)\],.bg-\[var\(--status-warning\)\]\/10{background-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-warning\)\]\/10{background-color:color-mix(in oklab,var(--status-warning)10%,transparent)}}.bg-\[var\(--status-warning\)\]\/20{background-color:var(--status-warning)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--status-warning\)\]\/20{background-color:color-mix(in oklab,var(--status-warning)20%,transparent)}}.bg-\[var\(--text-muted\)\],.bg-\[var\(--text-muted\)\]\/15{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--text-muted\)\]\/15{background-color:color-mix(in oklab,var(--text-muted)15%,transparent)}}.bg-\[var\(--text-muted\)\]\/20{background-color:var(--text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--text-muted\)\]\/20{background-color:color-mix(in oklab,var(--text-muted)20%,transparent)}}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-amber-500\/20{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/20{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.bg-amber-500\/70{background-color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/70{background-color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.bg-amber-600\/80{background-color:#dd7400cc}@supports (color:color-mix(in lab,red,red)){.bg-amber-600\/80{background-color:color-mix(in oklab,var(--color-amber-600)80%,transparent)}}.bg-background,.bg-background\/50{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/50{background-color:color-mix(in oklab,var(--background)50%,transparent)}}.bg-background\/60{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/60{background-color:color-mix(in oklab,var(--background)60%,transparent)}}.bg-background\/80{background-color:var(--background)}@supports (color:color-mix(in lab,red,red)){.bg-background\/80{background-color:color-mix(in oklab,var(--background)80%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\/40{background-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/40{background-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.bg-blue-500\/50{background-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\/50{background-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.bg-border{background-color:var(--border)}.bg-card\/60{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/60{background-color:color-mix(in oklab,var(--card)60%,transparent)}}.bg-card\/80{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/80{background-color:color-mix(in oklab,var(--card)80%,transparent)}}.bg-current{background-color:currentColor}.bg-cyan-500\/10{background-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.bg-cyan-500\/10{background-color:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.bg-emerald-500\/60{background-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/60{background-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-green-500\/10{background-color:#00c7581a}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/10{background-color:color-mix(in oklab,var(--color-green-500)10%,transparent)}}.bg-green-500\/20{background-color:#00c75833}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/20{background-color:color-mix(in oklab,var(--color-green-500)20%,transparent)}}.bg-green-500\/70{background-color:#00c758b3}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/70{background-color:color-mix(in oklab,var(--color-green-500)70%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-muted,.bg-muted\/30{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/30{background-color:color-mix(in oklab,var(--muted)30%,transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/40{background-color:color-mix(in oklab,var(--muted)40%,transparent)}}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-500\/5{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/5{background-color:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.bg-orange-500\/10{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/10{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.bg-orange-500\/20{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/20{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.bg-orange-500\/50{background-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.bg-orange-500\/50{background-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.bg-popover{background-color:var(--popover)}.bg-purple-500\/10{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/10{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.bg-purple-500\/20{background-color:#ac4bff33}@supports (color:color-mix(in lab,red,red)){.bg-purple-500\/20{background-color:color-mix(in oklab,var(--color-purple-500)20%,transparent)}}.bg-purple-600{background-color:var(--color-purple-600)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-red-500\/60{background-color:#fb2c3699}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/60{background-color:color-mix(in oklab,var(--color-red-500)60%,transparent)}}.bg-red-500\/70{background-color:#fb2c36b3}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/70{background-color:color-mix(in oklab,var(--color-red-500)70%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500\/5{background-color:#edb2000d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/5{background-color:color-mix(in oklab,var(--color-yellow-500)5%,transparent)}}.bg-yellow-500\/15{background-color:#edb20026}@supports (color:color-mix(in lab,red,red)){.bg-yellow-500\/15{background-color:color-mix(in oklab,var(--color-yellow-500)15%,transparent)}}.bg-zinc-700\/50{background-color:#3f3f4680}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\/50{background-color:color-mix(in oklab,var(--color-zinc-700)50%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-\[radial-gradient\(ellipse_at_top_right\,_var\(--tw-gradient-stops\)\)\]{background-image:radial-gradient(ellipse at top right,var(--tw-gradient-stops))}.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-from:var(--accent-glow)}@supports (color:color-mix(in lab,red,red)){.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-from:color-mix(in oklab,var(--accent-glow)7%,transparent)}}.from-\[var\(--accent-glow\)\]\/\[0\.07\]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[var\(--accent-primary\)\]{--tw-gradient-from:var(--accent-primary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[var\(--bg-elevated\)\]{--tw-gradient-from:var(--bg-elevated);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-950\/80{--tw-gradient-from:#053345cc}@supports (color:color-mix(in lab,red,red)){.from-cyan-950\/80{--tw-gradient-from:color-mix(in oklab,var(--color-cyan-950)80%,transparent)}}.from-cyan-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-400\/10{--tw-gradient-from:#00d2941a}@supports (color:color-mix(in lab,red,red)){.from-emerald-400\/10{--tw-gradient-from:color-mix(in oklab,var(--color-emerald-400)10%,transparent)}}.from-emerald-400\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-emerald-500\/10{--tw-gradient-from:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.from-emerald-500\/10{--tw-gradient-from:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.from-emerald-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-500\/5{--tw-gradient-from:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.from-orange-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.from-orange-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-950\/80{--tw-gradient-from:#441306cc}@supports (color:color-mix(in lab,red,red)){.from-orange-950\/80{--tw-gradient-from:color-mix(in oklab,var(--color-orange-950)80%,transparent)}}.from-orange-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500\/5{--tw-gradient-from:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.from-purple-500\/5{--tw-gradient-from:color-mix(in oklab,var(--color-purple-500)5%,transparent)}}.from-purple-500\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-zinc-900{--tw-gradient-from:var(--color-zinc-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-\[var\(--accent-primary\)\]{--tw-gradient-via:var(--accent-primary);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[var\(--border-default\)\]{--tw-gradient-via:var(--border-default);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via:var(--status-processing)}@supports (color:color-mix(in lab,red,red)){.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via:color-mix(in oklab,var(--status-processing)30%,transparent)}}.via-\[var\(--status-processing\)\]\/30{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-900\/60{--tw-gradient-via:#104e6499}@supports (color:color-mix(in lab,red,red)){.via-cyan-900\/60{--tw-gradient-via:color-mix(in oklab,var(--color-cyan-900)60%,transparent)}}.via-cyan-900\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-300{--tw-gradient-via:var(--color-orange-300);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-orange-900\/60{--tw-gradient-via:#7e2a0c99}@supports (color:color-mix(in lab,red,red)){.via-orange-900\/60{--tw-gradient-via:color-mix(in oklab,var(--color-orange-900)60%,transparent)}}.via-orange-900\/60{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500\/5{--tw-gradient-via:#00baa70d}@supports (color:color-mix(in lab,red,red)){.via-teal-500\/5{--tw-gradient-via:color-mix(in oklab,var(--color-teal-500)5%,transparent)}}.via-teal-500\/5{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[var\(--accent-secondary\)\]{--tw-gradient-to:var(--accent-secondary);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[var\(--bg-active\)\]{--tw-gradient-to:var(--bg-active);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[var\(--bg-panel\)\]{--tw-gradient-to:var(--bg-panel);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-black{--tw-gradient-to:var(--color-black);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-500\/10{--tw-gradient-to:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.to-cyan-500\/10{--tw-gradient-to:color-mix(in oklab,var(--color-cyan-500)10%,transparent)}}.to-cyan-500\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-950\/80{--tw-gradient-to:#053345cc}@supports (color:color-mix(in lab,red,red)){.to-cyan-950\/80{--tw-gradient-to:color-mix(in oklab,var(--color-cyan-950)80%,transparent)}}.to-cyan-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-orange-950\/80{--tw-gradient-to:#441306cc}@supports (color:color-mix(in lab,red,red)){.to-orange-950\/80{--tw-gradient-to:color-mix(in oklab,var(--color-orange-950)80%,transparent)}}.to-orange-950\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-red-500{fill:var(--color-red-500)}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-display{font-family:Space Grotesk,system-ui,sans-serif}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[10px\]{font-size:10px}.leading-none{--tw-leading:1;line-height:1}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-\[var\(--font-display\)\]{--tw-font-weight:var(--font-display);font-weight:var(--font-display)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[hsl\(var\(--bg-primary\)\)\]{color:hsl(var(--bg-primary))}.text-\[hsl\(var\(--text-secondary\)\)\]{color:hsl(var(--text-secondary))}.text-\[oklch\(0\.15_0\.02_55\)\]{color:#120904}.text-\[oklch\(0\.72_0\.19_145\)\]{color:#43c251}.text-\[oklch\(0\.72_0\.19_145\/0\.8\)\]{color:#43c251cc}.text-\[oklch\(0\.75_0\.18_55\)\]{color:#ff8b26;color:oklch(75% .18 55)}.text-\[oklch\(0\.85_0\.02_260\)\]{color:#c6cedb}.text-\[oklch\(0\.90_0\.02_25\)\]{color:#ebd9d7}.text-\[var\(--accent-glow\)\]{color:var(--accent-glow)}.text-\[var\(--accent-primary\)\]{color:var(--accent-primary)}.text-\[var\(--border-default\)\]{color:var(--border-default)}.text-\[var\(--primary-foreground\)\]{color:var(--primary-foreground)}.text-\[var\(--status-error\)\]{color:var(--status-error)}.text-\[var\(--status-offline\)\]{color:var(--status-offline)}.text-\[var\(--status-online\)\]{color:var(--status-online)}.text-\[var\(--status-processing\)\]{color:var(--status-processing)}.text-\[var\(--status-warning\)\]{color:var(--status-warning)}.text-\[var\(--text-accent\)\]{color:var(--text-accent)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-\[var\(--text-primary\)\]{color:var(--text-primary)}.text-\[var\(--text-secondary\)\]{color:var(--text-secondary)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-background{color:var(--background)}.text-black{color:var(--color-black)}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-card-foreground{color:var(--card-foreground)}.text-cyan-200{color:var(--color-cyan-200)}.text-cyan-300{color:var(--color-cyan-300)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-500\/60{color:#00b7d799}@supports (color:color-mix(in lab,red,red)){.text-cyan-500\/60{color:color-mix(in oklab,var(--color-cyan-500)60%,transparent)}}.text-destructive{color:var(--destructive)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-300\/60{color:#5ee9b599}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/60{color:color-mix(in oklab,var(--color-emerald-300)60%,transparent)}}.text-emerald-300\/70{color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.text-emerald-300\/70{color:color-mix(in oklab,var(--color-emerald-300)70%,transparent)}}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-foreground,.text-foreground\/90{color:var(--foreground)}@supports (color:color-mix(in lab,red,red)){.text-foreground\/90{color:color-mix(in oklab,var(--foreground)90%,transparent)}}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-muted{color:var(--muted)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-200{color:var(--color-orange-200)}.text-orange-200\/70{color:#ffd7a8b3}@supports (color:color-mix(in lab,red,red)){.text-orange-200\/70{color:color-mix(in oklab,var(--color-orange-200)70%,transparent)}}.text-orange-200\/80{color:#ffd7a8cc}@supports (color:color-mix(in lab,red,red)){.text-orange-200\/80{color:color-mix(in oklab,var(--color-orange-200)80%,transparent)}}.text-orange-300{color:var(--color-orange-300)}.text-orange-300\/60{color:#ffb96d99}@supports (color:color-mix(in lab,red,red)){.text-orange-300\/60{color:color-mix(in oklab,var(--color-orange-300)60%,transparent)}}.text-orange-300\/80{color:#ffb96dcc}@supports (color:color-mix(in lab,red,red)){.text-orange-300\/80{color:color-mix(in oklab,var(--color-orange-300)80%,transparent)}}.text-orange-400{color:var(--color-orange-400)}.text-orange-500{color:var(--color-orange-500)}.text-orange-500\/30{color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/30{color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.text-orange-500\/50{color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/50{color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.text-orange-500\/60{color:#fe6e0099}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/60{color:color-mix(in oklab,var(--color-orange-500)60%,transparent)}}.text-orange-500\/70{color:#fe6e00b3}@supports (color:color-mix(in lab,red,red)){.text-orange-500\/70{color:color-mix(in oklab,var(--color-orange-500)70%,transparent)}}.text-purple-200{color:var(--color-purple-200)}.text-purple-200\/80{color:#e9d5ffcc}@supports (color:color-mix(in lab,red,red)){.text-purple-200\/80{color:color-mix(in oklab,var(--color-purple-200)80%,transparent)}}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-purple-500{color:var(--color-purple-500)}.text-purple-500\/60{color:#ac4bff99}@supports (color:color-mix(in lab,red,red)){.text-purple-500\/60{color:color-mix(in oklab,var(--color-purple-500)60%,transparent)}}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\/70{color:color-mix(in oklab,var(--color-red-400)70%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.text-yellow-500{color:var(--color-yellow-500)}.text-zinc-300{color:var(--color-zinc-300)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.opacity-\[0\.03\]{opacity:.03}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_0_oklch\(0\.72_0\.19_145\)\]{--tw-shadow:0 0 8px 0 var(--tw-shadow-color,oklch(72% .19 145));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_var\(--status-online\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_10px_var\(--accent-primary\)\/20\]{--tw-shadow:0 0 10px var(--tw-shadow-color,var(--accent-primary)/20);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_16px_0_oklch\(0\.72_0\.19_145\/0\.25\)\,inset_0_1px_0_0_oklch\(0\.72_0\.19_145\/0\.1\)\]{--tw-shadow:0 0 16px 0 var(--tw-shadow-color,oklch(72% .19 145/.25)),inset 0 1px 0 0 var(--tw-shadow-color,oklch(72% .19 145/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_20px_0_var\(--accent-glow\)\]{--tw-shadow:0 0 20px 0 var(--tw-shadow-color,var(--accent-glow));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_30px_var\(--status-online\)\]{--tw-shadow:0 0 30px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0\.75_0\.18_55\/0\.4\)\,0_0_12px_0_oklch\(0\.75_0\.18_55\/0\.2\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(75% .18 55/.4)),0 0 12px 0 var(--tw-shadow-color,oklch(75% .18 55/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.1\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.2\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.3\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.3));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_2px_0_0_oklch\(0_0_0\/0\.25\)\]{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.25));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_0_var\(--border-subtle\)\,inset_0_-1px_0_0_oklch\(0_0_0\/0\.2\)\,0_2px_0_0_oklch\(0_0_0\/0\.1\)\]{--tw-shadow:inset 0 1px 0 0 var(--tw-shadow-color,var(--border-subtle)),inset 0 -1px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.2)),0 2px 0 0 var(--tw-shadow-color,oklch(0% 0 0/.1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_1px_0_rgba\(255\,255\,255\,0\.1\)\,0_2px_4px_rgba\(0\,0\,0\,0\.3\)\]{--tw-shadow:inset 0 1px 0 var(--tw-shadow-color,#ffffff1a),0 2px 4px var(--tw-shadow-color,#0000004d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-cyan-500\/10{--tw-shadow-color:#00b7d71a}@supports (color:color-mix(in lab,red,red)){.shadow-cyan-500\/10{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-500)10%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-emerald-500\/5{--tw-shadow-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/5{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-500)5%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-orange-500\/10{--tw-shadow-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.shadow-orange-500\/10{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-500)10%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-emerald-500\/30{--tw-ring-color:#00bb7f4d}@supports (color:color-mix(in lab,red,red)){.ring-emerald-500\/30{--tw-ring-color:color-mix(in oklab,var(--color-emerald-500)30%,transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-sm{--tw-blur:blur(var(--blur-sm));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,)}.grayscale{--tw-grayscale:grayscale(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,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[height\]{transition-property:height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,box-shadow\]{transition-property:transform,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-50{--tw-duration:50ms;transition-duration:50ms}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}.fade-in{--tw-enter-opacity:0}.running{animation-play-state:running}.slide-in-from-right{--tw-enter-translate-x:100%}.slide-in-from-top-2{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}@media(hover:hover){.group-hover\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:text-\[var\(--text-primary\)\]:is(:where(.group):hover *){color:var(--text-primary)}.group-hover\:text-orange-500:is(:where(.group):hover *){color:var(--color-orange-500)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-purple-500\/30 ::selection{background-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.selection\:bg-purple-500\/30 ::selection{background-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.selection\:bg-purple-500\/30::selection{background-color:#ac4bff4d}@supports (color:color-mix(in lab,red,red)){.selection\:bg-purple-500\/30::selection{background-color:color-mix(in oklab,var(--color-purple-500)30%,transparent)}}.placeholder\:text-muted-foreground\/50::placeholder{color:var(--muted-foreground)}@supports (color:color-mix(in lab,red,red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab,var(--muted-foreground)50%,transparent)}}.before\:pointer-events-none:before{content:var(--tw-content);pointer-events:none}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:inset-0:before{content:var(--tw-content);inset:calc(var(--spacing)*0)}.before\:bg-gradient-to-b:before{content:var(--tw-content);--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.before\:from-white\/\[0\.02\]:before{content:var(--tw-content);--tw-gradient-from:#ffffff05}@supports (color:color-mix(in lab,red,red)){.before\:from-white\/\[0\.02\]:before{--tw-gradient-from:color-mix(in oklab,var(--color-white)2%,transparent)}}.before\:from-white\/\[0\.02\]:before{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.before\:to-transparent:before{content:var(--tw-content);--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}@media(hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing)*-.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:translate-y-\[-2px\]:hover{--tw-translate-y:-2px;translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-\[oklch\(0\.50_0\.18_25\)\]:hover{border-color:#b32228}.hover\:border-\[oklch\(0\.65_0\.2_55\)\]:hover{border-color:#d76f00;border-color:oklch(65% .2 55)}.hover\:border-\[oklch\(0\.75_0\.18_55\)\]:hover{border-color:#ff8b26;border-color:oklch(75% .18 55)}.hover\:border-\[var\(--accent-primary\)\]:hover{border-color:var(--accent-primary)}.hover\:border-\[var\(--border-accent\)\]:hover{border-color:var(--border-accent)}.hover\:border-\[var\(--border-default\)\]:hover{border-color:var(--border-default)}.hover\:border-\[var\(--text-muted\)\]:hover{border-color:var(--text-muted)}.hover\:border-border:hover{border-color:var(--border)}.hover\:border-orange-500\/50:hover{border-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.hover\:border-orange-500\/50:hover{border-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.hover\:border-transparent:hover{border-color:#0000}.hover\:bg-\[oklch\(0\.22_0\.05_260\)\]:hover{background-color:#0c1a32}.hover\:bg-\[oklch\(0\.25_0\.04_260\)\]:hover{background-color:#162235}.hover\:bg-\[oklch\(0\.25_0\.06_260\)\]:hover{background-color:#10213e}.hover\:bg-\[oklch\(0\.40_0\.14_25\)\]:hover{background-color:#831a1d}.hover\:bg-\[oklch\(0\.78_0\.19_55\)\]:hover{background-color:#ff9b51;background-color:oklch(78% .19 55)}.hover\:bg-\[var\(--accent-primary\)\]:hover,.hover\:bg-\[var\(--accent-primary\)\]\/20:hover{background-color:var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--accent-primary\)\]\/20:hover{background-color:color-mix(in oklab,var(--accent-primary)20%,transparent)}}.hover\:bg-\[var\(--bg-active\)\]:hover{background-color:var(--bg-active)}.hover\:bg-\[var\(--bg-elevated\)\]:hover{background-color:var(--bg-elevated)}.hover\:bg-\[var\(--bg-panel\)\]\/50:hover{background-color:var(--bg-panel)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--bg-panel\)\]\/50:hover{background-color:color-mix(in oklab,var(--bg-panel)50%,transparent)}}.hover\:bg-\[var\(--bg-void\)\]:hover{background-color:var(--bg-void)}.hover\:bg-\[var\(--status-error\)\]\/20:hover{background-color:var(--status-error)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--status-error\)\]\/20:hover{background-color:color-mix(in oklab,var(--status-error)20%,transparent)}}.hover\:bg-\[var\(--status-offline\)\]\/10:hover{background-color:var(--status-offline)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-\[var\(--status-offline\)\]\/10:hover{background-color:color-mix(in oklab,var(--status-offline)10%,transparent)}}.hover\:bg-amber-500\/20:hover{background-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-500\/20:hover{background-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.hover\:bg-amber-600:hover{background-color:var(--color-amber-600)}.hover\:bg-blue-500\/60:hover{background-color:#3080ff99}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-500\/60:hover{background-color:color-mix(in oklab,var(--color-blue-500)60%,transparent)}}.hover\:bg-card:hover{background-color:var(--card)}.hover\:bg-cyan-500\/20:hover{background-color:#00b7d733}@supports (color:color-mix(in lab,red,red)){.hover\:bg-cyan-500\/20:hover{background-color:color-mix(in oklab,var(--color-cyan-500)20%,transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab,var(--destructive)10%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/20:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/20:hover{background-color:color-mix(in oklab,var(--muted)20%,transparent)}}.hover\:bg-orange-500\/5:hover{background-color:#fe6e000d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/5:hover{background-color:color-mix(in oklab,var(--color-orange-500)5%,transparent)}}.hover\:bg-orange-500\/10:hover{background-color:#fe6e001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/10:hover{background-color:color-mix(in oklab,var(--color-orange-500)10%,transparent)}}.hover\:bg-orange-500\/20:hover{background-color:#fe6e0033}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/20:hover{background-color:color-mix(in oklab,var(--color-orange-500)20%,transparent)}}.hover\:bg-orange-500\/30:hover{background-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-orange-500\/30:hover{background-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.hover\:bg-orange-600:hover{background-color:var(--color-orange-600)}.hover\:bg-purple-500\/5:hover{background-color:#ac4bff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-500\/5:hover{background-color:color-mix(in oklab,var(--color-purple-500)5%,transparent)}}.hover\:bg-purple-500\/10:hover{background-color:#ac4bff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-purple-500\/10:hover{background-color:color-mix(in oklab,var(--color-purple-500)10%,transparent)}}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-red-500\/30:hover{background-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/30:hover{background-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.hover\:text-\[oklch\(0\.75_0\.18_55\)\]:hover{color:#ff8b26;color:oklch(75% .18 55)}.hover\:text-\[oklch\(0\.80_0\.20_55\)\]:hover{color:#ffa566;color:oklch(80% .2 55)}.hover\:text-\[oklch\(0\.85_0\.02_260\)\]:hover{color:#c6cedb}.hover\:text-\[var\(--accent-primary\)\]:hover{color:var(--accent-primary)}.hover\:text-\[var\(--bg-panel\)\]:hover{color:var(--bg-panel)}.hover\:text-\[var\(--status-offline\)\]:hover{color:var(--status-offline)}.hover\:text-\[var\(--text-primary\)\]:hover{color:var(--text-primary)}.hover\:text-\[var\(--text-secondary\)\]:hover{color:var(--text-secondary)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-orange-300:hover{color:var(--color-orange-300)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:shadow-\[0_0_0_1px_var\(--accent-primary\)\,0_0_20px_oklch\(0\.75_0\.18_55\/0\.2\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent-primary)),0 0 20px var(--tw-shadow-color,oklch(75% .18 55/.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_10px_var\(--accent-primary\)\]:hover{--tw-shadow:0 0 10px var(--tw-shadow-color,var(--accent-primary));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--accent-primary\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--accent-primary));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--status-offline\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--status-offline));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_15px_var\(--status-online\)\]:hover{--tw-shadow:0 0 15px var(--tw-shadow-color,var(--status-online));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_0_20px_var\(--accent-primary\)\/15\]:hover{--tw-shadow:0 0 20px var(--tw-shadow-color,var(--accent-primary)/15);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_2px_0_0_oklch\(0\.75_0\.18_55\/0\.6\)\,0_0_20px_0_oklch\(0\.75_0\.18_55\/0\.35\)\]:hover{--tw-shadow:0 2px 0 0 var(--tw-shadow-color,oklch(75% .18 55/.6)),0 0 20px 0 var(--tw-shadow-color,oklch(75% .18 55/.35));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:border-orange-500\/50:focus{border-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.focus\:border-orange-500\/50:focus{border-color:color-mix(in oklab,var(--color-orange-500)50%,transparent)}}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-orange-500\/30:focus{--tw-ring-color:#fe6e004d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-orange-500\/30:focus{--tw-ring-color:color-mix(in oklab,var(--color-orange-500)30%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[hsl\(var\(--status-offline\)\)\]\/20:focus-visible{--tw-ring-color:hsl(var(--status-offline))}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-\[hsl\(var\(--status-offline\)\)\]\/20:focus-visible{--tw-ring-color:color-mix(in oklab,hsl(var(--status-offline))20%,transparent)}}.focus-visible\:ring-\[oklch\(0\.45_0\.08_260\)\]:focus-visible{--tw-ring-color:oklch(45% .08 260)}.focus-visible\:ring-\[oklch\(0\.45_0\.15_25\)\]:focus-visible{--tw-ring-color:oklch(45% .15 25)}.focus-visible\:ring-\[oklch\(0\.75_0\.18_55\)\]:focus-visible{--tw-ring-color:oklch(75% .18 55)}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab,var(--ring)50%,transparent)}}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-\[var\(--bg-panel\)\]:focus-visible{--tw-ring-offset-color:var(--bg-panel)}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:var(--background)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:translate-y-0:active{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.active\:translate-y-0\.5:active{--tw-translate-y:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.active\:bg-\[oklch\(0\.20_0\.04_260\)\]:active{background-color:#0b1628}.active\:shadow-\[0_0_8px_0_oklch\(0\.75_0\.18_55\/0\.4\)\]:active{--tw-shadow:0 0 8px 0 var(--tw-shadow-color,oklch(75% .18 55/.4));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.active\:shadow-none:active{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:active\:translate-y-0:disabled:active{--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing)*2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing)*3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing)*4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)20%,transparent)}}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=checked\]\:bg-\[var\(--accent-glow\)\][data-state=checked]{background-color:var(--accent-glow)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}@media(min-width:40rem){.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:block{display:block}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}@media(min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(min-width:80rem){.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab,var(--destructive)40%,transparent)}}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input)80%,transparent)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing)*3);height:calc(var(--spacing)*3)}@media(hover:hover){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--accent-primary\)\)\]\/90:hover{background-color:hsl(var(--accent-primary))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--accent-primary\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--accent-primary))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--bg-tertiary\)\)\]:hover{background-color:hsl(var(--bg-tertiary))}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-offline\)\)\]\/90:hover{background-color:hsl(var(--status-offline))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-offline\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-offline))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-online\)\)\]\/90:hover{background-color:hsl(var(--status-online))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-online\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-online))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-processing\)\)\]\/90:hover{background-color:hsl(var(--status-processing))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-processing\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-processing))90%,transparent)}}a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-warning\)\)\]\/90:hover{background-color:hsl(var(--status-warning))}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-\[hsl\(var\(--status-warning\)\)\]\/90:hover{background-color:color-mix(in oklab,hsl(var(--status-warning))90%,transparent)}}a.\[a\&\]\:hover\:text-\[hsl\(var\(--text-primary\)\)\]:hover{color:hsl(var(--text-primary))}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}:root{--radius:.5rem;--bg-void:oklch(97% .01 240);--bg-panel:oklch(100% 0 0);--bg-elevated:oklch(98% .01 240);--bg-active:oklch(94% .02 240);--accent-primary:oklch(50% .18 250);--accent-secondary:oklch(45% .15 255);--accent-glow:oklch(75% .12 220);--status-online:oklch(60% .18 145);--status-offline:oklch(50% .12 25);--status-warning:oklch(70% .16 85);--status-processing:oklch(65% .15 250);--text-primary:oklch(20% .03 250);--text-secondary:oklch(40% .02 250);--text-muted:oklch(55% .02 250);--text-accent:oklch(45% .16 250);--border-subtle:oklch(92% .01 240);--border-default:oklch(85% .02 240);--border-accent:oklch(50% .12 250);--background:oklch(97% .01 240);--foreground:oklch(20% .03 250);--card:oklch(100% 0 0);--card-foreground:oklch(20% .03 250);--popover:oklch(100% 0 0);--popover-foreground:oklch(20% .03 250);--primary:oklch(50% .18 250);--primary-foreground:oklch(98% .01 240);--secondary:oklch(94% .02 240);--secondary-foreground:oklch(30% .03 250);--muted:oklch(94% .02 240);--muted-foreground:oklch(50% .02 250);--accent:oklch(94% .03 220);--accent-foreground:oklch(40% .15 250);--destructive:oklch(55% .2 25);--border:oklch(92% .01 240);--input:oklch(92% .01 240);--ring:oklch(50% .18 250);--chart-1:oklch(50% .18 250);--chart-2:oklch(60% .18 145);--chart-3:oklch(65% .15 220);--chart-4:oklch(70% .16 85);--chart-5:oklch(45% .15 255);--sidebar:oklch(98% .01 240);--sidebar-foreground:oklch(20% .03 250);--sidebar-primary:oklch(50% .18 250);--sidebar-primary-foreground:oklch(98% 0 0);--sidebar-accent:oklch(94% .03 220);--sidebar-accent-foreground:oklch(40% .15 250);--sidebar-border:oklch(92% .01 240);--sidebar-ring:oklch(50% .18 250)}.dark{--bg-void:oklch(12% .03 250);--bg-panel:oklch(16% .04 250);--bg-elevated:oklch(20% .05 250);--bg-active:oklch(25% .06 250);--accent-primary:oklch(65% .18 250);--accent-secondary:oklch(55% .15 255);--accent-glow:oklch(80% .14 220);--status-online:oklch(72% .19 145);--status-offline:oklch(55% .12 25);--status-warning:oklch(80% .16 85);--status-processing:oklch(70% .15 250);--text-primary:oklch(96% .01 90);--text-secondary:oklch(75% .02 240);--text-muted:oklch(55% .03 250);--text-accent:oklch(80% .14 220);--border-subtle:oklch(25% .04 250);--border-default:oklch(32% .05 250);--border-accent:oklch(55% .12 250);--background:oklch(12% .03 250);--foreground:oklch(96% .01 90);--card:oklch(16% .04 250);--card-foreground:oklch(96% .01 90);--popover:oklch(16% .04 250);--popover-foreground:oklch(96% .01 90);--primary:oklch(65% .18 250);--primary-foreground:oklch(12% .03 250);--secondary:oklch(20% .05 250);--secondary-foreground:oklch(96% .01 90);--muted:oklch(20% .05 250);--muted-foreground:oklch(55% .03 250);--accent:oklch(25% .06 250);--accent-foreground:oklch(80% .14 220);--destructive:oklch(55% .18 25);--destructive-foreground:oklch(96% .01 90);--border:oklch(25% .04 250);--input:oklch(25% .04 250);--ring:oklch(65% .18 250);--chart-1:oklch(65% .18 250);--chart-2:oklch(72% .19 145);--chart-3:oklch(70% .15 220);--chart-4:oklch(80% .16 85);--chart-5:oklch(55% .15 255);--sidebar:oklch(14% .035 250);--sidebar-foreground:oklch(96% .01 90);--sidebar-primary:oklch(65% .18 250);--sidebar-primary-foreground:oklch(12% .03 250);--sidebar-accent:oklch(25% .06 250);--sidebar-accent-foreground:oklch(80% .14 220);--sidebar-border:oklch(25% .04 250);--sidebar-ring:oklch(65% .18 250)}@keyframes statusPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.7;transform:scale(1.05)}}@keyframes slideInFromRight{0%{opacity:0;transform:translate(1rem)}to{opacity:1;transform:translate(0)}}@keyframes scanLine{0%{background-position:-100% 0}to{background-position:200% 0}}.animate-status-pulse{animation:2s ease-in-out infinite statusPulse}.animate-slide-in-right{animation:.3s ease-out forwards slideInFromRight}.animate-scan-line{background:linear-gradient(90deg,transparent 0%,var(--accent-glow)50%,transparent 100%);background-size:200% 100%;animation:1.5s ease-in-out infinite scanLine}@keyframes fadeInUp{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in-up{animation:.4s ease-out forwards fadeInUp}.stagger-children>*{opacity:0;animation:.3s ease-out forwards fadeInUp}.stagger-children>:first-child{animation-delay:50ms}.stagger-children>:nth-child(2){animation-delay:.1s}.stagger-children>:nth-child(3){animation-delay:.15s}.stagger-children>:nth-child(4){animation-delay:.2s}.stagger-children>:nth-child(5){animation-delay:.25s}.stagger-children>:nth-child(6){animation-delay:.3s}@keyframes radarPulse{0%{opacity:.6;transform:scale(1)}to{opacity:0;transform:scale(2.5)}}@keyframes radarSweep{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes dataFlow{0%{stroke-dashoffset:100px}to{stroke-dashoffset:0}}@keyframes signalPulse{0%,to{opacity:1;transform:scaleY(1)}50%{opacity:.7;transform:scaleY(.95)}}@keyframes scanline{0%{opacity:0;top:-10%}10%{opacity:.5}90%{opacity:.5}to{opacity:0;top:110%}}@keyframes glowPulse{0%,to{box-shadow:0 0 8px var(--accent-glow)}50%{box-shadow:0 0 20px var(--accent-glow),0 0 40px var(--accent-primary)}}@keyframes flightPath{0%{stroke-dashoffset:1000px;opacity:0}10%{opacity:1}to{stroke-dashoffset:0;opacity:1}}@keyframes connectingPulse{0%,to{box-shadow:0 0 8px var(--status-processing);border-color:var(--status-processing);opacity:1}50%{box-shadow:0 0 15px var(--status-processing),0 0 30px var(--status-processing);border-color:var(--accent-primary);opacity:.8}}.animate-radar-pulse{animation:2s ease-out infinite radarPulse}.animate-radar-sweep{animation:4s linear infinite radarSweep}.animate-data-flow{animation:1.5s ease-in-out forwards dataFlow}.animate-signal-pulse{animation:1.5s ease-in-out infinite signalPulse}.animate-scanline{animation:3s linear infinite scanline}.animate-glow-pulse{animation:2s ease-in-out infinite glowPulse}.animate-connecting-pulse{animation:1s ease-in-out infinite connectingPulse}.animate-flight-path{animation:2s ease-out forwards flightPath}.delay-0{animation-delay:0s}.delay-75{animation-delay:75ms}.delay-100{animation-delay:.1s}.delay-150{animation-delay:.15s}.delay-200{animation-delay:.2s}.delay-300{animation-delay:.3s}.delay-400{animation-delay:.4s}.delay-500{animation-delay:.5s}.aviation-grid{background-image:linear-gradient(rgba(var(--accent-glow-rgb),.03)1px,transparent 1px),linear-gradient(90deg,rgba(var(--accent-glow-rgb),.03)1px,transparent 1px);background-size:20px 20px}.btn-cockpit{border-radius:calc(var(--radius) - 2px);padding-inline:calc(var(--spacing)*4);padding-block:calc(var(--spacing)*2);font-family:JetBrains Mono,Fira Code,monospace;font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider);text-transform:uppercase;background:linear-gradient(to bottom,var(--bg-elevated),var(--bg-panel));border:1px solid var(--border-default);position:relative;box-shadow:inset 0 1px #ffffff1a,0 2px 4px #0000004d}.btn-cockpit:active{transform:translateY(1px);box-shadow:inset 0 2px 4px #0000004d}.instrument-segment{border-right-style:var(--tw-border-style);border-right-width:1px;border-color:var(--border-subtle);padding-inline:calc(var(--spacing)*3);padding-block:calc(var(--spacing)*1);font-family:JetBrains Mono,Fira Code,monospace;font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));background:linear-gradient(#0000,#0000001a)}.instrument-segment:last-child{border-right:none}.card-glow{transition:box-shadow .2s ease-out,border-color .2s ease-out}.card-glow:hover{box-shadow:0 0 20px var(--accent-primary)}@supports (color:color-mix(in lab,red,red)){.card-glow:hover{box-shadow:0 0 20px color-mix(in oklch,var(--accent-primary)15%,transparent)}}.card-glow:hover{border-color:var(--accent-primary)}.btn-mechanical{transition:transform .1s ease-out,box-shadow .1s ease-out}.btn-mechanical:active{box-shadow:none;transform:translateY(2px)}.dark ::-webkit-scrollbar{width:8px;height:8px}.dark ::-webkit-scrollbar-track{background:var(--bg-panel)}.dark ::-webkit-scrollbar-thumb{background:var(--border-default);border-radius:4px}.dark ::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}.focus-ring:focus{--tw-outline-style:none;outline-style:none}.focus-ring:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:var(--ring);--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-offset-color:var(--background)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}} diff --git a/cmd/proxypilotui/assets/assets/index.js b/cmd/proxypilotui/assets/assets/index.js index 98946e57..5b41bae1 100644 --- a/cmd/proxypilotui/assets/assets/index.js +++ b/cmd/proxypilotui/assets/assets/index.js @@ -1,36 +1,36 @@ -function Ev(l,o){for(var c=0;cu[d]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const x of m.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&u(x)}).observe(document,{childList:!0,subtree:!0});function c(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(d){if(d.ep)return;d.ep=!0;const m=c(d);fetch(d.href,m)}})();function Xp(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var pu={exports:{}},or={};var Ih;function kv(){if(Ih)return or;Ih=1;var l=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function c(u,d,m){var x=null;if(m!==void 0&&(x=""+m),d.key!==void 0&&(x=""+d.key),"key"in d){m={};for(var g in d)g!=="key"&&(m[g]=d[g])}else m=d;return d=m.ref,{$$typeof:l,type:u,key:x,ref:d!==void 0?d:null,props:m}}return or.Fragment=o,or.jsx=c,or.jsxs=c,or}var ep;function Cv(){return ep||(ep=1,pu.exports=kv()),pu.exports}var s=Cv(),xu={exports:{}},_e={};var tp;function Tv(){if(tp)return _e;tp=1;var l=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),j=Symbol.iterator;function _(S){return S===null||typeof S!="object"?null:(S=j&&S[j]||S["@@iterator"],typeof S=="function"?S:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,H={};function k(S,K,X){this.props=S,this.context=K,this.refs=H,this.updater=X||A}k.prototype.isReactComponent={},k.prototype.setState=function(S,K){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,K,"setState")},k.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function Q(){}Q.prototype=k.prototype;function q(S,K,X){this.props=S,this.context=K,this.refs=H,this.updater=X||A}var W=q.prototype=new Q;W.constructor=q,z(W,k.prototype),W.isPureReactComponent=!0;var Z=Array.isArray;function ee(){}var E={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function Y(S,K,X){var ae=X.ref;return{$$typeof:l,type:S,key:K,ref:ae!==void 0?ae:null,props:X}}function le(S,K){return Y(S.type,K,S.props)}function G(S){return typeof S=="object"&&S!==null&&S.$$typeof===l}function ne(S){var K={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(X){return K[X]})}var M=/\/+/g;function se(S,K){return typeof S=="object"&&S!==null&&S.key!=null?ne(""+S.key):K.toString(36)}function ie(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ee,ee):(S.status="pending",S.then(function(K){S.status==="pending"&&(S.status="fulfilled",S.value=K)},function(K){S.status==="pending"&&(S.status="rejected",S.reason=K)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,K,X,ae,oe){var ge=typeof S;(ge==="undefined"||ge==="boolean")&&(S=null);var de=!1;if(S===null)de=!0;else switch(ge){case"bigint":case"string":case"number":de=!0;break;case"object":switch(S.$$typeof){case l:case o:de=!0;break;case b:return de=S._init,T(de(S._payload),K,X,ae,oe)}}if(de)return oe=oe(S),de=ae===""?"."+se(S,0):ae,Z(oe)?(X="",de!=null&&(X=de.replace(M,"$&/")+"/"),T(oe,K,X,"",function(We){return We})):oe!=null&&(G(oe)&&(oe=le(oe,X+(oe.key==null||S&&S.key===oe.key?"":(""+oe.key).replace(M,"$&/")+"/")+de)),K.push(oe)),1;de=0;var Ne=ae===""?".":ae+":";if(Z(S))for(var Ce=0;Ce>>1,xe=T[ue];if(0>>1;ued(X,B))aed(oe,X)?(T[ue]=oe,T[ae]=B,ue=ae):(T[ue]=X,T[K]=B,ue=K);else if(aed(oe,B))T[ue]=oe,T[ae]=B,ue=ae;else break e}}return V}function d(T,V){var B=T.sortIndex-V.sortIndex;return B!==0?B:T.id-V.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var x=Date,g=x.now();l.unstable_now=function(){return x.now()-g}}var v=[],p=[],b=1,h=null,j=3,_=!1,A=!1,z=!1,H=!1,k=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function W(T){for(var V=c(p);V!==null;){if(V.callback===null)u(p);else if(V.startTime<=T)u(p),V.sortIndex=V.expirationTime,o(v,V);else break;V=c(p)}}function Z(T){if(z=!1,W(T),!A)if(c(v)!==null)A=!0,ee||(ee=!0,ne());else{var V=c(p);V!==null&&ie(Z,V.startTime-T)}}var ee=!1,E=-1,L=5,Y=-1;function le(){return H?!0:!(l.unstable_now()-YT&&le());){var ue=h.callback;if(typeof ue=="function"){h.callback=null,j=h.priorityLevel;var xe=ue(h.expirationTime<=T);if(T=l.unstable_now(),typeof xe=="function"){h.callback=xe,W(T),V=!0;break t}h===c(v)&&u(v),W(T)}else u(v);h=c(v)}if(h!==null)V=!0;else{var S=c(p);S!==null&&ie(Z,S.startTime-T),V=!1}}break e}finally{h=null,j=B,_=!1}V=void 0}}finally{V?ne():ee=!1}}}var ne;if(typeof q=="function")ne=function(){q(G)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,se=M.port2;M.port1.onmessage=G,ne=function(){se.postMessage(null)}}else ne=function(){k(G,0)};function ie(T,V){E=k(function(){T(l.unstable_now())},V)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(T){T.callback=null},l.unstable_forceFrameRate=function(T){0>T||125ue?(T.sortIndex=B,o(p,T),c(v)===null&&T===c(p)&&(z?(Q(E),E=-1):z=!0,ie(Z,B-ue))):(T.sortIndex=xe,o(v,T),A||_||(A=!0,ee||(ee=!0,ne()))),T},l.unstable_shouldYield=le,l.unstable_wrapCallback=function(T){var V=j;return function(){var B=j;j=V;try{return T.apply(this,arguments)}finally{j=B}}}})(yu)),yu}var sp;function Mv(){return sp||(sp=1,vu.exports=Av()),vu.exports}var bu={exports:{}},kt={};var lp;function Ov(){if(lp)return kt;lp=1;var l=Gu();function o(v){var p="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(o){console.error(o)}}return l(),bu.exports=Ov(),bu.exports}var op;function zv(){if(op)return ir;op=1;var l=Mv(),o=Gu(),c=Qp();function u(e){var t="https://react.dev/errors/"+e;if(1xe||(e.current=ue[xe],ue[xe]=null,xe--)}function X(e,t){xe++,ue[xe]=e.current,e.current=t}var ae=S(null),oe=S(null),ge=S(null),de=S(null);function Ne(e,t){switch(X(ge,t),X(oe,e),X(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jh(t),e=Nh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}K(ae),X(ae,e)}function Ce(){K(ae),K(oe),K(ge)}function We(e){e.memoizedState!==null&&X(de,e);var t=ae.current,a=Nh(t,e.type);t!==a&&(X(oe,e),X(ae,a))}function it(e){oe.current===e&&(K(ae),K(oe)),de.current===e&&(K(de),nr._currentValue=B)}var qe,I;function Ye(e){if(qe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);qe=t&&t[1]||"",I=-1u[d]})}}}return Object.freeze(Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))u(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const x of m.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&u(x)}).observe(document,{childList:!0,subtree:!0});function c(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(d){if(d.ep)return;d.ep=!0;const m=c(d);fetch(d.href,m)}})();function F0(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var vu={exports:{}},or={};var s0;function Av(){if(s0)return or;s0=1;var l=Symbol.for("react.transitional.element"),o=Symbol.for("react.fragment");function c(u,d,m){var x=null;if(m!==void 0&&(x=""+m),d.key!==void 0&&(x=""+d.key),"key"in d){m={};for(var g in d)g!=="key"&&(m[g]=d[g])}else m=d;return d=m.ref,{$$typeof:l,type:u,key:x,ref:d!==void 0?d:null,props:m}}return or.Fragment=o,or.jsx=c,or.jsxs=c,or}var l0;function Mv(){return l0||(l0=1,vu.exports=Av()),vu.exports}var s=Mv(),bu={exports:{}},_e={};var r0;function Ov(){if(r0)return _e;r0=1;var l=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),j=Symbol.iterator;function S(_){return _===null||typeof _!="object"?null:(_=j&&_[j]||_["@@iterator"],typeof _=="function"?_:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,U={};function k(_,K,X){this.props=_,this.context=K,this.refs=U,this.updater=X||M}k.prototype.isReactComponent={},k.prototype.setState=function(_,K){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,K,"setState")},k.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function Q(){}Q.prototype=k.prototype;function q(_,K,X){this.props=_,this.context=K,this.refs=U,this.updater=X||M}var W=q.prototype=new Q;W.constructor=q,A(W,k.prototype),W.isPureReactComponent=!0;var Z=Array.isArray;function ee(){}var E={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function Y(_,K,X){var ae=X.ref;return{$$typeof:l,type:_,key:K,ref:ae!==void 0?ae:null,props:X}}function le(_,K){return Y(_.type,K,_.props)}function G(_){return typeof _=="object"&&_!==null&&_.$$typeof===l}function ne(_){var K={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(X){return K[X]})}var O=/\/+/g;function se(_,K){return typeof _=="object"&&_!==null&&_.key!=null?ne(""+_.key):K.toString(36)}function ie(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(ee,ee):(_.status="pending",_.then(function(K){_.status==="pending"&&(_.status="fulfilled",_.value=K)},function(K){_.status==="pending"&&(_.status="rejected",_.reason=K)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function T(_,K,X,ae,oe){var ge=typeof _;(ge==="undefined"||ge==="boolean")&&(_=null);var de=!1;if(_===null)de=!0;else switch(ge){case"bigint":case"string":case"number":de=!0;break;case"object":switch(_.$$typeof){case l:case o:de=!0;break;case y:return de=_._init,T(de(_._payload),K,X,ae,oe)}}if(de)return oe=oe(_),de=ae===""?"."+se(_,0):ae,Z(oe)?(X="",de!=null&&(X=de.replace(O,"$&/")+"/"),T(oe,K,X,"",function(We){return We})):oe!=null&&(G(oe)&&(oe=le(oe,X+(oe.key==null||_&&_.key===oe.key?"":(""+oe.key).replace(O,"$&/")+"/")+de)),K.push(oe)),1;de=0;var Ne=ae===""?".":ae+":";if(Z(_))for(var Ce=0;Ce<_.length;Ce++)ae=_[Ce],ge=Ne+se(ae,Ce),de+=T(ae,K,X,ge,oe);else if(Ce=S(_),typeof Ce=="function")for(_=Ce.call(_),Ce=0;!(ae=_.next()).done;)ae=ae.value,ge=Ne+se(ae,Ce++),de+=T(ae,K,X,ge,oe);else if(ge==="object"){if(typeof _.then=="function")return T(ie(_),K,X,ae,oe);throw K=String(_),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return de}function V(_,K,X){if(_==null)return _;var ae=[],oe=0;return T(_,ae,"","",function(ge){return K.call(X,ge,oe++)}),ae}function B(_){if(_._status===-1){var K=_._result;K=K(),K.then(function(X){(_._status===0||_._status===-1)&&(_._status=1,_._result=X)},function(X){(_._status===0||_._status===-1)&&(_._status=2,_._result=X)}),_._status===-1&&(_._status=0,_._result=K)}if(_._status===1)return _._result.default;throw _._result}var ue=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},xe={map:V,forEach:function(_,K,X){V(_,function(){K.apply(this,arguments)},X)},count:function(_){var K=0;return V(_,function(){K++}),K},toArray:function(_){return V(_,function(K){return K})||[]},only:function(_){if(!G(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return _e.Activity=h,_e.Children=xe,_e.Component=k,_e.Fragment=c,_e.Profiler=d,_e.PureComponent=q,_e.StrictMode=u,_e.Suspense=v,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,_e.__COMPILER_RUNTIME={__proto__:null,c:function(_){return E.H.useMemoCache(_)}},_e.cache=function(_){return function(){return _.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(_,K,X){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ae=A({},_.props),oe=_.key;if(K!=null)for(ge in K.key!==void 0&&(oe=""+K.key),K)!L.call(K,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&K.ref===void 0||(ae[ge]=K[ge]);var ge=arguments.length-2;if(ge===1)ae.children=X;else if(1>>1,xe=T[ue];if(0>>1;ue<_;){var K=2*(ue+1)-1,X=T[K],ae=K+1,oe=T[ae];if(0>d(X,B))aed(oe,X)?(T[ue]=oe,T[ae]=B,ue=ae):(T[ue]=X,T[K]=B,ue=K);else if(aed(oe,B))T[ue]=oe,T[ae]=B,ue=ae;else break e}}return V}function d(T,V){var B=T.sortIndex-V.sortIndex;return B!==0?B:T.id-V.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var x=Date,g=x.now();l.unstable_now=function(){return x.now()-g}}var v=[],p=[],y=1,h=null,j=3,S=!1,M=!1,A=!1,U=!1,k=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function W(T){for(var V=c(p);V!==null;){if(V.callback===null)u(p);else if(V.startTime<=T)u(p),V.sortIndex=V.expirationTime,o(v,V);else break;V=c(p)}}function Z(T){if(A=!1,W(T),!M)if(c(v)!==null)M=!0,ee||(ee=!0,ne());else{var V=c(p);V!==null&&ie(Z,V.startTime-T)}}var ee=!1,E=-1,L=5,Y=-1;function le(){return U?!0:!(l.unstable_now()-YT&&le());){var ue=h.callback;if(typeof ue=="function"){h.callback=null,j=h.priorityLevel;var xe=ue(h.expirationTime<=T);if(T=l.unstable_now(),typeof xe=="function"){h.callback=xe,W(T),V=!0;break t}h===c(v)&&u(v),W(T)}else u(v);h=c(v)}if(h!==null)V=!0;else{var _=c(p);_!==null&&ie(Z,_.startTime-T),V=!1}}break e}finally{h=null,j=B,S=!1}V=void 0}}finally{V?ne():ee=!1}}}var ne;if(typeof q=="function")ne=function(){q(G)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,se=O.port2;O.port1.onmessage=G,ne=function(){se.postMessage(null)}}else ne=function(){k(G,0)};function ie(T,V){E=k(function(){T(l.unstable_now())},V)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(T){T.callback=null},l.unstable_forceFrameRate=function(T){0>T||125ue?(T.sortIndex=B,o(p,T),c(v)===null&&T===c(p)&&(A?(Q(E),E=-1):A=!0,ie(Z,B-ue))):(T.sortIndex=xe,o(v,T),M||S||(M=!0,ee||(ee=!0,ne()))),T},l.unstable_shouldYield=le,l.unstable_wrapCallback=function(T){var V=j;return function(){var B=j;j=V;try{return T.apply(this,arguments)}finally{j=B}}}})(ju)),ju}var c0;function Rv(){return c0||(c0=1,wu.exports=zv()),wu.exports}var Nu={exports:{}},kt={};var u0;function Dv(){if(u0)return kt;u0=1;var l=Qu();function o(v){var p="https://react.dev/errors/"+v;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(o){console.error(o)}}return l(),Nu.exports=Dv(),Nu.exports}var f0;function Lv(){if(f0)return ir;f0=1;var l=Rv(),o=Qu(),c=W0();function u(e){var t="https://react.dev/errors/"+e;if(1xe||(e.current=ue[xe],ue[xe]=null,xe--)}function X(e,t){xe++,ue[xe]=e.current,e.current=t}var ae=_(null),oe=_(null),ge=_(null),de=_(null);function Ne(e,t){switch(X(ge,t),X(oe,e),X(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}K(ae),X(ae,e)}function Ce(){K(ae),K(oe),K(ge)}function We(e){e.memoizedState!==null&&X(de,e);var t=ae.current,a=Ch(t,e.type);t!==a&&(X(oe,e),X(ae,a))}function it(e){oe.current===e&&(K(ae),K(oe)),de.current===e&&(K(de),nr._currentValue=B)}var qe,I;function Ye(e){if(qe===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);qe=t&&t[1]||"",I=-1)":-1r||N[n]!==D[r]){var F=` -`+N[n].replace(" at new "," at ");return e.displayName&&F.includes("")&&(F=F.replace("",e.displayName)),F}while(1<=n&&0<=r);break}}}finally{J=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ye(a):""}function nt(e,t){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==t&&t!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return Ye("Activity");default:return""}}function Ct(e){try{var t="",a=null;do t+=nt(e,a),a=e,e=e.return;while(e);return t}catch(n){return` +`+N[n].replace(" at new "," at ");return e.displayName&&F.includes("")&&(F=F.replace("",e.displayName)),F}while(1<=n&&0<=r);break}}}finally{J=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ye(a):""}function nt(e,t){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==t&&t!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return be(e.type,!1);case 11:return be(e.type.render,!1);case 1:return be(e.type,!0);case 31:return Ye("Activity");default:return""}}function Ct(e){try{var t="",a=null;do t+=nt(e,a),a=e,e=e.return;while(e);return t}catch(n){return` Error generating stack: `+n.message+` -`+n.stack}}var Qt=Object.prototype.hasOwnProperty,hl=l.unstable_scheduleCallback,pl=l.unstable_cancelCallback,Tt=l.unstable_shouldYield,cn=l.unstable_requestPaint,At=l.unstable_now,ni=l.unstable_getCurrentPriorityLevel,Gn=l.unstable_ImmediatePriority,gr=l.unstable_UserBlockingPriority,Vn=l.unstable_NormalPriority,xl=l.unstable_LowPriority,Ba=l.unstable_IdlePriority,vr=l.log,un=l.unstable_setDisableYieldValue,$n=null,Mt=null;function ma(e){if(typeof vr=="function"&&un(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode($n,e)}catch{}}var _t=Math.clz32?Math.clz32:Na,si=Math.log,gl=Math.LN2;function Na(e){return e>>>=0,e===0?32:31-(si(e)/gl|0)|0}var ms=256,hs=262144,Xn=4194304;function Sa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Se(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var y=n&134217727;return y!==0?(n=y&~i,n!==0?r=Sa(n):(f&=y,f!==0?r=Sa(f):a||(a=y&~e,a!==0&&(r=Sa(a))))):(y=n&~i,y!==0?r=Sa(y):f!==0?r=Sa(f):a||(a=n&~e,a!==0&&(r=Sa(a)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:r}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Et(){var e=Xn;return Xn<<=1,(Xn&62914560)===0&&(Xn=4194304),e}function dn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rt(e,t,a,n,r,i){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var y=e.entanglements,N=e.expirationTimes,D=e.hiddenUpdates;for(a=f&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var bx=/[\n"\\]/g;function sa(e){return e.replace(bx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ci(e,t,a,n,r,i,f,y){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+na(t)):e.value!==""+na(t)&&(e.value=""+na(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ui(e,f,na(t)):a!=null?ui(e,f,na(a)):n!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.name=""+na(y):e.removeAttribute("name")}function pd(e,t,a,n,r,i,f,y){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){ii(e);return}a=a!=null?""+na(a):"",t=t!=null?""+na(t):a,y||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=y?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),ii(e)}function ui(e,t,a){t==="number"&&wr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ws(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pi=!1;if(Ga)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){pi=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{pi=!1}var mn=null,xi=null,Nr=null;function jd(){if(Nr)return Nr;var e,t=xi,a=t.length,n,r="value"in mn?mn.value:mn.textContent,i=r.length;for(e=0;e=Sl),Cd=" ",Td=!1;function Ad(e,t){switch(e){case"keyup":return Kx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Md(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _s=!1;function Fx(e,t){switch(e){case"compositionend":return Md(t);case"keypress":return t.which!==32?null:(Td=!0,Cd);case"textInput":return e=t.data,e===Cd&&Td?null:e;default:return null}}function Wx(e,t){if(_s)return e==="compositionend"||!wi&&Ad(e,t)?(e=jd(),Nr=xi=mn=null,_s=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Bd(a)}}function Yd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=wr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=wr(e.document)}return t}function Si(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var lg=Ga&&"documentMode"in document&&11>=document.documentMode,Es=null,_i=null,Cl=null,Ei=!1;function Vd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ei||Es==null||Es!==wr(n)||(n=Es,"selectionStart"in n&&Si(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Cl&&kl(Cl,n)||(Cl=n,n=go(_i,"onSelect"),0>=f,r-=f,_a=1<<32-_t(t)+r|a<ke?(ze=pe,pe=null):ze=pe.sibling;var Le=U(O,pe,R[ke],P);if(Le===null){pe===null&&(pe=ze);break}e&&pe&&Le.alternate===null&&t(O,pe),C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le,pe=ze}if(ke===R.length)return a(O,pe),Re&&$a(O,ke),ye;if(pe===null){for(;keke?(ze=pe,pe=null):ze=pe.sibling;var Dn=U(O,pe,Le.value,P);if(Dn===null){pe===null&&(pe=ze);break}e&&pe&&Dn.alternate===null&&t(O,pe),C=i(Dn,C,ke),De===null?ye=Dn:De.sibling=Dn,De=Dn,pe=ze}if(Le.done)return a(O,pe),Re&&$a(O,ke),ye;if(pe===null){for(;!Le.done;ke++,Le=R.next())Le=te(O,Le.value,P),Le!==null&&(C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le);return Re&&$a(O,ke),ye}for(pe=n(pe);!Le.done;ke++,Le=R.next())Le=$(pe,O,ke,Le.value,P),Le!==null&&(e&&Le.alternate!==null&&pe.delete(Le.key===null?ke:Le.key),C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le);return e&&pe.forEach(function(_v){return t(O,_v)}),Re&&$a(O,ke),ye}function $e(O,C,R,P){if(typeof R=="object"&&R!==null&&R.type===z&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case _:e:{for(var ye=R.key;C!==null;){if(C.key===ye){if(ye=R.type,ye===z){if(C.tag===7){a(O,C.sibling),P=r(C,R.props.children),P.return=O,O=P;break e}}else if(C.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===L&&ns(ye)===C.type){a(O,C.sibling),P=r(C,R.props),Rl(P,R),P.return=O,O=P;break e}a(O,C);break}else t(O,C);C=C.sibling}R.type===z?(P=Pn(R.props.children,O.mode,P,R.key),P.return=O,O=P):(P=zr(R.type,R.key,R.props,null,O.mode,P),Rl(P,R),P.return=O,O=P)}return f(O);case A:e:{for(ye=R.key;C!==null;){if(C.key===ye)if(C.tag===4&&C.stateNode.containerInfo===R.containerInfo&&C.stateNode.implementation===R.implementation){a(O,C.sibling),P=r(C,R.children||[]),P.return=O,O=P;break e}else{a(O,C);break}else t(O,C);C=C.sibling}P=zi(R,O.mode,P),P.return=O,O=P}return f(O);case L:return R=ns(R),$e(O,C,R,P)}if(ie(R))return fe(O,C,R,P);if(ne(R)){if(ye=ne(R),typeof ye!="function")throw Error(u(150));return R=ye.call(R),je(O,C,R,P)}if(typeof R.then=="function")return $e(O,C,qr(R),P);if(R.$$typeof===q)return $e(O,C,Lr(O,R),P);Yr(O,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,C!==null&&C.tag===6?(a(O,C.sibling),P=r(C,R),P.return=O,O=P):(a(O,C),P=Oi(R,O.mode,P),P.return=O,O=P),f(O)):a(O,C)}return function(O,C,R,P){try{zl=0;var ye=$e(O,C,R,P);return Us=null,ye}catch(pe){if(pe===Ls||pe===Hr)throw pe;var De=Kt(29,pe,null,O.mode);return De.lanes=P,De.return=O,De}}}var ls=mf(!0),hf=mf(!1),vn=!1;function Xi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function bn(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ue&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=Or(e),Fd(e,null,a),t}return Mr(e,n,t,a),Or(e)}function Dl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Dt(e,a)}}function Zi(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?r=i=f:i=i.next=f,a=a.next}while(a!==null);i===null?r=i=t:i=i.next=t}else r=i=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Ki=!1;function Ll(){if(Ki){var e=Ds;if(e!==null)throw e}}function Ul(e,t,a,n){Ki=!1;var r=e.updateQueue;vn=!1;var i=r.firstBaseUpdate,f=r.lastBaseUpdate,y=r.shared.pending;if(y!==null){r.shared.pending=null;var N=y,D=N.next;N.next=null,f===null?i=D:f.next=D,f=N;var F=e.alternate;F!==null&&(F=F.updateQueue,y=F.lastBaseUpdate,y!==f&&(y===null?F.firstBaseUpdate=D:y.next=D,F.lastBaseUpdate=N))}if(i!==null){var te=r.baseState;f=0,F=D=N=null,y=i;do{var U=y.lane&-536870913,$=U!==y.lane;if($?(Oe&U)===U:(n&U)===U){U!==0&&U===Rs&&(Ki=!0),F!==null&&(F=F.next={lane:0,tag:y.tag,payload:y.payload,callback:null,next:null});e:{var fe=e,je=y;U=t;var $e=a;switch(je.tag){case 1:if(fe=je.payload,typeof fe=="function"){te=fe.call($e,te,U);break e}te=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=je.payload,U=typeof fe=="function"?fe.call($e,te,U):fe,U==null)break e;te=h({},te,U);break e;case 2:vn=!0}}U=y.callback,U!==null&&(e.flags|=64,$&&(e.flags|=8192),$=r.callbacks,$===null?r.callbacks=[U]:$.push(U))}else $={lane:U,tag:y.tag,payload:y.payload,callback:y.callback,next:null},F===null?(D=F=$,N=te):F=F.next=$,f|=U;if(y=y.next,y===null){if(y=r.shared.pending,y===null)break;$=y,y=$.next,$.next=null,r.lastBaseUpdate=$,r.shared.pending=null}}while(!0);F===null&&(N=te),r.baseState=N,r.firstBaseUpdate=D,r.lastBaseUpdate=F,i===null&&(r.shared.lanes=0),_n|=f,e.lanes=f,e.memoizedState=te}}function pf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function xf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var f=T.T,y={};T.T=y,mc(e,!1,t,a);try{var N=r(),D=T.S;if(D!==null&&D(y,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var F=hg(N,n);ql(e,t,F,It(e))}else ql(e,t,n,It(e))}catch(te){ql(e,t,{then:function(){},status:"rejected",reason:te},It())}finally{V.p=i,f!==null&&y.types!==null&&(f.types=y.types),T.T=f}}function bg(){}function dc(e,t,a,n){if(e.tag!==5)throw Error(u(476));var r=Kf(e).queue;Zf(e,r,t,B,a===null?bg:function(){return Jf(e),a(n)})}function Kf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:B},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ka,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jf(e){var t=Kf(e);t.next===null&&(t=e.alternate.memoizedState),ql(e,t.next.queue,{},It())}function fc(){return yt(nr)}function Ff(){return tt().memoizedState}function Wf(){return tt().memoizedState}function wg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=It();e=yn(a);var n=bn(t,e,a);n!==null&&(Vt(n,t,a),Dl(n,t,a)),t={cache:Yi()},e.payload=t;return}t=t.return}}function jg(e,t,a){var n=It();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Wr(e)?If(t,a):(a=Ai(e,t,a,n),a!==null&&(Vt(a,e,n),em(a,t,n)))}function Pf(e,t,a){var n=It();ql(e,t,a,n)}function ql(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Wr(e))If(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,y=i(f,a);if(r.hasEagerState=!0,r.eagerState=y,Zt(y,f))return Mr(e,t,r,0),Xe===null&&Ar(),!1}catch{}if(a=Ai(e,t,r,n),a!==null)return Vt(a,e,n),em(a,t,n),!0}return!1}function mc(e,t,a,n){if(n={lane:2,revertLane:Xc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Wr(e)){if(t)throw Error(u(479))}else t=Ai(e,a,n,2),t!==null&&Vt(t,e,2)}function Wr(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function If(e,t){Bs=$r=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function em(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Dt(e,a)}}var Yl={readContext:yt,use:Zr,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Yl.useEffectEvent=Pe;var tm={readContext:yt,use:Zr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:Hf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Jr(4194308,4,Gf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Jr(4194308,4,e,t)},useInsertionEffect:function(e,t){Jr(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var n=e();if(rs){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Ot();if(a!==void 0){var r=a(t);if(rs){ma(!0);try{a(t)}finally{ma(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=jg.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=rc(e);var t=e.queue,a=Pf.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:cc,useDeferredValue:function(e,t){var a=Ot();return uc(a,e,t)},useTransition:function(){var e=rc(!1);return e=Zf.bind(null,Ee,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ee,r=Ot();if(Re){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Xe===null)throw Error(u(349));(Oe&127)!==0||jf(n,t,a)}r.memoizedState=a;var i={value:a,getSnapshot:t};return r.queue=i,Hf(Sf.bind(null,n,i,e),[e]),n.flags|=2048,Ys(9,{destroy:void 0},Nf.bind(null,n,i,a,t),null),a},useId:function(){var e=Ot(),t=Xe.identifierPrefix;if(Re){var a=Ea,n=_a;a=(n&~(1<<32-_t(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Xr++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?f.createElement(r,{is:n.is}):f.createElement(r)}}i[gt]=t,i[Ut]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(wt(i,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Fa(t)}}return Ze(t),kc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Fa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=ge.current,Os(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=vt,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[gt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||bh(e.nodeValue,a)),e||xn(t,!0)}else e=vo(e).createTextNode(n),e[gt]=t,t.stateNode=e}return Ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Os(t),a!==null){if(e===null){if(!n)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[gt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Ft(t),t):(Ft(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ze(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Os(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[gt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Ft(t),t):(Ft(t),null)}return Ft(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ao(t,t.updateQueue),Ze(t),null);case 4:return Ce(),e===null&&Jc(t.stateNode.containerInfo),Ze(t),null;case 10:return Qa(t.type),Ze(t),null;case 19:if(K(et),n=t.memoizedState,n===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=n.rendering,i===null)if(r)Vl(n,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Vr(e),i!==null){for(t.flags|=128,Vl(n,!1),e=i.updateQueue,t.updateQueue=e,ao(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Wd(a,e),a=a.sibling;return X(et,et.current&1|2),Re&&$a(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&At()>oo&&(t.flags|=128,r=!0,Vl(n,!1),t.lanes=4194304)}else{if(!r)if(e=Vr(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ao(t,e),Vl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!Re)return Ze(t),null}else 2*At()-n.renderingStartTime>oo&&a!==536870912&&(t.flags|=128,r=!0,Vl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,a=et.current,X(et,r?a&1|2:a&1),Re&&$a(t,n.treeForkCount),e):(Ze(t),null);case 22:case 23:return Ft(t),Fi(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&ao(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&K(as),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Qa(st),Ze(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function kg(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qa(st),Ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return it(t),null;case 31:if(t.memoizedState!==null){if(Ft(t),t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ft(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(et),null;case 4:return Ce(),null;case 10:return Qa(t.type),null;case 22:case 23:return Ft(t),Fi(),e!==null&&K(as),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qa(st),null;case 25:return null;default:return null}}function _m(e,t){switch(Di(t),t.tag){case 3:Qa(st),Ce();break;case 26:case 27:case 5:it(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&Ft(t);break;case 13:Ft(t);break;case 19:K(et);break;case 10:Qa(t.type);break;case 22:case 23:Ft(t),Fi(),e!==null&&K(as);break;case 24:Qa(st)}}function $l(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var i=a.create,f=a.inst;n=i(),f.destroy=n}a=a.next}while(a!==r)}}catch(y){Be(t,t.return,y)}}function Nn(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){var f=n.inst,y=f.destroy;if(y!==void 0){f.destroy=void 0,r=t;var N=a,D=y;try{D()}catch(F){Be(r,N,F)}}}n=n.next}while(n!==i)}}catch(F){Be(t,t.return,F)}}function Em(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{xf(t,a)}catch(n){Be(e,e.return,n)}}}function km(e,t,a){a.props=os(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Be(e,t,n)}}function Xl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){Be(e,t,r)}}function ka(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){Be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Be(e,t,r)}else a.current=null}function Cm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){Be(e,e.return,r)}}function Cc(e,t,a){try{var n=e.stateNode;Jg(n,e.type,a,t),n[Ut]=t}catch(r){Be(e,e.return,r)}}function Tm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&An(e.type)||e.tag===4}function Tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&An(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ac(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ya));else if(n!==4&&(n===27&&An(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Ac(e,t,a),e=e.sibling;e!==null;)Ac(e,t,a),e=e.sibling}function no(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&An(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(no(e,t,a),e=e.sibling;e!==null;)no(e,t,a),e=e.sibling}function Am(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);wt(t,n,a),t[gt]=e,t[Ut]=a}catch(i){Be(e,e.return,i)}}var Wa=!1,ot=!1,Mc=!1,Mm=typeof WeakSet=="function"?WeakSet:Set,pt=null;function Cg(e,t){if(e=e.containerInfo,Pc=_o,e=Gd(e),Si(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var f=0,y=-1,N=-1,D=0,F=0,te=e,U=null;t:for(;;){for(var $;te!==a||r!==0&&te.nodeType!==3||(y=f+r),te!==i||n!==0&&te.nodeType!==3||(N=f+n),te.nodeType===3&&(f+=te.nodeValue.length),($=te.firstChild)!==null;)U=te,te=$;for(;;){if(te===e)break t;if(U===a&&++D===r&&(y=f),U===i&&++F===n&&(N=f),($=te.nextSibling)!==null)break;te=U,U=te.parentNode}te=$}a=y===-1||N===-1?null:{start:y,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ic={focusedElem:e,selectionRange:a},_o=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),wt(i,n,a),i[gt]=e,ht(i),n=i;break e;case"link":var f=Uh("link","href",r).get(n+(a.href||""));if(f){for(var y=0;y$e&&(f=$e,$e=je,je=f);var O=qd(y,je),C=qd(y,$e);if(O&&C&&($.rangeCount!==1||$.anchorNode!==O.node||$.anchorOffset!==O.offset||$.focusNode!==C.node||$.focusOffset!==C.offset)){var R=te.createRange();R.setStart(O.node,O.offset),$.removeAllRanges(),je>$e?($.addRange(R),$.extend(C.node,C.offset)):(R.setEnd(C.node,C.offset),$.addRange(R))}}}}for(te=[],$=y;$=$.parentNode;)$.nodeType===1&&te.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;ya?32:a,T.T=null,a=Hc,Hc=null;var i=kn,f=an;if(ct=0,Qs=kn=null,an=0,(Ue&6)!==0)throw Error(u(331));var y=Ue;if(Ue|=4,Gm(i.current),Bm(i,i.current,f,a),Ue=y,Wl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot($n,i)}catch{}return!0}finally{V.p=r,T.T=n,rh(e,t)}}function ih(e,t,a){t=ra(a,t),t=gc(e.stateNode,t,2),e=bn(e,t,2),e!==null&&(Fe(e,2),Ca(e))}function Be(e,t,a){if(e.tag===3)ih(e,e,a);else for(;t!==null;){if(t.tag===3){ih(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(En===null||!En.has(n))){e=ra(a,e),a=cm(2),n=bn(t,a,2),n!==null&&(um(a,n,t,e),Fe(n,2),Ca(n));break}}t=t.return}}function Gc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Mg;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||(Rc=!0,r.add(a),e=Lg.bind(null,e,t,a),t.then(e,e))}function Lg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Oe&a)===a&&(Ie===4||Ie===3&&(Oe&62914560)===Oe&&300>At()-ro?(Ue&2)===0&&Zs(e,0):Dc|=a,Xs===Oe&&(Xs=0)),Ca(e)}function ch(e,t){t===0&&(t=Et()),e=Wn(e,t),e!==null&&(Fe(e,t),Ca(e))}function Ug(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),ch(e,a)}function Hg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),ch(e,a)}function Bg(e,t){return hl(e,t)}var ho=null,Js=null,Vc=!1,po=!1,$c=!1,Tn=0;function Ca(e){e!==Js&&e.next===null&&(Js===null?ho=Js=e:Js=Js.next=e),po=!0,Vc||(Vc=!0,Yg())}function Wl(e,t){if(!$c&&po){$c=!0;do for(var a=!1,n=ho;n!==null;){if(e!==0){var r=n.pendingLanes;if(r===0)var i=0;else{var f=n.suspendedLanes,y=n.pingedLanes;i=(1<<31-_t(42|e)+1)-1,i&=r&~(f&~y),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,mh(n,i))}else i=Oe,i=Se(n,n===Xe?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Ke(n,i)||(a=!0,mh(n,i));n=n.next}while(a);$c=!1}}function qg(){uh()}function uh(){po=Vc=!1;var e=0;Tn!==0&&Wg()&&(e=Tn);for(var t=At(),a=null,n=ho;n!==null;){var r=n.next,i=dh(n,t);i===0?(n.next=null,a===null?ho=r:a.next=r,r===null&&(Js=a)):(a=n,(e!==0||(i&3)!==0)&&(po=!0)),n=r}ct!==0&&ct!==5||Wl(e),Tn!==0&&(Tn=0)}function dh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0y)break;var F=N.transferSize,te=N.initiatorType;F&&wh(te)&&(N=N.responseEnd,f+=F*(N"u"?null:document;function zh(e,t,a){var n=Fs;if(n&&typeof t=="string"&&t){var r=sa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Oh.has(r)||(Oh.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),wt(t,"link",e),ht(t),n.head.appendChild(t)))}}function rv(e){nn.D(e),zh("dns-prefetch",e,null)}function ov(e,t){nn.C(e,t),zh("preconnect",e,t)}function iv(e,t,a){nn.L(e,t,a);var n=Fs;if(n&&e&&t){var r='link[rel="preload"][as="'+sa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+sa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+sa(a.imageSizes)+'"]')):r+='[href="'+sa(e)+'"]';var i=r;switch(t){case"style":i=Ws(e);break;case"script":i=Ps(e)}fa.has(i)||(e=h({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),fa.set(i,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(tr(i))||t==="script"&&n.querySelector(ar(i))||(t=n.createElement("link"),wt(t,"link",e),ht(t),n.head.appendChild(t)))}}function cv(e,t){nn.m(e,t);var a=Fs;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+sa(n)+'"][href="'+sa(e)+'"]',i=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ps(e)}if(!fa.has(i)&&(e=h({rel:"modulepreload",href:e},t),fa.set(i,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ar(i)))return}n=a.createElement("link"),wt(n,"link",e),ht(n),a.head.appendChild(n)}}}function uv(e,t,a){nn.S(e,t,a);var n=Fs;if(n&&e){var r=ys(n).hoistableStyles,i=Ws(e);t=t||"default";var f=r.get(i);if(!f){var y={loading:0,preload:null};if(f=n.querySelector(tr(i)))y.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},a),(a=fa.get(i))&&ru(e,a);var N=f=n.createElement("link");ht(N),wt(N,"link",e),N._p=new Promise(function(D,F){N.onload=D,N.onerror=F}),N.addEventListener("load",function(){y.loading|=1}),N.addEventListener("error",function(){y.loading|=2}),y.loading|=4,bo(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:y},r.set(i,f)}}}function dv(e,t){nn.X(e,t);var a=Fs;if(a&&e){var n=ys(a).hoistableScripts,r=Ps(e),i=n.get(r);i||(i=a.querySelector(ar(r)),i||(e=h({src:e,async:!0},t),(t=fa.get(r))&&ou(e,t),i=a.createElement("script"),ht(i),wt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function fv(e,t){nn.M(e,t);var a=Fs;if(a&&e){var n=ys(a).hoistableScripts,r=Ps(e),i=n.get(r);i||(i=a.querySelector(ar(r)),i||(e=h({src:e,async:!0,type:"module"},t),(t=fa.get(r))&&ou(e,t),i=a.createElement("script"),ht(i),wt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function Rh(e,t,a,n){var r=(r=ge.current)?yo(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ws(a.href),a=ys(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ws(a.href);var i=ys(r).hoistableStyles,f=i.get(e);if(f||(r=r.ownerDocument||r,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=r.querySelector(tr(e)))&&!i._p&&(f.instance=i,f.state.loading=5),fa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},fa.set(e,a),i||mv(r,e,a,f.state))),t&&n===null)throw Error(u(528,""));return f}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ps(a),a=ys(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ws(e){return'href="'+sa(e)+'"'}function tr(e){return'link[rel="stylesheet"]['+e+"]"}function Dh(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function mv(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),wt(t,"link",a),ht(t),e.head.appendChild(t))}function Ps(e){return'[src="'+sa(e)+'"]'}function ar(e){return"script[async]"+e}function Lh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+sa(a.href)+'"]');if(n)return t.instance=n,ht(n),n;var r=h({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),ht(n),wt(n,"style",r),bo(n,a.precedence,e),t.instance=n;case"stylesheet":r=Ws(a.href);var i=e.querySelector(tr(r));if(i)return t.state.loading|=4,t.instance=i,ht(i),i;n=Dh(a),(r=fa.get(r))&&ru(n,r),i=(e.ownerDocument||e).createElement("link"),ht(i);var f=i;return f._p=new Promise(function(y,N){f.onload=y,f.onerror=N}),wt(i,"link",n),t.state.loading|=4,bo(i,a.precedence,e),t.instance=i;case"script":return i=Ps(a.src),(r=e.querySelector(ar(i)))?(t.instance=r,ht(r),r):(n=a,(r=fa.get(i))&&(n=h({},a),ou(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),ht(r),wt(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,bo(n,a.precedence,e));return t.instance}function bo(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,i=r,f=0;f title"):null)}function hv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Bh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function pv(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Ws(n.href),i=t.querySelector(tr(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=jo.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,ht(i);return}i=t.ownerDocument||t,n=Dh(n),(r=fa.get(r))&&ru(n,r),i=i.createElement("link"),ht(i);var f=i;f._p=new Promise(function(y,N){f.onload=y,f.onerror=N}),wt(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=jo.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var iu=0;function xv(e,t){return e.stylesheets&&e.count===0&&So(e,e.stylesheets),0iu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function jo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)So(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var No=null;function So(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,No=new Map,t.forEach(gv,e),No=null,jo.call(e))}function gv(e,t){if(!(t.state.loading&4)){var a=No.get(e);if(a)var n=a.get(null);else{a=new Map,No.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(o){console.error(o)}}return l(),gu.exports=zv(),gu.exports}var Dv=Rv();function Oa(l,o,{checkForDefaultPrevented:c=!0}={}){return function(d){if(l?.(d),c===!1||!d.defaultPrevented)return o?.(d)}}function cp(l,o){if(typeof l=="function")return l(o);l!=null&&(l.current=o)}function $u(...l){return o=>{let c=!1;const u=l.map(d=>{const m=cp(d,o);return!c&&typeof m=="function"&&(c=!0),m});if(c)return()=>{for(let d=0;d{const{scope:j,children:_,...A}=h,z=j?.[l]?.[v]||g,H=w.useMemo(()=>A,Object.values(A));return s.jsx(z.Provider,{value:H,children:_})};p.displayName=m+"Provider";function b(h,j){const _=j?.[l]?.[v]||g,A=w.useContext(_);if(A)return A;if(x!==void 0)return x;throw new Error(`\`${h}\` must be used within \`${m}\``)}return[p,b]}const d=()=>{const m=c.map(x=>w.createContext(x));return function(g){const v=g?.[l]||m;return w.useMemo(()=>({[`__scope${l}`]:{...g,[l]:v}}),[g,v])}};return d.scopeName=l,[u,Lv(d,...o)]}function Lv(...l){const o=l[0];if(l.length===1)return o;const c=()=>{const u=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(m){const x=u.reduce((g,{useScope:v,scopeName:p})=>{const h=v(m)[`__scope${p}`];return{...g,...h}},{});return w.useMemo(()=>({[`__scope${o.scopeName}`]:x}),[x])}};return c.scopeName=o.scopeName,c}var Qu=Qp();const Zp=Xp(Qu);function Uv(l){const o=Hv(l),c=w.forwardRef((u,d)=>{const{children:m,...x}=u,g=w.Children.toArray(m),v=g.find(qv);if(v){const p=v.props.children,b=g.map(h=>h===v?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:h);return s.jsx(o,{...x,ref:d,children:w.isValidElement(p)?w.cloneElement(p,void 0,b):null})}return s.jsx(o,{...x,ref:d,children:m})});return c.displayName=`${l}.Slot`,c}function Hv(l){const o=w.forwardRef((c,u)=>{const{children:d,...m}=c;if(w.isValidElement(d)){const x=Gv(d),g=Yv(m,d.props);return d.type!==w.Fragment&&(g.ref=u?$u(u,x):x),w.cloneElement(d,g)}return w.Children.count(d)>1?w.Children.only(null):null});return o.displayName=`${l}.SlotClone`,o}var Bv=Symbol("radix.slottable");function qv(l){return w.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===Bv}function Yv(l,o){const c={...o};for(const u in o){const d=l[u],m=o[u];/^on[A-Z]/.test(u)?d&&m?c[u]=(...g)=>{const v=m(...g);return d(...g),v}:d&&(c[u]=d):u==="style"?c[u]={...d,...m}:u==="className"&&(c[u]=[d,m].filter(Boolean).join(" "))}return{...l,...c}}function Gv(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var Vv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ua=Vv.reduce((l,o)=>{const c=Uv(`Primitive.${o}`),u=w.forwardRef((d,m)=>{const{asChild:x,...g}=d,v=x?c:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(v,{...g,ref:m})});return u.displayName=`Primitive.${o}`,{...l,[o]:u}},{});function $v(l,o){l&&Qu.flushSync(()=>l.dispatchEvent(o))}function Jo(l){const o=w.useRef(l);return w.useEffect(()=>{o.current=l}),w.useMemo(()=>(...c)=>o.current?.(...c),[])}function Xv(l,o=globalThis?.document){const c=Jo(l);w.useEffect(()=>{const u=d=>{d.key==="Escape"&&c(d)};return o.addEventListener("keydown",u,{capture:!0}),()=>o.removeEventListener("keydown",u,{capture:!0})},[c,o])}var Qv="DismissableLayer",Au="dismissableLayer.update",Zv="dismissableLayer.pointerDownOutside",Kv="dismissableLayer.focusOutside",up,Kp=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jp=w.forwardRef((l,o)=>{const{disableOutsidePointerEvents:c=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:x,onDismiss:g,...v}=l,p=w.useContext(Kp),[b,h]=w.useState(null),j=b?.ownerDocument??globalThis?.document,[,_]=w.useState({}),A=on(o,E=>h(E)),z=Array.from(p.layers),[H]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=z.indexOf(H),Q=b?z.indexOf(b):-1,q=p.layersWithOutsidePointerEventsDisabled.size>0,W=Q>=k,Z=Wv(E=>{const L=E.target,Y=[...p.branches].some(le=>le.contains(L));!W||Y||(d?.(E),x?.(E),E.defaultPrevented||g?.())},j),ee=Pv(E=>{const L=E.target;[...p.branches].some(le=>le.contains(L))||(m?.(E),x?.(E),E.defaultPrevented||g?.())},j);return Xv(E=>{Q===p.layers.size-1&&(u?.(E),!E.defaultPrevented&&g&&(E.preventDefault(),g()))},j),w.useEffect(()=>{if(b)return c&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(up=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),dp(),()=>{c&&p.layersWithOutsidePointerEventsDisabled.size===1&&(j.body.style.pointerEvents=up)}},[b,j,c,p]),w.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),dp())},[b,p]),w.useEffect(()=>{const E=()=>_({});return document.addEventListener(Au,E),()=>document.removeEventListener(Au,E)},[]),s.jsx(Ua.div,{...v,ref:A,style:{pointerEvents:q?W?"auto":"none":void 0,...l.style},onFocusCapture:Oa(l.onFocusCapture,ee.onFocusCapture),onBlurCapture:Oa(l.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:Oa(l.onPointerDownCapture,Z.onPointerDownCapture)})});Jp.displayName=Qv;var Jv="DismissableLayerBranch",Fv=w.forwardRef((l,o)=>{const c=w.useContext(Kp),u=w.useRef(null),d=on(o,u);return w.useEffect(()=>{const m=u.current;if(m)return c.branches.add(m),()=>{c.branches.delete(m)}},[c.branches]),s.jsx(Ua.div,{...l,ref:d})});Fv.displayName=Jv;function Wv(l,o=globalThis?.document){const c=Jo(l),u=w.useRef(!1),d=w.useRef(()=>{});return w.useEffect(()=>{const m=g=>{if(g.target&&!u.current){let v=function(){Fp(Zv,c,p,{discrete:!0})};const p={originalEvent:g};g.pointerType==="touch"?(o.removeEventListener("click",d.current),d.current=v,o.addEventListener("click",d.current,{once:!0})):v()}else o.removeEventListener("click",d.current);u.current=!1},x=window.setTimeout(()=>{o.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(x),o.removeEventListener("pointerdown",m),o.removeEventListener("click",d.current)}},[o,c]),{onPointerDownCapture:()=>u.current=!0}}function Pv(l,o=globalThis?.document){const c=Jo(l),u=w.useRef(!1);return w.useEffect(()=>{const d=m=>{m.target&&!u.current&&Fp(Kv,c,{originalEvent:m},{discrete:!1})};return o.addEventListener("focusin",d),()=>o.removeEventListener("focusin",d)},[o,c]),{onFocusCapture:()=>u.current=!0,onBlurCapture:()=>u.current=!1}}function dp(){const l=new CustomEvent(Au);document.dispatchEvent(l)}function Fp(l,o,c,{discrete:u}){const d=c.originalEvent.target,m=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:c});o&&d.addEventListener(l,o,{once:!0}),u?$v(d,m):d.dispatchEvent(m)}var Hn=globalThis?.document?w.useLayoutEffect:()=>{},Iv=Vu[" useId ".trim().toString()]||(()=>{}),ey=0;function ty(l){const[o,c]=w.useState(Iv());return Hn(()=>{c(u=>u??String(ey++))},[l]),o?`radix-${o}`:""}const ay=["top","right","bottom","left"],Bn=Math.min,ea=Math.max,qo=Math.round,Oo=Math.floor,Da=l=>({x:l,y:l}),ny={left:"right",right:"left",bottom:"top",top:"bottom"},sy={start:"end",end:"start"};function Mu(l,o,c){return ea(l,Bn(o,c))}function ln(l,o){return typeof l=="function"?l(o):l}function rn(l){return l.split("-")[0]}function ul(l){return l.split("-")[1]}function Zu(l){return l==="x"?"y":"x"}function Ku(l){return l==="y"?"height":"width"}const ly=new Set(["top","bottom"]);function za(l){return ly.has(rn(l))?"y":"x"}function Ju(l){return Zu(za(l))}function ry(l,o,c){c===void 0&&(c=!1);const u=ul(l),d=Ju(l),m=Ku(d);let x=d==="x"?u===(c?"end":"start")?"right":"left":u==="start"?"bottom":"top";return o.reference[m]>o.floating[m]&&(x=Yo(x)),[x,Yo(x)]}function oy(l){const o=Yo(l);return[Ou(l),o,Ou(o)]}function Ou(l){return l.replace(/start|end/g,o=>sy[o])}const fp=["left","right"],mp=["right","left"],iy=["top","bottom"],cy=["bottom","top"];function uy(l,o,c){switch(l){case"top":case"bottom":return c?o?mp:fp:o?fp:mp;case"left":case"right":return o?iy:cy;default:return[]}}function dy(l,o,c,u){const d=ul(l);let m=uy(rn(l),c==="start",u);return d&&(m=m.map(x=>x+"-"+d),o&&(m=m.concat(m.map(Ou)))),m}function Yo(l){return l.replace(/left|right|bottom|top/g,o=>ny[o])}function fy(l){return{top:0,right:0,bottom:0,left:0,...l}}function Wp(l){return typeof l!="number"?fy(l):{top:l,right:l,bottom:l,left:l}}function Go(l){const{x:o,y:c,width:u,height:d}=l;return{width:u,height:d,top:c,left:o,right:o+u,bottom:c+d,x:o,y:c}}function hp(l,o,c){let{reference:u,floating:d}=l;const m=za(o),x=Ju(o),g=Ku(x),v=rn(o),p=m==="y",b=u.x+u.width/2-d.width/2,h=u.y+u.height/2-d.height/2,j=u[g]/2-d[g]/2;let _;switch(v){case"top":_={x:b,y:u.y-d.height};break;case"bottom":_={x:b,y:u.y+u.height};break;case"right":_={x:u.x+u.width,y:h};break;case"left":_={x:u.x-d.width,y:h};break;default:_={x:u.x,y:u.y}}switch(ul(o)){case"start":_[x]-=j*(c&&p?-1:1);break;case"end":_[x]+=j*(c&&p?-1:1);break}return _}const my=async(l,o,c)=>{const{placement:u="bottom",strategy:d="absolute",middleware:m=[],platform:x}=c,g=m.filter(Boolean),v=await(x.isRTL==null?void 0:x.isRTL(o));let p=await x.getElementRects({reference:l,floating:o,strategy:d}),{x:b,y:h}=hp(p,u,v),j=u,_={},A=0;for(let z=0;z({name:"arrow",options:l,async fn(o){const{x:c,y:u,placement:d,rects:m,platform:x,elements:g,middlewareData:v}=o,{element:p,padding:b=0}=ln(l,o)||{};if(p==null)return{};const h=Wp(b),j={x:c,y:u},_=Ju(d),A=Ku(_),z=await x.getDimensions(p),H=_==="y",k=H?"top":"left",Q=H?"bottom":"right",q=H?"clientHeight":"clientWidth",W=m.reference[A]+m.reference[_]-j[_]-m.floating[A],Z=j[_]-m.reference[_],ee=await(x.getOffsetParent==null?void 0:x.getOffsetParent(p));let E=ee?ee[q]:0;(!E||!await(x.isElement==null?void 0:x.isElement(ee)))&&(E=g.floating[q]||m.floating[A]);const L=W/2-Z/2,Y=E/2-z[A]/2-1,le=Bn(h[k],Y),G=Bn(h[Q],Y),ne=le,M=E-z[A]-G,se=E/2-z[A]/2+L,ie=Mu(ne,se,M),T=!v.arrow&&ul(d)!=null&&se!==ie&&m.reference[A]/2-(sese<=0)){var G,ne;const se=(((G=m.flip)==null?void 0:G.index)||0)+1,ie=E[se];if(ie&&(!(h==="alignment"?Q!==za(ie):!1)||le.every(B=>za(B.placement)===Q?B.overflows[0]>0:!0)))return{data:{index:se,overflows:le},reset:{placement:ie}};let T=(ne=le.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:ne.placement;if(!T)switch(_){case"bestFit":{var M;const V=(M=le.filter(B=>{if(ee){const ue=za(B.placement);return ue===Q||ue==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ue=>ue>0).reduce((ue,xe)=>ue+xe,0)]).sort((B,ue)=>B[1]-ue[1])[0])==null?void 0:M[0];V&&(T=V);break}case"initialPlacement":T=g;break}if(d!==T)return{reset:{placement:T}}}return{}}}};function pp(l,o){return{top:l.top-o.height,right:l.right-o.width,bottom:l.bottom-o.height,left:l.left-o.width}}function xp(l){return ay.some(o=>l[o]>=0)}const xy=function(l){return l===void 0&&(l={}),{name:"hide",options:l,async fn(o){const{rects:c}=o,{strategy:u="referenceHidden",...d}=ln(l,o);switch(u){case"referenceHidden":{const m=await dr(o,{...d,elementContext:"reference"}),x=pp(m,c.reference);return{data:{referenceHiddenOffsets:x,referenceHidden:xp(x)}}}case"escaped":{const m=await dr(o,{...d,altBoundary:!0}),x=pp(m,c.floating);return{data:{escapedOffsets:x,escaped:xp(x)}}}default:return{}}}}},Pp=new Set(["left","top"]);async function gy(l,o){const{placement:c,platform:u,elements:d}=l,m=await(u.isRTL==null?void 0:u.isRTL(d.floating)),x=rn(c),g=ul(c),v=za(c)==="y",p=Pp.has(x)?-1:1,b=m&&v?-1:1,h=ln(o,l);let{mainAxis:j,crossAxis:_,alignmentAxis:A}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return g&&typeof A=="number"&&(_=g==="end"?A*-1:A),v?{x:_*b,y:j*p}:{x:j*p,y:_*b}}const vy=function(l){return l===void 0&&(l=0),{name:"offset",options:l,async fn(o){var c,u;const{x:d,y:m,placement:x,middlewareData:g}=o,v=await gy(o,l);return x===((c=g.offset)==null?void 0:c.placement)&&(u=g.arrow)!=null&&u.alignmentOffset?{}:{x:d+v.x,y:m+v.y,data:{...v,placement:x}}}}},yy=function(l){return l===void 0&&(l={}),{name:"shift",options:l,async fn(o){const{x:c,y:u,placement:d}=o,{mainAxis:m=!0,crossAxis:x=!1,limiter:g={fn:H=>{let{x:k,y:Q}=H;return{x:k,y:Q}}},...v}=ln(l,o),p={x:c,y:u},b=await dr(o,v),h=za(rn(d)),j=Zu(h);let _=p[j],A=p[h];if(m){const H=j==="y"?"top":"left",k=j==="y"?"bottom":"right",Q=_+b[H],q=_-b[k];_=Mu(Q,_,q)}if(x){const H=h==="y"?"top":"left",k=h==="y"?"bottom":"right",Q=A+b[H],q=A-b[k];A=Mu(Q,A,q)}const z=g.fn({...o,[j]:_,[h]:A});return{...z,data:{x:z.x-c,y:z.y-u,enabled:{[j]:m,[h]:x}}}}}},by=function(l){return l===void 0&&(l={}),{options:l,fn(o){const{x:c,y:u,placement:d,rects:m,middlewareData:x}=o,{offset:g=0,mainAxis:v=!0,crossAxis:p=!0}=ln(l,o),b={x:c,y:u},h=za(d),j=Zu(h);let _=b[j],A=b[h];const z=ln(g,o),H=typeof z=="number"?{mainAxis:z,crossAxis:0}:{mainAxis:0,crossAxis:0,...z};if(v){const q=j==="y"?"height":"width",W=m.reference[j]-m.floating[q]+H.mainAxis,Z=m.reference[j]+m.reference[q]-H.mainAxis;_Z&&(_=Z)}if(p){var k,Q;const q=j==="y"?"width":"height",W=Pp.has(rn(d)),Z=m.reference[h]-m.floating[q]+(W&&((k=x.offset)==null?void 0:k[h])||0)+(W?0:H.crossAxis),ee=m.reference[h]+m.reference[q]+(W?0:((Q=x.offset)==null?void 0:Q[h])||0)-(W?H.crossAxis:0);Aee&&(A=ee)}return{[j]:_,[h]:A}}}},wy=function(l){return l===void 0&&(l={}),{name:"size",options:l,async fn(o){var c,u;const{placement:d,rects:m,platform:x,elements:g}=o,{apply:v=()=>{},...p}=ln(l,o),b=await dr(o,p),h=rn(d),j=ul(d),_=za(d)==="y",{width:A,height:z}=m.floating;let H,k;h==="top"||h==="bottom"?(H=h,k=j===(await(x.isRTL==null?void 0:x.isRTL(g.floating))?"start":"end")?"left":"right"):(k=h,H=j==="end"?"top":"bottom");const Q=z-b.top-b.bottom,q=A-b.left-b.right,W=Bn(z-b[H],Q),Z=Bn(A-b[k],q),ee=!o.middlewareData.shift;let E=W,L=Z;if((c=o.middlewareData.shift)!=null&&c.enabled.x&&(L=q),(u=o.middlewareData.shift)!=null&&u.enabled.y&&(E=Q),ee&&!j){const le=ea(b.left,0),G=ea(b.right,0),ne=ea(b.top,0),M=ea(b.bottom,0);_?L=A-2*(le!==0||G!==0?le+G:ea(b.left,b.right)):E=z-2*(ne!==0||M!==0?ne+M:ea(b.top,b.bottom))}await v({...o,availableWidth:L,availableHeight:E});const Y=await x.getDimensions(g.floating);return A!==Y.width||z!==Y.height?{reset:{rects:!0}}:{}}}};function Fo(){return typeof window<"u"}function dl(l){return Ip(l)?(l.nodeName||"").toLowerCase():"#document"}function ta(l){var o;return(l==null||(o=l.ownerDocument)==null?void 0:o.defaultView)||window}function Ha(l){var o;return(o=(Ip(l)?l.ownerDocument:l.document)||window.document)==null?void 0:o.documentElement}function Ip(l){return Fo()?l instanceof Node||l instanceof ta(l).Node:!1}function wa(l){return Fo()?l instanceof Element||l instanceof ta(l).Element:!1}function La(l){return Fo()?l instanceof HTMLElement||l instanceof ta(l).HTMLElement:!1}function gp(l){return!Fo()||typeof ShadowRoot>"u"?!1:l instanceof ShadowRoot||l instanceof ta(l).ShadowRoot}const jy=new Set(["inline","contents"]);function hr(l){const{overflow:o,overflowX:c,overflowY:u,display:d}=ja(l);return/auto|scroll|overlay|hidden|clip/.test(o+u+c)&&!jy.has(d)}const Ny=new Set(["table","td","th"]);function Sy(l){return Ny.has(dl(l))}const _y=[":popover-open",":modal"];function Wo(l){return _y.some(o=>{try{return l.matches(o)}catch{return!1}})}const Ey=["transform","translate","scale","rotate","perspective"],ky=["transform","translate","scale","rotate","perspective","filter"],Cy=["paint","layout","strict","content"];function Fu(l){const o=Wu(),c=wa(l)?ja(l):l;return Ey.some(u=>c[u]?c[u]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!o&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!o&&(c.filter?c.filter!=="none":!1)||ky.some(u=>(c.willChange||"").includes(u))||Cy.some(u=>(c.contain||"").includes(u))}function Ty(l){let o=qn(l);for(;La(o)&&!sl(o);){if(Fu(o))return o;if(Wo(o))return null;o=qn(o)}return null}function Wu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ay=new Set(["html","body","#document"]);function sl(l){return Ay.has(dl(l))}function ja(l){return ta(l).getComputedStyle(l)}function Po(l){return wa(l)?{scrollLeft:l.scrollLeft,scrollTop:l.scrollTop}:{scrollLeft:l.scrollX,scrollTop:l.scrollY}}function qn(l){if(dl(l)==="html")return l;const o=l.assignedSlot||l.parentNode||gp(l)&&l.host||Ha(l);return gp(o)?o.host:o}function e0(l){const o=qn(l);return sl(o)?l.ownerDocument?l.ownerDocument.body:l.body:La(o)&&hr(o)?o:e0(o)}function fr(l,o,c){var u;o===void 0&&(o=[]),c===void 0&&(c=!0);const d=e0(l),m=d===((u=l.ownerDocument)==null?void 0:u.body),x=ta(d);if(m){const g=zu(x);return o.concat(x,x.visualViewport||[],hr(d)?d:[],g&&c?fr(g):[])}return o.concat(d,fr(d,[],c))}function zu(l){return l.parent&&Object.getPrototypeOf(l.parent)?l.frameElement:null}function t0(l){const o=ja(l);let c=parseFloat(o.width)||0,u=parseFloat(o.height)||0;const d=La(l),m=d?l.offsetWidth:c,x=d?l.offsetHeight:u,g=qo(c)!==m||qo(u)!==x;return g&&(c=m,u=x),{width:c,height:u,$:g}}function Pu(l){return wa(l)?l:l.contextElement}function al(l){const o=Pu(l);if(!La(o))return Da(1);const c=o.getBoundingClientRect(),{width:u,height:d,$:m}=t0(o);let x=(m?qo(c.width):c.width)/u,g=(m?qo(c.height):c.height)/d;return(!x||!Number.isFinite(x))&&(x=1),(!g||!Number.isFinite(g))&&(g=1),{x,y:g}}const My=Da(0);function a0(l){const o=ta(l);return!Wu()||!o.visualViewport?My:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Oy(l,o,c){return o===void 0&&(o=!1),!c||o&&c!==ta(l)?!1:o}function ds(l,o,c,u){o===void 0&&(o=!1),c===void 0&&(c=!1);const d=l.getBoundingClientRect(),m=Pu(l);let x=Da(1);o&&(u?wa(u)&&(x=al(u)):x=al(l));const g=Oy(m,c,u)?a0(m):Da(0);let v=(d.left+g.x)/x.x,p=(d.top+g.y)/x.y,b=d.width/x.x,h=d.height/x.y;if(m){const j=ta(m),_=u&&wa(u)?ta(u):u;let A=j,z=zu(A);for(;z&&u&&_!==A;){const H=al(z),k=z.getBoundingClientRect(),Q=ja(z),q=k.left+(z.clientLeft+parseFloat(Q.paddingLeft))*H.x,W=k.top+(z.clientTop+parseFloat(Q.paddingTop))*H.y;v*=H.x,p*=H.y,b*=H.x,h*=H.y,v+=q,p+=W,A=ta(z),z=zu(A)}}return Go({width:b,height:h,x:v,y:p})}function Io(l,o){const c=Po(l).scrollLeft;return o?o.left+c:ds(Ha(l)).left+c}function n0(l,o){const c=l.getBoundingClientRect(),u=c.left+o.scrollLeft-Io(l,c),d=c.top+o.scrollTop;return{x:u,y:d}}function zy(l){let{elements:o,rect:c,offsetParent:u,strategy:d}=l;const m=d==="fixed",x=Ha(u),g=o?Wo(o.floating):!1;if(u===x||g&&m)return c;let v={scrollLeft:0,scrollTop:0},p=Da(1);const b=Da(0),h=La(u);if((h||!h&&!m)&&((dl(u)!=="body"||hr(x))&&(v=Po(u)),La(u))){const _=ds(u);p=al(u),b.x=_.x+u.clientLeft,b.y=_.y+u.clientTop}const j=x&&!h&&!m?n0(x,v):Da(0);return{width:c.width*p.x,height:c.height*p.y,x:c.x*p.x-v.scrollLeft*p.x+b.x+j.x,y:c.y*p.y-v.scrollTop*p.y+b.y+j.y}}function Ry(l){return Array.from(l.getClientRects())}function Dy(l){const o=Ha(l),c=Po(l),u=l.ownerDocument.body,d=ea(o.scrollWidth,o.clientWidth,u.scrollWidth,u.clientWidth),m=ea(o.scrollHeight,o.clientHeight,u.scrollHeight,u.clientHeight);let x=-c.scrollLeft+Io(l);const g=-c.scrollTop;return ja(u).direction==="rtl"&&(x+=ea(o.clientWidth,u.clientWidth)-d),{width:d,height:m,x,y:g}}const vp=25;function Ly(l,o){const c=ta(l),u=Ha(l),d=c.visualViewport;let m=u.clientWidth,x=u.clientHeight,g=0,v=0;if(d){m=d.width,x=d.height;const b=Wu();(!b||b&&o==="fixed")&&(g=d.offsetLeft,v=d.offsetTop)}const p=Io(u);if(p<=0){const b=u.ownerDocument,h=b.body,j=getComputedStyle(h),_=b.compatMode==="CSS1Compat"&&parseFloat(j.marginLeft)+parseFloat(j.marginRight)||0,A=Math.abs(u.clientWidth-h.clientWidth-_);A<=vp&&(m-=A)}else p<=vp&&(m+=p);return{width:m,height:x,x:g,y:v}}const Uy=new Set(["absolute","fixed"]);function Hy(l,o){const c=ds(l,!0,o==="fixed"),u=c.top+l.clientTop,d=c.left+l.clientLeft,m=La(l)?al(l):Da(1),x=l.clientWidth*m.x,g=l.clientHeight*m.y,v=d*m.x,p=u*m.y;return{width:x,height:g,x:v,y:p}}function yp(l,o,c){let u;if(o==="viewport")u=Ly(l,c);else if(o==="document")u=Dy(Ha(l));else if(wa(o))u=Hy(o,c);else{const d=a0(l);u={x:o.x-d.x,y:o.y-d.y,width:o.width,height:o.height}}return Go(u)}function s0(l,o){const c=qn(l);return c===o||!wa(c)||sl(c)?!1:ja(c).position==="fixed"||s0(c,o)}function By(l,o){const c=o.get(l);if(c)return c;let u=fr(l,[],!1).filter(g=>wa(g)&&dl(g)!=="body"),d=null;const m=ja(l).position==="fixed";let x=m?qn(l):l;for(;wa(x)&&!sl(x);){const g=ja(x),v=Fu(x);!v&&g.position==="fixed"&&(d=null),(m?!v&&!d:!v&&g.position==="static"&&!!d&&Uy.has(d.position)||hr(x)&&!v&&s0(l,x))?u=u.filter(b=>b!==x):d=g,x=qn(x)}return o.set(l,u),u}function qy(l){let{element:o,boundary:c,rootBoundary:u,strategy:d}=l;const x=[...c==="clippingAncestors"?Wo(o)?[]:By(o,this._c):[].concat(c),u],g=x[0],v=x.reduce((p,b)=>{const h=yp(o,b,d);return p.top=ea(h.top,p.top),p.right=Bn(h.right,p.right),p.bottom=Bn(h.bottom,p.bottom),p.left=ea(h.left,p.left),p},yp(o,g,d));return{width:v.right-v.left,height:v.bottom-v.top,x:v.left,y:v.top}}function Yy(l){const{width:o,height:c}=t0(l);return{width:o,height:c}}function Gy(l,o,c){const u=La(o),d=Ha(o),m=c==="fixed",x=ds(l,!0,m,o);let g={scrollLeft:0,scrollTop:0};const v=Da(0);function p(){v.x=Io(d)}if(u||!u&&!m)if((dl(o)!=="body"||hr(d))&&(g=Po(o)),u){const _=ds(o,!0,m,o);v.x=_.x+o.clientLeft,v.y=_.y+o.clientTop}else d&&p();m&&!u&&d&&p();const b=d&&!u&&!m?n0(d,g):Da(0),h=x.left+g.scrollLeft-v.x-b.x,j=x.top+g.scrollTop-v.y-b.y;return{x:h,y:j,width:x.width,height:x.height}}function wu(l){return ja(l).position==="static"}function bp(l,o){if(!La(l)||ja(l).position==="fixed")return null;if(o)return o(l);let c=l.offsetParent;return Ha(l)===c&&(c=c.ownerDocument.body),c}function l0(l,o){const c=ta(l);if(Wo(l))return c;if(!La(l)){let d=qn(l);for(;d&&!sl(d);){if(wa(d)&&!wu(d))return d;d=qn(d)}return c}let u=bp(l,o);for(;u&&Sy(u)&&wu(u);)u=bp(u,o);return u&&sl(u)&&wu(u)&&!Fu(u)?c:u||Ty(l)||c}const Vy=async function(l){const o=this.getOffsetParent||l0,c=this.getDimensions,u=await c(l.floating);return{reference:Gy(l.reference,await o(l.floating),l.strategy),floating:{x:0,y:0,width:u.width,height:u.height}}};function $y(l){return ja(l).direction==="rtl"}const Xy={convertOffsetParentRelativeRectToViewportRelativeRect:zy,getDocumentElement:Ha,getClippingRect:qy,getOffsetParent:l0,getElementRects:Vy,getClientRects:Ry,getDimensions:Yy,getScale:al,isElement:wa,isRTL:$y};function r0(l,o){return l.x===o.x&&l.y===o.y&&l.width===o.width&&l.height===o.height}function Qy(l,o){let c=null,u;const d=Ha(l);function m(){var g;clearTimeout(u),(g=c)==null||g.disconnect(),c=null}function x(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),m();const p=l.getBoundingClientRect(),{left:b,top:h,width:j,height:_}=p;if(g||o(),!j||!_)return;const A=Oo(h),z=Oo(d.clientWidth-(b+j)),H=Oo(d.clientHeight-(h+_)),k=Oo(b),q={rootMargin:-A+"px "+-z+"px "+-H+"px "+-k+"px",threshold:ea(0,Bn(1,v))||1};let W=!0;function Z(ee){const E=ee[0].intersectionRatio;if(E!==v){if(!W)return x();E?x(!1,E):u=setTimeout(()=>{x(!1,1e-7)},1e3)}E===1&&!r0(p,l.getBoundingClientRect())&&x(),W=!1}try{c=new IntersectionObserver(Z,{...q,root:d.ownerDocument})}catch{c=new IntersectionObserver(Z,q)}c.observe(l)}return x(!0),m}function Zy(l,o,c,u){u===void 0&&(u={});const{ancestorScroll:d=!0,ancestorResize:m=!0,elementResize:x=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:v=!1}=u,p=Pu(l),b=d||m?[...p?fr(p):[],...fr(o)]:[];b.forEach(k=>{d&&k.addEventListener("scroll",c,{passive:!0}),m&&k.addEventListener("resize",c)});const h=p&&g?Qy(p,c):null;let j=-1,_=null;x&&(_=new ResizeObserver(k=>{let[Q]=k;Q&&Q.target===p&&_&&(_.unobserve(o),cancelAnimationFrame(j),j=requestAnimationFrame(()=>{var q;(q=_)==null||q.observe(o)})),c()}),p&&!v&&_.observe(p),_.observe(o));let A,z=v?ds(l):null;v&&H();function H(){const k=ds(l);z&&!r0(z,k)&&c(),z=k,A=requestAnimationFrame(H)}return c(),()=>{var k;b.forEach(Q=>{d&&Q.removeEventListener("scroll",c),m&&Q.removeEventListener("resize",c)}),h?.(),(k=_)==null||k.disconnect(),_=null,v&&cancelAnimationFrame(A)}}const Ky=vy,Jy=yy,Fy=py,Wy=wy,Py=xy,wp=hy,Iy=by,eb=(l,o,c)=>{const u=new Map,d={platform:Xy,...c},m={...d.platform,_c:u};return my(l,o,{...d,platform:m})};var tb=typeof document<"u",ab=function(){},Ho=tb?w.useLayoutEffect:ab;function Vo(l,o){if(l===o)return!0;if(typeof l!=typeof o)return!1;if(typeof l=="function"&&l.toString()===o.toString())return!0;let c,u,d;if(l&&o&&typeof l=="object"){if(Array.isArray(l)){if(c=l.length,c!==o.length)return!1;for(u=c;u--!==0;)if(!Vo(l[u],o[u]))return!1;return!0}if(d=Object.keys(l),c=d.length,c!==Object.keys(o).length)return!1;for(u=c;u--!==0;)if(!{}.hasOwnProperty.call(o,d[u]))return!1;for(u=c;u--!==0;){const m=d[u];if(!(m==="_owner"&&l.$$typeof)&&!Vo(l[m],o[m]))return!1}return!0}return l!==l&&o!==o}function o0(l){return typeof window>"u"?1:(l.ownerDocument.defaultView||window).devicePixelRatio||1}function jp(l,o){const c=o0(l);return Math.round(o*c)/c}function ju(l){const o=w.useRef(l);return Ho(()=>{o.current=l}),o}function nb(l){l===void 0&&(l={});const{placement:o="bottom",strategy:c="absolute",middleware:u=[],platform:d,elements:{reference:m,floating:x}={},transform:g=!0,whileElementsMounted:v,open:p}=l,[b,h]=w.useState({x:0,y:0,strategy:c,placement:o,middlewareData:{},isPositioned:!1}),[j,_]=w.useState(u);Vo(j,u)||_(u);const[A,z]=w.useState(null),[H,k]=w.useState(null),Q=w.useCallback(B=>{B!==ee.current&&(ee.current=B,z(B))},[]),q=w.useCallback(B=>{B!==E.current&&(E.current=B,k(B))},[]),W=m||A,Z=x||H,ee=w.useRef(null),E=w.useRef(null),L=w.useRef(b),Y=v!=null,le=ju(v),G=ju(d),ne=ju(p),M=w.useCallback(()=>{if(!ee.current||!E.current)return;const B={placement:o,strategy:c,middleware:j};G.current&&(B.platform=G.current),eb(ee.current,E.current,B).then(ue=>{const xe={...ue,isPositioned:ne.current!==!1};se.current&&!Vo(L.current,xe)&&(L.current=xe,Qu.flushSync(()=>{h(xe)}))})},[j,o,c,G,ne]);Ho(()=>{p===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[p]);const se=w.useRef(!1);Ho(()=>(se.current=!0,()=>{se.current=!1}),[]),Ho(()=>{if(W&&(ee.current=W),Z&&(E.current=Z),W&&Z){if(le.current)return le.current(W,Z,M);M()}},[W,Z,M,le,Y]);const ie=w.useMemo(()=>({reference:ee,floating:E,setReference:Q,setFloating:q}),[Q,q]),T=w.useMemo(()=>({reference:W,floating:Z}),[W,Z]),V=w.useMemo(()=>{const B={position:c,left:0,top:0};if(!T.floating)return B;const ue=jp(T.floating,b.x),xe=jp(T.floating,b.y);return g?{...B,transform:"translate("+ue+"px, "+xe+"px)",...o0(T.floating)>=1.5&&{willChange:"transform"}}:{position:c,left:ue,top:xe}},[c,g,T.floating,b.x,b.y]);return w.useMemo(()=>({...b,update:M,refs:ie,elements:T,floatingStyles:V}),[b,M,ie,T,V])}const sb=l=>{function o(c){return{}.hasOwnProperty.call(c,"current")}return{name:"arrow",options:l,fn(c){const{element:u,padding:d}=typeof l=="function"?l(c):l;return u&&o(u)?u.current!=null?wp({element:u.current,padding:d}).fn(c):{}:u?wp({element:u,padding:d}).fn(c):{}}}},lb=(l,o)=>({...Ky(l),options:[l,o]}),rb=(l,o)=>({...Jy(l),options:[l,o]}),ob=(l,o)=>({...Iy(l),options:[l,o]}),ib=(l,o)=>({...Fy(l),options:[l,o]}),cb=(l,o)=>({...Wy(l),options:[l,o]}),ub=(l,o)=>({...Py(l),options:[l,o]}),db=(l,o)=>({...sb(l),options:[l,o]});var fb="Arrow",i0=w.forwardRef((l,o)=>{const{children:c,width:u=10,height:d=5,...m}=l;return s.jsx(Ua.svg,{...m,ref:o,width:u,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:l.asChild?c:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});i0.displayName=fb;var mb=i0;function c0(l){const[o,c]=w.useState(void 0);return Hn(()=>{if(l){c({width:l.offsetWidth,height:l.offsetHeight});const u=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const m=d[0];let x,g;if("borderBoxSize"in m){const v=m.borderBoxSize,p=Array.isArray(v)?v[0]:v;x=p.inlineSize,g=p.blockSize}else x=l.offsetWidth,g=l.offsetHeight;c({width:x,height:g})});return u.observe(l,{box:"border-box"}),()=>u.unobserve(l)}else c(void 0)},[l]),o}var Iu="Popper",[u0,d0]=Xu(Iu),[hb,f0]=u0(Iu),m0=l=>{const{__scopePopper:o,children:c}=l,[u,d]=w.useState(null);return s.jsx(hb,{scope:o,anchor:u,onAnchorChange:d,children:c})};m0.displayName=Iu;var h0="PopperAnchor",p0=w.forwardRef((l,o)=>{const{__scopePopper:c,virtualRef:u,...d}=l,m=f0(h0,c),x=w.useRef(null),g=on(o,x),v=w.useRef(null);return w.useEffect(()=>{const p=v.current;v.current=u?.current||x.current,p!==v.current&&m.onAnchorChange(v.current)}),u?null:s.jsx(Ua.div,{...d,ref:g})});p0.displayName=h0;var ed="PopperContent",[pb,xb]=u0(ed),x0=w.forwardRef((l,o)=>{const{__scopePopper:c,side:u="bottom",sideOffset:d=0,align:m="center",alignOffset:x=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:p=[],collisionPadding:b=0,sticky:h="partial",hideWhenDetached:j=!1,updatePositionStrategy:_="optimized",onPlaced:A,...z}=l,H=f0(ed,c),[k,Q]=w.useState(null),q=on(o,de=>Q(de)),[W,Z]=w.useState(null),ee=c0(W),E=ee?.width??0,L=ee?.height??0,Y=u+(m!=="center"?"-"+m:""),le=typeof b=="number"?b:{top:0,right:0,bottom:0,left:0,...b},G=Array.isArray(p)?p:[p],ne=G.length>0,M={padding:le,boundary:G.filter(vb),altBoundary:ne},{refs:se,floatingStyles:ie,placement:T,isPositioned:V,middlewareData:B}=nb({strategy:"fixed",placement:Y,whileElementsMounted:(...de)=>Zy(...de,{animationFrame:_==="always"}),elements:{reference:H.anchor},middleware:[lb({mainAxis:d+L,alignmentAxis:x}),v&&rb({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?ob():void 0,...M}),v&&ib({...M}),cb({...M,apply:({elements:de,rects:Ne,availableWidth:Ce,availableHeight:We})=>{const{width:it,height:qe}=Ne.reference,I=de.floating.style;I.setProperty("--radix-popper-available-width",`${Ce}px`),I.setProperty("--radix-popper-available-height",`${We}px`),I.setProperty("--radix-popper-anchor-width",`${it}px`),I.setProperty("--radix-popper-anchor-height",`${qe}px`)}}),W&&db({element:W,padding:g}),yb({arrowWidth:E,arrowHeight:L}),j&&ub({strategy:"referenceHidden",...M})]}),[ue,xe]=y0(T),S=Jo(A);Hn(()=>{V&&S?.()},[V,S]);const K=B.arrow?.x,X=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[oe,ge]=w.useState();return Hn(()=>{k&&ge(window.getComputedStyle(k).zIndex)},[k]),s.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:V?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:l.dir,children:s.jsx(pb,{scope:c,placedSide:ue,onArrowChange:Z,arrowX:K,arrowY:X,shouldHideArrow:ae,children:s.jsx(Ua.div,{"data-side":ue,"data-align":xe,...z,ref:q,style:{...z.style,animation:V?void 0:"none"}})})})});x0.displayName=ed;var g0="PopperArrow",gb={top:"bottom",right:"left",bottom:"top",left:"right"},v0=w.forwardRef(function(o,c){const{__scopePopper:u,...d}=o,m=xb(g0,u),x=gb[m.placedSide];return s.jsx("span",{ref:m.onArrowChange,style:{position:"absolute",left:m.arrowX,top:m.arrowY,[x]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[m.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[m.placedSide],visibility:m.shouldHideArrow?"hidden":void 0},children:s.jsx(mb,{...d,ref:c,style:{...d.style,display:"block"}})})});v0.displayName=g0;function vb(l){return l!==null}var yb=l=>({name:"transformOrigin",options:l,fn(o){const{placement:c,rects:u,middlewareData:d}=o,x=d.arrow?.centerOffset!==0,g=x?0:l.arrowWidth,v=x?0:l.arrowHeight,[p,b]=y0(c),h={start:"0%",center:"50%",end:"100%"}[b],j=(d.arrow?.x??0)+g/2,_=(d.arrow?.y??0)+v/2;let A="",z="";return p==="bottom"?(A=x?h:`${j}px`,z=`${-v}px`):p==="top"?(A=x?h:`${j}px`,z=`${u.floating.height+v}px`):p==="right"?(A=`${-v}px`,z=x?h:`${_}px`):p==="left"&&(A=`${u.floating.width+v}px`,z=x?h:`${_}px`),{data:{x:A,y:z}}}});function y0(l){const[o,c="center"]=l.split("-");return[o,c]}var bb=m0,wb=p0,jb=x0,Nb=v0,Sb="Portal",b0=w.forwardRef((l,o)=>{const{container:c,...u}=l,[d,m]=w.useState(!1);Hn(()=>m(!0),[]);const x=c||d&&globalThis?.document?.body;return x?Zp.createPortal(s.jsx(Ua.div,{...u,ref:o}),x):null});b0.displayName=Sb;function _b(l,o){return w.useReducer((c,u)=>o[c][u]??c,l)}var td=l=>{const{present:o,children:c}=l,u=Eb(o),d=typeof c=="function"?c({present:u.isPresent}):w.Children.only(c),m=on(u.ref,kb(d));return typeof c=="function"||u.isPresent?w.cloneElement(d,{ref:m}):null};td.displayName="Presence";function Eb(l){const[o,c]=w.useState(),u=w.useRef(null),d=w.useRef(l),m=w.useRef("none"),x=l?"mounted":"unmounted",[g,v]=_b(x,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=zo(u.current);m.current=g==="mounted"?p:"none"},[g]),Hn(()=>{const p=u.current,b=d.current;if(b!==l){const j=m.current,_=zo(p);l?v("MOUNT"):_==="none"||p?.display==="none"?v("UNMOUNT"):v(b&&j!==_?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,v]),Hn(()=>{if(o){let p;const b=o.ownerDocument.defaultView??window,h=_=>{const z=zo(u.current).includes(CSS.escape(_.animationName));if(_.target===o&&z&&(v("ANIMATION_END"),!d.current)){const H=o.style.animationFillMode;o.style.animationFillMode="forwards",p=b.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=H)})}},j=_=>{_.target===o&&(m.current=zo(u.current))};return o.addEventListener("animationstart",j),o.addEventListener("animationcancel",h),o.addEventListener("animationend",h),()=>{b.clearTimeout(p),o.removeEventListener("animationstart",j),o.removeEventListener("animationcancel",h),o.removeEventListener("animationend",h)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:w.useCallback(p=>{u.current=p?getComputedStyle(p):null,c(p)},[])}}function zo(l){return l?.animationName||"none"}function kb(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var Cb=Symbol("radix.slottable");function Tb(l){const o=({children:c})=>s.jsx(s.Fragment,{children:c});return o.displayName=`${l}.Slottable`,o.__radixId=Cb,o}var Ab=Vu[" useInsertionEffect ".trim().toString()]||Hn;function w0({prop:l,defaultProp:o,onChange:c=()=>{},caller:u}){const[d,m,x]=Mb({defaultProp:o,onChange:c}),g=l!==void 0,v=g?l:d;{const b=w.useRef(l!==void 0);w.useEffect(()=>{const h=b.current;h!==g&&console.warn(`${u} is changing from ${h?"controlled":"uncontrolled"} to ${g?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=g},[g,u])}const p=w.useCallback(b=>{if(g){const h=Ob(b)?b(l):b;h!==l&&x.current?.(h)}else m(b)},[g,l,m,x]);return[v,p]}function Mb({defaultProp:l,onChange:o}){const[c,u]=w.useState(l),d=w.useRef(c),m=w.useRef(o);return Ab(()=>{m.current=o},[o]),w.useEffect(()=>{d.current!==c&&(m.current?.(c),d.current=c)},[c,d]),[c,u,m]}function Ob(l){return typeof l=="function"}var zb=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Rb="VisuallyHidden",j0=w.forwardRef((l,o)=>s.jsx(Ua.span,{...l,ref:o,style:{...zb,...l.style}}));j0.displayName=Rb;var Db=j0,[ei]=Xu("Tooltip",[d0]),ti=d0(),N0="TooltipProvider",Lb=700,Ru="tooltip.open",[Ub,ad]=ei(N0),S0=l=>{const{__scopeTooltip:o,delayDuration:c=Lb,skipDelayDuration:u=300,disableHoverableContent:d=!1,children:m}=l,x=w.useRef(!0),g=w.useRef(!1),v=w.useRef(0);return w.useEffect(()=>{const p=v.current;return()=>window.clearTimeout(p)},[]),s.jsx(Ub,{scope:o,isOpenDelayedRef:x,delayDuration:c,onOpen:w.useCallback(()=>{window.clearTimeout(v.current),x.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>x.current=!0,u)},[u]),isPointerInTransitRef:g,onPointerInTransitChange:w.useCallback(p=>{g.current=p},[]),disableHoverableContent:d,children:m})};S0.displayName=N0;var mr="Tooltip",[Hb,pr]=ei(mr),_0=l=>{const{__scopeTooltip:o,children:c,open:u,defaultOpen:d,onOpenChange:m,disableHoverableContent:x,delayDuration:g}=l,v=ad(mr,l.__scopeTooltip),p=ti(o),[b,h]=w.useState(null),j=ty(),_=w.useRef(0),A=x??v.disableHoverableContent,z=g??v.delayDuration,H=w.useRef(!1),[k,Q]=w0({prop:u,defaultProp:d??!1,onChange:E=>{E?(v.onOpen(),document.dispatchEvent(new CustomEvent(Ru))):v.onClose(),m?.(E)},caller:mr}),q=w.useMemo(()=>k?H.current?"delayed-open":"instant-open":"closed",[k]),W=w.useCallback(()=>{window.clearTimeout(_.current),_.current=0,H.current=!1,Q(!0)},[Q]),Z=w.useCallback(()=>{window.clearTimeout(_.current),_.current=0,Q(!1)},[Q]),ee=w.useCallback(()=>{window.clearTimeout(_.current),_.current=window.setTimeout(()=>{H.current=!0,Q(!0),_.current=0},z)},[z,Q]);return w.useEffect(()=>()=>{_.current&&(window.clearTimeout(_.current),_.current=0)},[]),s.jsx(bb,{...p,children:s.jsx(Hb,{scope:o,contentId:j,open:k,stateAttribute:q,trigger:b,onTriggerChange:h,onTriggerEnter:w.useCallback(()=>{v.isOpenDelayedRef.current?ee():W()},[v.isOpenDelayedRef,ee,W]),onTriggerLeave:w.useCallback(()=>{A?Z():(window.clearTimeout(_.current),_.current=0)},[Z,A]),onOpen:W,onClose:Z,disableHoverableContent:A,children:c})})};_0.displayName=mr;var Du="TooltipTrigger",E0=w.forwardRef((l,o)=>{const{__scopeTooltip:c,...u}=l,d=pr(Du,c),m=ad(Du,c),x=ti(c),g=w.useRef(null),v=on(o,g,d.onTriggerChange),p=w.useRef(!1),b=w.useRef(!1),h=w.useCallback(()=>p.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(wb,{asChild:!0,...x,children:s.jsx(Ua.button,{"aria-describedby":d.open?d.contentId:void 0,"data-state":d.stateAttribute,...u,ref:v,onPointerMove:Oa(l.onPointerMove,j=>{j.pointerType!=="touch"&&!b.current&&!m.isPointerInTransitRef.current&&(d.onTriggerEnter(),b.current=!0)}),onPointerLeave:Oa(l.onPointerLeave,()=>{d.onTriggerLeave(),b.current=!1}),onPointerDown:Oa(l.onPointerDown,()=>{d.open&&d.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oa(l.onFocus,()=>{p.current||d.onOpen()}),onBlur:Oa(l.onBlur,d.onClose),onClick:Oa(l.onClick,d.onClose)})})});E0.displayName=Du;var nd="TooltipPortal",[Bb,qb]=ei(nd,{forceMount:void 0}),k0=l=>{const{__scopeTooltip:o,forceMount:c,children:u,container:d}=l,m=pr(nd,o);return s.jsx(Bb,{scope:o,forceMount:c,children:s.jsx(td,{present:c||m.open,children:s.jsx(b0,{asChild:!0,container:d,children:u})})})};k0.displayName=nd;var ll="TooltipContent",C0=w.forwardRef((l,o)=>{const c=qb(ll,l.__scopeTooltip),{forceMount:u=c.forceMount,side:d="top",...m}=l,x=pr(ll,l.__scopeTooltip);return s.jsx(td,{present:u||x.open,children:x.disableHoverableContent?s.jsx(T0,{side:d,...m,ref:o}):s.jsx(Yb,{side:d,...m,ref:o})})}),Yb=w.forwardRef((l,o)=>{const c=pr(ll,l.__scopeTooltip),u=ad(ll,l.__scopeTooltip),d=w.useRef(null),m=on(o,d),[x,g]=w.useState(null),{trigger:v,onClose:p}=c,b=d.current,{onPointerInTransitChange:h}=u,j=w.useCallback(()=>{g(null),h(!1)},[h]),_=w.useCallback((A,z)=>{const H=A.currentTarget,k={x:A.clientX,y:A.clientY},Q=Xb(k,H.getBoundingClientRect()),q=Qb(k,Q),W=Zb(z.getBoundingClientRect()),Z=Jb([...q,...W]);g(Z),h(!0)},[h]);return w.useEffect(()=>()=>j(),[j]),w.useEffect(()=>{if(v&&b){const A=H=>_(H,b),z=H=>_(H,v);return v.addEventListener("pointerleave",A),b.addEventListener("pointerleave",z),()=>{v.removeEventListener("pointerleave",A),b.removeEventListener("pointerleave",z)}}},[v,b,_,j]),w.useEffect(()=>{if(x){const A=z=>{const H=z.target,k={x:z.clientX,y:z.clientY},Q=v?.contains(H)||b?.contains(H),q=!Kb(k,x);Q?j():q&&(j(),p())};return document.addEventListener("pointermove",A),()=>document.removeEventListener("pointermove",A)}},[v,b,x,p,j]),s.jsx(T0,{...l,ref:m})}),[Gb,Vb]=ei(mr,{isInside:!1}),$b=Tb("TooltipContent"),T0=w.forwardRef((l,o)=>{const{__scopeTooltip:c,children:u,"aria-label":d,onEscapeKeyDown:m,onPointerDownOutside:x,...g}=l,v=pr(ll,c),p=ti(c),{onClose:b}=v;return w.useEffect(()=>(document.addEventListener(Ru,b),()=>document.removeEventListener(Ru,b)),[b]),w.useEffect(()=>{if(v.trigger){const h=j=>{j.target?.contains(v.trigger)&&b()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[v.trigger,b]),s.jsx(Jp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:m,onPointerDownOutside:x,onFocusOutside:h=>h.preventDefault(),onDismiss:b,children:s.jsxs(jb,{"data-state":v.stateAttribute,...p,...g,ref:o,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx($b,{children:u}),s.jsx(Gb,{scope:c,isInside:!0,children:s.jsx(Db,{id:v.contentId,role:"tooltip",children:d||u})})]})})});C0.displayName=ll;var A0="TooltipArrow",M0=w.forwardRef((l,o)=>{const{__scopeTooltip:c,...u}=l,d=ti(c);return Vb(A0,c).isInside?null:s.jsx(Nb,{...d,...u,ref:o})});M0.displayName=A0;function Xb(l,o){const c=Math.abs(o.top-l.y),u=Math.abs(o.bottom-l.y),d=Math.abs(o.right-l.x),m=Math.abs(o.left-l.x);switch(Math.min(c,u,d,m)){case m:return"left";case d:return"right";case c:return"top";case u:return"bottom";default:throw new Error("unreachable")}}function Qb(l,o,c=5){const u=[];switch(o){case"top":u.push({x:l.x-c,y:l.y+c},{x:l.x+c,y:l.y+c});break;case"bottom":u.push({x:l.x-c,y:l.y-c},{x:l.x+c,y:l.y-c});break;case"left":u.push({x:l.x+c,y:l.y-c},{x:l.x+c,y:l.y+c});break;case"right":u.push({x:l.x-c,y:l.y-c},{x:l.x-c,y:l.y+c});break}return u}function Zb(l){const{top:o,right:c,bottom:u,left:d}=l;return[{x:d,y:o},{x:c,y:o},{x:c,y:u},{x:d,y:u}]}function Kb(l,o){const{x:c,y:u}=l;let d=!1;for(let m=0,x=o.length-1;mu!=j>u&&c<(h-p)*(u-b)/(j-b)+p&&(d=!d)}return d}function Jb(l){const o=l.slice();return o.sort((c,u)=>c.xu.x?1:c.yu.y?1:0),Fb(o)}function Fb(l){if(l.length<=1)return l.slice();const o=[];for(let u=0;u=2;){const m=o[o.length-1],x=o[o.length-2];if((m.x-x.x)*(d.y-x.y)>=(m.y-x.y)*(d.x-x.x))o.pop();else break}o.push(d)}o.pop();const c=[];for(let u=l.length-1;u>=0;u--){const d=l[u];for(;c.length>=2;){const m=c[c.length-1],x=c[c.length-2];if((m.x-x.x)*(d.y-x.y)>=(m.y-x.y)*(d.x-x.x))c.pop();else break}c.push(d)}return c.pop(),o.length===1&&c.length===1&&o[0].x===c[0].x&&o[0].y===c[0].y?o:o.concat(c)}var Wb=S0,Pb=_0,Ib=E0,e1=k0,t1=C0,a1=M0;function O0(l){var o,c,u="";if(typeof l=="string"||typeof l=="number")u+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(o=0;o{const c=new Array(l.length+o.length);for(let u=0;u({classGroupId:l,validator:o}),R0=(l=new Map,o=null,c)=>({nextPart:l,validators:o,classGroupId:c}),$o="-",Np=[],l1="arbitrary..",r1=l=>{const o=i1(l),{conflictingClassGroups:c,conflictingClassGroupModifiers:u}=l;return{getClassGroupId:x=>{if(x.startsWith("[")&&x.endsWith("]"))return o1(x);const g=x.split($o),v=g[0]===""&&g.length>1?1:0;return D0(g,v,o)},getConflictingClassGroupIds:(x,g)=>{if(g){const v=u[x],p=c[x];return v?p?n1(p,v):v:p||Np}return c[x]||Np}}},D0=(l,o,c)=>{if(l.length-o===0)return c.classGroupId;const d=l[o],m=c.nextPart.get(d);if(m){const p=D0(l,o+1,m);if(p)return p}const x=c.validators;if(x===null)return;const g=o===0?l.join($o):l.slice(o).join($o),v=x.length;for(let p=0;pl.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=l.slice(1,-1),c=o.indexOf(":"),u=o.slice(0,c);return u?l1+u:void 0})(),i1=l=>{const{theme:o,classGroups:c}=l;return c1(c,o)},c1=(l,o)=>{const c=R0();for(const u in l){const d=l[u];sd(d,c,u,o)}return c},sd=(l,o,c,u)=>{const d=l.length;for(let m=0;m{if(typeof l=="string"){d1(l,o,c);return}if(typeof l=="function"){f1(l,o,c,u);return}m1(l,o,c,u)},d1=(l,o,c)=>{const u=l===""?o:L0(o,l);u.classGroupId=c},f1=(l,o,c,u)=>{if(h1(l)){sd(l(u),o,c,u);return}o.validators===null&&(o.validators=[]),o.validators.push(s1(c,l))},m1=(l,o,c,u)=>{const d=Object.entries(l),m=d.length;for(let x=0;x{let c=l;const u=o.split($o),d=u.length;for(let m=0;m"isThemeGetter"in l&&l.isThemeGetter===!0,p1=l=>{if(l<1)return{get:()=>{},set:()=>{}};let o=0,c=Object.create(null),u=Object.create(null);const d=(m,x)=>{c[m]=x,o++,o>l&&(o=0,u=c,c=Object.create(null))};return{get(m){let x=c[m];if(x!==void 0)return x;if((x=u[m])!==void 0)return d(m,x),x},set(m,x){m in c?c[m]=x:d(m,x)}}},Lu="!",Sp=":",x1=[],_p=(l,o,c,u,d)=>({modifiers:l,hasImportantModifier:o,baseClassName:c,maybePostfixModifierPosition:u,isExternal:d}),g1=l=>{const{prefix:o,experimentalParseClassName:c}=l;let u=d=>{const m=[];let x=0,g=0,v=0,p;const b=d.length;for(let z=0;zv?p-v:void 0;return _p(m,_,j,A)};if(o){const d=o+Sp,m=u;u=x=>x.startsWith(d)?m(x.slice(d.length)):_p(x1,!1,x,void 0,!0)}if(c){const d=u;u=m=>c({className:m,parseClassName:d})}return u},v1=l=>{const o=new Map;return l.orderSensitiveModifiers.forEach((c,u)=>{o.set(c,1e6+u)}),c=>{const u=[];let d=[];for(let m=0;m0&&(d.sort(),u.push(...d),d=[]),u.push(x)):d.push(x)}return d.length>0&&(d.sort(),u.push(...d)),u}},y1=l=>({cache:p1(l.cacheSize),parseClassName:g1(l),sortModifiers:v1(l),...r1(l)}),b1=/\s+/,w1=(l,o)=>{const{parseClassName:c,getClassGroupId:u,getConflictingClassGroupIds:d,sortModifiers:m}=o,x=[],g=l.trim().split(b1);let v="";for(let p=g.length-1;p>=0;p-=1){const b=g[p],{isExternal:h,modifiers:j,hasImportantModifier:_,baseClassName:A,maybePostfixModifierPosition:z}=c(b);if(h){v=b+(v.length>0?" "+v:v);continue}let H=!!z,k=u(H?A.substring(0,z):A);if(!k){if(!H){v=b+(v.length>0?" "+v:v);continue}if(k=u(A),!k){v=b+(v.length>0?" "+v:v);continue}H=!1}const Q=j.length===0?"":j.length===1?j[0]:m(j).join(":"),q=_?Q+Lu:Q,W=q+k;if(x.indexOf(W)>-1)continue;x.push(W);const Z=d(k,H);for(let ee=0;ee0?" "+v:v)}return v},j1=(...l)=>{let o=0,c,u,d="";for(;o{if(typeof l=="string")return l;let o,c="";for(let u=0;u{let c,u,d,m;const x=v=>{const p=o.reduce((b,h)=>h(b),l());return c=y1(p),u=c.cache.get,d=c.cache.set,m=g,g(v)},g=v=>{const p=u(v);if(p)return p;const b=w1(v,c);return d(v,b),b};return m=x,(...v)=>m(j1(...v))},S1=[],ut=l=>{const o=c=>c[l]||S1;return o.isThemeGetter=!0,o},H0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,B0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_1=/^\d+\/\d+$/,E1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,C1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,T1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,A1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=l=>_1.test(l),Te=l=>!!l&&!Number.isNaN(Number(l)),Ln=l=>!!l&&Number.isInteger(Number(l)),Nu=l=>l.endsWith("%")&&Te(l.slice(0,-1)),sn=l=>E1.test(l),M1=()=>!0,O1=l=>k1.test(l)&&!C1.test(l),q0=()=>!1,z1=l=>T1.test(l),R1=l=>A1.test(l),D1=l=>!me(l)&&!he(l),L1=l=>fl(l,V0,q0),me=l=>H0.test(l),us=l=>fl(l,$0,O1),Su=l=>fl(l,Y1,Te),Ep=l=>fl(l,Y0,q0),U1=l=>fl(l,G0,R1),Ro=l=>fl(l,X0,z1),he=l=>B0.test(l),cr=l=>ml(l,$0),H1=l=>ml(l,G1),kp=l=>ml(l,Y0),B1=l=>ml(l,V0),q1=l=>ml(l,G0),Do=l=>ml(l,X0,!0),fl=(l,o,c)=>{const u=H0.exec(l);return u?u[1]?o(u[1]):c(u[2]):!1},ml=(l,o,c=!1)=>{const u=B0.exec(l);return u?u[1]?o(u[1]):c:!1},Y0=l=>l==="position"||l==="percentage",G0=l=>l==="image"||l==="url",V0=l=>l==="length"||l==="size"||l==="bg-size",$0=l=>l==="length",Y1=l=>l==="number",G1=l=>l==="family-name",X0=l=>l==="shadow",V1=()=>{const l=ut("color"),o=ut("font"),c=ut("text"),u=ut("font-weight"),d=ut("tracking"),m=ut("leading"),x=ut("breakpoint"),g=ut("container"),v=ut("spacing"),p=ut("radius"),b=ut("shadow"),h=ut("inset-shadow"),j=ut("text-shadow"),_=ut("drop-shadow"),A=ut("blur"),z=ut("perspective"),H=ut("aspect"),k=ut("ease"),Q=ut("animate"),q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...W(),he,me],ee=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],L=()=>[he,me,v],Y=()=>[el,"full","auto",...L()],le=()=>[Ln,"none","subgrid",he,me],G=()=>["auto",{span:["full",Ln,he,me]},Ln,he,me],ne=()=>[Ln,"auto",he,me],M=()=>["auto","min","max","fr",he,me],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...L()],V=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],B=()=>[l,he,me],ue=()=>[...W(),kp,Ep,{position:[he,me]}],xe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],S=()=>["auto","cover","contain",B1,L1,{size:[he,me]}],K=()=>[Nu,cr,us],X=()=>["","none","full",p,he,me],ae=()=>["",Te,cr,us],oe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Te,Nu,kp,Ep],Ne=()=>["","none",A,he,me],Ce=()=>["none",Te,he,me],We=()=>["none",Te,he,me],it=()=>[Te,he,me],qe=()=>[el,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sn],breakpoint:[sn],color:[M1],container:[sn],"drop-shadow":[sn],ease:["in","out","in-out"],font:[D1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sn],shadow:[sn],spacing:["px",Te],text:[sn],"text-shadow":[sn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,me,he,H]}],container:["container"],columns:[{columns:[Te,me,he,g]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Ln,"auto",he,me]}],basis:[{basis:[el,"full","auto",g,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,el,"auto","initial","none",me]}],grow:[{grow:["",Te,he,me]}],shrink:[{shrink:["",Te,he,me]}],order:[{order:[Ln,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":M()}],"auto-rows":[{"auto-rows":M()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[g,"screen",...V()]}],"min-w":[{"min-w":[g,"screen","none",...V()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[x]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",c,cr,us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[u,he,Su]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Nu,me]}],"font-family":[{font:[H1,me,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,he,me]}],"line-clamp":[{"line-clamp":[Te,"none",he,Su]}],leading:[{leading:[m,...L()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",he,us]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Te,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:xe()}],"bg-size":[{bg:S()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ln,he,me],radial:["",he,me],conic:[Ln,he,me]},q1,U1]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,he,me]}],"outline-w":[{outline:["",Te,cr,us]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",b,Do,Ro]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Do,Ro]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Te,us]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",j,Do,Ro]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Te,he,me]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:xe()}],"mask-size":[{mask:S()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:Ne()}],brightness:[{brightness:[Te,he,me]}],contrast:[{contrast:[Te,he,me]}],"drop-shadow":[{"drop-shadow":["","none",_,Do,Ro]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Te,he,me]}],"hue-rotate":[{"hue-rotate":[Te,he,me]}],invert:[{invert:["",Te,he,me]}],saturate:[{saturate:[Te,he,me]}],sepia:[{sepia:["",Te,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[Te,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Te,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Te,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Te,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Te,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",he,me]}],ease:[{ease:["linear","initial",k,he,me]}],delay:[{delay:[Te,he,me]}],animate:[{animate:["none",Q,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[z,he,me]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:We()}],"scale-x":[{"scale-x":We()}],"scale-y":[{"scale-y":We()}],"scale-z":[{"scale-z":We()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,me]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Te,cr,us,Su]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$1=N1(V1);function be(...l){return $1(z0(l))}function Q0({delayDuration:l=0,...o}){return s.jsx(Wb,{"data-slot":"tooltip-provider",delayDuration:l,...o})}function va({...l}){return s.jsx(Q0,{children:s.jsx(Pb,{"data-slot":"tooltip",...l})})}function ya({...l}){return s.jsx(Ib,{"data-slot":"tooltip-trigger",...l})}function ba({className:l,sideOffset:o=0,children:c,...u}){return s.jsx(e1,{children:s.jsxs(t1,{"data-slot":"tooltip-content",sideOffset:o,className:be("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",l),...u,children:[c,s.jsx(a1,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function X1(l){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",o.appendChild(c),c.styleSheet?c.styleSheet.cssText=l:c.appendChild(document.createTextNode(l))}const Q1=l=>{switch(l){case"success":return J1;case"info":return W1;case"warning":return F1;case"error":return P1;default:return null}},Z1=Array(12).fill(0),K1=({visible:l,className:o})=>re.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":l},re.createElement("div",{className:"sonner-spinner"},Z1.map((c,u)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${u}`})))),J1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),F1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),W1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),P1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),I1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),e2=()=>{const[l,o]=re.useState(document.hidden);return re.useEffect(()=>{const c=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",c),()=>window.removeEventListener("visibilitychange",c)},[]),l};let Uu=1;class t2{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const c=this.subscribers.indexOf(o);this.subscribers.splice(c,1)}),this.publish=o=>{this.subscribers.forEach(c=>c(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var c;const{message:u,...d}=o,m=typeof o?.id=="number"||((c=o.id)==null?void 0:c.length)>0?o.id:Uu++,x=this.toasts.find(v=>v.id===m),g=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(m)&&this.dismissedToasts.delete(m),x?this.toasts=this.toasts.map(v=>v.id===m?(this.publish({...v,...o,id:m,title:u}),{...v,...o,id:m,dismissible:g,title:u}):v):this.addToast({title:u,...d,dismissible:g,id:m}),m},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(c=>c({id:o,dismiss:!0})))):this.toasts.forEach(c=>{this.subscribers.forEach(u=>u({id:c.id,dismiss:!0}))}),o),this.message=(o,c)=>this.create({...c,message:o}),this.error=(o,c)=>this.create({...c,message:o,type:"error"}),this.success=(o,c)=>this.create({...c,type:"success",message:o}),this.info=(o,c)=>this.create({...c,type:"info",message:o}),this.warning=(o,c)=>this.create({...c,type:"warning",message:o}),this.loading=(o,c)=>this.create({...c,type:"loading",message:o}),this.promise=(o,c)=>{if(!c)return;let u;c.loading!==void 0&&(u=this.create({...c,promise:o,type:"loading",message:c.loading,description:typeof c.description!="function"?c.description:void 0}));const d=Promise.resolve(o instanceof Function?o():o);let m=u!==void 0,x;const g=d.then(async p=>{if(x=["resolve",p],re.isValidElement(p))m=!1,this.create({id:u,type:"default",message:p});else if(n2(p)&&!p.ok){m=!1;const h=typeof c.error=="function"?await c.error(`HTTP error! status: ${p.status}`):c.error,j=typeof c.description=="function"?await c.description(`HTTP error! status: ${p.status}`):c.description,A=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:j,...A})}else if(p instanceof Error){m=!1;const h=typeof c.error=="function"?await c.error(p):c.error,j=typeof c.description=="function"?await c.description(p):c.description,A=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:j,...A})}else if(c.success!==void 0){m=!1;const h=typeof c.success=="function"?await c.success(p):c.success,j=typeof c.description=="function"?await c.description(p):c.description,A=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"success",description:j,...A})}}).catch(async p=>{if(x=["reject",p],c.error!==void 0){m=!1;const b=typeof c.error=="function"?await c.error(p):c.error,h=typeof c.description=="function"?await c.description(p):c.description,_=typeof b=="object"&&!re.isValidElement(b)?b:{message:b};this.create({id:u,type:"error",description:h,..._})}}).finally(()=>{m&&(this.dismiss(u),u=void 0),c.finally==null||c.finally.call(c)}),v=()=>new Promise((p,b)=>g.then(()=>x[0]==="reject"?b(x[1]):p(x[1])).catch(b));return typeof u!="string"&&typeof u!="number"?{unwrap:v}:Object.assign(u,{unwrap:v})},this.custom=(o,c)=>{const u=c?.id||Uu++;return this.create({jsx:o(u),id:u,...c}),u},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Xt=new t2,a2=(l,o)=>{const c=o?.id||Uu++;return Xt.addToast({title:l,...o,id:c}),c},n2=l=>l&&typeof l=="object"&&"ok"in l&&typeof l.ok=="boolean"&&"status"in l&&typeof l.status=="number",s2=a2,l2=()=>Xt.toasts,r2=()=>Xt.getActiveToasts(),jt=Object.assign(s2,{success:Xt.success,info:Xt.info,warning:Xt.warning,error:Xt.error,custom:Xt.custom,message:Xt.message,promise:Xt.promise,dismiss:Xt.dismiss,loading:Xt.loading},{getHistory:l2,getToasts:r2});X1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Lo(l){return l.label!==void 0}const o2=3,i2="24px",c2="16px",Cp=4e3,u2=356,d2=14,f2=45,m2=200;function Ta(...l){return l.filter(Boolean).join(" ")}function h2(l){const[o,c]=l.split("-"),u=[];return o&&u.push(o),c&&u.push(c),u}const p2=l=>{var o,c,u,d,m,x,g,v,p;const{invert:b,toast:h,unstyled:j,interacting:_,setHeights:A,visibleToasts:z,heights:H,index:k,toasts:Q,expanded:q,removeToast:W,defaultRichColors:Z,closeButton:ee,style:E,cancelButtonStyle:L,actionButtonStyle:Y,className:le="",descriptionClassName:G="",duration:ne,position:M,gap:se,expandByDefault:ie,classNames:T,icons:V,closeButtonAriaLabel:B="Close toast"}=l,[ue,xe]=re.useState(null),[S,K]=re.useState(null),[X,ae]=re.useState(!1),[oe,ge]=re.useState(!1),[de,Ne]=re.useState(!1),[Ce,We]=re.useState(!1),[it,qe]=re.useState(!1),[I,Ye]=re.useState(0),[J,ve]=re.useState(0),nt=re.useRef(h.duration||ne||Cp),Ct=re.useRef(null),Qt=re.useRef(null),hl=k===0,pl=k+1<=z,Tt=h.type,cn=h.dismissible!==!1,At=h.className||"",ni=h.descriptionClassName||"",Gn=re.useMemo(()=>H.findIndex(Se=>Se.toastId===h.id)||0,[H,h.id]),gr=re.useMemo(()=>{var Se;return(Se=h.closeButton)!=null?Se:ee},[h.closeButton,ee]),Vn=re.useMemo(()=>h.duration||ne||Cp,[h.duration,ne]),xl=re.useRef(0),Ba=re.useRef(0),vr=re.useRef(0),un=re.useRef(null),[$n,Mt]=M.split("-"),ma=re.useMemo(()=>H.reduce((Se,Ke,mt)=>mt>=Gn?Se:Se+Ke.height,0),[H,Gn]),_t=e2(),si=h.invert||b,gl=Tt==="loading";Ba.current=re.useMemo(()=>Gn*se+ma,[Gn,ma]),re.useEffect(()=>{nt.current=Vn},[Vn]),re.useEffect(()=>{ae(!0)},[]),re.useEffect(()=>{const Se=Qt.current;if(Se){const Ke=Se.getBoundingClientRect().height;return ve(Ke),A(mt=>[{toastId:h.id,height:Ke,position:h.position},...mt]),()=>A(mt=>mt.filter(Et=>Et.toastId!==h.id))}},[A,h.id]),re.useLayoutEffect(()=>{if(!X)return;const Se=Qt.current,Ke=Se.style.height;Se.style.height="auto";const mt=Se.getBoundingClientRect().height;Se.style.height=Ke,ve(mt),A(Et=>Et.find(Fe=>Fe.toastId===h.id)?Et.map(Fe=>Fe.toastId===h.id?{...Fe,height:mt}:Fe):[{toastId:h.id,height:mt,position:h.position},...Et])},[X,h.title,h.description,A,h.id,h.jsx,h.action,h.cancel]);const Na=re.useCallback(()=>{ge(!0),Ye(Ba.current),A(Se=>Se.filter(Ke=>Ke.toastId!==h.id)),setTimeout(()=>{W(h)},m2)},[h,W,A,Ba]);re.useEffect(()=>{if(h.promise&&Tt==="loading"||h.duration===1/0||h.type==="loading")return;let Se;return q||_||_t?(()=>{if(vr.current{h.onAutoClose==null||h.onAutoClose.call(h,h),Na()},nt.current)),()=>clearTimeout(Se)},[q,_,h,Tt,_t,Na]),re.useEffect(()=>{h.delete&&(Na(),h.onDismiss==null||h.onDismiss.call(h,h))},[Na,h.delete]);function ms(){var Se;if(V?.loading){var Ke;return re.createElement("div",{className:Ta(T?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Tt==="loading"},V.loading)}return re.createElement(K1,{className:Ta(T?.loader,h==null||(Se=h.classNames)==null?void 0:Se.loader),visible:Tt==="loading"})}const hs=h.icon||V?.[Tt]||Q1(Tt);var Xn,Sa;return re.createElement("li",{tabIndex:0,ref:Qt,className:Ta(le,At,T?.toast,h==null||(o=h.classNames)==null?void 0:o.toast,T?.default,T?.[Tt],h==null||(c=h.classNames)==null?void 0:c[Tt]),"data-sonner-toast":"","data-rich-colors":(Xn=h.richColors)!=null?Xn:Z,"data-styled":!(h.jsx||h.unstyled||j),"data-mounted":X,"data-promise":!!h.promise,"data-swiped":it,"data-removed":oe,"data-visible":pl,"data-y-position":$n,"data-x-position":Mt,"data-index":k,"data-front":hl,"data-swiping":de,"data-dismissible":cn,"data-type":Tt,"data-invert":si,"data-swipe-out":Ce,"data-swipe-direction":S,"data-expanded":!!(q||ie&&X),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":Q.length-k,"--offset":`${oe?I:Ba.current}px`,"--initial-height":ie?"auto":`${J}px`,...E,...h.style},onDragEnd:()=>{Ne(!1),xe(null),un.current=null},onPointerDown:Se=>{Se.button!==2&&(gl||!cn||(Ct.current=new Date,Ye(Ba.current),Se.target.setPointerCapture(Se.pointerId),Se.target.tagName!=="BUTTON"&&(Ne(!0),un.current={x:Se.clientX,y:Se.clientY})))},onPointerUp:()=>{var Se,Ke,mt;if(Ce||!cn)return;un.current=null;const Et=Number(((Se=Qt.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),dn=Number(((Ke=Qt.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Fe=new Date().getTime()-((mt=Ct.current)==null?void 0:mt.getTime()),Rt=ue==="x"?Et:dn,Qn=Math.abs(Rt)/Fe;if(Math.abs(Rt)>=f2||Qn>.11){Ye(Ba.current),h.onDismiss==null||h.onDismiss.call(h,h),K(ue==="x"?Et>0?"right":"left":dn>0?"down":"up"),Na(),We(!0);return}else{var Dt,Lt;(Dt=Qt.current)==null||Dt.style.setProperty("--swipe-amount-x","0px"),(Lt=Qt.current)==null||Lt.style.setProperty("--swipe-amount-y","0px")}qe(!1),Ne(!1),xe(null)},onPointerMove:Se=>{var Ke,mt,Et;if(!un.current||!cn||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const Fe=Se.clientY-un.current.y,Rt=Se.clientX-un.current.x;var Qn;const Dt=(Qn=l.swipeDirections)!=null?Qn:h2(M);!ue&&(Math.abs(Rt)>1||Math.abs(Fe)>1)&&xe(Math.abs(Rt)>Math.abs(Fe)?"x":"y");let Lt={x:0,y:0};const ps=ha=>1/(1.5+Math.abs(ha)/20);if(ue==="y"){if(Dt.includes("top")||Dt.includes("bottom"))if(Dt.includes("top")&&Fe<0||Dt.includes("bottom")&&Fe>0)Lt.y=Fe;else{const ha=Fe*ps(Fe);Lt.y=Math.abs(ha)0)Lt.x=Rt;else{const ha=Rt*ps(Rt);Lt.x=Math.abs(ha)0||Math.abs(Lt.y)>0)&&qe(!0),(mt=Qt.current)==null||mt.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(Et=Qt.current)==null||Et.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},gr&&!h.jsx&&Tt!=="loading"?re.createElement("button",{"aria-label":B,"data-disabled":gl,"data-close-button":!0,onClick:gl||!cn?()=>{}:()=>{Na(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Ta(T?.closeButton,h==null||(u=h.classNames)==null?void 0:u.closeButton)},(Sa=V?.close)!=null?Sa:I1):null,(Tt||h.icon||h.promise)&&h.icon!==null&&(V?.[Tt]!==null||h.icon)?re.createElement("div",{"data-icon":"",className:Ta(T?.icon,h==null||(d=h.classNames)==null?void 0:d.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ms():null,h.type!=="loading"?hs:null):null,re.createElement("div",{"data-content":"",className:Ta(T?.content,h==null||(m=h.classNames)==null?void 0:m.content)},re.createElement("div",{"data-title":"",className:Ta(T?.title,h==null||(x=h.classNames)==null?void 0:x.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?re.createElement("div",{"data-description":"",className:Ta(G,ni,T?.description,h==null||(g=h.classNames)==null?void 0:g.description)},typeof h.description=="function"?h.description():h.description):null),re.isValidElement(h.cancel)?h.cancel:h.cancel&&Lo(h.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||L,onClick:Se=>{Lo(h.cancel)&&cn&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Se),Na())},className:Ta(T?.cancelButton,h==null||(v=h.classNames)==null?void 0:v.cancelButton)},h.cancel.label):null,re.isValidElement(h.action)?h.action:h.action&&Lo(h.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||Y,onClick:Se=>{Lo(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Se),!Se.defaultPrevented&&Na())},className:Ta(T?.actionButton,h==null||(p=h.classNames)==null?void 0:p.actionButton)},h.action.label):null)};function Tp(){if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?window.getComputedStyle(document.documentElement).direction:l}function x2(l,o){const c={};return[l,o].forEach((u,d)=>{const m=d===1,x=m?"--mobile-offset":"--offset",g=m?c2:i2;function v(p){["top","right","bottom","left"].forEach(b=>{c[`${x}-${b}`]=typeof p=="number"?`${p}px`:p})}typeof u=="number"||typeof u=="string"?v(u):typeof u=="object"?["top","right","bottom","left"].forEach(p=>{u[p]===void 0?c[`${x}-${p}`]=g:c[`${x}-${p}`]=typeof u[p]=="number"?`${u[p]}px`:u[p]}):v(g)}),c}const g2=re.forwardRef(function(o,c){const{id:u,invert:d,position:m="bottom-right",hotkey:x=["altKey","KeyT"],expand:g,closeButton:v,className:p,offset:b,mobileOffset:h,theme:j="light",richColors:_,duration:A,style:z,visibleToasts:H=o2,toastOptions:k,dir:Q=Tp(),gap:q=d2,icons:W,containerAriaLabel:Z="Notifications"}=o,[ee,E]=re.useState([]),L=re.useMemo(()=>u?ee.filter(X=>X.toasterId===u):ee.filter(X=>!X.toasterId),[ee,u]),Y=re.useMemo(()=>Array.from(new Set([m].concat(L.filter(X=>X.position).map(X=>X.position)))),[L,m]),[le,G]=re.useState([]),[ne,M]=re.useState(!1),[se,ie]=re.useState(!1),[T,V]=re.useState(j!=="system"?j:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=re.useRef(null),ue=x.join("+").replace(/Key/g,"").replace(/Digit/g,""),xe=re.useRef(null),S=re.useRef(!1),K=re.useCallback(X=>{E(ae=>{var oe;return(oe=ae.find(ge=>ge.id===X.id))!=null&&oe.delete||Xt.dismiss(X.id),ae.filter(({id:ge})=>ge!==X.id)})},[]);return re.useEffect(()=>Xt.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{E(ae=>ae.map(oe=>oe.id===X.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{Zp.flushSync(()=>{E(ae=>{const oe=ae.findIndex(ge=>ge.id===X.id);return oe!==-1?[...ae.slice(0,oe),{...ae[oe],...X},...ae.slice(oe+1)]:[X,...ae]})})})}),[ee]),re.useEffect(()=>{if(j!=="system"){V(j);return}if(j==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:ae})=>{V(ae?"dark":"light")})}catch{X.addListener(({matches:oe})=>{try{V(oe?"dark":"light")}catch(ge){console.error(ge)}})}},[j]),re.useEffect(()=>{ee.length<=1&&M(!1)},[ee]),re.useEffect(()=>{const X=ae=>{var oe;if(x.every(Ne=>ae[Ne]||ae.code===Ne)){var de;M(!0),(de=B.current)==null||de.focus()}ae.code==="Escape"&&(document.activeElement===B.current||(oe=B.current)!=null&&oe.contains(document.activeElement))&&M(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[x]),re.useEffect(()=>{if(B.current)return()=>{xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null,S.current=!1)}},[B.current]),re.createElement("section",{ref:c,"aria-label":`${Z} ${ue}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Y.map((X,ae)=>{var oe;const[ge,de]=X.split("-");return L.length?re.createElement("ol",{key:X,dir:Q==="auto"?Tp():Q,tabIndex:-1,ref:B,className:p,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":ge,"data-x-position":de,style:{"--front-toast-height":`${((oe=le[0])==null?void 0:oe.height)||0}px`,"--width":`${u2}px`,"--gap":`${q}px`,...z,...x2(b,h)},onBlur:Ne=>{S.current&&!Ne.currentTarget.contains(Ne.relatedTarget)&&(S.current=!1,xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null))},onFocus:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||S.current||(S.current=!0,xe.current=Ne.relatedTarget)},onMouseEnter:()=>M(!0),onMouseMove:()=>M(!0),onMouseLeave:()=>{se||M(!1)},onDragEnd:()=>M(!1),onPointerDown:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},L.filter(Ne=>!Ne.position&&ae===0||Ne.position===X).map((Ne,Ce)=>{var We,it;return re.createElement(p2,{key:Ne.id,icons:W,index:Ce,toast:Ne,defaultRichColors:_,duration:(We=k?.duration)!=null?We:A,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:d,visibleToasts:H,closeButton:(it=k?.closeButton)!=null?it:v,interacting:se,position:X,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:K,toasts:L.filter(qe=>qe.position==Ne.position),heights:le.filter(qe=>qe.position==Ne.position),setHeights:G,expandByDefault:g,gap:q,expanded:ne,swipeDirections:o.swipeDirections})})):null}))});class at extends Error{constructor(){super("Engine Offline"),this.name="EngineOfflineError"}}const Z0=w.createContext(null);function St(){const l=w.useContext(Z0);if(!l)throw new Error("useProxyContext must be used within ProxyProvider");return l}function v2({children:l}){const[o,c]=w.useState(null),u=w.useRef(null),[d,m]=w.useState(null),[x,g]=w.useState([]),[v,p]=w.useState(null),[b,h]=w.useState(!1),[j,_]=w.useState(1200),[A,z]=w.useState(!1),[H,k]=w.useState(!1),Q=typeof window.pp_status=="function",q=w.useCallback((E,L="success")=>{L==="success"?jt.success(E):jt.error(E)},[]),W=w.useCallback(async()=>{try{let E=!1;if(window.pp_status){const L=await window.pp_status();c(L),u.current=L,E=L.running}else try{const L=await fetch("/healthz");if(L.ok){const le={running:!0,port:(await L.json().catch(()=>({}))).port||0,base_url:location.origin,last_error:""};c(le),u.current=le,E=!0}else{const Y={running:!1,port:0,base_url:location.origin,last_error:L.statusText};c(Y),u.current=Y}}catch(L){const Y={running:!1,port:0,base_url:location.origin,last_error:String(L)};c(Y),u.current=Y,E=!1}if(E){if(z(!0),k(!1),_(1200),d)try{const Y=await fetch("/v0/management/auth-files",{headers:{"X-Management-Key":d}});if(Y.ok){const le=await Y.json();Array.isArray(le)&&g(le)}}catch(L){console.error("Auth files error:",L)}}else A&&!H&&Q&&window.pp_start&&(console.log("Unexpected stop detected, attempting auto-reconnect..."),window.pp_start().catch(L=>console.error("Auto-reconnect failed:",L))),g([]),_(L=>Math.min(L*1.5,1e4))}catch(E){console.error("Status error:",E),_(L=>Math.min(L*1.5,1e4))}},[d]),Z=w.useCallback(async(E,L={})=>{if(!u.current?.running)throw new at;if(!d)throw new Error("Missing management key");h(!0);try{const le=Object.assign({},L.headers||{},{"X-Management-Key":d}),G=await fetch(E,{...L,headers:le}),M=(G.headers.get("content-type")||"").toLowerCase().includes("application/json")?await G.json():await G.text();if(!G.ok){const se=u.current;if(G.status===404&&(!se||!se.running))throw new at;const ie=typeof M=="string"?M:M?.error?M.error:JSON.stringify(M);throw new Error(`${G.status} ${G.statusText}: ${ie}`)}return M}catch(le){throw le instanceof TypeError?new at:le}finally{h(!1)}},[d]),ee=w.useCallback(async(E,L,Y)=>{if(E){L==="stop"&&k(!0),(L==="start"||L==="restart")&&k(!1),p(L);try{await E(),q(Y,"success"),await W()}catch(le){q(le instanceof Error?le.message:String(le),"error")}finally{p(null)}}},[q,W]);return w.useEffect(()=>{W();let E;const L=()=>{E=setTimeout(async()=>{await W(),L()},j)};return L(),(async()=>{try{if(window.pp_get_management_key){const Y=await window.pp_get_management_key();m(Y)}else if(!Q){const Y=document.querySelector('meta[name="pp-mgmt-key"]');m(Y?Y.getAttribute("content"):null)}}catch(Y){console.error("Management key error:",Y)}})(),()=>clearTimeout(E)},[W,Q,j]),s.jsx(Z0.Provider,{value:{status:o,isDesktop:Q,mgmtKey:d,authFiles:x,loading:v,isMgmtLoading:b,setLoading:p,refreshStatus:W,showToast:q,mgmtFetch:Z,handleAction:ee,pp_get_usage:window.pp_get_usage,pp_detect_agents:window.pp_detect_agents,pp_configure_agent:window.pp_configure_agent,pp_unconfigure_agent:window.pp_unconfigure_agent,pp_check_updates:window.pp_check_updates,pp_download_update:window.pp_download_update},children:l})}const y2=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b2=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,c,u)=>u?u.toUpperCase():c.toLowerCase()),Ap=l=>{const o=b2(l);return o.charAt(0).toUpperCase()+o.slice(1)},K0=(...l)=>l.filter((o,c,u)=>!!o&&o.trim()!==""&&u.indexOf(o)===c).join(" ").trim(),w2=l=>{for(const o in l)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var j2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const N2=w.forwardRef(({color:l="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:d="",children:m,iconNode:x,...g},v)=>w.createElement("svg",{ref:v,...j2,width:o,height:o,stroke:l,strokeWidth:u?Number(c)*24/Number(o):c,className:K0("lucide",d),...!m&&!w2(g)&&{"aria-hidden":"true"},...g},[...x.map(([p,b])=>w.createElement(p,b)),...Array.isArray(m)?m:[m]]));const ce=(l,o)=>{const c=w.forwardRef(({className:u,...d},m)=>w.createElement(N2,{ref:m,iconNode:o,className:K0(`lucide-${y2(Ap(l))}`,`lucide-${l}`,u),...d}));return c.displayName=Ap(l),c};const S2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],xr=ce("activity",S2);const _2=[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]],Mp=ce("anchor",_2);const E2=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Hu=ce("brain",E2);const k2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Bu=ce("chart-column",k2);const C2=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],T2=ce("chart-pie",C2);const A2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rl=ce("check",A2);const M2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Yn=ce("chevron-down",M2);const O2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],z2=ce("chevron-left",O2);const R2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xo=ce("chevron-right",R2);const D2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],L2=ce("chevron-up",D2);const U2=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],H2=ce("chevrons-left",U2);const B2=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],q2=ce("chevrons-right",B2);const Y2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Qo=ce("circle-alert",Y2);const G2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],J0=ce("circle-check",G2);const V2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$2=ce("circle-x",V2);const X2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Zo=ce("circle",X2);const Q2=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],Z2=ce("clipboard",Q2);const K2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],F0=ce("clock",K2);const J2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Op=ce("code-xml",J2);const F2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ol=ce("copy",F2);const W2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ur=ce("database",W2);const P2=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],I2=ce("dollar-sign",P2);const ew=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],fs=ce("download",ew);const tw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],W0=ce("external-link",tw);const aw=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],nw=ce("file-code",aw);const sw=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],P0=ce("file-text",sw);const lw=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],qu=ce("folder-open",lw);const rw=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],ow=ce("funnel",rw);const iw=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],cw=ce("gauge",iw);const uw=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],dw=ce("git-branch",uw);const fw=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],mw=ce("hard-drive",fw);const hw=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],_u=ce("hash",hw);const pw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],xw=ce("history",pw);const gw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],vw=ce("info",gw);const yw=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],bw=ce("key",yw);const ww=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nt=ce("loader-circle",ww);const jw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],I0=ce("lock-open",jw);const Nw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],ex=ce("lock",Nw);const Sw=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],_w=ce("monitor",Sw);const Ew=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],kw=ce("moon",Ew);const Cw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Tw=ce("pencil",Cw);const Aw=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Mw=ce("pin",Aw);const Ow=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],tx=ce("play",Ow);const zw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Rw=ce("plus",zw);const Dw=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],Eu=ce("radar",Dw);const Lw=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],ax=ce("radio",Lw);const Uw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],aa=ce("refresh-cw",Uw);const Hw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Bw=ce("rotate-ccw",Hw);const qw=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Yw=ce("rotate-cw",qw);const Gw=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],nl=ce("save",Gw);const Vw=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],$w=ce("scissors",Vw);const Xw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Qw=ce("scroll-text",Xw);const Zw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Kw=ce("search",Zw);const Jw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Bo=ce("settings",Jw);const Fw=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ww=ce("settings-2",Fw);const Pw=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Iw=ce("shield",Pw);const ej=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],nx=ce("sparkles",ej);const tj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],aj=ce("square",tj);const nj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],sj=ce("sun",nj);const lj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Yu=ce("terminal",lj);const rj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],il=ce("trash-2",rj);const oj=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],ij=ce("trending-down",oj);const cj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],zp=ce("trending-up",cj);const uj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ld=ce("triangle-alert",uj);const dj=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],fj=ce("undo-2",dj);const mj=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],hj=ce("upload",mj);const pj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],ku=ce("users",pj);const xj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],sx=ce("wrench",xj);const gj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],rd=ce("x",gj);const vj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Un=ce("zap",vj);function yj(l){const o=Math.floor(l/3600),c=Math.floor(l%3600/60),u=l%60;return o>0?`${o}h ${c}m`:c>0?`${c}m ${u}s`:`${u}s`}function bj(){const{status:l,loading:o,handleAction:c,showToast:u,isDesktop:d}=St(),[m,x]=w.useState(0),[g,v]=w.useState(!1),p=w.useRef(null),b=l?.running??!1;w.useEffect(()=>{if(b){p.current===null&&(p.current=Date.now());const j=setInterval(()=>{p.current&&x(Math.floor((Date.now()-p.current)/1e3))},1e3);return()=>clearInterval(j)}p.current=null,x(0)},[b]);const h=async()=>{if(l?.base_url)try{await navigator.clipboard.writeText(l.base_url),v(!0),u("URL copied to clipboard","success"),setTimeout(()=>v(!1),2e3)}catch{u("Failed to copy URL","error")}};return s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsx(ax,{className:"h-4 w-4 text-[var(--accent-primary)]"}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"Engine Control"}),s.jsx("div",{className:"flex-1"}),s.jsx("div",{className:`h-2 w-2 rounded-full ${b?"bg-[var(--status-online)] animate-pulse":"bg-[var(--status-offline)]"}`})]}),s.jsxs("div",{className:"p-6 flex flex-col items-center",children:[s.jsxs("div",{className:"relative w-48 h-48 mb-6",children:[b&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite"}}),s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite 0.5s"}}),s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite 1s"}})]}),s.jsx("div",{className:`absolute inset-4 rounded-full border-2 transition-colors duration-300 ${b?"border-[var(--status-online)]/30":"border-[var(--border-subtle)]"}`}),s.jsx("div",{className:`absolute inset-8 rounded-full border transition-colors duration-300 ${b?"border-[var(--status-online)]/20":"border-[var(--border-subtle)]/50"}`}),s.jsx("div",{className:`absolute inset-12 rounded-full flex flex-col items-center justify-center transition-all duration-500 ${b?"bg-gradient-to-br from-[var(--accent-primary)] to-[var(--accent-secondary)] shadow-[0_0_30px_var(--status-online)]":"bg-gradient-to-br from-[var(--bg-elevated)] to-[var(--bg-active)] border border-[var(--border-default)]"}`,children:s.jsx("span",{className:`font-mono text-xs font-bold tracking-wider ${b?"text-white":"text-[var(--text-muted)]"}`,children:b?"ONLINE":"OFFLINE"})}),b&&s.jsx("div",{className:"absolute inset-0 rounded-full overflow-hidden",style:{animation:"radar-sweep 3s linear infinite"},children:s.jsx("div",{className:"absolute top-1/2 left-1/2 w-1/2 h-0.5 origin-left",style:{background:"linear-gradient(90deg, var(--status-online) 0%, transparent 100%)"}})})]}),s.jsxs("div",{className:"w-full grid grid-cols-2 gap-3 mb-6",children:[s.jsxs("div",{className:"bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Port"}),s.jsx("div",{className:`font-mono text-lg font-bold ${b?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"}`,children:b&&l?.port||"---"})]}),s.jsxs("div",{className:"bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Uptime"}),s.jsx("div",{className:`font-mono text-lg font-bold ${b?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"}`,children:b?yj(m):"--:--"})]})]}),l?.last_error&&s.jsx("div",{className:"w-full mb-6 rounded-md border-2 border-[var(--status-warning)] bg-[var(--status-warning)]/10 p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-1.5 rounded bg-[var(--status-warning)]/20",children:s.jsx(ld,{className:"h-4 w-4 text-[var(--status-warning)]"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--status-warning)] mb-1",children:"Caution"}),s.jsx("div",{className:"font-mono text-sm text-[var(--status-warning)] break-all",children:l.last_error})]})]})}),s.jsxs("div",{className:"w-full grid grid-cols-3 gap-3 mb-6",children:[s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:b||o==="start",onClick:()=>c(window.pp_start,"start","Proxy started"),className:` +`+n.stack}}var Zt=Object.prototype.hasOwnProperty,hl=l.unstable_scheduleCallback,pl=l.unstable_cancelCallback,Tt=l.unstable_shouldYield,dn=l.unstable_requestPaint,At=l.unstable_now,ri=l.unstable_getCurrentPriorityLevel,Gn=l.unstable_ImmediatePriority,yr=l.unstable_UserBlockingPriority,Vn=l.unstable_NormalPriority,xl=l.unstable_LowPriority,qa=l.unstable_IdlePriority,wr=l.log,fn=l.unstable_setDisableYieldValue,$n=null,Mt=null;function ma(e){if(typeof wr=="function"&&fn(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode($n,e)}catch{}}var _t=Math.clz32?Math.clz32:Na,oi=Math.log,gl=Math.LN2;function Na(e){return e>>>=0,e===0?32:31-(oi(e)/gl|0)|0}var ms=256,hs=262144,Xn=4194304;function Sa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Se(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var b=n&134217727;return b!==0?(n=b&~i,n!==0?r=Sa(n):(f&=b,f!==0?r=Sa(f):a||(a=b&~e,a!==0&&(r=Sa(a))))):(b=n&~i,b!==0?r=Sa(b):f!==0?r=Sa(f):a||(a=n&~e,a!==0&&(r=Sa(a)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:r}function Ke(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ht(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Et(){var e=Xn;return Xn<<=1,(Xn&62914560)===0&&(Xn=4194304),e}function mn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rt(e,t,a,n,r,i){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var b=e.entanglements,N=e.expirationTimes,D=e.hiddenUpdates;for(a=f&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Nx=/[\n"\\]/g;function sa(e){return e.replace(Nx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function fi(e,t,a,n,r,i,f,b){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+na(t)):e.value!==""+na(t)&&(e.value=""+na(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?mi(e,f,na(t)):a!=null?mi(e,f,na(a)):n!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+na(b):e.removeAttribute("name")}function yd(e,t,a,n,r,i,f,b){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){di(e);return}a=a!=null?""+na(a):"",t=t!=null?""+na(t):a,b||t===e.value||(e.value=t),e.defaultValue=t}n=n??r,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=b?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f),di(e)}function mi(e,t,a){t==="number"&&Sr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ws(e,t,a,n){if(e=e.options,t){t={};for(var r=0;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vi=!1;if(Va)try{var wl={};Object.defineProperty(wl,"passive",{get:function(){vi=!0}}),window.addEventListener("test",wl,wl),window.removeEventListener("test",wl,wl)}catch{vi=!1}var pn=null,bi=null,Er=null;function kd(){if(Er)return Er;var e,t=bi,a=t.length,n,r="value"in pn?pn.value:pn.textContent,i=r.length;for(e=0;e=Sl),zd=" ",Rd=!1;function Dd(e,t){switch(e){case"keyup":return Wx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ld(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _s=!1;function Ix(e,t){switch(e){case"compositionend":return Ld(t);case"keypress":return t.which!==32?null:(Rd=!0,zd);case"textInput":return e=t.data,e===zd&&Rd?null:e;default:return null}}function eg(e,t){if(_s)return e==="compositionend"||!Si&&Dd(e,t)?(e=kd(),Er=bi=pn=null,_s=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=$d(a)}}function Qd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Sr(e.document)}return t}function ki(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var ig=Va&&"documentMode"in document&&11>=document.documentMode,Es=null,Ci=null,Cl=null,Ti=!1;function Kd(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ti||Es==null||Es!==Sr(n)||(n=Es,"selectionStart"in n&&ki(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Cl&&kl(Cl,n)||(Cl=n,n=yo(Ci,"onSelect"),0>=f,r-=f,_a=1<<32-_t(t)+r|a<ke?(ze=pe,pe=null):ze=pe.sibling;var Le=H(z,pe,R[ke],P);if(Le===null){pe===null&&(pe=ze);break}e&&pe&&Le.alternate===null&&t(z,pe),C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le,pe=ze}if(ke===R.length)return a(z,pe),Re&&Xa(z,ke),ye;if(pe===null){for(;keke?(ze=pe,pe=null):ze=pe.sibling;var Un=H(z,pe,Le.value,P);if(Un===null){pe===null&&(pe=ze);break}e&&pe&&Un.alternate===null&&t(z,pe),C=i(Un,C,ke),De===null?ye=Un:De.sibling=Un,De=Un,pe=ze}if(Le.done)return a(z,pe),Re&&Xa(z,ke),ye;if(pe===null){for(;!Le.done;ke++,Le=R.next())Le=te(z,Le.value,P),Le!==null&&(C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le);return Re&&Xa(z,ke),ye}for(pe=n(pe);!Le.done;ke++,Le=R.next())Le=$(pe,z,ke,Le.value,P),Le!==null&&(e&&Le.alternate!==null&&pe.delete(Le.key===null?ke:Le.key),C=i(Le,C,ke),De===null?ye=Le:De.sibling=Le,De=Le);return e&&pe.forEach(function(Cv){return t(z,Cv)}),Re&&Xa(z,ke),ye}function $e(z,C,R,P){if(typeof R=="object"&&R!==null&&R.type===A&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case S:e:{for(var ye=R.key;C!==null;){if(C.key===ye){if(ye=R.type,ye===A){if(C.tag===7){a(z,C.sibling),P=r(C,R.props.children),P.return=z,z=P;break e}}else if(C.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===L&&ns(ye)===C.type){a(z,C.sibling),P=r(C,R.props),Rl(P,R),P.return=z,z=P;break e}a(z,C);break}else t(z,C);C=C.sibling}R.type===A?(P=Pn(R.props.children,z.mode,P,R.key),P.return=z,z=P):(P=Lr(R.type,R.key,R.props,null,z.mode,P),Rl(P,R),P.return=z,z=P)}return f(z);case M:e:{for(ye=R.key;C!==null;){if(C.key===ye)if(C.tag===4&&C.stateNode.containerInfo===R.containerInfo&&C.stateNode.implementation===R.implementation){a(z,C.sibling),P=r(C,R.children||[]),P.return=z,z=P;break e}else{a(z,C);break}else t(z,C);C=C.sibling}P=Li(R,z.mode,P),P.return=z,z=P}return f(z);case L:return R=ns(R),$e(z,C,R,P)}if(ie(R))return fe(z,C,R,P);if(ne(R)){if(ye=ne(R),typeof ye!="function")throw Error(u(150));return R=ye.call(R),je(z,C,R,P)}if(typeof R.then=="function")return $e(z,C,Vr(R),P);if(R.$$typeof===q)return $e(z,C,Br(z,R),P);$r(z,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,C!==null&&C.tag===6?(a(z,C.sibling),P=r(C,R),P.return=z,z=P):(a(z,C),P=Di(R,z.mode,P),P.return=z,z=P),f(z)):a(z,C)}return function(z,C,R,P){try{zl=0;var ye=$e(z,C,R,P);return Us=null,ye}catch(pe){if(pe===Ls||pe===Yr)throw pe;var De=Jt(29,pe,null,z.mode);return De.lanes=P,De.return=z,De}}}var ls=vf(!0),bf=vf(!1),yn=!1;function Ki(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ji(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function jn(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ue&2)!==0){var r=n.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),n.pending=t,t=Dr(e),tf(e,null,a),t}return Rr(e,n,t,a),Dr(e)}function Dl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Dt(e,a)}}function Fi(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var r=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?r=i=f:i=i.next=f,a=a.next}while(a!==null);i===null?r=i=t:i=i.next=t}else r=i=t;a={baseState:n.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Wi=!1;function Ll(){if(Wi){var e=Ds;if(e!==null)throw e}}function Ul(e,t,a,n){Wi=!1;var r=e.updateQueue;yn=!1;var i=r.firstBaseUpdate,f=r.lastBaseUpdate,b=r.shared.pending;if(b!==null){r.shared.pending=null;var N=b,D=N.next;N.next=null,f===null?i=D:f.next=D,f=N;var F=e.alternate;F!==null&&(F=F.updateQueue,b=F.lastBaseUpdate,b!==f&&(b===null?F.firstBaseUpdate=D:b.next=D,F.lastBaseUpdate=N))}if(i!==null){var te=r.baseState;f=0,F=D=N=null,b=i;do{var H=b.lane&-536870913,$=H!==b.lane;if($?(Oe&H)===H:(n&H)===H){H!==0&&H===Rs&&(Wi=!0),F!==null&&(F=F.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var fe=e,je=b;H=t;var $e=a;switch(je.tag){case 1:if(fe=je.payload,typeof fe=="function"){te=fe.call($e,te,H);break e}te=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=je.payload,H=typeof fe=="function"?fe.call($e,te,H):fe,H==null)break e;te=h({},te,H);break e;case 2:yn=!0}}H=b.callback,H!==null&&(e.flags|=64,$&&(e.flags|=8192),$=r.callbacks,$===null?r.callbacks=[H]:$.push(H))}else $={lane:H,tag:b.tag,payload:b.payload,callback:b.callback,next:null},F===null?(D=F=$,N=te):F=F.next=$,f|=H;if(b=b.next,b===null){if(b=r.shared.pending,b===null)break;$=b,b=$.next,$.next=null,r.lastBaseUpdate=$,r.shared.pending=null}}while(!0);F===null&&(N=te),r.baseState=N,r.firstBaseUpdate=D,r.lastBaseUpdate=F,i===null&&(r.shared.lanes=0),kn|=f,e.lanes=f,e.memoizedState=te}}function yf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function wf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var f=T.T,b={};T.T=b,xc(e,!1,t,a);try{var N=r(),D=T.S;if(D!==null&&D(b,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var F=gg(N,n);ql(e,t,F,ea(e))}else ql(e,t,n,ea(e))}catch(te){ql(e,t,{then:function(){},status:"rejected",reason:te},ea())}finally{V.p=i,f!==null&&b.types!==null&&(f.types=b.types),T.T=f}}function Ng(){}function hc(e,t,a,n){if(e.tag!==5)throw Error(u(476));var r=If(e).queue;Pf(e,r,t,B,a===null?Ng:function(){return em(e),a(n)})}function If(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:B},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function em(e){var t=If(e);t.next===null&&(t=e.alternate.memoizedState),ql(e,t.next.queue,{},ea())}function pc(){return wt(nr)}function tm(){return at().memoizedState}function am(){return at().memoizedState}function Sg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=ea();e=wn(a);var n=jn(t,e,a);n!==null&&(Vt(n,t,a),Dl(n,t,a)),t={cache:$i()},e.payload=t;return}t=t.return}}function _g(e,t,a){var n=ea();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},eo(e)?sm(t,a):(a=zi(e,t,a,n),a!==null&&(Vt(a,e,n),lm(a,t,n)))}function nm(e,t,a){var n=ea();ql(e,t,a,n)}function ql(e,t,a,n){var r={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(eo(e))sm(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var f=t.lastRenderedState,b=i(f,a);if(r.hasEagerState=!0,r.eagerState=b,Kt(b,f))return Rr(e,t,r,0),Xe===null&&zr(),!1}catch{}if(a=zi(e,t,r,n),a!==null)return Vt(a,e,n),lm(a,t,n),!0}return!1}function xc(e,t,a,n){if(n={lane:2,revertLane:Kc(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},eo(e)){if(t)throw Error(u(479))}else t=zi(e,a,n,2),t!==null&&Vt(t,e,2)}function eo(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function sm(e,t){Bs=Zr=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function lm(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,Dt(e,a)}}var Yl={readContext:wt,use:Fr,useCallback:Pe,useContext:Pe,useEffect:Pe,useImperativeHandle:Pe,useLayoutEffect:Pe,useInsertionEffect:Pe,useMemo:Pe,useReducer:Pe,useRef:Pe,useState:Pe,useDebugValue:Pe,useDeferredValue:Pe,useTransition:Pe,useSyncExternalStore:Pe,useId:Pe,useHostTransitionStatus:Pe,useFormState:Pe,useActionState:Pe,useOptimistic:Pe,useMemoCache:Pe,useCacheRefresh:Pe};Yl.useEffectEvent=Pe;var rm={readContext:wt,use:Fr,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:Vf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Pr(4194308,4,Zf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Pr(4194308,4,e,t)},useInsertionEffect:function(e,t){Pr(4,2,e,t)},useMemo:function(e,t){var a=Ot();t=t===void 0?null:t;var n=e();if(rs){ma(!0);try{e()}finally{ma(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=Ot();if(a!==void 0){var r=a(t);if(rs){ma(!0);try{a(t)}finally{ma(!1)}}}else r=t;return n.memoizedState=n.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},n.queue=e,e=e.dispatch=_g.bind(null,Ee,e),[n.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:function(e){e=cc(e);var t=e.queue,a=nm.bind(null,Ee,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:fc,useDeferredValue:function(e,t){var a=Ot();return mc(a,e,t)},useTransition:function(){var e=cc(!1);return e=Pf.bind(null,Ee,e.queue,!0,!1),Ot().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=Ee,r=Ot();if(Re){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Xe===null)throw Error(u(349));(Oe&127)!==0||kf(n,t,a)}r.memoizedState=a;var i={value:a,getSnapshot:t};return r.queue=i,Vf(Tf.bind(null,n,i,e),[e]),n.flags|=2048,Ys(9,{destroy:void 0},Cf.bind(null,n,i,a,t),null),a},useId:function(){var e=Ot(),t=Xe.identifierPrefix;if(Re){var a=Ea,n=_a;a=(n&~(1<<32-_t(n)-1)).toString(32)+a,t="_"+t+"R_"+a,a=Kr++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?f.createElement("select",{is:n.is}):f.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?f.createElement(r,{is:n.is}):f.createElement(r)}}i[bt]=t,i[Ut]=n;e:for(f=t.child;f!==null;){if(f.tag===5||f.tag===6)i.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}t.stateNode=i;e:switch(Nt(i,r,n),r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&Wa(t)}}return Ze(t),Ac(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Wa(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=ge.current,Os(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,r=yt,r!==null)switch(r.tag){case 27:case 5:n=r.memoizedProps}e[bt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||_h(e.nodeValue,a)),e||vn(t,!0)}else e=wo(e).createTextNode(n),e[bt]=t,t.stateNode=e}return Ze(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(n=Os(t),a!==null){if(e===null){if(!n)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[bt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Wt(t),t):(Wt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ze(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Os(t),n!==null&&n.dehydrated!==null){if(e===null){if(!r)throw Error(u(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(u(317));r[bt]=t}else In(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Wt(t),t):(Wt(t),null)}return Wt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=n!==null,e=e!==null&&e.memoizedState!==null,a&&(n=t.child,r=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(r=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==r&&(n.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),lo(t,t.updateQueue),Ze(t),null);case 4:return Ce(),e===null&&Pc(t.stateNode.containerInfo),Ze(t),null;case 10:return Za(t.type),Ze(t),null;case 19:if(K(tt),n=t.memoizedState,n===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=n.rendering,i===null)if(r)Vl(n,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Qr(e),i!==null){for(t.flags|=128,Vl(n,!1),e=i.updateQueue,t.updateQueue=e,lo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)af(a,e),a=a.sibling;return X(tt,tt.current&1|2),Re&&Xa(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&At()>uo&&(t.flags|=128,r=!0,Vl(n,!1),t.lanes=4194304)}else{if(!r)if(e=Qr(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,lo(t,e),Vl(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!Re)return Ze(t),null}else 2*At()-n.renderingStartTime>uo&&a!==536870912&&(t.flags|=128,r=!0,Vl(n,!1),t.lanes=4194304);n.isBackwards?(i.sibling=t.child,t.child=i):(e=n.last,e!==null?e.sibling=i:t.child=i,n.last=i)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=At(),e.sibling=null,a=tt.current,X(tt,r?a&1|2:a&1),Re&&Xa(t,n.treeForkCount),e):(Ze(t),null);case 22:case 23:return Wt(t),Ii(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),a=t.updateQueue,a!==null&&lo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&K(as),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Za(st),Ze(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Ag(e,t){switch(Hi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Za(st),Ce(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return it(t),null;case 31:if(t.memoizedState!==null){if(Wt(t),t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));In()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(tt),null;case 4:return Ce(),null;case 10:return Za(t.type),null;case 22:case 23:return Wt(t),Ii(),e!==null&&K(as),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Za(st),null;case 25:return null;default:return null}}function Am(e,t){switch(Hi(t),t.tag){case 3:Za(st),Ce();break;case 26:case 27:case 5:it(t);break;case 4:Ce();break;case 31:t.memoizedState!==null&&Wt(t);break;case 13:Wt(t);break;case 19:K(tt);break;case 10:Za(t.type);break;case 22:case 23:Wt(t),Ii(),e!==null&&K(as);break;case 24:Za(st)}}function $l(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var r=n.next;a=r;do{if((a.tag&e)===e){n=void 0;var i=a.create,f=a.inst;n=i(),f.destroy=n}a=a.next}while(a!==r)}}catch(b){Be(t,t.return,b)}}function _n(e,t,a){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){var f=n.inst,b=f.destroy;if(b!==void 0){f.destroy=void 0,r=t;var N=a,D=b;try{D()}catch(F){Be(r,N,F)}}}n=n.next}while(n!==i)}}catch(F){Be(t,t.return,F)}}function Mm(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{wf(t,a)}catch(n){Be(e,e.return,n)}}}function Om(e,t,a){a.props=os(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Be(e,t,n)}}function Xl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(r){Be(e,t,r)}}function ka(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(r){Be(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Be(e,t,r)}else a.current=null}function zm(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(r){Be(e,e.return,r)}}function Mc(e,t,a){try{var n=e.stateNode;Pg(n,e.type,a,t),n[Ut]=t}catch(r){Be(e,e.return,r)}}function Rm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&On(e.type)||e.tag===4}function Oc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rm(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&On(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function zc(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ga));else if(n!==4&&(n===27&&On(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(zc(e,t,a),e=e.sibling;e!==null;)zc(e,t,a),e=e.sibling}function ro(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&On(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ro(e,t,a),e=e.sibling;e!==null;)ro(e,t,a),e=e.sibling}function Dm(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Nt(t,n,a),t[bt]=e,t[Ut]=a}catch(i){Be(e,e.return,i)}}var Pa=!1,ot=!1,Rc=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Mg(e,t){if(e=e.containerInfo,tu=Co,e=Zd(e),ki(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var r=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var f=0,b=-1,N=-1,D=0,F=0,te=e,H=null;t:for(;;){for(var $;te!==a||r!==0&&te.nodeType!==3||(b=f+r),te!==i||n!==0&&te.nodeType!==3||(N=f+n),te.nodeType===3&&(f+=te.nodeValue.length),($=te.firstChild)!==null;)H=te,te=$;for(;;){if(te===e)break t;if(H===a&&++D===r&&(b=f),H===i&&++F===n&&(N=f),($=te.nextSibling)!==null)break;te=H,H=te.parentNode}te=$}a=b===-1||N===-1?null:{start:b,end:N}}else a=null}a=a||{start:0,end:0}}else a=null;for(au={focusedElem:e,selectionRange:a},Co=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),Nt(i,n,a),i[bt]=e,pt(i),n=i;break e;case"link":var f=Gh("link","href",r).get(n+(a.href||""));if(f){for(var b=0;b$e&&(f=$e,$e=je,je=f);var z=Xd(b,je),C=Xd(b,$e);if(z&&C&&($.rangeCount!==1||$.anchorNode!==z.node||$.anchorOffset!==z.offset||$.focusNode!==C.node||$.focusOffset!==C.offset)){var R=te.createRange();R.setStart(z.node,z.offset),$.removeAllRanges(),je>$e?($.addRange(R),$.extend(C.node,C.offset)):(R.setEnd(C.node,C.offset),$.addRange(R))}}}}for(te=[],$=b;$=$.parentNode;)$.nodeType===1&&te.push({element:$,left:$.scrollLeft,top:$.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;ba?32:a,T.T=null,a=Yc,Yc=null;var i=Tn,f=nn;if(ct=0,Qs=Tn=null,nn=0,(Ue&6)!==0)throw Error(u(331));var b=Ue;if(Ue|=4,Zm(i.current),$m(i,i.current,f,a),Ue=b,Wl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot($n,i)}catch{}return!0}finally{V.p=r,T.T=n,dh(e,t)}}function mh(e,t,a){t=ra(a,t),t=yc(e.stateNode,t,2),e=jn(e,t,2),e!==null&&(Fe(e,2),Ca(e))}function Be(e,t,a){if(e.tag===3)mh(e,e,a);else for(;t!==null;){if(t.tag===3){mh(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Cn===null||!Cn.has(n))){e=ra(a,e),a=hm(2),n=jn(t,a,2),n!==null&&(pm(a,n,t,e),Fe(n,2),Ca(n));break}}t=t.return}}function Xc(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new Rg;var r=new Set;n.set(t,r)}else r=n.get(t),r===void 0&&(r=new Set,n.set(t,r));r.has(a)||(Uc=!0,r.add(a),e=Bg.bind(null,e,t,a),t.then(e,e))}function Bg(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Oe&a)===a&&(Ie===4||Ie===3&&(Oe&62914560)===Oe&&300>At()-co?(Ue&2)===0&&Zs(e,0):Hc|=a,Xs===Oe&&(Xs=0)),Ca(e)}function hh(e,t){t===0&&(t=Et()),e=Wn(e,t),e!==null&&(Fe(e,t),Ca(e))}function qg(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),hh(e,a)}function Yg(e,t){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),hh(e,a)}function Gg(e,t){return hl(e,t)}var go=null,Js=null,Qc=!1,vo=!1,Zc=!1,Mn=0;function Ca(e){e!==Js&&e.next===null&&(Js===null?go=Js=e:Js=Js.next=e),vo=!0,Qc||(Qc=!0,$g())}function Wl(e,t){if(!Zc&&vo){Zc=!0;do for(var a=!1,n=go;n!==null;){if(e!==0){var r=n.pendingLanes;if(r===0)var i=0;else{var f=n.suspendedLanes,b=n.pingedLanes;i=(1<<31-_t(42|e)+1)-1,i&=r&~(f&~b),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,vh(n,i))}else i=Oe,i=Se(n,n===Xe?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||Ke(n,i)||(a=!0,vh(n,i));n=n.next}while(a);Zc=!1}}function Vg(){ph()}function ph(){vo=Qc=!1;var e=0;Mn!==0&&ev()&&(e=Mn);for(var t=At(),a=null,n=go;n!==null;){var r=n.next,i=xh(n,t);i===0?(n.next=null,a===null?go=r:a.next=r,r===null&&(Js=a)):(a=n,(e!==0||(i&3)!==0)&&(vo=!0)),n=r}ct!==0&&ct!==5||Wl(e),Mn!==0&&(Mn=0)}function xh(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0b)break;var F=N.transferSize,te=N.initiatorType;F&&Eh(te)&&(N=N.responseEnd,f+=F*(N"u"?null:document;function Hh(e,t,a){var n=Fs;if(n&&typeof t=="string"&&t){var r=sa(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Uh.has(r)||(Uh.add(r),e={rel:e,crossOrigin:a,href:t},n.querySelector(r)===null&&(t=n.createElement("link"),Nt(t,"link",e),pt(t),n.head.appendChild(t)))}}function cv(e){sn.D(e),Hh("dns-prefetch",e,null)}function uv(e,t){sn.C(e,t),Hh("preconnect",e,t)}function dv(e,t,a){sn.L(e,t,a);var n=Fs;if(n&&e&&t){var r='link[rel="preload"][as="'+sa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+sa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+sa(a.imageSizes)+'"]')):r+='[href="'+sa(e)+'"]';var i=r;switch(t){case"style":i=Ws(e);break;case"script":i=Ps(e)}fa.has(i)||(e=h({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),fa.set(i,e),n.querySelector(r)!==null||t==="style"&&n.querySelector(tr(i))||t==="script"&&n.querySelector(ar(i))||(t=n.createElement("link"),Nt(t,"link",e),pt(t),n.head.appendChild(t)))}}function fv(e,t){sn.m(e,t);var a=Fs;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+sa(n)+'"][href="'+sa(e)+'"]',i=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ps(e)}if(!fa.has(i)&&(e=h({rel:"modulepreload",href:e},t),fa.set(i,e),a.querySelector(r)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ar(i)))return}n=a.createElement("link"),Nt(n,"link",e),pt(n),a.head.appendChild(n)}}}function mv(e,t,a){sn.S(e,t,a);var n=Fs;if(n&&e){var r=bs(n).hoistableStyles,i=Ws(e);t=t||"default";var f=r.get(i);if(!f){var b={loading:0,preload:null};if(f=n.querySelector(tr(i)))b.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},a),(a=fa.get(i))&&cu(e,a);var N=f=n.createElement("link");pt(N),Nt(N,"link",e),N._p=new Promise(function(D,F){N.onload=D,N.onerror=F}),N.addEventListener("load",function(){b.loading|=1}),N.addEventListener("error",function(){b.loading|=2}),b.loading|=4,No(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:b},r.set(i,f)}}}function hv(e,t){sn.X(e,t);var a=Fs;if(a&&e){var n=bs(a).hoistableScripts,r=Ps(e),i=n.get(r);i||(i=a.querySelector(ar(r)),i||(e=h({src:e,async:!0},t),(t=fa.get(r))&&uu(e,t),i=a.createElement("script"),pt(i),Nt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function pv(e,t){sn.M(e,t);var a=Fs;if(a&&e){var n=bs(a).hoistableScripts,r=Ps(e),i=n.get(r);i||(i=a.querySelector(ar(r)),i||(e=h({src:e,async:!0,type:"module"},t),(t=fa.get(r))&&uu(e,t),i=a.createElement("script"),pt(i),Nt(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(r,i))}}function Bh(e,t,a,n){var r=(r=ge.current)?jo(r):null;if(!r)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ws(a.href),a=bs(r).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ws(a.href);var i=bs(r).hoistableStyles,f=i.get(e);if(f||(r=r.ownerDocument||r,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,f),(i=r.querySelector(tr(e)))&&!i._p&&(f.instance=i,f.state.loading=5),fa.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},fa.set(e,a),i||xv(r,e,a,f.state))),t&&n===null)throw Error(u(528,""));return f}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ps(a),a=bs(r).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ws(e){return'href="'+sa(e)+'"'}function tr(e){return'link[rel="stylesheet"]['+e+"]"}function qh(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function xv(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),Nt(t,"link",a),pt(t),e.head.appendChild(t))}function Ps(e){return'[src="'+sa(e)+'"]'}function ar(e){return"script[async]"+e}function Yh(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+sa(a.href)+'"]');if(n)return t.instance=n,pt(n),n;var r=h({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),pt(n),Nt(n,"style",r),No(n,a.precedence,e),t.instance=n;case"stylesheet":r=Ws(a.href);var i=e.querySelector(tr(r));if(i)return t.state.loading|=4,t.instance=i,pt(i),i;n=qh(a),(r=fa.get(r))&&cu(n,r),i=(e.ownerDocument||e).createElement("link"),pt(i);var f=i;return f._p=new Promise(function(b,N){f.onload=b,f.onerror=N}),Nt(i,"link",n),t.state.loading|=4,No(i,a.precedence,e),t.instance=i;case"script":return i=Ps(a.src),(r=e.querySelector(ar(i)))?(t.instance=r,pt(r),r):(n=a,(r=fa.get(i))&&(n=h({},a),uu(n,r)),e=e.ownerDocument||e,r=e.createElement("script"),pt(r),Nt(r,"link",n),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,No(n,a.precedence,e));return t.instance}function No(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=n.length?n[n.length-1]:null,i=r,f=0;f title"):null)}function gv(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function $h(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function vv(e,t,a,n){if(a.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Ws(n.href),i=t.querySelector(tr(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=_o.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,pt(i);return}i=t.ownerDocument||t,n=qh(n),(r=fa.get(r))&&cu(n,r),i=i.createElement("link"),pt(i);var f=i;f._p=new Promise(function(b,N){f.onload=b,f.onerror=N}),Nt(i,"link",n),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=_o.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var du=0;function bv(e,t){return e.stylesheets&&e.count===0&&ko(e,e.stylesheets),0du?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(r)}}:null}function _o(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ko(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Eo=null;function ko(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Eo=new Map,t.forEach(yv,e),Eo=null,_o.call(e))}function yv(e,t){if(!(t.state.loading&4)){var a=Eo.get(e);if(a)var n=a.get(null);else{a=new Map,Eo.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(o){console.error(o)}}return l(),yu.exports=Lv(),yu.exports}var Hv=Uv();function Oa(l,o,{checkForDefaultPrevented:c=!0}={}){return function(d){if(l?.(d),c===!1||!d.defaultPrevented)return o?.(d)}}function h0(l,o){if(typeof l=="function")return l(o);l!=null&&(l.current=o)}function Ku(...l){return o=>{let c=!1;const u=l.map(d=>{const m=h0(d,o);return!c&&typeof m=="function"&&(c=!0),m});if(c)return()=>{for(let d=0;d{const{scope:j,children:S,...M}=h,A=j?.[l]?.[v]||g,U=w.useMemo(()=>M,Object.values(M));return s.jsx(A.Provider,{value:U,children:S})};p.displayName=m+"Provider";function y(h,j){const S=j?.[l]?.[v]||g,M=w.useContext(S);if(M)return M;if(x!==void 0)return x;throw new Error(`\`${h}\` must be used within \`${m}\``)}return[p,y]}const d=()=>{const m=c.map(x=>w.createContext(x));return function(g){const v=g?.[l]||m;return w.useMemo(()=>({[`__scope${l}`]:{...g,[l]:v}}),[g,v])}};return d.scopeName=l,[u,Bv(d,...o)]}function Bv(...l){const o=l[0];if(l.length===1)return o;const c=()=>{const u=l.map(d=>({useScope:d(),scopeName:d.scopeName}));return function(m){const x=u.reduce((g,{useScope:v,scopeName:p})=>{const h=v(m)[`__scope${p}`];return{...g,...h}},{});return w.useMemo(()=>({[`__scope${o.scopeName}`]:x}),[x])}};return c.scopeName=o.scopeName,c}var Fu=W0();const P0=F0(Fu);function qv(l){const o=Yv(l),c=w.forwardRef((u,d)=>{const{children:m,...x}=u,g=w.Children.toArray(m),v=g.find(Vv);if(v){const p=v.props.children,y=g.map(h=>h===v?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:h);return s.jsx(o,{...x,ref:d,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return s.jsx(o,{...x,ref:d,children:m})});return c.displayName=`${l}.Slot`,c}function Yv(l){const o=w.forwardRef((c,u)=>{const{children:d,...m}=c;if(w.isValidElement(d)){const x=Xv(d),g=$v(m,d.props);return d.type!==w.Fragment&&(g.ref=u?Ku(u,x):x),w.cloneElement(d,g)}return w.Children.count(d)>1?w.Children.only(null):null});return o.displayName=`${l}.SlotClone`,o}var Gv=Symbol("radix.slottable");function Vv(l){return w.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===Gv}function $v(l,o){const c={...o};for(const u in o){const d=l[u],m=o[u];/^on[A-Z]/.test(u)?d&&m?c[u]=(...g)=>{const v=m(...g);return d(...g),v}:d&&(c[u]=d):u==="style"?c[u]={...d,...m}:u==="className"&&(c[u]=[d,m].filter(Boolean).join(" "))}return{...l,...c}}function Xv(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var Qv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ha=Qv.reduce((l,o)=>{const c=qv(`Primitive.${o}`),u=w.forwardRef((d,m)=>{const{asChild:x,...g}=d,v=x?c:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(v,{...g,ref:m})});return u.displayName=`Primitive.${o}`,{...l,[o]:u}},{});function Zv(l,o){l&&Fu.flushSync(()=>l.dispatchEvent(o))}function Wo(l){const o=w.useRef(l);return w.useEffect(()=>{o.current=l}),w.useMemo(()=>(...c)=>o.current?.(...c),[])}function Kv(l,o=globalThis?.document){const c=Wo(l);w.useEffect(()=>{const u=d=>{d.key==="Escape"&&c(d)};return o.addEventListener("keydown",u,{capture:!0}),()=>o.removeEventListener("keydown",u,{capture:!0})},[c,o])}var Jv="DismissableLayer",zu="dismissableLayer.update",Fv="dismissableLayer.pointerDownOutside",Wv="dismissableLayer.focusOutside",p0,I0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ep=w.forwardRef((l,o)=>{const{disableOutsidePointerEvents:c=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:x,onDismiss:g,...v}=l,p=w.useContext(I0),[y,h]=w.useState(null),j=y?.ownerDocument??globalThis?.document,[,S]=w.useState({}),M=un(o,E=>h(E)),A=Array.from(p.layers),[U]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=A.indexOf(U),Q=y?A.indexOf(y):-1,q=p.layersWithOutsidePointerEventsDisabled.size>0,W=Q>=k,Z=eb(E=>{const L=E.target,Y=[...p.branches].some(le=>le.contains(L));!W||Y||(d?.(E),x?.(E),E.defaultPrevented||g?.())},j),ee=tb(E=>{const L=E.target;[...p.branches].some(le=>le.contains(L))||(m?.(E),x?.(E),E.defaultPrevented||g?.())},j);return Kv(E=>{Q===p.layers.size-1&&(u?.(E),!E.defaultPrevented&&g&&(E.preventDefault(),g()))},j),w.useEffect(()=>{if(y)return c&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(p0=j.body.style.pointerEvents,j.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),x0(),()=>{c&&p.layersWithOutsidePointerEventsDisabled.size===1&&(j.body.style.pointerEvents=p0)}},[y,j,c,p]),w.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),x0())},[y,p]),w.useEffect(()=>{const E=()=>S({});return document.addEventListener(zu,E),()=>document.removeEventListener(zu,E)},[]),s.jsx(Ha.div,{...v,ref:M,style:{pointerEvents:q?W?"auto":"none":void 0,...l.style},onFocusCapture:Oa(l.onFocusCapture,ee.onFocusCapture),onBlurCapture:Oa(l.onBlurCapture,ee.onBlurCapture),onPointerDownCapture:Oa(l.onPointerDownCapture,Z.onPointerDownCapture)})});ep.displayName=Jv;var Pv="DismissableLayerBranch",Iv=w.forwardRef((l,o)=>{const c=w.useContext(I0),u=w.useRef(null),d=un(o,u);return w.useEffect(()=>{const m=u.current;if(m)return c.branches.add(m),()=>{c.branches.delete(m)}},[c.branches]),s.jsx(Ha.div,{...l,ref:d})});Iv.displayName=Pv;function eb(l,o=globalThis?.document){const c=Wo(l),u=w.useRef(!1),d=w.useRef(()=>{});return w.useEffect(()=>{const m=g=>{if(g.target&&!u.current){let v=function(){tp(Fv,c,p,{discrete:!0})};const p={originalEvent:g};g.pointerType==="touch"?(o.removeEventListener("click",d.current),d.current=v,o.addEventListener("click",d.current,{once:!0})):v()}else o.removeEventListener("click",d.current);u.current=!1},x=window.setTimeout(()=>{o.addEventListener("pointerdown",m)},0);return()=>{window.clearTimeout(x),o.removeEventListener("pointerdown",m),o.removeEventListener("click",d.current)}},[o,c]),{onPointerDownCapture:()=>u.current=!0}}function tb(l,o=globalThis?.document){const c=Wo(l),u=w.useRef(!1);return w.useEffect(()=>{const d=m=>{m.target&&!u.current&&tp(Wv,c,{originalEvent:m},{discrete:!1})};return o.addEventListener("focusin",d),()=>o.removeEventListener("focusin",d)},[o,c]),{onFocusCapture:()=>u.current=!0,onBlurCapture:()=>u.current=!1}}function x0(){const l=new CustomEvent(zu);document.dispatchEvent(l)}function tp(l,o,c,{discrete:u}){const d=c.originalEvent.target,m=new CustomEvent(l,{bubbles:!1,cancelable:!0,detail:c});o&&d.addEventListener(l,o,{once:!0}),u?Zv(d,m):d.dispatchEvent(m)}var Bn=globalThis?.document?w.useLayoutEffect:()=>{},ab=Zu[" useId ".trim().toString()]||(()=>{}),nb=0;function sb(l){const[o,c]=w.useState(ab());return Bn(()=>{c(u=>u??String(nb++))},[l]),o?`radix-${o}`:""}const lb=["top","right","bottom","left"],qn=Math.min,ta=Math.max,$o=Math.round,Do=Math.floor,La=l=>({x:l,y:l}),rb={left:"right",right:"left",bottom:"top",top:"bottom"},ob={start:"end",end:"start"};function Ru(l,o,c){return ta(l,qn(o,c))}function rn(l,o){return typeof l=="function"?l(o):l}function on(l){return l.split("-")[0]}function ul(l){return l.split("-")[1]}function Wu(l){return l==="x"?"y":"x"}function Pu(l){return l==="y"?"height":"width"}const ib=new Set(["top","bottom"]);function za(l){return ib.has(on(l))?"y":"x"}function Iu(l){return Wu(za(l))}function cb(l,o,c){c===void 0&&(c=!1);const u=ul(l),d=Iu(l),m=Pu(d);let x=d==="x"?u===(c?"end":"start")?"right":"left":u==="start"?"bottom":"top";return o.reference[m]>o.floating[m]&&(x=Xo(x)),[x,Xo(x)]}function ub(l){const o=Xo(l);return[Du(l),o,Du(o)]}function Du(l){return l.replace(/start|end/g,o=>ob[o])}const g0=["left","right"],v0=["right","left"],db=["top","bottom"],fb=["bottom","top"];function mb(l,o,c){switch(l){case"top":case"bottom":return c?o?v0:g0:o?g0:v0;case"left":case"right":return o?db:fb;default:return[]}}function hb(l,o,c,u){const d=ul(l);let m=mb(on(l),c==="start",u);return d&&(m=m.map(x=>x+"-"+d),o&&(m=m.concat(m.map(Du)))),m}function Xo(l){return l.replace(/left|right|bottom|top/g,o=>rb[o])}function pb(l){return{top:0,right:0,bottom:0,left:0,...l}}function ap(l){return typeof l!="number"?pb(l):{top:l,right:l,bottom:l,left:l}}function Qo(l){const{x:o,y:c,width:u,height:d}=l;return{width:u,height:d,top:c,left:o,right:o+u,bottom:c+d,x:o,y:c}}function b0(l,o,c){let{reference:u,floating:d}=l;const m=za(o),x=Iu(o),g=Pu(x),v=on(o),p=m==="y",y=u.x+u.width/2-d.width/2,h=u.y+u.height/2-d.height/2,j=u[g]/2-d[g]/2;let S;switch(v){case"top":S={x:y,y:u.y-d.height};break;case"bottom":S={x:y,y:u.y+u.height};break;case"right":S={x:u.x+u.width,y:h};break;case"left":S={x:u.x-d.width,y:h};break;default:S={x:u.x,y:u.y}}switch(ul(o)){case"start":S[x]-=j*(c&&p?-1:1);break;case"end":S[x]+=j*(c&&p?-1:1);break}return S}const xb=async(l,o,c)=>{const{placement:u="bottom",strategy:d="absolute",middleware:m=[],platform:x}=c,g=m.filter(Boolean),v=await(x.isRTL==null?void 0:x.isRTL(o));let p=await x.getElementRects({reference:l,floating:o,strategy:d}),{x:y,y:h}=b0(p,u,v),j=u,S={},M=0;for(let A=0;A({name:"arrow",options:l,async fn(o){const{x:c,y:u,placement:d,rects:m,platform:x,elements:g,middlewareData:v}=o,{element:p,padding:y=0}=rn(l,o)||{};if(p==null)return{};const h=ap(y),j={x:c,y:u},S=Iu(d),M=Pu(S),A=await x.getDimensions(p),U=S==="y",k=U?"top":"left",Q=U?"bottom":"right",q=U?"clientHeight":"clientWidth",W=m.reference[M]+m.reference[S]-j[S]-m.floating[M],Z=j[S]-m.reference[S],ee=await(x.getOffsetParent==null?void 0:x.getOffsetParent(p));let E=ee?ee[q]:0;(!E||!await(x.isElement==null?void 0:x.isElement(ee)))&&(E=g.floating[q]||m.floating[M]);const L=W/2-Z/2,Y=E/2-A[M]/2-1,le=qn(h[k],Y),G=qn(h[Q],Y),ne=le,O=E-A[M]-G,se=E/2-A[M]/2+L,ie=Ru(ne,se,O),T=!v.arrow&&ul(d)!=null&&se!==ie&&m.reference[M]/2-(sese<=0)){var G,ne;const se=(((G=m.flip)==null?void 0:G.index)||0)+1,ie=E[se];if(ie&&(!(h==="alignment"?Q!==za(ie):!1)||le.every(B=>za(B.placement)===Q?B.overflows[0]>0:!0)))return{data:{index:se,overflows:le},reset:{placement:ie}};let T=(ne=le.filter(V=>V.overflows[0]<=0).sort((V,B)=>V.overflows[1]-B.overflows[1])[0])==null?void 0:ne.placement;if(!T)switch(S){case"bestFit":{var O;const V=(O=le.filter(B=>{if(ee){const ue=za(B.placement);return ue===Q||ue==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(ue=>ue>0).reduce((ue,xe)=>ue+xe,0)]).sort((B,ue)=>B[1]-ue[1])[0])==null?void 0:O[0];V&&(T=V);break}case"initialPlacement":T=g;break}if(d!==T)return{reset:{placement:T}}}return{}}}};function y0(l,o){return{top:l.top-o.height,right:l.right-o.width,bottom:l.bottom-o.height,left:l.left-o.width}}function w0(l){return lb.some(o=>l[o]>=0)}const bb=function(l){return l===void 0&&(l={}),{name:"hide",options:l,async fn(o){const{rects:c}=o,{strategy:u="referenceHidden",...d}=rn(l,o);switch(u){case"referenceHidden":{const m=await dr(o,{...d,elementContext:"reference"}),x=y0(m,c.reference);return{data:{referenceHiddenOffsets:x,referenceHidden:w0(x)}}}case"escaped":{const m=await dr(o,{...d,altBoundary:!0}),x=y0(m,c.floating);return{data:{escapedOffsets:x,escaped:w0(x)}}}default:return{}}}}},np=new Set(["left","top"]);async function yb(l,o){const{placement:c,platform:u,elements:d}=l,m=await(u.isRTL==null?void 0:u.isRTL(d.floating)),x=on(c),g=ul(c),v=za(c)==="y",p=np.has(x)?-1:1,y=m&&v?-1:1,h=rn(o,l);let{mainAxis:j,crossAxis:S,alignmentAxis:M}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return g&&typeof M=="number"&&(S=g==="end"?M*-1:M),v?{x:S*y,y:j*p}:{x:j*p,y:S*y}}const wb=function(l){return l===void 0&&(l=0),{name:"offset",options:l,async fn(o){var c,u;const{x:d,y:m,placement:x,middlewareData:g}=o,v=await yb(o,l);return x===((c=g.offset)==null?void 0:c.placement)&&(u=g.arrow)!=null&&u.alignmentOffset?{}:{x:d+v.x,y:m+v.y,data:{...v,placement:x}}}}},jb=function(l){return l===void 0&&(l={}),{name:"shift",options:l,async fn(o){const{x:c,y:u,placement:d}=o,{mainAxis:m=!0,crossAxis:x=!1,limiter:g={fn:U=>{let{x:k,y:Q}=U;return{x:k,y:Q}}},...v}=rn(l,o),p={x:c,y:u},y=await dr(o,v),h=za(on(d)),j=Wu(h);let S=p[j],M=p[h];if(m){const U=j==="y"?"top":"left",k=j==="y"?"bottom":"right",Q=S+y[U],q=S-y[k];S=Ru(Q,S,q)}if(x){const U=h==="y"?"top":"left",k=h==="y"?"bottom":"right",Q=M+y[U],q=M-y[k];M=Ru(Q,M,q)}const A=g.fn({...o,[j]:S,[h]:M});return{...A,data:{x:A.x-c,y:A.y-u,enabled:{[j]:m,[h]:x}}}}}},Nb=function(l){return l===void 0&&(l={}),{options:l,fn(o){const{x:c,y:u,placement:d,rects:m,middlewareData:x}=o,{offset:g=0,mainAxis:v=!0,crossAxis:p=!0}=rn(l,o),y={x:c,y:u},h=za(d),j=Wu(h);let S=y[j],M=y[h];const A=rn(g,o),U=typeof A=="number"?{mainAxis:A,crossAxis:0}:{mainAxis:0,crossAxis:0,...A};if(v){const q=j==="y"?"height":"width",W=m.reference[j]-m.floating[q]+U.mainAxis,Z=m.reference[j]+m.reference[q]-U.mainAxis;SZ&&(S=Z)}if(p){var k,Q;const q=j==="y"?"width":"height",W=np.has(on(d)),Z=m.reference[h]-m.floating[q]+(W&&((k=x.offset)==null?void 0:k[h])||0)+(W?0:U.crossAxis),ee=m.reference[h]+m.reference[q]+(W?0:((Q=x.offset)==null?void 0:Q[h])||0)-(W?U.crossAxis:0);Mee&&(M=ee)}return{[j]:S,[h]:M}}}},Sb=function(l){return l===void 0&&(l={}),{name:"size",options:l,async fn(o){var c,u;const{placement:d,rects:m,platform:x,elements:g}=o,{apply:v=()=>{},...p}=rn(l,o),y=await dr(o,p),h=on(d),j=ul(d),S=za(d)==="y",{width:M,height:A}=m.floating;let U,k;h==="top"||h==="bottom"?(U=h,k=j===(await(x.isRTL==null?void 0:x.isRTL(g.floating))?"start":"end")?"left":"right"):(k=h,U=j==="end"?"top":"bottom");const Q=A-y.top-y.bottom,q=M-y.left-y.right,W=qn(A-y[U],Q),Z=qn(M-y[k],q),ee=!o.middlewareData.shift;let E=W,L=Z;if((c=o.middlewareData.shift)!=null&&c.enabled.x&&(L=q),(u=o.middlewareData.shift)!=null&&u.enabled.y&&(E=Q),ee&&!j){const le=ta(y.left,0),G=ta(y.right,0),ne=ta(y.top,0),O=ta(y.bottom,0);S?L=M-2*(le!==0||G!==0?le+G:ta(y.left,y.right)):E=A-2*(ne!==0||O!==0?ne+O:ta(y.top,y.bottom))}await v({...o,availableWidth:L,availableHeight:E});const Y=await x.getDimensions(g.floating);return M!==Y.width||A!==Y.height?{reset:{rects:!0}}:{}}}};function Po(){return typeof window<"u"}function dl(l){return sp(l)?(l.nodeName||"").toLowerCase():"#document"}function aa(l){var o;return(l==null||(o=l.ownerDocument)==null?void 0:o.defaultView)||window}function Ba(l){var o;return(o=(sp(l)?l.ownerDocument:l.document)||window.document)==null?void 0:o.documentElement}function sp(l){return Po()?l instanceof Node||l instanceof aa(l).Node:!1}function wa(l){return Po()?l instanceof Element||l instanceof aa(l).Element:!1}function Ua(l){return Po()?l instanceof HTMLElement||l instanceof aa(l).HTMLElement:!1}function j0(l){return!Po()||typeof ShadowRoot>"u"?!1:l instanceof ShadowRoot||l instanceof aa(l).ShadowRoot}const _b=new Set(["inline","contents"]);function gr(l){const{overflow:o,overflowX:c,overflowY:u,display:d}=ja(l);return/auto|scroll|overlay|hidden|clip/.test(o+u+c)&&!_b.has(d)}const Eb=new Set(["table","td","th"]);function kb(l){return Eb.has(dl(l))}const Cb=[":popover-open",":modal"];function Io(l){return Cb.some(o=>{try{return l.matches(o)}catch{return!1}})}const Tb=["transform","translate","scale","rotate","perspective"],Ab=["transform","translate","scale","rotate","perspective","filter"],Mb=["paint","layout","strict","content"];function ed(l){const o=td(),c=wa(l)?ja(l):l;return Tb.some(u=>c[u]?c[u]!=="none":!1)||(c.containerType?c.containerType!=="normal":!1)||!o&&(c.backdropFilter?c.backdropFilter!=="none":!1)||!o&&(c.filter?c.filter!=="none":!1)||Ab.some(u=>(c.willChange||"").includes(u))||Mb.some(u=>(c.contain||"").includes(u))}function Ob(l){let o=Yn(l);for(;Ua(o)&&!sl(o);){if(ed(o))return o;if(Io(o))return null;o=Yn(o)}return null}function td(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zb=new Set(["html","body","#document"]);function sl(l){return zb.has(dl(l))}function ja(l){return aa(l).getComputedStyle(l)}function ei(l){return wa(l)?{scrollLeft:l.scrollLeft,scrollTop:l.scrollTop}:{scrollLeft:l.scrollX,scrollTop:l.scrollY}}function Yn(l){if(dl(l)==="html")return l;const o=l.assignedSlot||l.parentNode||j0(l)&&l.host||Ba(l);return j0(o)?o.host:o}function lp(l){const o=Yn(l);return sl(o)?l.ownerDocument?l.ownerDocument.body:l.body:Ua(o)&&gr(o)?o:lp(o)}function fr(l,o,c){var u;o===void 0&&(o=[]),c===void 0&&(c=!0);const d=lp(l),m=d===((u=l.ownerDocument)==null?void 0:u.body),x=aa(d);if(m){const g=Lu(x);return o.concat(x,x.visualViewport||[],gr(d)?d:[],g&&c?fr(g):[])}return o.concat(d,fr(d,[],c))}function Lu(l){return l.parent&&Object.getPrototypeOf(l.parent)?l.frameElement:null}function rp(l){const o=ja(l);let c=parseFloat(o.width)||0,u=parseFloat(o.height)||0;const d=Ua(l),m=d?l.offsetWidth:c,x=d?l.offsetHeight:u,g=$o(c)!==m||$o(u)!==x;return g&&(c=m,u=x),{width:c,height:u,$:g}}function ad(l){return wa(l)?l:l.contextElement}function al(l){const o=ad(l);if(!Ua(o))return La(1);const c=o.getBoundingClientRect(),{width:u,height:d,$:m}=rp(o);let x=(m?$o(c.width):c.width)/u,g=(m?$o(c.height):c.height)/d;return(!x||!Number.isFinite(x))&&(x=1),(!g||!Number.isFinite(g))&&(g=1),{x,y:g}}const Rb=La(0);function op(l){const o=aa(l);return!td()||!o.visualViewport?Rb:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function Db(l,o,c){return o===void 0&&(o=!1),!c||o&&c!==aa(l)?!1:o}function ds(l,o,c,u){o===void 0&&(o=!1),c===void 0&&(c=!1);const d=l.getBoundingClientRect(),m=ad(l);let x=La(1);o&&(u?wa(u)&&(x=al(u)):x=al(l));const g=Db(m,c,u)?op(m):La(0);let v=(d.left+g.x)/x.x,p=(d.top+g.y)/x.y,y=d.width/x.x,h=d.height/x.y;if(m){const j=aa(m),S=u&&wa(u)?aa(u):u;let M=j,A=Lu(M);for(;A&&u&&S!==M;){const U=al(A),k=A.getBoundingClientRect(),Q=ja(A),q=k.left+(A.clientLeft+parseFloat(Q.paddingLeft))*U.x,W=k.top+(A.clientTop+parseFloat(Q.paddingTop))*U.y;v*=U.x,p*=U.y,y*=U.x,h*=U.y,v+=q,p+=W,M=aa(A),A=Lu(M)}}return Qo({width:y,height:h,x:v,y:p})}function ti(l,o){const c=ei(l).scrollLeft;return o?o.left+c:ds(Ba(l)).left+c}function ip(l,o){const c=l.getBoundingClientRect(),u=c.left+o.scrollLeft-ti(l,c),d=c.top+o.scrollTop;return{x:u,y:d}}function Lb(l){let{elements:o,rect:c,offsetParent:u,strategy:d}=l;const m=d==="fixed",x=Ba(u),g=o?Io(o.floating):!1;if(u===x||g&&m)return c;let v={scrollLeft:0,scrollTop:0},p=La(1);const y=La(0),h=Ua(u);if((h||!h&&!m)&&((dl(u)!=="body"||gr(x))&&(v=ei(u)),Ua(u))){const S=ds(u);p=al(u),y.x=S.x+u.clientLeft,y.y=S.y+u.clientTop}const j=x&&!h&&!m?ip(x,v):La(0);return{width:c.width*p.x,height:c.height*p.y,x:c.x*p.x-v.scrollLeft*p.x+y.x+j.x,y:c.y*p.y-v.scrollTop*p.y+y.y+j.y}}function Ub(l){return Array.from(l.getClientRects())}function Hb(l){const o=Ba(l),c=ei(l),u=l.ownerDocument.body,d=ta(o.scrollWidth,o.clientWidth,u.scrollWidth,u.clientWidth),m=ta(o.scrollHeight,o.clientHeight,u.scrollHeight,u.clientHeight);let x=-c.scrollLeft+ti(l);const g=-c.scrollTop;return ja(u).direction==="rtl"&&(x+=ta(o.clientWidth,u.clientWidth)-d),{width:d,height:m,x,y:g}}const N0=25;function Bb(l,o){const c=aa(l),u=Ba(l),d=c.visualViewport;let m=u.clientWidth,x=u.clientHeight,g=0,v=0;if(d){m=d.width,x=d.height;const y=td();(!y||y&&o==="fixed")&&(g=d.offsetLeft,v=d.offsetTop)}const p=ti(u);if(p<=0){const y=u.ownerDocument,h=y.body,j=getComputedStyle(h),S=y.compatMode==="CSS1Compat"&&parseFloat(j.marginLeft)+parseFloat(j.marginRight)||0,M=Math.abs(u.clientWidth-h.clientWidth-S);M<=N0&&(m-=M)}else p<=N0&&(m+=p);return{width:m,height:x,x:g,y:v}}const qb=new Set(["absolute","fixed"]);function Yb(l,o){const c=ds(l,!0,o==="fixed"),u=c.top+l.clientTop,d=c.left+l.clientLeft,m=Ua(l)?al(l):La(1),x=l.clientWidth*m.x,g=l.clientHeight*m.y,v=d*m.x,p=u*m.y;return{width:x,height:g,x:v,y:p}}function S0(l,o,c){let u;if(o==="viewport")u=Bb(l,c);else if(o==="document")u=Hb(Ba(l));else if(wa(o))u=Yb(o,c);else{const d=op(l);u={x:o.x-d.x,y:o.y-d.y,width:o.width,height:o.height}}return Qo(u)}function cp(l,o){const c=Yn(l);return c===o||!wa(c)||sl(c)?!1:ja(c).position==="fixed"||cp(c,o)}function Gb(l,o){const c=o.get(l);if(c)return c;let u=fr(l,[],!1).filter(g=>wa(g)&&dl(g)!=="body"),d=null;const m=ja(l).position==="fixed";let x=m?Yn(l):l;for(;wa(x)&&!sl(x);){const g=ja(x),v=ed(x);!v&&g.position==="fixed"&&(d=null),(m?!v&&!d:!v&&g.position==="static"&&!!d&&qb.has(d.position)||gr(x)&&!v&&cp(l,x))?u=u.filter(y=>y!==x):d=g,x=Yn(x)}return o.set(l,u),u}function Vb(l){let{element:o,boundary:c,rootBoundary:u,strategy:d}=l;const x=[...c==="clippingAncestors"?Io(o)?[]:Gb(o,this._c):[].concat(c),u],g=x[0],v=x.reduce((p,y)=>{const h=S0(o,y,d);return p.top=ta(h.top,p.top),p.right=qn(h.right,p.right),p.bottom=qn(h.bottom,p.bottom),p.left=ta(h.left,p.left),p},S0(o,g,d));return{width:v.right-v.left,height:v.bottom-v.top,x:v.left,y:v.top}}function $b(l){const{width:o,height:c}=rp(l);return{width:o,height:c}}function Xb(l,o,c){const u=Ua(o),d=Ba(o),m=c==="fixed",x=ds(l,!0,m,o);let g={scrollLeft:0,scrollTop:0};const v=La(0);function p(){v.x=ti(d)}if(u||!u&&!m)if((dl(o)!=="body"||gr(d))&&(g=ei(o)),u){const S=ds(o,!0,m,o);v.x=S.x+o.clientLeft,v.y=S.y+o.clientTop}else d&&p();m&&!u&&d&&p();const y=d&&!u&&!m?ip(d,g):La(0),h=x.left+g.scrollLeft-v.x-y.x,j=x.top+g.scrollTop-v.y-y.y;return{x:h,y:j,width:x.width,height:x.height}}function Su(l){return ja(l).position==="static"}function _0(l,o){if(!Ua(l)||ja(l).position==="fixed")return null;if(o)return o(l);let c=l.offsetParent;return Ba(l)===c&&(c=c.ownerDocument.body),c}function up(l,o){const c=aa(l);if(Io(l))return c;if(!Ua(l)){let d=Yn(l);for(;d&&!sl(d);){if(wa(d)&&!Su(d))return d;d=Yn(d)}return c}let u=_0(l,o);for(;u&&kb(u)&&Su(u);)u=_0(u,o);return u&&sl(u)&&Su(u)&&!ed(u)?c:u||Ob(l)||c}const Qb=async function(l){const o=this.getOffsetParent||up,c=this.getDimensions,u=await c(l.floating);return{reference:Xb(l.reference,await o(l.floating),l.strategy),floating:{x:0,y:0,width:u.width,height:u.height}}};function Zb(l){return ja(l).direction==="rtl"}const Kb={convertOffsetParentRelativeRectToViewportRelativeRect:Lb,getDocumentElement:Ba,getClippingRect:Vb,getOffsetParent:up,getElementRects:Qb,getClientRects:Ub,getDimensions:$b,getScale:al,isElement:wa,isRTL:Zb};function dp(l,o){return l.x===o.x&&l.y===o.y&&l.width===o.width&&l.height===o.height}function Jb(l,o){let c=null,u;const d=Ba(l);function m(){var g;clearTimeout(u),(g=c)==null||g.disconnect(),c=null}function x(g,v){g===void 0&&(g=!1),v===void 0&&(v=1),m();const p=l.getBoundingClientRect(),{left:y,top:h,width:j,height:S}=p;if(g||o(),!j||!S)return;const M=Do(h),A=Do(d.clientWidth-(y+j)),U=Do(d.clientHeight-(h+S)),k=Do(y),q={rootMargin:-M+"px "+-A+"px "+-U+"px "+-k+"px",threshold:ta(0,qn(1,v))||1};let W=!0;function Z(ee){const E=ee[0].intersectionRatio;if(E!==v){if(!W)return x();E?x(!1,E):u=setTimeout(()=>{x(!1,1e-7)},1e3)}E===1&&!dp(p,l.getBoundingClientRect())&&x(),W=!1}try{c=new IntersectionObserver(Z,{...q,root:d.ownerDocument})}catch{c=new IntersectionObserver(Z,q)}c.observe(l)}return x(!0),m}function Fb(l,o,c,u){u===void 0&&(u={});const{ancestorScroll:d=!0,ancestorResize:m=!0,elementResize:x=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:v=!1}=u,p=ad(l),y=d||m?[...p?fr(p):[],...fr(o)]:[];y.forEach(k=>{d&&k.addEventListener("scroll",c,{passive:!0}),m&&k.addEventListener("resize",c)});const h=p&&g?Jb(p,c):null;let j=-1,S=null;x&&(S=new ResizeObserver(k=>{let[Q]=k;Q&&Q.target===p&&S&&(S.unobserve(o),cancelAnimationFrame(j),j=requestAnimationFrame(()=>{var q;(q=S)==null||q.observe(o)})),c()}),p&&!v&&S.observe(p),S.observe(o));let M,A=v?ds(l):null;v&&U();function U(){const k=ds(l);A&&!dp(A,k)&&c(),A=k,M=requestAnimationFrame(U)}return c(),()=>{var k;y.forEach(Q=>{d&&Q.removeEventListener("scroll",c),m&&Q.removeEventListener("resize",c)}),h?.(),(k=S)==null||k.disconnect(),S=null,v&&cancelAnimationFrame(M)}}const Wb=wb,Pb=jb,Ib=vb,ey=Sb,ty=bb,E0=gb,ay=Nb,ny=(l,o,c)=>{const u=new Map,d={platform:Kb,...c},m={...d.platform,_c:u};return xb(l,o,{...d,platform:m})};var sy=typeof document<"u",ly=function(){},Go=sy?w.useLayoutEffect:ly;function Zo(l,o){if(l===o)return!0;if(typeof l!=typeof o)return!1;if(typeof l=="function"&&l.toString()===o.toString())return!0;let c,u,d;if(l&&o&&typeof l=="object"){if(Array.isArray(l)){if(c=l.length,c!==o.length)return!1;for(u=c;u--!==0;)if(!Zo(l[u],o[u]))return!1;return!0}if(d=Object.keys(l),c=d.length,c!==Object.keys(o).length)return!1;for(u=c;u--!==0;)if(!{}.hasOwnProperty.call(o,d[u]))return!1;for(u=c;u--!==0;){const m=d[u];if(!(m==="_owner"&&l.$$typeof)&&!Zo(l[m],o[m]))return!1}return!0}return l!==l&&o!==o}function fp(l){return typeof window>"u"?1:(l.ownerDocument.defaultView||window).devicePixelRatio||1}function k0(l,o){const c=fp(l);return Math.round(o*c)/c}function _u(l){const o=w.useRef(l);return Go(()=>{o.current=l}),o}function ry(l){l===void 0&&(l={});const{placement:o="bottom",strategy:c="absolute",middleware:u=[],platform:d,elements:{reference:m,floating:x}={},transform:g=!0,whileElementsMounted:v,open:p}=l,[y,h]=w.useState({x:0,y:0,strategy:c,placement:o,middlewareData:{},isPositioned:!1}),[j,S]=w.useState(u);Zo(j,u)||S(u);const[M,A]=w.useState(null),[U,k]=w.useState(null),Q=w.useCallback(B=>{B!==ee.current&&(ee.current=B,A(B))},[]),q=w.useCallback(B=>{B!==E.current&&(E.current=B,k(B))},[]),W=m||M,Z=x||U,ee=w.useRef(null),E=w.useRef(null),L=w.useRef(y),Y=v!=null,le=_u(v),G=_u(d),ne=_u(p),O=w.useCallback(()=>{if(!ee.current||!E.current)return;const B={placement:o,strategy:c,middleware:j};G.current&&(B.platform=G.current),ny(ee.current,E.current,B).then(ue=>{const xe={...ue,isPositioned:ne.current!==!1};se.current&&!Zo(L.current,xe)&&(L.current=xe,Fu.flushSync(()=>{h(xe)}))})},[j,o,c,G,ne]);Go(()=>{p===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,h(B=>({...B,isPositioned:!1})))},[p]);const se=w.useRef(!1);Go(()=>(se.current=!0,()=>{se.current=!1}),[]),Go(()=>{if(W&&(ee.current=W),Z&&(E.current=Z),W&&Z){if(le.current)return le.current(W,Z,O);O()}},[W,Z,O,le,Y]);const ie=w.useMemo(()=>({reference:ee,floating:E,setReference:Q,setFloating:q}),[Q,q]),T=w.useMemo(()=>({reference:W,floating:Z}),[W,Z]),V=w.useMemo(()=>{const B={position:c,left:0,top:0};if(!T.floating)return B;const ue=k0(T.floating,y.x),xe=k0(T.floating,y.y);return g?{...B,transform:"translate("+ue+"px, "+xe+"px)",...fp(T.floating)>=1.5&&{willChange:"transform"}}:{position:c,left:ue,top:xe}},[c,g,T.floating,y.x,y.y]);return w.useMemo(()=>({...y,update:O,refs:ie,elements:T,floatingStyles:V}),[y,O,ie,T,V])}const oy=l=>{function o(c){return{}.hasOwnProperty.call(c,"current")}return{name:"arrow",options:l,fn(c){const{element:u,padding:d}=typeof l=="function"?l(c):l;return u&&o(u)?u.current!=null?E0({element:u.current,padding:d}).fn(c):{}:u?E0({element:u,padding:d}).fn(c):{}}}},iy=(l,o)=>({...Wb(l),options:[l,o]}),cy=(l,o)=>({...Pb(l),options:[l,o]}),uy=(l,o)=>({...ay(l),options:[l,o]}),dy=(l,o)=>({...Ib(l),options:[l,o]}),fy=(l,o)=>({...ey(l),options:[l,o]}),my=(l,o)=>({...ty(l),options:[l,o]}),hy=(l,o)=>({...oy(l),options:[l,o]});var py="Arrow",mp=w.forwardRef((l,o)=>{const{children:c,width:u=10,height:d=5,...m}=l;return s.jsx(Ha.svg,{...m,ref:o,width:u,height:d,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:l.asChild?c:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});mp.displayName=py;var xy=mp;function hp(l){const[o,c]=w.useState(void 0);return Bn(()=>{if(l){c({width:l.offsetWidth,height:l.offsetHeight});const u=new ResizeObserver(d=>{if(!Array.isArray(d)||!d.length)return;const m=d[0];let x,g;if("borderBoxSize"in m){const v=m.borderBoxSize,p=Array.isArray(v)?v[0]:v;x=p.inlineSize,g=p.blockSize}else x=l.offsetWidth,g=l.offsetHeight;c({width:x,height:g})});return u.observe(l,{box:"border-box"}),()=>u.unobserve(l)}else c(void 0)},[l]),o}var nd="Popper",[pp,xp]=Ju(nd),[gy,gp]=pp(nd),vp=l=>{const{__scopePopper:o,children:c}=l,[u,d]=w.useState(null);return s.jsx(gy,{scope:o,anchor:u,onAnchorChange:d,children:c})};vp.displayName=nd;var bp="PopperAnchor",yp=w.forwardRef((l,o)=>{const{__scopePopper:c,virtualRef:u,...d}=l,m=gp(bp,c),x=w.useRef(null),g=un(o,x),v=w.useRef(null);return w.useEffect(()=>{const p=v.current;v.current=u?.current||x.current,p!==v.current&&m.onAnchorChange(v.current)}),u?null:s.jsx(Ha.div,{...d,ref:g})});yp.displayName=bp;var sd="PopperContent",[vy,by]=pp(sd),wp=w.forwardRef((l,o)=>{const{__scopePopper:c,side:u="bottom",sideOffset:d=0,align:m="center",alignOffset:x=0,arrowPadding:g=0,avoidCollisions:v=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:h="partial",hideWhenDetached:j=!1,updatePositionStrategy:S="optimized",onPlaced:M,...A}=l,U=gp(sd,c),[k,Q]=w.useState(null),q=un(o,de=>Q(de)),[W,Z]=w.useState(null),ee=hp(W),E=ee?.width??0,L=ee?.height??0,Y=u+(m!=="center"?"-"+m:""),le=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},G=Array.isArray(p)?p:[p],ne=G.length>0,O={padding:le,boundary:G.filter(wy),altBoundary:ne},{refs:se,floatingStyles:ie,placement:T,isPositioned:V,middlewareData:B}=ry({strategy:"fixed",placement:Y,whileElementsMounted:(...de)=>Fb(...de,{animationFrame:S==="always"}),elements:{reference:U.anchor},middleware:[iy({mainAxis:d+L,alignmentAxis:x}),v&&cy({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?uy():void 0,...O}),v&&dy({...O}),fy({...O,apply:({elements:de,rects:Ne,availableWidth:Ce,availableHeight:We})=>{const{width:it,height:qe}=Ne.reference,I=de.floating.style;I.setProperty("--radix-popper-available-width",`${Ce}px`),I.setProperty("--radix-popper-available-height",`${We}px`),I.setProperty("--radix-popper-anchor-width",`${it}px`),I.setProperty("--radix-popper-anchor-height",`${qe}px`)}}),W&&hy({element:W,padding:g}),jy({arrowWidth:E,arrowHeight:L}),j&&my({strategy:"referenceHidden",...O})]}),[ue,xe]=Sp(T),_=Wo(M);Bn(()=>{V&&_?.()},[V,_]);const K=B.arrow?.x,X=B.arrow?.y,ae=B.arrow?.centerOffset!==0,[oe,ge]=w.useState();return Bn(()=>{k&&ge(window.getComputedStyle(k).zIndex)},[k]),s.jsx("div",{ref:se.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:V?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:l.dir,children:s.jsx(vy,{scope:c,placedSide:ue,onArrowChange:Z,arrowX:K,arrowY:X,shouldHideArrow:ae,children:s.jsx(Ha.div,{"data-side":ue,"data-align":xe,...A,ref:q,style:{...A.style,animation:V?void 0:"none"}})})})});wp.displayName=sd;var jp="PopperArrow",yy={top:"bottom",right:"left",bottom:"top",left:"right"},Np=w.forwardRef(function(o,c){const{__scopePopper:u,...d}=o,m=by(jp,u),x=yy[m.placedSide];return s.jsx("span",{ref:m.onArrowChange,style:{position:"absolute",left:m.arrowX,top:m.arrowY,[x]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[m.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[m.placedSide],visibility:m.shouldHideArrow?"hidden":void 0},children:s.jsx(xy,{...d,ref:c,style:{...d.style,display:"block"}})})});Np.displayName=jp;function wy(l){return l!==null}var jy=l=>({name:"transformOrigin",options:l,fn(o){const{placement:c,rects:u,middlewareData:d}=o,x=d.arrow?.centerOffset!==0,g=x?0:l.arrowWidth,v=x?0:l.arrowHeight,[p,y]=Sp(c),h={start:"0%",center:"50%",end:"100%"}[y],j=(d.arrow?.x??0)+g/2,S=(d.arrow?.y??0)+v/2;let M="",A="";return p==="bottom"?(M=x?h:`${j}px`,A=`${-v}px`):p==="top"?(M=x?h:`${j}px`,A=`${u.floating.height+v}px`):p==="right"?(M=`${-v}px`,A=x?h:`${S}px`):p==="left"&&(M=`${u.floating.width+v}px`,A=x?h:`${S}px`),{data:{x:M,y:A}}}});function Sp(l){const[o,c="center"]=l.split("-");return[o,c]}var Ny=vp,Sy=yp,_y=wp,Ey=Np,ky="Portal",_p=w.forwardRef((l,o)=>{const{container:c,...u}=l,[d,m]=w.useState(!1);Bn(()=>m(!0),[]);const x=c||d&&globalThis?.document?.body;return x?P0.createPortal(s.jsx(Ha.div,{...u,ref:o}),x):null});_p.displayName=ky;function Cy(l,o){return w.useReducer((c,u)=>o[c][u]??c,l)}var ld=l=>{const{present:o,children:c}=l,u=Ty(o),d=typeof c=="function"?c({present:u.isPresent}):w.Children.only(c),m=un(u.ref,Ay(d));return typeof c=="function"||u.isPresent?w.cloneElement(d,{ref:m}):null};ld.displayName="Presence";function Ty(l){const[o,c]=w.useState(),u=w.useRef(null),d=w.useRef(l),m=w.useRef("none"),x=l?"mounted":"unmounted",[g,v]=Cy(x,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const p=Lo(u.current);m.current=g==="mounted"?p:"none"},[g]),Bn(()=>{const p=u.current,y=d.current;if(y!==l){const j=m.current,S=Lo(p);l?v("MOUNT"):S==="none"||p?.display==="none"?v("UNMOUNT"):v(y&&j!==S?"ANIMATION_OUT":"UNMOUNT"),d.current=l}},[l,v]),Bn(()=>{if(o){let p;const y=o.ownerDocument.defaultView??window,h=S=>{const A=Lo(u.current).includes(CSS.escape(S.animationName));if(S.target===o&&A&&(v("ANIMATION_END"),!d.current)){const U=o.style.animationFillMode;o.style.animationFillMode="forwards",p=y.setTimeout(()=>{o.style.animationFillMode==="forwards"&&(o.style.animationFillMode=U)})}},j=S=>{S.target===o&&(m.current=Lo(u.current))};return o.addEventListener("animationstart",j),o.addEventListener("animationcancel",h),o.addEventListener("animationend",h),()=>{y.clearTimeout(p),o.removeEventListener("animationstart",j),o.removeEventListener("animationcancel",h),o.removeEventListener("animationend",h)}}else v("ANIMATION_END")},[o,v]),{isPresent:["mounted","unmountSuspended"].includes(g),ref:w.useCallback(p=>{u.current=p?getComputedStyle(p):null,c(p)},[])}}function Lo(l){return l?.animationName||"none"}function Ay(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var My=Symbol("radix.slottable");function Oy(l){const o=({children:c})=>s.jsx(s.Fragment,{children:c});return o.displayName=`${l}.Slottable`,o.__radixId=My,o}var zy=Zu[" useInsertionEffect ".trim().toString()]||Bn;function Ep({prop:l,defaultProp:o,onChange:c=()=>{},caller:u}){const[d,m,x]=Ry({defaultProp:o,onChange:c}),g=l!==void 0,v=g?l:d;{const y=w.useRef(l!==void 0);w.useEffect(()=>{const h=y.current;h!==g&&console.warn(`${u} is changing from ${h?"controlled":"uncontrolled"} to ${g?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=g},[g,u])}const p=w.useCallback(y=>{if(g){const h=Dy(y)?y(l):y;h!==l&&x.current?.(h)}else m(y)},[g,l,m,x]);return[v,p]}function Ry({defaultProp:l,onChange:o}){const[c,u]=w.useState(l),d=w.useRef(c),m=w.useRef(o);return zy(()=>{m.current=o},[o]),w.useEffect(()=>{d.current!==c&&(m.current?.(c),d.current=c)},[c,d]),[c,u,m]}function Dy(l){return typeof l=="function"}var Ly=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Uy="VisuallyHidden",kp=w.forwardRef((l,o)=>s.jsx(Ha.span,{...l,ref:o,style:{...Ly,...l.style}}));kp.displayName=Uy;var Hy=kp,[ai]=Ju("Tooltip",[xp]),ni=xp(),Cp="TooltipProvider",By=700,Uu="tooltip.open",[qy,rd]=ai(Cp),Tp=l=>{const{__scopeTooltip:o,delayDuration:c=By,skipDelayDuration:u=300,disableHoverableContent:d=!1,children:m}=l,x=w.useRef(!0),g=w.useRef(!1),v=w.useRef(0);return w.useEffect(()=>{const p=v.current;return()=>window.clearTimeout(p)},[]),s.jsx(qy,{scope:o,isOpenDelayedRef:x,delayDuration:c,onOpen:w.useCallback(()=>{window.clearTimeout(v.current),x.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>x.current=!0,u)},[u]),isPointerInTransitRef:g,onPointerInTransitChange:w.useCallback(p=>{g.current=p},[]),disableHoverableContent:d,children:m})};Tp.displayName=Cp;var mr="Tooltip",[Yy,vr]=ai(mr),Ap=l=>{const{__scopeTooltip:o,children:c,open:u,defaultOpen:d,onOpenChange:m,disableHoverableContent:x,delayDuration:g}=l,v=rd(mr,l.__scopeTooltip),p=ni(o),[y,h]=w.useState(null),j=sb(),S=w.useRef(0),M=x??v.disableHoverableContent,A=g??v.delayDuration,U=w.useRef(!1),[k,Q]=Ep({prop:u,defaultProp:d??!1,onChange:E=>{E?(v.onOpen(),document.dispatchEvent(new CustomEvent(Uu))):v.onClose(),m?.(E)},caller:mr}),q=w.useMemo(()=>k?U.current?"delayed-open":"instant-open":"closed",[k]),W=w.useCallback(()=>{window.clearTimeout(S.current),S.current=0,U.current=!1,Q(!0)},[Q]),Z=w.useCallback(()=>{window.clearTimeout(S.current),S.current=0,Q(!1)},[Q]),ee=w.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{U.current=!0,Q(!0),S.current=0},A)},[A,Q]);return w.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]),s.jsx(Ny,{...p,children:s.jsx(Yy,{scope:o,contentId:j,open:k,stateAttribute:q,trigger:y,onTriggerChange:h,onTriggerEnter:w.useCallback(()=>{v.isOpenDelayedRef.current?ee():W()},[v.isOpenDelayedRef,ee,W]),onTriggerLeave:w.useCallback(()=>{M?Z():(window.clearTimeout(S.current),S.current=0)},[Z,M]),onOpen:W,onClose:Z,disableHoverableContent:M,children:c})})};Ap.displayName=mr;var Hu="TooltipTrigger",Mp=w.forwardRef((l,o)=>{const{__scopeTooltip:c,...u}=l,d=vr(Hu,c),m=rd(Hu,c),x=ni(c),g=w.useRef(null),v=un(o,g,d.onTriggerChange),p=w.useRef(!1),y=w.useRef(!1),h=w.useCallback(()=>p.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(Sy,{asChild:!0,...x,children:s.jsx(Ha.button,{"aria-describedby":d.open?d.contentId:void 0,"data-state":d.stateAttribute,...u,ref:v,onPointerMove:Oa(l.onPointerMove,j=>{j.pointerType!=="touch"&&!y.current&&!m.isPointerInTransitRef.current&&(d.onTriggerEnter(),y.current=!0)}),onPointerLeave:Oa(l.onPointerLeave,()=>{d.onTriggerLeave(),y.current=!1}),onPointerDown:Oa(l.onPointerDown,()=>{d.open&&d.onClose(),p.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Oa(l.onFocus,()=>{p.current||d.onOpen()}),onBlur:Oa(l.onBlur,d.onClose),onClick:Oa(l.onClick,d.onClose)})})});Mp.displayName=Hu;var od="TooltipPortal",[Gy,Vy]=ai(od,{forceMount:void 0}),Op=l=>{const{__scopeTooltip:o,forceMount:c,children:u,container:d}=l,m=vr(od,o);return s.jsx(Gy,{scope:o,forceMount:c,children:s.jsx(ld,{present:c||m.open,children:s.jsx(_p,{asChild:!0,container:d,children:u})})})};Op.displayName=od;var ll="TooltipContent",zp=w.forwardRef((l,o)=>{const c=Vy(ll,l.__scopeTooltip),{forceMount:u=c.forceMount,side:d="top",...m}=l,x=vr(ll,l.__scopeTooltip);return s.jsx(ld,{present:u||x.open,children:x.disableHoverableContent?s.jsx(Rp,{side:d,...m,ref:o}):s.jsx($y,{side:d,...m,ref:o})})}),$y=w.forwardRef((l,o)=>{const c=vr(ll,l.__scopeTooltip),u=rd(ll,l.__scopeTooltip),d=w.useRef(null),m=un(o,d),[x,g]=w.useState(null),{trigger:v,onClose:p}=c,y=d.current,{onPointerInTransitChange:h}=u,j=w.useCallback(()=>{g(null),h(!1)},[h]),S=w.useCallback((M,A)=>{const U=M.currentTarget,k={x:M.clientX,y:M.clientY},Q=Ky(k,U.getBoundingClientRect()),q=Jy(k,Q),W=Fy(A.getBoundingClientRect()),Z=Py([...q,...W]);g(Z),h(!0)},[h]);return w.useEffect(()=>()=>j(),[j]),w.useEffect(()=>{if(v&&y){const M=U=>S(U,y),A=U=>S(U,v);return v.addEventListener("pointerleave",M),y.addEventListener("pointerleave",A),()=>{v.removeEventListener("pointerleave",M),y.removeEventListener("pointerleave",A)}}},[v,y,S,j]),w.useEffect(()=>{if(x){const M=A=>{const U=A.target,k={x:A.clientX,y:A.clientY},Q=v?.contains(U)||y?.contains(U),q=!Wy(k,x);Q?j():q&&(j(),p())};return document.addEventListener("pointermove",M),()=>document.removeEventListener("pointermove",M)}},[v,y,x,p,j]),s.jsx(Rp,{...l,ref:m})}),[Xy,Qy]=ai(mr,{isInside:!1}),Zy=Oy("TooltipContent"),Rp=w.forwardRef((l,o)=>{const{__scopeTooltip:c,children:u,"aria-label":d,onEscapeKeyDown:m,onPointerDownOutside:x,...g}=l,v=vr(ll,c),p=ni(c),{onClose:y}=v;return w.useEffect(()=>(document.addEventListener(Uu,y),()=>document.removeEventListener(Uu,y)),[y]),w.useEffect(()=>{if(v.trigger){const h=j=>{j.target?.contains(v.trigger)&&y()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[v.trigger,y]),s.jsx(ep,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:m,onPointerDownOutside:x,onFocusOutside:h=>h.preventDefault(),onDismiss:y,children:s.jsxs(_y,{"data-state":v.stateAttribute,...p,...g,ref:o,style:{...g.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(Zy,{children:u}),s.jsx(Xy,{scope:c,isInside:!0,children:s.jsx(Hy,{id:v.contentId,role:"tooltip",children:d||u})})]})})});zp.displayName=ll;var Dp="TooltipArrow",Lp=w.forwardRef((l,o)=>{const{__scopeTooltip:c,...u}=l,d=ni(c);return Qy(Dp,c).isInside?null:s.jsx(Ey,{...d,...u,ref:o})});Lp.displayName=Dp;function Ky(l,o){const c=Math.abs(o.top-l.y),u=Math.abs(o.bottom-l.y),d=Math.abs(o.right-l.x),m=Math.abs(o.left-l.x);switch(Math.min(c,u,d,m)){case m:return"left";case d:return"right";case c:return"top";case u:return"bottom";default:throw new Error("unreachable")}}function Jy(l,o,c=5){const u=[];switch(o){case"top":u.push({x:l.x-c,y:l.y+c},{x:l.x+c,y:l.y+c});break;case"bottom":u.push({x:l.x-c,y:l.y-c},{x:l.x+c,y:l.y-c});break;case"left":u.push({x:l.x+c,y:l.y-c},{x:l.x+c,y:l.y+c});break;case"right":u.push({x:l.x-c,y:l.y-c},{x:l.x-c,y:l.y+c});break}return u}function Fy(l){const{top:o,right:c,bottom:u,left:d}=l;return[{x:d,y:o},{x:c,y:o},{x:c,y:u},{x:d,y:u}]}function Wy(l,o){const{x:c,y:u}=l;let d=!1;for(let m=0,x=o.length-1;mu!=j>u&&c<(h-p)*(u-y)/(j-y)+p&&(d=!d)}return d}function Py(l){const o=l.slice();return o.sort((c,u)=>c.xu.x?1:c.yu.y?1:0),Iy(o)}function Iy(l){if(l.length<=1)return l.slice();const o=[];for(let u=0;u=2;){const m=o[o.length-1],x=o[o.length-2];if((m.x-x.x)*(d.y-x.y)>=(m.y-x.y)*(d.x-x.x))o.pop();else break}o.push(d)}o.pop();const c=[];for(let u=l.length-1;u>=0;u--){const d=l[u];for(;c.length>=2;){const m=c[c.length-1],x=c[c.length-2];if((m.x-x.x)*(d.y-x.y)>=(m.y-x.y)*(d.x-x.x))c.pop();else break}c.push(d)}return c.pop(),o.length===1&&c.length===1&&o[0].x===c[0].x&&o[0].y===c[0].y?o:o.concat(c)}var e1=Tp,t1=Ap,a1=Mp,n1=Op,s1=zp,l1=Lp;function Up(l){var o,c,u="";if(typeof l=="string"||typeof l=="number")u+=l;else if(typeof l=="object")if(Array.isArray(l)){var d=l.length;for(o=0;o{const c=new Array(l.length+o.length);for(let u=0;u({classGroupId:l,validator:o}),Bp=(l=new Map,o=null,c)=>({nextPart:l,validators:o,classGroupId:c}),Ko="-",C0=[],i1="arbitrary..",c1=l=>{const o=d1(l),{conflictingClassGroups:c,conflictingClassGroupModifiers:u}=l;return{getClassGroupId:x=>{if(x.startsWith("[")&&x.endsWith("]"))return u1(x);const g=x.split(Ko),v=g[0]===""&&g.length>1?1:0;return qp(g,v,o)},getConflictingClassGroupIds:(x,g)=>{if(g){const v=u[x],p=c[x];return v?p?r1(p,v):v:p||C0}return c[x]||C0}}},qp=(l,o,c)=>{if(l.length-o===0)return c.classGroupId;const d=l[o],m=c.nextPart.get(d);if(m){const p=qp(l,o+1,m);if(p)return p}const x=c.validators;if(x===null)return;const g=o===0?l.join(Ko):l.slice(o).join(Ko),v=x.length;for(let p=0;pl.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=l.slice(1,-1),c=o.indexOf(":"),u=o.slice(0,c);return u?i1+u:void 0})(),d1=l=>{const{theme:o,classGroups:c}=l;return f1(c,o)},f1=(l,o)=>{const c=Bp();for(const u in l){const d=l[u];id(d,c,u,o)}return c},id=(l,o,c,u)=>{const d=l.length;for(let m=0;m{if(typeof l=="string"){h1(l,o,c);return}if(typeof l=="function"){p1(l,o,c,u);return}x1(l,o,c,u)},h1=(l,o,c)=>{const u=l===""?o:Yp(o,l);u.classGroupId=c},p1=(l,o,c,u)=>{if(g1(l)){id(l(u),o,c,u);return}o.validators===null&&(o.validators=[]),o.validators.push(o1(c,l))},x1=(l,o,c,u)=>{const d=Object.entries(l),m=d.length;for(let x=0;x{let c=l;const u=o.split(Ko),d=u.length;for(let m=0;m"isThemeGetter"in l&&l.isThemeGetter===!0,v1=l=>{if(l<1)return{get:()=>{},set:()=>{}};let o=0,c=Object.create(null),u=Object.create(null);const d=(m,x)=>{c[m]=x,o++,o>l&&(o=0,u=c,c=Object.create(null))};return{get(m){let x=c[m];if(x!==void 0)return x;if((x=u[m])!==void 0)return d(m,x),x},set(m,x){m in c?c[m]=x:d(m,x)}}},Bu="!",T0=":",b1=[],A0=(l,o,c,u,d)=>({modifiers:l,hasImportantModifier:o,baseClassName:c,maybePostfixModifierPosition:u,isExternal:d}),y1=l=>{const{prefix:o,experimentalParseClassName:c}=l;let u=d=>{const m=[];let x=0,g=0,v=0,p;const y=d.length;for(let A=0;Av?p-v:void 0;return A0(m,S,j,M)};if(o){const d=o+T0,m=u;u=x=>x.startsWith(d)?m(x.slice(d.length)):A0(b1,!1,x,void 0,!0)}if(c){const d=u;u=m=>c({className:m,parseClassName:d})}return u},w1=l=>{const o=new Map;return l.orderSensitiveModifiers.forEach((c,u)=>{o.set(c,1e6+u)}),c=>{const u=[];let d=[];for(let m=0;m0&&(d.sort(),u.push(...d),d=[]),u.push(x)):d.push(x)}return d.length>0&&(d.sort(),u.push(...d)),u}},j1=l=>({cache:v1(l.cacheSize),parseClassName:y1(l),sortModifiers:w1(l),...c1(l)}),N1=/\s+/,S1=(l,o)=>{const{parseClassName:c,getClassGroupId:u,getConflictingClassGroupIds:d,sortModifiers:m}=o,x=[],g=l.trim().split(N1);let v="";for(let p=g.length-1;p>=0;p-=1){const y=g[p],{isExternal:h,modifiers:j,hasImportantModifier:S,baseClassName:M,maybePostfixModifierPosition:A}=c(y);if(h){v=y+(v.length>0?" "+v:v);continue}let U=!!A,k=u(U?M.substring(0,A):M);if(!k){if(!U){v=y+(v.length>0?" "+v:v);continue}if(k=u(M),!k){v=y+(v.length>0?" "+v:v);continue}U=!1}const Q=j.length===0?"":j.length===1?j[0]:m(j).join(":"),q=S?Q+Bu:Q,W=q+k;if(x.indexOf(W)>-1)continue;x.push(W);const Z=d(k,U);for(let ee=0;ee0?" "+v:v)}return v},_1=(...l)=>{let o=0,c,u,d="";for(;o{if(typeof l=="string")return l;let o,c="";for(let u=0;u{let c,u,d,m;const x=v=>{const p=o.reduce((y,h)=>h(y),l());return c=j1(p),u=c.cache.get,d=c.cache.set,m=g,g(v)},g=v=>{const p=u(v);if(p)return p;const y=S1(v,c);return d(v,y),y};return m=x,(...v)=>m(_1(...v))},k1=[],ut=l=>{const o=c=>c[l]||k1;return o.isThemeGetter=!0,o},Vp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$p=/^\((?:(\w[\w-]*):)?(.+)\)$/i,C1=/^\d+\/\d+$/,T1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,A1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,z1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,el=l=>C1.test(l),Te=l=>!!l&&!Number.isNaN(Number(l)),Hn=l=>!!l&&Number.isInteger(Number(l)),Eu=l=>l.endsWith("%")&&Te(l.slice(0,-1)),ln=l=>T1.test(l),R1=()=>!0,D1=l=>A1.test(l)&&!M1.test(l),Xp=()=>!1,L1=l=>O1.test(l),U1=l=>z1.test(l),H1=l=>!me(l)&&!he(l),B1=l=>fl(l,Kp,Xp),me=l=>Vp.test(l),us=l=>fl(l,Jp,D1),ku=l=>fl(l,$1,Te),M0=l=>fl(l,Qp,Xp),q1=l=>fl(l,Zp,U1),Uo=l=>fl(l,Fp,L1),he=l=>$p.test(l),cr=l=>ml(l,Jp),Y1=l=>ml(l,X1),O0=l=>ml(l,Qp),G1=l=>ml(l,Kp),V1=l=>ml(l,Zp),Ho=l=>ml(l,Fp,!0),fl=(l,o,c)=>{const u=Vp.exec(l);return u?u[1]?o(u[1]):c(u[2]):!1},ml=(l,o,c=!1)=>{const u=$p.exec(l);return u?u[1]?o(u[1]):c:!1},Qp=l=>l==="position"||l==="percentage",Zp=l=>l==="image"||l==="url",Kp=l=>l==="length"||l==="size"||l==="bg-size",Jp=l=>l==="length",$1=l=>l==="number",X1=l=>l==="family-name",Fp=l=>l==="shadow",Q1=()=>{const l=ut("color"),o=ut("font"),c=ut("text"),u=ut("font-weight"),d=ut("tracking"),m=ut("leading"),x=ut("breakpoint"),g=ut("container"),v=ut("spacing"),p=ut("radius"),y=ut("shadow"),h=ut("inset-shadow"),j=ut("text-shadow"),S=ut("drop-shadow"),M=ut("blur"),A=ut("perspective"),U=ut("aspect"),k=ut("ease"),Q=ut("animate"),q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Z=()=>[...W(),he,me],ee=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],L=()=>[he,me,v],Y=()=>[el,"full","auto",...L()],le=()=>[Hn,"none","subgrid",he,me],G=()=>["auto",{span:["full",Hn,he,me]},Hn,he,me],ne=()=>[Hn,"auto",he,me],O=()=>["auto","min","max","fr",he,me],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...L()],V=()=>[el,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],B=()=>[l,he,me],ue=()=>[...W(),O0,M0,{position:[he,me]}],xe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_=()=>["auto","cover","contain",G1,B1,{size:[he,me]}],K=()=>[Eu,cr,us],X=()=>["","none","full",p,he,me],ae=()=>["",Te,cr,us],oe=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Te,Eu,O0,M0],Ne=()=>["","none",M,he,me],Ce=()=>["none",Te,he,me],We=()=>["none",Te,he,me],it=()=>[Te,he,me],qe=()=>[el,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ln],breakpoint:[ln],color:[R1],container:[ln],"drop-shadow":[ln],ease:["in","out","in-out"],font:[H1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ln],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ln],shadow:[ln],spacing:["px",Te],text:[ln],"text-shadow":[ln],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",el,me,he,U]}],container:["container"],columns:[{columns:[Te,me,he,g]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Z()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{start:Y()}],end:[{end:Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[Hn,"auto",he,me]}],basis:[{basis:[el,"full","auto",g,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Te,el,"auto","initial","none",me]}],grow:[{grow:["",Te,he,me]}],shrink:[{shrink:["",Te,he,me]}],order:[{order:[Hn,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],w:[{w:[g,"screen",...V()]}],"min-w":[{"min-w":[g,"screen","none",...V()]}],"max-w":[{"max-w":[g,"screen","none","prose",{screen:[x]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",c,cr,us]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[u,he,ku]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eu,me]}],"font-family":[{font:[Y1,me,o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[d,he,me]}],"line-clamp":[{"line-clamp":[Te,"none",he,ku]}],leading:[{leading:[m,...L()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Te,"from-font","auto",he,us]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[Te,"auto",he,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ue()}],"bg-repeat":[{bg:xe()}],"bg-size":[{bg:_()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Hn,he,me],radial:["",he,me],conic:[Hn,he,me]},V1,q1]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:ae()}],"border-w-x":[{"border-x":ae()}],"border-w-y":[{"border-y":ae()}],"border-w-s":[{"border-s":ae()}],"border-w-e":[{"border-e":ae()}],"border-w-t":[{"border-t":ae()}],"border-w-r":[{"border-r":ae()}],"border-w-b":[{"border-b":ae()}],"border-w-l":[{"border-l":ae()}],"divide-x":[{"divide-x":ae()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ae()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Te,he,me]}],"outline-w":[{outline:["",Te,cr,us]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",y,Ho,Uo]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",h,Ho,Uo]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[Te,us]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":ae()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",j,Ho,Uo]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[Te,he,me]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Te]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":W()}],"mask-image-conic-pos":[{"mask-conic":[Te]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ue()}],"mask-repeat":[{mask:xe()}],"mask-size":[{mask:_()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:Ne()}],brightness:[{brightness:[Te,he,me]}],contrast:[{contrast:[Te,he,me]}],"drop-shadow":[{"drop-shadow":["","none",S,Ho,Uo]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",Te,he,me]}],"hue-rotate":[{"hue-rotate":[Te,he,me]}],invert:[{invert:["",Te,he,me]}],saturate:[{saturate:[Te,he,me]}],sepia:[{sepia:["",Te,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[Te,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Te,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Te,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Te,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Te,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Te,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Te,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Te,he,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Te,"initial",he,me]}],ease:[{ease:["linear","initial",k,he,me]}],delay:[{delay:[Te,he,me]}],animate:[{animate:["none",Q,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[A,he,me]}],"perspective-origin":[{"perspective-origin":Z()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:We()}],"scale-x":[{"scale-x":We()}],"scale-y":[{"scale-y":We()}],"scale-z":[{"scale-z":We()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:Z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:qe()}],"translate-x":[{"translate-x":qe()}],"translate-y":[{"translate-y":qe()}],"translate-z":[{"translate-z":qe()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he,me]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[Te,cr,us,ku]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Z1=E1(Q1);function ve(...l){return Z1(Hp(l))}function Wp({delayDuration:l=0,...o}){return s.jsx(e1,{"data-slot":"tooltip-provider",delayDuration:l,...o})}function va({...l}){return s.jsx(Wp,{children:s.jsx(t1,{"data-slot":"tooltip",...l})})}function ba({...l}){return s.jsx(a1,{"data-slot":"tooltip-trigger",...l})}function ya({className:l,sideOffset:o=0,children:c,...u}){return s.jsx(n1,{children:s.jsxs(s1,{"data-slot":"tooltip-content",sideOffset:o,className:ve("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",l),...u,children:[c,s.jsx(l1,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function K1(l){if(typeof document>"u")return;let o=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",o.appendChild(c),c.styleSheet?c.styleSheet.cssText=l:c.appendChild(document.createTextNode(l))}const J1=l=>{switch(l){case"success":return P1;case"info":return e2;case"warning":return I1;case"error":return t2;default:return null}},F1=Array(12).fill(0),W1=({visible:l,className:o})=>re.createElement("div",{className:["sonner-loading-wrapper",o].filter(Boolean).join(" "),"data-visible":l},re.createElement("div",{className:"sonner-spinner"},F1.map((c,u)=>re.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${u}`})))),P1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),I1=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),e2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),t2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},re.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),a2=re.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},re.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),re.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),n2=()=>{const[l,o]=re.useState(document.hidden);return re.useEffect(()=>{const c=()=>{o(document.hidden)};return document.addEventListener("visibilitychange",c),()=>window.removeEventListener("visibilitychange",c)},[]),l};let qu=1;class s2{constructor(){this.subscribe=o=>(this.subscribers.push(o),()=>{const c=this.subscribers.indexOf(o);this.subscribers.splice(c,1)}),this.publish=o=>{this.subscribers.forEach(c=>c(o))},this.addToast=o=>{this.publish(o),this.toasts=[...this.toasts,o]},this.create=o=>{var c;const{message:u,...d}=o,m=typeof o?.id=="number"||((c=o.id)==null?void 0:c.length)>0?o.id:qu++,x=this.toasts.find(v=>v.id===m),g=o.dismissible===void 0?!0:o.dismissible;return this.dismissedToasts.has(m)&&this.dismissedToasts.delete(m),x?this.toasts=this.toasts.map(v=>v.id===m?(this.publish({...v,...o,id:m,title:u}),{...v,...o,id:m,dismissible:g,title:u}):v):this.addToast({title:u,...d,dismissible:g,id:m}),m},this.dismiss=o=>(o?(this.dismissedToasts.add(o),requestAnimationFrame(()=>this.subscribers.forEach(c=>c({id:o,dismiss:!0})))):this.toasts.forEach(c=>{this.subscribers.forEach(u=>u({id:c.id,dismiss:!0}))}),o),this.message=(o,c)=>this.create({...c,message:o}),this.error=(o,c)=>this.create({...c,message:o,type:"error"}),this.success=(o,c)=>this.create({...c,type:"success",message:o}),this.info=(o,c)=>this.create({...c,type:"info",message:o}),this.warning=(o,c)=>this.create({...c,type:"warning",message:o}),this.loading=(o,c)=>this.create({...c,type:"loading",message:o}),this.promise=(o,c)=>{if(!c)return;let u;c.loading!==void 0&&(u=this.create({...c,promise:o,type:"loading",message:c.loading,description:typeof c.description!="function"?c.description:void 0}));const d=Promise.resolve(o instanceof Function?o():o);let m=u!==void 0,x;const g=d.then(async p=>{if(x=["resolve",p],re.isValidElement(p))m=!1,this.create({id:u,type:"default",message:p});else if(r2(p)&&!p.ok){m=!1;const h=typeof c.error=="function"?await c.error(`HTTP error! status: ${p.status}`):c.error,j=typeof c.description=="function"?await c.description(`HTTP error! status: ${p.status}`):c.description,M=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:j,...M})}else if(p instanceof Error){m=!1;const h=typeof c.error=="function"?await c.error(p):c.error,j=typeof c.description=="function"?await c.description(p):c.description,M=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:j,...M})}else if(c.success!==void 0){m=!1;const h=typeof c.success=="function"?await c.success(p):c.success,j=typeof c.description=="function"?await c.description(p):c.description,M=typeof h=="object"&&!re.isValidElement(h)?h:{message:h};this.create({id:u,type:"success",description:j,...M})}}).catch(async p=>{if(x=["reject",p],c.error!==void 0){m=!1;const y=typeof c.error=="function"?await c.error(p):c.error,h=typeof c.description=="function"?await c.description(p):c.description,S=typeof y=="object"&&!re.isValidElement(y)?y:{message:y};this.create({id:u,type:"error",description:h,...S})}}).finally(()=>{m&&(this.dismiss(u),u=void 0),c.finally==null||c.finally.call(c)}),v=()=>new Promise((p,y)=>g.then(()=>x[0]==="reject"?y(x[1]):p(x[1])).catch(y));return typeof u!="string"&&typeof u!="number"?{unwrap:v}:Object.assign(u,{unwrap:v})},this.custom=(o,c)=>{const u=c?.id||qu++;return this.create({jsx:o(u),id:u,...c}),u},this.getActiveToasts=()=>this.toasts.filter(o=>!this.dismissedToasts.has(o.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Xt=new s2,l2=(l,o)=>{const c=o?.id||qu++;return Xt.addToast({title:l,...o,id:c}),c},r2=l=>l&&typeof l=="object"&&"ok"in l&&typeof l.ok=="boolean"&&"status"in l&&typeof l.status=="number",o2=l2,i2=()=>Xt.toasts,c2=()=>Xt.getActiveToasts(),St=Object.assign(o2,{success:Xt.success,info:Xt.info,warning:Xt.warning,error:Xt.error,custom:Xt.custom,message:Xt.message,promise:Xt.promise,dismiss:Xt.dismiss,loading:Xt.loading},{getHistory:i2,getToasts:c2});K1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Bo(l){return l.label!==void 0}const u2=3,d2="24px",f2="16px",z0=4e3,m2=356,h2=14,p2=45,x2=200;function Ta(...l){return l.filter(Boolean).join(" ")}function g2(l){const[o,c]=l.split("-"),u=[];return o&&u.push(o),c&&u.push(c),u}const v2=l=>{var o,c,u,d,m,x,g,v,p;const{invert:y,toast:h,unstyled:j,interacting:S,setHeights:M,visibleToasts:A,heights:U,index:k,toasts:Q,expanded:q,removeToast:W,defaultRichColors:Z,closeButton:ee,style:E,cancelButtonStyle:L,actionButtonStyle:Y,className:le="",descriptionClassName:G="",duration:ne,position:O,gap:se,expandByDefault:ie,classNames:T,icons:V,closeButtonAriaLabel:B="Close toast"}=l,[ue,xe]=re.useState(null),[_,K]=re.useState(null),[X,ae]=re.useState(!1),[oe,ge]=re.useState(!1),[de,Ne]=re.useState(!1),[Ce,We]=re.useState(!1),[it,qe]=re.useState(!1),[I,Ye]=re.useState(0),[J,be]=re.useState(0),nt=re.useRef(h.duration||ne||z0),Ct=re.useRef(null),Zt=re.useRef(null),hl=k===0,pl=k+1<=A,Tt=h.type,dn=h.dismissible!==!1,At=h.className||"",ri=h.descriptionClassName||"",Gn=re.useMemo(()=>U.findIndex(Se=>Se.toastId===h.id)||0,[U,h.id]),yr=re.useMemo(()=>{var Se;return(Se=h.closeButton)!=null?Se:ee},[h.closeButton,ee]),Vn=re.useMemo(()=>h.duration||ne||z0,[h.duration,ne]),xl=re.useRef(0),qa=re.useRef(0),wr=re.useRef(0),fn=re.useRef(null),[$n,Mt]=O.split("-"),ma=re.useMemo(()=>U.reduce((Se,Ke,ht)=>ht>=Gn?Se:Se+Ke.height,0),[U,Gn]),_t=n2(),oi=h.invert||y,gl=Tt==="loading";qa.current=re.useMemo(()=>Gn*se+ma,[Gn,ma]),re.useEffect(()=>{nt.current=Vn},[Vn]),re.useEffect(()=>{ae(!0)},[]),re.useEffect(()=>{const Se=Zt.current;if(Se){const Ke=Se.getBoundingClientRect().height;return be(Ke),M(ht=>[{toastId:h.id,height:Ke,position:h.position},...ht]),()=>M(ht=>ht.filter(Et=>Et.toastId!==h.id))}},[M,h.id]),re.useLayoutEffect(()=>{if(!X)return;const Se=Zt.current,Ke=Se.style.height;Se.style.height="auto";const ht=Se.getBoundingClientRect().height;Se.style.height=Ke,be(ht),M(Et=>Et.find(Fe=>Fe.toastId===h.id)?Et.map(Fe=>Fe.toastId===h.id?{...Fe,height:ht}:Fe):[{toastId:h.id,height:ht,position:h.position},...Et])},[X,h.title,h.description,M,h.id,h.jsx,h.action,h.cancel]);const Na=re.useCallback(()=>{ge(!0),Ye(qa.current),M(Se=>Se.filter(Ke=>Ke.toastId!==h.id)),setTimeout(()=>{W(h)},x2)},[h,W,M,qa]);re.useEffect(()=>{if(h.promise&&Tt==="loading"||h.duration===1/0||h.type==="loading")return;let Se;return q||S||_t?(()=>{if(wr.current{h.onAutoClose==null||h.onAutoClose.call(h,h),Na()},nt.current)),()=>clearTimeout(Se)},[q,S,h,Tt,_t,Na]),re.useEffect(()=>{h.delete&&(Na(),h.onDismiss==null||h.onDismiss.call(h,h))},[Na,h.delete]);function ms(){var Se;if(V?.loading){var Ke;return re.createElement("div",{className:Ta(T?.loader,h==null||(Ke=h.classNames)==null?void 0:Ke.loader,"sonner-loader"),"data-visible":Tt==="loading"},V.loading)}return re.createElement(W1,{className:Ta(T?.loader,h==null||(Se=h.classNames)==null?void 0:Se.loader),visible:Tt==="loading"})}const hs=h.icon||V?.[Tt]||J1(Tt);var Xn,Sa;return re.createElement("li",{tabIndex:0,ref:Zt,className:Ta(le,At,T?.toast,h==null||(o=h.classNames)==null?void 0:o.toast,T?.default,T?.[Tt],h==null||(c=h.classNames)==null?void 0:c[Tt]),"data-sonner-toast":"","data-rich-colors":(Xn=h.richColors)!=null?Xn:Z,"data-styled":!(h.jsx||h.unstyled||j),"data-mounted":X,"data-promise":!!h.promise,"data-swiped":it,"data-removed":oe,"data-visible":pl,"data-y-position":$n,"data-x-position":Mt,"data-index":k,"data-front":hl,"data-swiping":de,"data-dismissible":dn,"data-type":Tt,"data-invert":oi,"data-swipe-out":Ce,"data-swipe-direction":_,"data-expanded":!!(q||ie&&X),"data-testid":h.testId,style:{"--index":k,"--toasts-before":k,"--z-index":Q.length-k,"--offset":`${oe?I:qa.current}px`,"--initial-height":ie?"auto":`${J}px`,...E,...h.style},onDragEnd:()=>{Ne(!1),xe(null),fn.current=null},onPointerDown:Se=>{Se.button!==2&&(gl||!dn||(Ct.current=new Date,Ye(qa.current),Se.target.setPointerCapture(Se.pointerId),Se.target.tagName!=="BUTTON"&&(Ne(!0),fn.current={x:Se.clientX,y:Se.clientY})))},onPointerUp:()=>{var Se,Ke,ht;if(Ce||!dn)return;fn.current=null;const Et=Number(((Se=Zt.current)==null?void 0:Se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),mn=Number(((Ke=Zt.current)==null?void 0:Ke.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Fe=new Date().getTime()-((ht=Ct.current)==null?void 0:ht.getTime()),Rt=ue==="x"?Et:mn,Qn=Math.abs(Rt)/Fe;if(Math.abs(Rt)>=p2||Qn>.11){Ye(qa.current),h.onDismiss==null||h.onDismiss.call(h,h),K(ue==="x"?Et>0?"right":"left":mn>0?"down":"up"),Na(),We(!0);return}else{var Dt,Lt;(Dt=Zt.current)==null||Dt.style.setProperty("--swipe-amount-x","0px"),(Lt=Zt.current)==null||Lt.style.setProperty("--swipe-amount-y","0px")}qe(!1),Ne(!1),xe(null)},onPointerMove:Se=>{var Ke,ht,Et;if(!fn.current||!dn||((Ke=window.getSelection())==null?void 0:Ke.toString().length)>0)return;const Fe=Se.clientY-fn.current.y,Rt=Se.clientX-fn.current.x;var Qn;const Dt=(Qn=l.swipeDirections)!=null?Qn:g2(O);!ue&&(Math.abs(Rt)>1||Math.abs(Fe)>1)&&xe(Math.abs(Rt)>Math.abs(Fe)?"x":"y");let Lt={x:0,y:0};const ps=ha=>1/(1.5+Math.abs(ha)/20);if(ue==="y"){if(Dt.includes("top")||Dt.includes("bottom"))if(Dt.includes("top")&&Fe<0||Dt.includes("bottom")&&Fe>0)Lt.y=Fe;else{const ha=Fe*ps(Fe);Lt.y=Math.abs(ha)0)Lt.x=Rt;else{const ha=Rt*ps(Rt);Lt.x=Math.abs(ha)0||Math.abs(Lt.y)>0)&&qe(!0),(ht=Zt.current)==null||ht.style.setProperty("--swipe-amount-x",`${Lt.x}px`),(Et=Zt.current)==null||Et.style.setProperty("--swipe-amount-y",`${Lt.y}px`)}},yr&&!h.jsx&&Tt!=="loading"?re.createElement("button",{"aria-label":B,"data-disabled":gl,"data-close-button":!0,onClick:gl||!dn?()=>{}:()=>{Na(),h.onDismiss==null||h.onDismiss.call(h,h)},className:Ta(T?.closeButton,h==null||(u=h.classNames)==null?void 0:u.closeButton)},(Sa=V?.close)!=null?Sa:a2):null,(Tt||h.icon||h.promise)&&h.icon!==null&&(V?.[Tt]!==null||h.icon)?re.createElement("div",{"data-icon":"",className:Ta(T?.icon,h==null||(d=h.classNames)==null?void 0:d.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||ms():null,h.type!=="loading"?hs:null):null,re.createElement("div",{"data-content":"",className:Ta(T?.content,h==null||(m=h.classNames)==null?void 0:m.content)},re.createElement("div",{"data-title":"",className:Ta(T?.title,h==null||(x=h.classNames)==null?void 0:x.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?re.createElement("div",{"data-description":"",className:Ta(G,ri,T?.description,h==null||(g=h.classNames)==null?void 0:g.description)},typeof h.description=="function"?h.description():h.description):null),re.isValidElement(h.cancel)?h.cancel:h.cancel&&Bo(h.cancel)?re.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||L,onClick:Se=>{Bo(h.cancel)&&dn&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,Se),Na())},className:Ta(T?.cancelButton,h==null||(v=h.classNames)==null?void 0:v.cancelButton)},h.cancel.label):null,re.isValidElement(h.action)?h.action:h.action&&Bo(h.action)?re.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||Y,onClick:Se=>{Bo(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,Se),!Se.defaultPrevented&&Na())},className:Ta(T?.actionButton,h==null||(p=h.classNames)==null?void 0:p.actionButton)},h.action.label):null)};function R0(){if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?window.getComputedStyle(document.documentElement).direction:l}function b2(l,o){const c={};return[l,o].forEach((u,d)=>{const m=d===1,x=m?"--mobile-offset":"--offset",g=m?f2:d2;function v(p){["top","right","bottom","left"].forEach(y=>{c[`${x}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof u=="number"||typeof u=="string"?v(u):typeof u=="object"?["top","right","bottom","left"].forEach(p=>{u[p]===void 0?c[`${x}-${p}`]=g:c[`${x}-${p}`]=typeof u[p]=="number"?`${u[p]}px`:u[p]}):v(g)}),c}const y2=re.forwardRef(function(o,c){const{id:u,invert:d,position:m="bottom-right",hotkey:x=["altKey","KeyT"],expand:g,closeButton:v,className:p,offset:y,mobileOffset:h,theme:j="light",richColors:S,duration:M,style:A,visibleToasts:U=u2,toastOptions:k,dir:Q=R0(),gap:q=h2,icons:W,containerAriaLabel:Z="Notifications"}=o,[ee,E]=re.useState([]),L=re.useMemo(()=>u?ee.filter(X=>X.toasterId===u):ee.filter(X=>!X.toasterId),[ee,u]),Y=re.useMemo(()=>Array.from(new Set([m].concat(L.filter(X=>X.position).map(X=>X.position)))),[L,m]),[le,G]=re.useState([]),[ne,O]=re.useState(!1),[se,ie]=re.useState(!1),[T,V]=re.useState(j!=="system"?j:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=re.useRef(null),ue=x.join("+").replace(/Key/g,"").replace(/Digit/g,""),xe=re.useRef(null),_=re.useRef(!1),K=re.useCallback(X=>{E(ae=>{var oe;return(oe=ae.find(ge=>ge.id===X.id))!=null&&oe.delete||Xt.dismiss(X.id),ae.filter(({id:ge})=>ge!==X.id)})},[]);return re.useEffect(()=>Xt.subscribe(X=>{if(X.dismiss){requestAnimationFrame(()=>{E(ae=>ae.map(oe=>oe.id===X.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{P0.flushSync(()=>{E(ae=>{const oe=ae.findIndex(ge=>ge.id===X.id);return oe!==-1?[...ae.slice(0,oe),{...ae[oe],...X},...ae.slice(oe+1)]:[X,...ae]})})})}),[ee]),re.useEffect(()=>{if(j!=="system"){V(j);return}if(j==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?V("dark"):V("light")),typeof window>"u")return;const X=window.matchMedia("(prefers-color-scheme: dark)");try{X.addEventListener("change",({matches:ae})=>{V(ae?"dark":"light")})}catch{X.addListener(({matches:oe})=>{try{V(oe?"dark":"light")}catch(ge){console.error(ge)}})}},[j]),re.useEffect(()=>{ee.length<=1&&O(!1)},[ee]),re.useEffect(()=>{const X=ae=>{var oe;if(x.every(Ne=>ae[Ne]||ae.code===Ne)){var de;O(!0),(de=B.current)==null||de.focus()}ae.code==="Escape"&&(document.activeElement===B.current||(oe=B.current)!=null&&oe.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",X),()=>document.removeEventListener("keydown",X)},[x]),re.useEffect(()=>{if(B.current)return()=>{xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null,_.current=!1)}},[B.current]),re.createElement("section",{ref:c,"aria-label":`${Z} ${ue}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Y.map((X,ae)=>{var oe;const[ge,de]=X.split("-");return L.length?re.createElement("ol",{key:X,dir:Q==="auto"?R0():Q,tabIndex:-1,ref:B,className:p,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":ge,"data-x-position":de,style:{"--front-toast-height":`${((oe=le[0])==null?void 0:oe.height)||0}px`,"--width":`${m2}px`,"--gap":`${q}px`,...A,...b2(y,h)},onBlur:Ne=>{_.current&&!Ne.currentTarget.contains(Ne.relatedTarget)&&(_.current=!1,xe.current&&(xe.current.focus({preventScroll:!0}),xe.current=null))},onFocus:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||_.current||(_.current=!0,xe.current=Ne.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{se||O(!1)},onDragEnd:()=>O(!1),onPointerDown:Ne=>{Ne.target instanceof HTMLElement&&Ne.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},L.filter(Ne=>!Ne.position&&ae===0||Ne.position===X).map((Ne,Ce)=>{var We,it;return re.createElement(v2,{key:Ne.id,icons:W,index:Ce,toast:Ne,defaultRichColors:S,duration:(We=k?.duration)!=null?We:M,className:k?.className,descriptionClassName:k?.descriptionClassName,invert:d,visibleToasts:U,closeButton:(it=k?.closeButton)!=null?it:v,interacting:se,position:X,style:k?.style,unstyled:k?.unstyled,classNames:k?.classNames,cancelButtonStyle:k?.cancelButtonStyle,actionButtonStyle:k?.actionButtonStyle,closeButtonAriaLabel:k?.closeButtonAriaLabel,removeToast:K,toasts:L.filter(qe=>qe.position==Ne.position),heights:le.filter(qe=>qe.position==Ne.position),setHeights:G,expandByDefault:g,gap:q,expanded:ne,swipeDirections:o.swipeDirections})})):null}))});class et extends Error{constructor(){super("Engine Offline"),this.name="EngineOfflineError"}}const Pp=w.createContext(null);function vt(){const l=w.useContext(Pp);if(!l)throw new Error("useProxyContext must be used within ProxyProvider");return l}function w2({children:l}){const[o,c]=w.useState(null),u=w.useRef(null),[d,m]=w.useState(null),[x,g]=w.useState([]),[v,p]=w.useState(null),[y,h]=w.useState(!1),[j,S]=w.useState(1200),[M,A]=w.useState(!1),[U,k]=w.useState(!1),Q=typeof window.pp_status=="function",q=w.useCallback((E,L="success")=>{L==="success"?St.success(E):St.error(E)},[]),W=w.useCallback(async()=>{try{let E=!1;if(window.pp_status){const L=await window.pp_status();c(L),u.current=L,E=L.running}else try{const L=await fetch("/healthz");if(L.ok){const le={running:!0,port:(await L.json().catch(()=>({}))).port||0,base_url:location.origin,last_error:""};c(le),u.current=le,E=!0}else{const Y={running:!1,port:0,base_url:location.origin,last_error:L.statusText};c(Y),u.current=Y}}catch(L){const Y={running:!1,port:0,base_url:location.origin,last_error:String(L)};c(Y),u.current=Y,E=!1}if(E){if(A(!0),k(!1),S(1200),d)try{const Y=await fetch("/v0/management/auth-files",{headers:{"X-Management-Key":d}});if(Y.ok){const le=await Y.json();Array.isArray(le)&&g(le)}}catch(L){console.error("Auth files error:",L)}}else M&&!U&&Q&&window.pp_start&&(console.log("Unexpected stop detected, attempting auto-reconnect..."),window.pp_start().catch(L=>console.error("Auto-reconnect failed:",L))),g([]),S(L=>Math.min(L*1.5,1e4))}catch(E){console.error("Status error:",E),S(L=>Math.min(L*1.5,1e4))}},[d]),Z=w.useCallback(async(E,L={})=>{if(!u.current?.running)throw new et;if(!d)throw new Error("Missing management key");h(!0);try{const le=Object.assign({},L.headers||{},{"X-Management-Key":d}),G=await fetch(E,{...L,headers:le}),O=(G.headers.get("content-type")||"").toLowerCase().includes("application/json")?await G.json():await G.text();if(!G.ok){const se=u.current;if(G.status===404&&(!se||!se.running))throw new et;const ie=typeof O=="string"?O:O?.error?O.error:JSON.stringify(O);throw new Error(`${G.status} ${G.statusText}: ${ie}`)}return O}catch(le){throw le instanceof TypeError?new et:le}finally{h(!1)}},[d]),ee=w.useCallback(async(E,L,Y)=>{if(E){L==="stop"&&k(!0),(L==="start"||L==="restart")&&k(!1),p(L);try{await E(),q(Y,"success"),await W()}catch(le){q(le instanceof Error?le.message:String(le),"error")}finally{p(null)}}},[q,W]);return w.useEffect(()=>{W();let E;const L=()=>{E=setTimeout(async()=>{await W(),L()},j)};return L(),(async()=>{try{if(window.pp_get_management_key){const Y=await window.pp_get_management_key();m(Y)}else if(!Q){const Y=document.querySelector('meta[name="pp-mgmt-key"]');m(Y?Y.getAttribute("content"):null)}}catch(Y){console.error("Management key error:",Y)}})(),()=>clearTimeout(E)},[W,Q,j]),s.jsx(Pp.Provider,{value:{status:o,isDesktop:Q,mgmtKey:d,authFiles:x,loading:v,isMgmtLoading:y,setLoading:p,refreshStatus:W,showToast:q,mgmtFetch:Z,handleAction:ee,pp_get_usage:window.pp_get_usage,pp_detect_agents:window.pp_detect_agents,pp_configure_agent:window.pp_configure_agent,pp_unconfigure_agent:window.pp_unconfigure_agent,pp_check_updates:window.pp_check_updates,pp_download_update:window.pp_download_update},children:l})}const j2=l=>l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N2=l=>l.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,c,u)=>u?u.toUpperCase():c.toLowerCase()),D0=l=>{const o=N2(l);return o.charAt(0).toUpperCase()+o.slice(1)},Ip=(...l)=>l.filter((o,c,u)=>!!o&&o.trim()!==""&&u.indexOf(o)===c).join(" ").trim(),S2=l=>{for(const o in l)if(o.startsWith("aria-")||o==="role"||o==="title")return!0};var _2={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const E2=w.forwardRef(({color:l="currentColor",size:o=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:d="",children:m,iconNode:x,...g},v)=>w.createElement("svg",{ref:v,..._2,width:o,height:o,stroke:l,strokeWidth:u?Number(c)*24/Number(o):c,className:Ip("lucide",d),...!m&&!S2(g)&&{"aria-hidden":"true"},...g},[...x.map(([p,y])=>w.createElement(p,y)),...Array.isArray(m)?m:[m]]));const ce=(l,o)=>{const c=w.forwardRef(({className:u,...d},m)=>w.createElement(E2,{ref:m,iconNode:o,className:Ip(`lucide-${j2(D0(l))}`,`lucide-${l}`,u),...d}));return c.displayName=D0(l),c};const k2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],br=ce("activity",k2);const C2=[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]],L0=ce("anchor",C2);const T2=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Yu=ce("brain",T2);const A2=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Gu=ce("chart-column",A2);const M2=[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]],O2=ce("chart-pie",M2);const z2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],rl=ce("check",z2);const R2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],cn=ce("chevron-down",R2);const D2=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],L2=ce("chevron-left",D2);const U2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hr=ce("chevron-right",U2);const H2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],B2=ce("chevron-up",H2);const q2=[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]],Y2=ce("chevrons-left",q2);const G2=[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]],V2=ce("chevrons-right",G2);const $2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],pr=ce("circle-alert",$2);const X2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],si=ce("circle-check",X2);const Q2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],cd=ce("circle-x",Q2);const Z2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Jo=ce("circle",Z2);const K2=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],J2=ce("clipboard",K2);const F2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],xr=ce("clock",F2);const W2=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],U0=ce("code-xml",W2);const P2=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ol=ce("copy",P2);const I2=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ur=ce("database",I2);const ew=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],tw=ce("dollar-sign",ew);const aw=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],fs=ce("download",aw);const nw=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ex=ce("external-link",nw);const sw=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],lw=ce("file-code",sw);const rw=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],tx=ce("file-text",rw);const ow=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Vu=ce("folder-open",ow);const iw=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],cw=ce("funnel",iw);const uw=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],$u=ce("gauge",uw);const dw=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],fw=ce("git-branch",dw);const mw=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],hw=ce("hard-drive",mw);const pw=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],Cu=ce("hash",pw);const xw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],gw=ce("history",xw);const vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bw=ce("info",vw);const yw=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],ww=ce("key",yw);const jw=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],mt=ce("loader-circle",jw);const Nw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],ax=ce("lock-open",Nw);const Sw=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],nx=ce("lock",Sw);const _w=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ew=ce("monitor",_w);const kw=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],Cw=ce("moon",kw);const Tw=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Aw=ce("pencil",Tw);const Mw=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Ow=ce("pin",Mw);const zw=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],sx=ce("play",zw);const Rw=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Dw=ce("plus",Rw);const Lw=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],Tu=ce("radar",Lw);const Uw=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],lx=ce("radio",Uw);const Hw=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Qt=ce("refresh-cw",Hw);const Bw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],qw=ce("rotate-ccw",Bw);const Yw=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],Gw=ce("rotate-cw",Yw);const Vw=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],nl=ce("save",Vw);const $w=[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]],Xw=ce("scissors",$w);const Qw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Zw=ce("scroll-text",Qw);const Kw=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jw=ce("search",Kw);const Fw=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Vo=ce("settings",Fw);const Ww=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Pw=ce("settings-2",Ww);const Iw=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],ej=ce("shield",Iw);const tj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],rx=ce("sparkles",tj);const aj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],nj=ce("square",aj);const sj=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],lj=ce("sun",sj);const rj=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Xu=ce("terminal",rj);const oj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],il=ce("trash-2",oj);const ij=[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]],cj=ce("trending-down",ij);const uj=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],H0=ce("trending-up",uj);const dj=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ud=ce("triangle-alert",dj);const fj=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],mj=ce("undo-2",fj);const hj=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],pj=ce("upload",hj);const xj=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],Au=ce("users",xj);const gj=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],ox=ce("wrench",gj);const vj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],dd=ce("x",vj);const bj=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Ra=ce("zap",bj);function yj(l){const o=Math.floor(l/3600),c=Math.floor(l%3600/60),u=l%60;return o>0?`${o}h ${c}m`:c>0?`${c}m ${u}s`:`${u}s`}function wj(){const{status:l,loading:o,handleAction:c,showToast:u,isDesktop:d}=vt(),[m,x]=w.useState(0),[g,v]=w.useState(!1),p=w.useRef(null),y=l?.running??!1;w.useEffect(()=>{if(y){p.current===null&&(p.current=Date.now());const j=setInterval(()=>{p.current&&x(Math.floor((Date.now()-p.current)/1e3))},1e3);return()=>clearInterval(j)}p.current=null,x(0)},[y]);const h=async()=>{if(l?.base_url)try{await navigator.clipboard.writeText(l.base_url),v(!0),u("URL copied to clipboard","success"),setTimeout(()=>v(!1),2e3)}catch{u("Failed to copy URL","error")}};return s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsx(lx,{className:"h-4 w-4 text-[var(--accent-primary)]"}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"Engine Control"}),s.jsx("div",{className:"flex-1"}),s.jsx("div",{className:`h-2 w-2 rounded-full ${y?"bg-[var(--status-online)] animate-pulse":"bg-[var(--status-offline)]"}`})]}),s.jsxs("div",{className:"p-6 flex flex-col items-center",children:[s.jsxs("div",{className:"relative w-48 h-48 mb-6",children:[y&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite"}}),s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite 0.5s"}}),s.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-[var(--status-online)] opacity-0",style:{animation:"radar-pulse 2s ease-out infinite 1s"}})]}),s.jsx("div",{className:`absolute inset-4 rounded-full border-2 transition-colors duration-300 ${y?"border-[var(--status-online)]/30":"border-[var(--border-subtle)]"}`}),s.jsx("div",{className:`absolute inset-8 rounded-full border transition-colors duration-300 ${y?"border-[var(--status-online)]/20":"border-[var(--border-subtle)]/50"}`}),s.jsx("div",{className:`absolute inset-12 rounded-full flex flex-col items-center justify-center transition-all duration-500 ${y?"bg-gradient-to-br from-[var(--accent-primary)] to-[var(--accent-secondary)] shadow-[0_0_30px_var(--status-online)]":"bg-gradient-to-br from-[var(--bg-elevated)] to-[var(--bg-active)] border border-[var(--border-default)]"}`,children:s.jsx("span",{className:`font-mono text-xs font-bold tracking-wider ${y?"text-white":"text-[var(--text-muted)]"}`,children:y?"ONLINE":"OFFLINE"})}),y&&s.jsx("div",{className:"absolute inset-0 rounded-full overflow-hidden",style:{animation:"radar-sweep 3s linear infinite"},children:s.jsx("div",{className:"absolute top-1/2 left-1/2 w-1/2 h-0.5 origin-left",style:{background:"linear-gradient(90deg, var(--status-online) 0%, transparent 100%)"}})})]}),s.jsxs("div",{className:"w-full grid grid-cols-2 gap-3 mb-6",children:[s.jsxs("div",{className:"bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Port"}),s.jsx("div",{className:`font-mono text-lg font-bold ${y?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"}`,children:y&&l?.port||"---"})]}),s.jsxs("div",{className:"bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Uptime"}),s.jsx("div",{className:`font-mono text-lg font-bold ${y?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"}`,children:y?yj(m):"--:--"})]})]}),l?.last_error&&s.jsx("div",{className:"w-full mb-6 rounded-md border-2 border-[var(--status-warning)] bg-[var(--status-warning)]/10 p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"p-1.5 rounded bg-[var(--status-warning)]/20",children:s.jsx(ud,{className:"h-4 w-4 text-[var(--status-warning)]"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--status-warning)] mb-1",children:"Caution"}),s.jsx("div",{className:"font-mono text-sm text-[var(--status-warning)] break-all",children:l.last_error})]})]})}),s.jsxs("div",{className:"w-full grid grid-cols-3 gap-3 mb-6",children:[s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:y||o==="start",onClick:()=>c(window.pp_start,"start","Proxy started"),className:` relative flex flex-col items-center justify-center gap-1 py-4 px-3 rounded-lg font-mono text-xs font-bold uppercase tracking-wider border-2 transition-all duration-150 - ${b||o==="start"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--status-online)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--status-online)] hover:shadow-[0_0_15px_var(--status-online)] active:translate-y-0.5 active:shadow-none cursor-pointer"} + ${y||o==="start"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--status-online)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--status-online)] hover:shadow-[0_0_15px_var(--status-online)] active:translate-y-0.5 active:shadow-none cursor-pointer"} shadow-[inset_0_1px_0_rgba(255,255,255,0.1),0_2px_4px_rgba(0,0,0,0.3)] - `,children:[s.jsx(tx,{className:"h-5 w-5 fill-current"}),s.jsx("span",{children:"Start"})]})}),s.jsx(ba,{children:"Start the proxy server"})]}),s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:!b||o==="stop",onClick:()=>c(window.pp_stop,"stop","Proxy stopped"),className:` + `,children:[s.jsx(sx,{className:"h-5 w-5 fill-current"}),s.jsx("span",{children:"Start"})]})}),s.jsx(ya,{children:"Start the proxy server"})]}),s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:!y||o==="stop",onClick:()=>c(window.pp_stop,"stop","Proxy stopped"),className:` relative flex flex-col items-center justify-center gap-1 py-4 px-3 rounded-lg font-mono text-xs font-bold uppercase tracking-wider border-2 transition-all duration-150 - ${!b||o==="stop"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--status-offline)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--status-offline)] hover:shadow-[0_0_15px_var(--status-offline)] active:translate-y-0.5 active:shadow-none cursor-pointer"} + ${!y||o==="stop"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--status-offline)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--status-offline)] hover:shadow-[0_0_15px_var(--status-offline)] active:translate-y-0.5 active:shadow-none cursor-pointer"} shadow-[inset_0_1px_0_rgba(255,255,255,0.1),0_2px_4px_rgba(0,0,0,0.3)] - `,children:[s.jsx(aj,{className:"h-5 w-5 fill-current"}),s.jsx("span",{children:"Stop"})]})}),s.jsx(ba,{children:"Stop the proxy server"})]}),s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:!b||o==="restart",onClick:()=>c(window.pp_restart,"restart","Proxy restarted"),className:` + `,children:[s.jsx(nj,{className:"h-5 w-5 fill-current"}),s.jsx("span",{children:"Stop"})]})}),s.jsx(ya,{children:"Stop the proxy server"})]}),s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{type:"button",disabled:!y||o==="restart",onClick:()=>c(window.pp_restart,"restart","Proxy restarted"),className:` relative flex flex-col items-center justify-center gap-1 py-4 px-3 rounded-lg font-mono text-xs font-bold uppercase tracking-wider border-2 transition-all duration-150 - ${!b||o==="restart"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--accent-primary)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--accent-primary)] hover:shadow-[0_0_15px_var(--accent-primary)] active:translate-y-0.5 active:shadow-none cursor-pointer"} + ${!y||o==="restart"?"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]":"border-[var(--accent-primary)] bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)] text-[var(--accent-primary)] hover:shadow-[0_0_15px_var(--accent-primary)] active:translate-y-0.5 active:shadow-none cursor-pointer"} shadow-[inset_0_1px_0_rgba(255,255,255,0.1),0_2px_4px_rgba(0,0,0,0.3)] - `,children:[s.jsx(Yw,{className:`h-5 w-5 ${o==="restart"?"animate-spin":""}`}),s.jsx("span",{children:"Restart"})]})}),s.jsx(ba,{children:"Restart the proxy server"})]})]}),l?.base_url&&s.jsx("div",{className:"w-full bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Base URL"}),s.jsx("div",{className:"font-mono text-sm text-[var(--text-accent)] truncate",children:l.base_url})]}),s.jsxs("button",{type:"button",onClick:h,className:` + `,children:[s.jsx(Gw,{className:`h-5 w-5 ${o==="restart"?"animate-spin":""}`}),s.jsx("span",{children:"Restart"})]})}),s.jsx(ya,{children:"Restart the proxy server"})]})]}),l?.base_url&&s.jsx("div",{className:"w-full bg-[var(--bg-void)] rounded-md border border-[var(--border-subtle)] p-3",children:s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-1",children:"Base URL"}),s.jsx("div",{className:"font-mono text-sm text-[var(--text-accent)] truncate",children:l.base_url})]}),s.jsxs("button",{type:"button",onClick:h,className:` flex items-center gap-1.5 px-3 py-1.5 rounded font-mono text-xs uppercase tracking-wider border transition-all duration-150 ${g?"border-[var(--status-online)] bg-[var(--status-online)]/10 text-[var(--status-online)]":"border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)]"} active:translate-y-0.5 cursor-pointer - `,children:[g?s.jsx(rl,{className:"h-3.5 w-3.5"}):s.jsx(ol,{className:"h-3.5 w-3.5"}),g?"Copied":"Copy"]})]})}),d&&s.jsxs("div",{className:"w-full mt-4 pt-4 border-t border-[var(--border-subtle)]",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-3",children:"Quick Actions"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{type:"button",onClick:()=>c(window.pp_open_logs,"logs","Opened logs"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors active:translate-y-0.5 cursor-pointer",children:[s.jsx(P0,{className:"h-3.5 w-3.5"}),"Logs"]}),s.jsxs("button",{type:"button",onClick:()=>c(window.pp_open_auth_folder,"auth","Opened auth folder"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors active:translate-y-0.5 cursor-pointer",children:[s.jsx(qu,{className:"h-3.5 w-3.5"}),"Auth"]}),s.jsxs("button",{type:"button",disabled:!b,onClick:()=>c(window.pp_open_diagnostics,"diag-open","Opened diagnostics"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded border font-mono text-xs transition-colors active:translate-y-0.5 cursor-pointer ${b?"border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)]":"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]"}`,children:[s.jsx(xr,{className:"h-3.5 w-3.5"}),"Diagnostics"]})]})]}),!d&&!l?.base_url&&s.jsx("div",{className:"w-full mt-4 pt-4 border-t border-[var(--border-subtle)]",children:s.jsxs("button",{type:"button",onClick:h,disabled:!l?.base_url,className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors disabled:opacity-40 disabled:cursor-not-allowed active:translate-y-0.5 cursor-pointer",children:[g?s.jsx(rl,{className:"h-3.5 w-3.5"}):s.jsx(ol,{className:"h-3.5 w-3.5"}),g?"Copied":"Copy URL"]})})]}),s.jsx("style",{children:` + `,children:[g?s.jsx(rl,{className:"h-3.5 w-3.5"}):s.jsx(ol,{className:"h-3.5 w-3.5"}),g?"Copied":"Copy"]})]})}),d&&s.jsxs("div",{className:"w-full mt-4 pt-4 border-t border-[var(--border-subtle)]",children:[s.jsx("div",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)] mb-3",children:"Quick Actions"}),s.jsxs("div",{className:"flex flex-wrap gap-2",children:[s.jsxs("button",{type:"button",onClick:()=>c(window.pp_open_logs,"logs","Opened logs"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors active:translate-y-0.5 cursor-pointer",children:[s.jsx(tx,{className:"h-3.5 w-3.5"}),"Logs"]}),s.jsxs("button",{type:"button",onClick:()=>c(window.pp_open_auth_folder,"auth","Opened auth folder"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors active:translate-y-0.5 cursor-pointer",children:[s.jsx(Vu,{className:"h-3.5 w-3.5"}),"Auth"]}),s.jsxs("button",{type:"button",disabled:!y,onClick:()=>c(window.pp_open_diagnostics,"diag-open","Opened diagnostics"),className:`flex items-center gap-1.5 px-3 py-1.5 rounded border font-mono text-xs transition-colors active:translate-y-0.5 cursor-pointer ${y?"border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)]":"opacity-40 cursor-not-allowed border-[var(--border-subtle)] bg-[var(--bg-elevated)] text-[var(--text-muted)]"}`,children:[s.jsx(br,{className:"h-3.5 w-3.5"}),"Diagnostics"]})]})]}),!d&&!l?.base_url&&s.jsx("div",{className:"w-full mt-4 pt-4 border-t border-[var(--border-subtle)]",children:s.jsxs("button",{type:"button",onClick:h,disabled:!l?.base_url,className:"flex items-center gap-1.5 px-3 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-secondary)] font-mono text-xs hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-colors disabled:opacity-40 disabled:cursor-not-allowed active:translate-y-0.5 cursor-pointer",children:[g?s.jsx(rl,{className:"h-3.5 w-3.5"}):s.jsx(ol,{className:"h-3.5 w-3.5"}),g?"Copied":"Copy URL"]})})]}),s.jsx("style",{children:` @keyframes radar-pulse { 0% { transform: scale(0.8); @@ -50,7 +50,7 @@ Error generating stack: `+n.message+` transform: rotate(360deg); } } - `})]})}function wj(l){const o=w.useRef({value:l,previous:l});return w.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}var ai="Switch",[jj]=Xu(ai),[Nj,Sj]=jj(ai),lx=w.forwardRef((l,o)=>{const{__scopeSwitch:c,name:u,checked:d,defaultChecked:m,required:x,disabled:g,value:v="on",onCheckedChange:p,form:b,...h}=l,[j,_]=w.useState(null),A=on(o,q=>_(q)),z=w.useRef(!1),H=j?b||!!j.closest("form"):!0,[k,Q]=w0({prop:d,defaultProp:m??!1,onChange:p,caller:ai});return s.jsxs(Nj,{scope:c,checked:k,disabled:g,children:[s.jsx(Ua.button,{type:"button",role:"switch","aria-checked":k,"aria-required":x,"data-state":cx(k),"data-disabled":g?"":void 0,disabled:g,value:v,...h,ref:A,onClick:Oa(l.onClick,q=>{Q(W=>!W),H&&(z.current=q.isPropagationStopped(),z.current||q.stopPropagation())})}),H&&s.jsx(ix,{control:j,bubbles:!z.current,name:u,value:v,checked:k,required:x,disabled:g,form:b,style:{transform:"translateX(-100%)"}})]})});lx.displayName=ai;var rx="SwitchThumb",ox=w.forwardRef((l,o)=>{const{__scopeSwitch:c,...u}=l,d=Sj(rx,c);return s.jsx(Ua.span,{"data-state":cx(d.checked),"data-disabled":d.disabled?"":void 0,...u,ref:o})});ox.displayName=rx;var _j="SwitchBubbleInput",ix=w.forwardRef(({__scopeSwitch:l,control:o,checked:c,bubbles:u=!0,...d},m)=>{const x=w.useRef(null),g=on(x,m),v=wj(c),p=c0(o);return w.useEffect(()=>{const b=x.current;if(!b)return;const h=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(h,"checked").set;if(v!==c&&_){const A=new Event("click",{bubbles:u});_.call(b,c),b.dispatchEvent(A)}},[v,c,u]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...d,tabIndex:-1,ref:g,style:{...d.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ix.displayName=_j;function cx(l){return l?"checked":"unchecked"}var Ej=lx,kj=ox;function cl({className:l,...o}){return s.jsx(Ej,{"data-slot":"switch",className:be("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",l),...o,children:s.jsx(kj,{"data-slot":"switch-thumb",className:be("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var Cj=Symbol.for("react.lazy"),Ko=Vu[" use ".trim().toString()];function Tj(l){return typeof l=="object"&&l!==null&&"then"in l}function ux(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===Cj&&"_payload"in l&&Tj(l._payload)}function dx(l){const o=Aj(l),c=w.forwardRef((u,d)=>{let{children:m,...x}=u;ux(m)&&typeof Ko=="function"&&(m=Ko(m._payload));const g=w.Children.toArray(m),v=g.find(Oj);if(v){const p=v.props.children,b=g.map(h=>h===v?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:h);return s.jsx(o,{...x,ref:d,children:w.isValidElement(p)?w.cloneElement(p,void 0,b):null})}return s.jsx(o,{...x,ref:d,children:m})});return c.displayName=`${l}.Slot`,c}var fx=dx("Slot");function Aj(l){const o=w.forwardRef((c,u)=>{let{children:d,...m}=c;if(ux(d)&&typeof Ko=="function"&&(d=Ko(d._payload)),w.isValidElement(d)){const x=Rj(d),g=zj(m,d.props);return d.type!==w.Fragment&&(g.ref=u?$u(u,x):x),w.cloneElement(d,g)}return w.Children.count(d)>1?w.Children.only(null):null});return o.displayName=`${l}.SlotClone`,o}var Mj=Symbol("radix.slottable");function Oj(l){return w.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===Mj}function zj(l,o){const c={...o};for(const u in o){const d=l[u],m=o[u];/^on[A-Z]/.test(u)?d&&m?c[u]=(...g)=>{const v=m(...g);return d(...g),v}:d&&(c[u]=d):u==="style"?c[u]={...d,...m}:u==="className"&&(c[u]=[d,m].filter(Boolean).join(" "))}return{...l,...c}}function Rj(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var Dj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Lj=Dj.reduce((l,o)=>{const c=dx(`Primitive.${o}`),u=w.forwardRef((d,m)=>{const{asChild:x,...g}=d,v=x?c:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(v,{...g,ref:m})});return u.displayName=`Primitive.${o}`,{...l,[o]:u}},{}),Uj="Label",mx=w.forwardRef((l,o)=>s.jsx(Lj.label,{...l,ref:o,onMouseDown:c=>{c.target.closest("button, input, select, textarea")||(l.onMouseDown?.(c),!c.defaultPrevented&&c.detail>1&&c.preventDefault())}}));mx.displayName=Uj;var Hj=mx;function $t({className:l,...o}){return s.jsx(Hj,{"data-slot":"label",className:be("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",l),...o})}const Bj=[{id:"claude",name:"Claude",color:"oklch(0.60 0.15 35)",icon:"🤖"},{id:"gemini",name:"Gemini",color:"oklch(0.55 0.18 250)",icon:"✨"},{id:"gemini-cli",name:"Gemini CLI",color:"oklch(0.58 0.16 240)",icon:"🌐"},{id:"codex",name:"Codex",color:"oklch(0.60 0.16 145)",icon:"💻"},{id:"qwen",name:"Qwen",color:"oklch(0.60 0.14 280)",icon:"🔮"},{id:"antigravity",name:"Antigravity",color:"oklch(0.65 0.20 320)",icon:"🚀"},{id:"kiro",name:"Kiro",color:"oklch(0.58 0.17 200)",icon:"🛸"},{id:"amazonq",name:"Amazon Q",color:"oklch(0.55 0.16 30)",icon:"📦",isImport:!0},{id:"minimax",name:"MiniMax",color:"oklch(0.60 0.18 60)",icon:"🔶",isApiKey:!0},{id:"zhipu",name:"Zhipu",color:"oklch(0.55 0.15 180)",icon:"🧠",isApiKey:!0}],qj=[20,40,60,80,100];function Yj({isConnected:l,color:o}){return s.jsx("div",{className:"flex items-end justify-center gap-[3px] h-5",children:qj.map((c,u)=>s.jsx("div",{className:be("w-[5px] rounded-sm transition-all duration-300",l&&"animate-signal-pulse"),style:{height:`${c}%`,background:l?o:"var(--border-subtle)",boxShadow:l?`0 0 6px ${o}`:"none",animationDelay:l?`${u*100}ms`:"0ms"}},u))})}function Gj({provider:l,isAuthenticated:o,isLoading:c,isDisabled:u,onClick:d,index:m}){const x=`delay-${m%6*100}`;return s.jsxs("div",{className:be("group relative flex flex-col items-center p-5","bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg","transition-all duration-300 ease-out","hover:border-transparent","animate-fade-in-up",x,c&&"animate-connecting-pulse",u&&"opacity-50 grayscale pointer-events-none"),style:{"--provider-color":l.color},children:[s.jsx("div",{className:"absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{boxShadow:`0 0 30px color-mix(in oklch, ${l.color} 25%, transparent), inset 0 0 20px color-mix(in oklch, ${l.color} 8%, transparent)`}}),s.jsx("div",{className:"absolute inset-0 rounded-lg border-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{borderColor:l.color,boxShadow:`inset 0 0 15px color-mix(in oklch, ${l.color} 15%, transparent)`}}),s.jsxs("div",{className:be("relative w-14 h-14 rounded-xl flex items-center justify-center text-2xl","transition-all duration-300","group-hover:scale-110"),style:{background:`linear-gradient(135deg, color-mix(in oklch, ${l.color} 20%, transparent), color-mix(in oklch, ${l.color} 10%, transparent))`,border:`1px solid color-mix(in oklch, ${l.color} 40%, transparent)`,boxShadow:o?`0 0 20px color-mix(in oklch, ${l.color} 40%, transparent), inset 0 0 10px color-mix(in oklch, ${l.color} 15%, transparent)`:`0 0 10px color-mix(in oklch, ${l.color} 20%, transparent)`},children:[o&&s.jsx("div",{className:"absolute inset-0 rounded-xl animate-pulse-glow",style:{boxShadow:`0 0 25px ${l.color}`}}),s.jsx("span",{className:"relative z-10",children:l.icon})]}),s.jsx("div",{className:"mt-4 font-bold uppercase tracking-[0.15em] text-[var(--text-primary)] text-center text-xs",style:{fontFamily:"var(--font-display)"},children:l.name}),s.jsx("div",{className:"mt-4",children:s.jsx(Yj,{isConnected:o,color:l.color})}),s.jsx("div",{className:be("mt-2 text-[0.65rem] uppercase tracking-wider",o?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:o?"Connected":"Offline"}),s.jsx("button",{onClick:d,disabled:c||u,className:be("mt-4 px-5 py-1.5 rounded text-[0.7rem] uppercase tracking-wider font-semibold","border transition-all duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg-panel)]","disabled:opacity-50 disabled:cursor-wait",o?"bg-transparent hover:bg-[var(--bg-elevated)]":"hover:scale-105"),style:{fontFamily:"var(--font-mono)",borderColor:l.color,color:l.color,boxShadow:`0 0 10px color-mix(in oklch, ${l.color} 30%, transparent)`},children:c?s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin"}),"Linking"]}):o?"Relink":"Login"})]})}function Vj(){return s.jsxs("div",{className:"flex flex-col items-center p-5 bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg animate-pulse",children:[s.jsx("div",{className:"w-14 h-14 rounded-xl bg-[var(--bg-elevated)]"}),s.jsx("div",{className:"mt-4 h-3 w-16 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-4 h-5 w-12 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-2 h-2 w-10 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-4 h-8 w-20 bg-[var(--bg-elevated)] rounded"})]})}function Rp(l){return!l||l===0?"—":l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toString()}function $j(l){if(!l)return{text:"—",status:"ok"};const o=new Date(l),c=new Date,u=o.getTime()-c.getTime();if(u<0)return{text:"expired",status:"error"};const d=Math.floor(u/6e4);return d<10?{text:`${d}m`,status:"error"}:d<60?{text:`${d}m`,status:"warning"}:{text:`${Math.floor(d/60)}h ${d%60}m`,status:"ok"}}function Xj(){const{loading:l,setLoading:o,showToast:c,authFiles:u,status:d,isMgmtLoading:m,mgmtKey:x,mgmtFetch:g}=St(),[v,p]=w.useState(!1),[b,h]=w.useState(!1),[j,_]=w.useState([]),[A,z]=w.useState(null),H=d?.running??!1,k={claude:u.some(G=>G.toLowerCase().includes("claude")),gemini:u.some(G=>G.toLowerCase().includes("gemini")&&!G.toLowerCase().includes("gemini-")),"gemini-cli":u.some(G=>G.toLowerCase().includes("gemini-")&&!G.toLowerCase().includes("antigravity")),codex:u.some(G=>G.toLowerCase().includes("codex")),qwen:u.some(G=>G.toLowerCase().includes("qwen")),antigravity:u.some(G=>G.toLowerCase().includes("antigravity")),kiro:u.some(G=>G.toLowerCase().includes("kiro")),amazonq:u.some(G=>G.toLowerCase().includes("amazonq")),minimax:u.some(G=>G.toLowerCase().includes("minimax")),zhipu:u.some(G=>G.toLowerCase().includes("zhipu"))};w.useEffect(()=>{(async()=>{try{if(window.pp_get_oauth_private){const G=await window.pp_get_oauth_private();p(G)}}catch(G){console.error("OAuth private error:",G)}})()},[]),w.useEffect(()=>{!x||!H||(async()=>{try{const G=await g("/v0/management/config");z(G);const ne=await g("/v0/management/auth-files");_(ne.files||[])}catch(G){G instanceof at||console.error("Config load error:",G)}})()},[x,H]);const Q=async G=>{try{window.pp_set_oauth_private&&(await window.pp_set_oauth_private(G),p(G),c("Encryption mode updated","success"))}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}},q=async G=>{o(`oauth-${G}`);try{window.pp_oauth&&(await window.pp_oauth(G),c(`Establishing uplink to ${G}...`,"success"))}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}finally{o(null)}},W=async G=>{o(`oauth-${G}`);try{if(G==="amazonq"){const ne=await g("/v0/management/amazonq-import",{method:"POST"});if(ne.success){c(`Amazon Q CLI token imported: ${ne.email||"success"}`,"success");const M=await g("/v0/management/auth-files");_(M.files||[])}else c(ne.message||"Import failed","error")}}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}finally{o(null)}},Z=async G=>{const ne=window.prompt(`Enter your ${G==="minimax"?"MiniMax":"Zhipu AI"} API key:`);if(ne){o(`oauth-${G}`);try{const se=await g(G==="minimax"?"/v0/management/minimax-api-key":"/v0/management/zhipu-api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:ne})});if(se.success){c(`${G==="minimax"?"MiniMax":"Zhipu"} API key saved`,"success");const ie=await g("/v0/management/auth-files");_(ie.files||[])}else c(se.message||"Save failed","error")}catch(M){c(M instanceof Error?M.message:String(M),"error")}finally{o(null)}}},ee=G=>{"isImport"in G&&G.isImport?W(G.id):"isApiKey"in G&&G.isApiKey?Z(G.id):q(G.id)},E=async()=>{try{const G=await g("/v0/management/debug");await g("/v0/management/debug",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:!G.value})});const ne=await g("/v0/management/config");z(ne)}catch(G){console.error(G)}},L=async G=>{try{await g("/v0/management/auth/reset-cooldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G?{auth_id:G}:{})});const ne=await g("/v0/management/auth-files");_(ne.files||[]),c("Cooldowns reset","success")}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}},Y=async(G,ne)=>{try{await g(`/v0/management/auth/${G}/priority`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:ne})});const M=await g("/v0/management/auth-files");_(M.files||[])}catch(M){c(M instanceof Error?M.message:String(M),"error")}},le=!!A?.debug;return s.jsxs("div",{className:be("bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg","shadow-lg overflow-hidden"),children:[s.jsxs("div",{className:be("flex items-center justify-between px-5 py-3","border-b border-[var(--border-subtle)]","bg-gradient-to-r from-[var(--bg-elevated)] to-transparent"),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[var(--accent-glow)] text-sm tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"::"}),s.jsx("span",{className:"text-[var(--text-primary)] text-sm font-bold uppercase tracking-[0.15em]",style:{fontFamily:"var(--font-display)"},children:"Providers"})]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{className:be("flex items-center gap-2 px-3 py-1 rounded-full border transition-all duration-200",v?"border-[var(--accent-glow)] bg-[color-mix(in_oklch,var(--accent-glow)_10%,transparent)]":"border-[var(--border-subtle)] bg-transparent"),children:[v?s.jsx(ex,{className:"h-3.5 w-3.5 text-[var(--accent-glow)]"}):s.jsx(I0,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),s.jsx($t,{htmlFor:"private-oauth-providers",className:be("text-[0.65rem] cursor-pointer uppercase tracking-wider",v?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:v?"Encrypted":"Private"}),s.jsx(cl,{id:"private-oauth-providers",checked:v,onCheckedChange:Q,className:"scale-75 data-[state=checked]:bg-[var(--accent-glow)]"})]})})]}),s.jsxs("div",{className:"p-5",children:[!H&&s.jsx("div",{className:"mb-6 p-4 rounded-lg border border-yellow-500/30 bg-yellow-500/5 text-yellow-500 text-xs text-center uppercase tracking-widest font-mono",children:"⚠️ Please start the proxy engine to manage providers"}),s.jsx("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(160px, 1fr))"},children:m&&u.length===0?Array.from({length:6}).map((G,ne)=>s.jsx(Vj,{},ne)):Bj.map((G,ne)=>s.jsx(Gj,{index:ne,provider:G,isAuthenticated:k[G.id],isLoading:l===`oauth-${G.id}`,isDisabled:!H,onClick:()=>ee(G)},G.id))}),x&&H&&s.jsxs("div",{className:"mt-6 pt-5 border-t border-[var(--border-subtle)]",children:[s.jsxs("button",{onClick:()=>h(!b),className:"flex items-center justify-between w-full text-left group",children:[s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] group-hover:text-[var(--text-primary)] transition-colors",style:{fontFamily:"var(--font-mono)"},children:"Configuration & Accounts"}),s.jsx(Yn,{className:be("h-4 w-4 text-[var(--text-muted)] transition-transform",b&&"rotate-180")})]}),b&&s.jsxs("div",{className:"mt-4 space-y-4 animate-in slide-in-from-top-2 duration-200",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("button",{onClick:()=>E().catch(console.error),className:be("px-3 py-1.5 rounded-md text-xs font-semibold uppercase tracking-wider border transition-all",le?"border-[var(--accent-primary)] bg-[var(--accent-primary)]/10 text-[var(--accent-primary)] shadow-[0_0_10px_var(--accent-primary)/20]":"border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"),style:{fontFamily:"var(--font-mono)"},children:["Debug: ",le?"ON":"OFF"]}),s.jsxs("button",{onClick:()=>L().catch(console.error),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold uppercase tracking-wider border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",style:{fontFamily:"var(--font-mono)"},children:[s.jsx(aa,{className:"h-3 w-3"}),"Reset Cooldowns"]})]}),j.length>0&&s.jsx("div",{className:"rounded-lg border border-[var(--border-subtle)] overflow-hidden",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{className:"bg-[var(--bg-elevated)]",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Provider"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Account"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Priority"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Status"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Expires"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Usage (Today)"})]})}),s.jsx("tbody",{children:j.map(G=>s.jsxs("tr",{className:"border-t border-[var(--border-subtle)]",children:[s.jsx("td",{className:"px-3 py-2 font-mono text-[var(--text-primary)]",children:G.provider||G.type||"—"}),s.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)]",children:G.email||G.label||"—"}),s.jsx("td",{className:"px-3 py-2",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>Y(G.id,(G.priority??0)-1),className:"p-0.5 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",title:"Higher priority",children:s.jsx(L2,{className:"h-3 w-3"})}),s.jsx("span",{className:"font-mono text-[var(--text-secondary)] min-w-[1.5rem] text-center",children:G.priority??0}),s.jsx("button",{onClick:()=>Y(G.id,(G.priority??0)+1),className:"p-0.5 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",title:"Lower priority",children:s.jsx(Yn,{className:"h-3 w-3"})})]})}),s.jsx("td",{className:"px-3 py-2",children:s.jsx("span",{className:be("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",G.status==="active"||G.status==="ok"?"bg-[var(--status-online)]/15 text-[var(--status-online)]":"bg-[var(--text-muted)]/15 text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:G.status||"unknown"})}),s.jsx("td",{className:"px-3 py-2",children:(()=>{const ne=$j(G.token_expires_at);return s.jsx("span",{className:be("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",ne.status==="ok"&&"bg-[var(--status-online)]/15 text-[var(--status-online)]",ne.status==="warning"&&"bg-yellow-500/15 text-yellow-500",ne.status==="error"&&"bg-red-500/15 text-red-500"),style:{fontFamily:"var(--font-mono)"},children:ne.text})})()}),s.jsx("td",{className:"px-3 py-2",children:s.jsxs("span",{className:"font-mono text-[10px] text-[var(--text-secondary)]",title:`Total: ${Rp(G.usage?.total_output_tokens)} tokens, ${G.usage?.request_count??0} requests`,children:[Rp(G.usage?.daily_output_tokens)," / ",G.usage?.daily_request_count??0," req"]})})]},G.id))})]})})]})]})]}),s.jsx("style",{children:` + `})]})}function jj(l){const o=w.useRef({value:l,previous:l});return w.useMemo(()=>(o.current.value!==l&&(o.current.previous=o.current.value,o.current.value=l),o.current.previous),[l])}var li="Switch",[Nj]=Ju(li),[Sj,_j]=Nj(li),ix=w.forwardRef((l,o)=>{const{__scopeSwitch:c,name:u,checked:d,defaultChecked:m,required:x,disabled:g,value:v="on",onCheckedChange:p,form:y,...h}=l,[j,S]=w.useState(null),M=un(o,q=>S(q)),A=w.useRef(!1),U=j?y||!!j.closest("form"):!0,[k,Q]=Ep({prop:d,defaultProp:m??!1,onChange:p,caller:li});return s.jsxs(Sj,{scope:c,checked:k,disabled:g,children:[s.jsx(Ha.button,{type:"button",role:"switch","aria-checked":k,"aria-required":x,"data-state":fx(k),"data-disabled":g?"":void 0,disabled:g,value:v,...h,ref:M,onClick:Oa(l.onClick,q=>{Q(W=>!W),U&&(A.current=q.isPropagationStopped(),A.current||q.stopPropagation())})}),U&&s.jsx(dx,{control:j,bubbles:!A.current,name:u,value:v,checked:k,required:x,disabled:g,form:y,style:{transform:"translateX(-100%)"}})]})});ix.displayName=li;var cx="SwitchThumb",ux=w.forwardRef((l,o)=>{const{__scopeSwitch:c,...u}=l,d=_j(cx,c);return s.jsx(Ha.span,{"data-state":fx(d.checked),"data-disabled":d.disabled?"":void 0,...u,ref:o})});ux.displayName=cx;var Ej="SwitchBubbleInput",dx=w.forwardRef(({__scopeSwitch:l,control:o,checked:c,bubbles:u=!0,...d},m)=>{const x=w.useRef(null),g=un(x,m),v=jj(c),p=hp(o);return w.useEffect(()=>{const y=x.current;if(!y)return;const h=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(h,"checked").set;if(v!==c&&S){const M=new Event("click",{bubbles:u});S.call(y,c),y.dispatchEvent(M)}},[v,c,u]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:c,...d,tabIndex:-1,ref:g,style:{...d.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});dx.displayName=Ej;function fx(l){return l?"checked":"unchecked"}var kj=ix,Cj=ux;function cl({className:l,...o}){return s.jsx(kj,{"data-slot":"switch",className:ve("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",l),...o,children:s.jsx(Cj,{"data-slot":"switch-thumb",className:ve("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var Tj=Symbol.for("react.lazy"),Fo=Zu[" use ".trim().toString()];function Aj(l){return typeof l=="object"&&l!==null&&"then"in l}function mx(l){return l!=null&&typeof l=="object"&&"$$typeof"in l&&l.$$typeof===Tj&&"_payload"in l&&Aj(l._payload)}function hx(l){const o=Mj(l),c=w.forwardRef((u,d)=>{let{children:m,...x}=u;mx(m)&&typeof Fo=="function"&&(m=Fo(m._payload));const g=w.Children.toArray(m),v=g.find(zj);if(v){const p=v.props.children,y=g.map(h=>h===v?w.Children.count(p)>1?w.Children.only(null):w.isValidElement(p)?p.props.children:null:h);return s.jsx(o,{...x,ref:d,children:w.isValidElement(p)?w.cloneElement(p,void 0,y):null})}return s.jsx(o,{...x,ref:d,children:m})});return c.displayName=`${l}.Slot`,c}var px=hx("Slot");function Mj(l){const o=w.forwardRef((c,u)=>{let{children:d,...m}=c;if(mx(d)&&typeof Fo=="function"&&(d=Fo(d._payload)),w.isValidElement(d)){const x=Dj(d),g=Rj(m,d.props);return d.type!==w.Fragment&&(g.ref=u?Ku(u,x):x),w.cloneElement(d,g)}return w.Children.count(d)>1?w.Children.only(null):null});return o.displayName=`${l}.SlotClone`,o}var Oj=Symbol("radix.slottable");function zj(l){return w.isValidElement(l)&&typeof l.type=="function"&&"__radixId"in l.type&&l.type.__radixId===Oj}function Rj(l,o){const c={...o};for(const u in o){const d=l[u],m=o[u];/^on[A-Z]/.test(u)?d&&m?c[u]=(...g)=>{const v=m(...g);return d(...g),v}:d&&(c[u]=d):u==="style"?c[u]={...d,...m}:u==="className"&&(c[u]=[d,m].filter(Boolean).join(" "))}return{...l,...c}}function Dj(l){let o=Object.getOwnPropertyDescriptor(l.props,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning;return c?l.ref:(o=Object.getOwnPropertyDescriptor(l,"ref")?.get,c=o&&"isReactWarning"in o&&o.isReactWarning,c?l.props.ref:l.props.ref||l.ref)}var Lj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Uj=Lj.reduce((l,o)=>{const c=hx(`Primitive.${o}`),u=w.forwardRef((d,m)=>{const{asChild:x,...g}=d,v=x?c:o;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(v,{...g,ref:m})});return u.displayName=`Primitive.${o}`,{...l,[o]:u}},{}),Hj="Label",xx=w.forwardRef((l,o)=>s.jsx(Uj.label,{...l,ref:o,onMouseDown:c=>{c.target.closest("button, input, select, textarea")||(l.onMouseDown?.(c),!c.defaultPrevented&&c.detail>1&&c.preventDefault())}}));xx.displayName=Hj;var Bj=xx;function $t({className:l,...o}){return s.jsx(Bj,{"data-slot":"label",className:ve("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",l),...o})}const qj=[{id:"claude",name:"Claude",color:"oklch(0.60 0.15 35)",icon:"🤖"},{id:"gemini",name:"Gemini",color:"oklch(0.55 0.18 250)",icon:"✨"},{id:"gemini-cli",name:"Gemini CLI",color:"oklch(0.58 0.16 240)",icon:"🌐"},{id:"codex",name:"Codex",color:"oklch(0.60 0.16 145)",icon:"💻"},{id:"qwen",name:"Qwen",color:"oklch(0.60 0.14 280)",icon:"🔮"},{id:"antigravity",name:"Antigravity",color:"oklch(0.65 0.20 320)",icon:"🚀"},{id:"kiro",name:"Kiro",color:"oklch(0.58 0.17 200)",icon:"🛸"},{id:"amazonq",name:"Amazon Q",color:"oklch(0.55 0.16 30)",icon:"📦",isImport:!0},{id:"minimax",name:"MiniMax",color:"oklch(0.60 0.18 60)",icon:"🔶",isApiKey:!0},{id:"zhipu",name:"Zhipu",color:"oklch(0.55 0.15 180)",icon:"🧠",isApiKey:!0}],Yj=[20,40,60,80,100];function Gj({isConnected:l,color:o}){return s.jsx("div",{className:"flex items-end justify-center gap-[3px] h-5",children:Yj.map((c,u)=>s.jsx("div",{className:ve("w-[5px] rounded-sm transition-all duration-300",l&&"animate-signal-pulse"),style:{height:`${c}%`,background:l?o:"var(--border-subtle)",boxShadow:l?`0 0 6px ${o}`:"none",animationDelay:l?`${u*100}ms`:"0ms"}},u))})}function Vj({provider:l,isAuthenticated:o,isLoading:c,isDisabled:u,onClick:d,index:m}){const x=`delay-${m%6*100}`;return s.jsxs("div",{className:ve("group relative flex flex-col items-center p-5","bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg","transition-all duration-300 ease-out","hover:border-transparent","animate-fade-in-up",x,c&&"animate-connecting-pulse",u&&"opacity-50 grayscale pointer-events-none"),style:{"--provider-color":l.color},children:[s.jsx("div",{className:"absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{boxShadow:`0 0 30px color-mix(in oklch, ${l.color} 25%, transparent), inset 0 0 20px color-mix(in oklch, ${l.color} 8%, transparent)`}}),s.jsx("div",{className:"absolute inset-0 rounded-lg border-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{borderColor:l.color,boxShadow:`inset 0 0 15px color-mix(in oklch, ${l.color} 15%, transparent)`}}),s.jsxs("div",{className:ve("relative w-14 h-14 rounded-xl flex items-center justify-center text-2xl","transition-all duration-300","group-hover:scale-110"),style:{background:`linear-gradient(135deg, color-mix(in oklch, ${l.color} 20%, transparent), color-mix(in oklch, ${l.color} 10%, transparent))`,border:`1px solid color-mix(in oklch, ${l.color} 40%, transparent)`,boxShadow:o?`0 0 20px color-mix(in oklch, ${l.color} 40%, transparent), inset 0 0 10px color-mix(in oklch, ${l.color} 15%, transparent)`:`0 0 10px color-mix(in oklch, ${l.color} 20%, transparent)`},children:[o&&s.jsx("div",{className:"absolute inset-0 rounded-xl animate-pulse-glow",style:{boxShadow:`0 0 25px ${l.color}`}}),s.jsx("span",{className:"relative z-10",children:l.icon})]}),s.jsx("div",{className:"mt-4 font-bold uppercase tracking-[0.15em] text-[var(--text-primary)] text-center text-xs",style:{fontFamily:"var(--font-display)"},children:l.name}),s.jsx("div",{className:"mt-4",children:s.jsx(Gj,{isConnected:o,color:l.color})}),s.jsx("div",{className:ve("mt-2 text-[0.65rem] uppercase tracking-wider",o?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:o?"Connected":"Offline"}),s.jsx("button",{onClick:d,disabled:c||u,className:ve("mt-4 px-5 py-1.5 rounded text-[0.7rem] uppercase tracking-wider font-semibold","border transition-all duration-200","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg-panel)]","disabled:opacity-50 disabled:cursor-wait",o?"bg-transparent hover:bg-[var(--bg-elevated)]":"hover:scale-105"),style:{fontFamily:"var(--font-mono)",borderColor:l.color,color:l.color,boxShadow:`0 0 10px color-mix(in oklch, ${l.color} 30%, transparent)`},children:c?s.jsxs("span",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"w-3 h-3 border-2 border-current border-t-transparent rounded-full animate-spin"}),"Linking"]}):o?"Relink":"Login"})]})}function $j(){return s.jsxs("div",{className:"flex flex-col items-center p-5 bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg animate-pulse",children:[s.jsx("div",{className:"w-14 h-14 rounded-xl bg-[var(--bg-elevated)]"}),s.jsx("div",{className:"mt-4 h-3 w-16 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-4 h-5 w-12 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-2 h-2 w-10 bg-[var(--bg-elevated)] rounded"}),s.jsx("div",{className:"mt-4 h-8 w-20 bg-[var(--bg-elevated)] rounded"})]})}function B0(l){return!l||l===0?"—":l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toString()}function Xj(l){if(!l)return{text:"—",status:"ok"};const o=new Date(l),c=new Date,u=o.getTime()-c.getTime();if(u<0)return{text:"expired",status:"error"};const d=Math.floor(u/6e4);return d<10?{text:`${d}m`,status:"error"}:d<60?{text:`${d}m`,status:"warning"}:{text:`${Math.floor(d/60)}h ${d%60}m`,status:"ok"}}function Qj(){const{loading:l,setLoading:o,showToast:c,authFiles:u,status:d,isMgmtLoading:m,mgmtKey:x,mgmtFetch:g}=vt(),[v,p]=w.useState(!1),[y,h]=w.useState(!1),[j,S]=w.useState([]),[M,A]=w.useState(null),U=d?.running??!1,k={claude:u.some(G=>G.toLowerCase().includes("claude")),gemini:u.some(G=>G.toLowerCase().includes("gemini")&&!G.toLowerCase().includes("gemini-")),"gemini-cli":u.some(G=>G.toLowerCase().includes("gemini-")&&!G.toLowerCase().includes("antigravity")),codex:u.some(G=>G.toLowerCase().includes("codex")),qwen:u.some(G=>G.toLowerCase().includes("qwen")),antigravity:u.some(G=>G.toLowerCase().includes("antigravity")),kiro:u.some(G=>G.toLowerCase().includes("kiro")),amazonq:u.some(G=>G.toLowerCase().includes("amazonq")),minimax:u.some(G=>G.toLowerCase().includes("minimax")),zhipu:u.some(G=>G.toLowerCase().includes("zhipu"))};w.useEffect(()=>{(async()=>{try{if(window.pp_get_oauth_private){const G=await window.pp_get_oauth_private();p(G)}}catch(G){console.error("OAuth private error:",G)}})()},[]),w.useEffect(()=>{!x||!U||(async()=>{try{const G=await g("/v0/management/config");A(G);const ne=await g("/v0/management/auth-files");S(ne.files||[])}catch(G){G instanceof et||console.error("Config load error:",G)}})()},[x,U]);const Q=async G=>{try{window.pp_set_oauth_private&&(await window.pp_set_oauth_private(G),p(G),c("Encryption mode updated","success"))}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}},q=async G=>{o(`oauth-${G}`);try{window.pp_oauth&&(await window.pp_oauth(G),c(`Establishing uplink to ${G}...`,"success"))}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}finally{o(null)}},W=async G=>{o(`oauth-${G}`);try{if(G==="amazonq"){const ne=await g("/v0/management/amazonq-import",{method:"POST"});if(ne.success){c(`Amazon Q CLI token imported: ${ne.email||"success"}`,"success");const O=await g("/v0/management/auth-files");S(O.files||[])}else c(ne.message||"Import failed","error")}}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}finally{o(null)}},Z=async G=>{const ne=window.prompt(`Enter your ${G==="minimax"?"MiniMax":"Zhipu AI"} API key:`);if(ne){o(`oauth-${G}`);try{const se=await g(G==="minimax"?"/v0/management/minimax-api-key":"/v0/management/zhipu-api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:ne})});if(se.success){c(`${G==="minimax"?"MiniMax":"Zhipu"} API key saved`,"success");const ie=await g("/v0/management/auth-files");S(ie.files||[])}else c(se.message||"Save failed","error")}catch(O){c(O instanceof Error?O.message:String(O),"error")}finally{o(null)}}},ee=G=>{"isImport"in G&&G.isImport?W(G.id):"isApiKey"in G&&G.isApiKey?Z(G.id):q(G.id)},E=async()=>{try{const G=await g("/v0/management/debug");await g("/v0/management/debug",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:!G.value})});const ne=await g("/v0/management/config");A(ne)}catch(G){console.error(G)}},L=async G=>{try{await g("/v0/management/auth/reset-cooldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(G?{auth_id:G}:{})});const ne=await g("/v0/management/auth-files");S(ne.files||[]),c("Cooldowns reset","success")}catch(ne){c(ne instanceof Error?ne.message:String(ne),"error")}},Y=async(G,ne)=>{try{await g(`/v0/management/auth/${G}/priority`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:ne})});const O=await g("/v0/management/auth-files");S(O.files||[])}catch(O){c(O instanceof Error?O.message:String(O),"error")}},le=!!M?.debug;return s.jsxs("div",{className:ve("bg-[var(--bg-panel)] border border-[var(--border-subtle)] rounded-lg","shadow-lg overflow-hidden"),children:[s.jsxs("div",{className:ve("flex items-center justify-between px-5 py-3","border-b border-[var(--border-subtle)]","bg-gradient-to-r from-[var(--bg-elevated)] to-transparent"),children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-[var(--accent-glow)] text-sm tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"::"}),s.jsx("span",{className:"text-[var(--text-primary)] text-sm font-bold uppercase tracking-[0.15em]",style:{fontFamily:"var(--font-display)"},children:"Providers"})]}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("div",{className:ve("flex items-center gap-2 px-3 py-1 rounded-full border transition-all duration-200",v?"border-[var(--accent-glow)] bg-[color-mix(in_oklch,var(--accent-glow)_10%,transparent)]":"border-[var(--border-subtle)] bg-transparent"),children:[v?s.jsx(nx,{className:"h-3.5 w-3.5 text-[var(--accent-glow)]"}):s.jsx(ax,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),s.jsx($t,{htmlFor:"private-oauth-providers",className:ve("text-[0.65rem] cursor-pointer uppercase tracking-wider",v?"text-[var(--accent-glow)]":"text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:v?"Encrypted":"Private"}),s.jsx(cl,{id:"private-oauth-providers",checked:v,onCheckedChange:Q,className:"scale-75 data-[state=checked]:bg-[var(--accent-glow)]"})]})})]}),s.jsxs("div",{className:"p-5",children:[!U&&s.jsx("div",{className:"mb-6 p-4 rounded-lg border border-yellow-500/30 bg-yellow-500/5 text-yellow-500 text-xs text-center uppercase tracking-widest font-mono",children:"⚠️ Please start the proxy engine to manage providers"}),s.jsx("div",{className:"grid gap-5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(160px, 1fr))"},children:m&&u.length===0?Array.from({length:6}).map((G,ne)=>s.jsx($j,{},ne)):qj.map((G,ne)=>s.jsx(Vj,{index:ne,provider:G,isAuthenticated:k[G.id],isLoading:l===`oauth-${G.id}`,isDisabled:!U,onClick:()=>ee(G)},G.id))}),x&&U&&s.jsxs("div",{className:"mt-6 pt-5 border-t border-[var(--border-subtle)]",children:[s.jsxs("button",{onClick:()=>h(!y),className:"flex items-center justify-between w-full text-left group",children:[s.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)] group-hover:text-[var(--text-primary)] transition-colors",style:{fontFamily:"var(--font-mono)"},children:"Configuration & Accounts"}),s.jsx(cn,{className:ve("h-4 w-4 text-[var(--text-muted)] transition-transform",y&&"rotate-180")})]}),y&&s.jsxs("div",{className:"mt-4 space-y-4 animate-in slide-in-from-top-2 duration-200",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[s.jsxs("button",{onClick:()=>E().catch(console.error),className:ve("px-3 py-1.5 rounded-md text-xs font-semibold uppercase tracking-wider border transition-all",le?"border-[var(--accent-primary)] bg-[var(--accent-primary)]/10 text-[var(--accent-primary)] shadow-[0_0_10px_var(--accent-primary)/20]":"border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]"),style:{fontFamily:"var(--font-mono)"},children:["Debug: ",le?"ON":"OFF"]}),s.jsxs("button",{onClick:()=>L().catch(console.error),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-semibold uppercase tracking-wider border border-[var(--border-default)] bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",style:{fontFamily:"var(--font-mono)"},children:[s.jsx(Qt,{className:"h-3 w-3"}),"Reset Cooldowns"]})]}),j.length>0&&s.jsx("div",{className:"rounded-lg border border-[var(--border-subtle)] overflow-hidden",children:s.jsxs("table",{className:"w-full text-xs",children:[s.jsx("thead",{className:"bg-[var(--bg-elevated)]",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Provider"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Account"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Priority"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Status"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Expires"}),s.jsx("th",{className:"px-3 py-2 text-left text-[var(--text-muted)] font-semibold uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:"Usage (Today)"})]})}),s.jsx("tbody",{children:j.map(G=>s.jsxs("tr",{className:"border-t border-[var(--border-subtle)]",children:[s.jsx("td",{className:"px-3 py-2 font-mono text-[var(--text-primary)]",children:G.provider||G.type||"—"}),s.jsx("td",{className:"px-3 py-2 text-[var(--text-secondary)]",children:G.email||G.label||"—"}),s.jsx("td",{className:"px-3 py-2",children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>Y(G.id,(G.priority??0)-1),className:"p-0.5 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",title:"Higher priority",children:s.jsx(B2,{className:"h-3 w-3"})}),s.jsx("span",{className:"font-mono text-[var(--text-secondary)] min-w-[1.5rem] text-center",children:G.priority??0}),s.jsx("button",{onClick:()=>Y(G.id,(G.priority??0)+1),className:"p-0.5 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",title:"Lower priority",children:s.jsx(cn,{className:"h-3 w-3"})})]})}),s.jsx("td",{className:"px-3 py-2",children:s.jsx("span",{className:ve("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",G.status==="active"||G.status==="ok"?"bg-[var(--status-online)]/15 text-[var(--status-online)]":"bg-[var(--text-muted)]/15 text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:G.status||"unknown"})}),s.jsx("td",{className:"px-3 py-2",children:(()=>{const ne=Xj(G.token_expires_at);return s.jsx("span",{className:ve("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",ne.status==="ok"&&"bg-[var(--status-online)]/15 text-[var(--status-online)]",ne.status==="warning"&&"bg-yellow-500/15 text-yellow-500",ne.status==="error"&&"bg-red-500/15 text-red-500"),style:{fontFamily:"var(--font-mono)"},children:ne.text})})()}),s.jsx("td",{className:"px-3 py-2",children:s.jsxs("span",{className:"font-mono text-[10px] text-[var(--text-secondary)]",title:`Total: ${B0(G.usage?.total_output_tokens)} tokens, ${G.usage?.request_count??0} requests`,children:[B0(G.usage?.daily_output_tokens)," / ",G.usage?.daily_request_count??0," req"]})})]},G.id))})]})})]})]})]}),s.jsx("style",{children:` @keyframes pulse-glow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } @@ -59,18 +59,18 @@ Error generating stack: `+n.message+` .animate-pulse-glow { animation: pulse-glow 2s ease-in-out infinite; } - `})]})}const Dp=l=>typeof l=="boolean"?`${l}`:l===0?"0":l,Lp=z0,hx=(l,o)=>c=>{var u;if(o?.variants==null)return Lp(l,c?.class,c?.className);const{variants:d,defaultVariants:m}=o,x=Object.keys(d).map(p=>{const b=c?.[p],h=m?.[p];if(b===null)return null;const j=Dp(b)||Dp(h);return d[p][j]}),g=c&&Object.entries(c).reduce((p,b)=>{let[h,j]=b;return j===void 0||(p[h]=j),p},{}),v=o==null||(u=o.compoundVariants)===null||u===void 0?void 0:u.reduce((p,b)=>{let{class:h,className:j,..._}=b;return Object.entries(_).every(A=>{let[z,H]=A;return Array.isArray(H)?H.includes({...m,...g}[z]):{...m,...g}[z]===H})?[...p,h,j]:p},[]);return Lp(l,x,v,c?.class,c?.className)},Qj=hx(["inline-flex items-center justify-center gap-2 whitespace-nowrap","text-sm font-semibold uppercase tracking-wide","rounded-md","border border-transparent","transition-[transform,box-shadow] duration-50 ease-out","active:translate-y-0.5 active:shadow-none","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0"].join(" "),{variants:{variant:{default:["bg-[oklch(0.75_0.18_55)] text-[oklch(0.15_0.02_55)]","shadow-[0_2px_0_0_oklch(0_0_0/0.25)]","hover:bg-[oklch(0.78_0.19_55)] hover:border-[oklch(0.65_0.2_55)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),secondary:["bg-[oklch(0.18_0.04_260)] text-[oklch(0.85_0.02_260)]","border-[oklch(0.30_0.05_260)]","shadow-[0_2px_0_0_oklch(0_0_0/0.3)]","hover:bg-[oklch(0.22_0.05_260)] hover:border-[oklch(0.75_0.18_55)]","focus-visible:ring-[oklch(0.45_0.08_260)]"].join(" "),destructive:["bg-[oklch(0.35_0.12_25)] text-[oklch(0.90_0.02_25)]","border-[oklch(0.40_0.15_25)]","shadow-[0_2px_0_0_oklch(0_0_0/0.3)]","hover:bg-[oklch(0.40_0.14_25)] hover:border-[oklch(0.50_0.18_25)]","focus-visible:ring-[oklch(0.45_0.15_25)]"].join(" "),outline:["bg-transparent text-foreground","border-[oklch(0.35_0.05_260)]","shadow-[0_2px_0_0_oklch(0_0_0/0.1)]","hover:border-[oklch(0.75_0.18_55)] hover:text-[oklch(0.75_0.18_55)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),ghost:["bg-transparent text-foreground","shadow-none","hover:bg-[oklch(0.25_0.04_260)] hover:text-[oklch(0.85_0.02_260)]","active:translate-y-0 active:bg-[oklch(0.20_0.04_260)]","focus-visible:ring-[oklch(0.45_0.08_260)]"].join(" "),command:["bg-[oklch(0.20_0.05_260)] text-[oklch(0.75_0.18_55)]","border-[oklch(0.75_0.18_55)]","shadow-[0_2px_0_0_oklch(0.75_0.18_55/0.4),0_0_12px_0_oklch(0.75_0.18_55/0.2)]","hover:bg-[oklch(0.25_0.06_260)] hover:shadow-[0_2px_0_0_oklch(0.75_0.18_55/0.6),0_0_20px_0_oklch(0.75_0.18_55/0.35)]","hover:text-[oklch(0.80_0.20_55)]","active:shadow-[0_0_8px_0_oklch(0.75_0.18_55/0.4)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),link:["text-[oklch(0.75_0.18_55)] underline-offset-4","shadow-none","hover:underline hover:text-[oklch(0.80_0.20_55)]","active:translate-y-0","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" ")},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 text-xs has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 text-base has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function we({className:l,variant:o="default",size:c="default",asChild:u=!1,...d}){const m=u?fx:"button";return s.jsx(m,{"data-slot":"button","data-variant":o,"data-size":c,className:be(Qj({variant:o,size:c,className:l})),...d})}function Zj(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u,pp_detect_agents:d,pp_configure_agent:m,pp_unconfigure_agent:x,isDesktop:g}=St(),[v,p]=w.useState([]),[b,h]=w.useState(!1),[j,_]=w.useState(null),[A,z]=w.useState(null),[H,k]=w.useState(null),Q=c?.running??!1,q=w.useCallback(async()=>{if(Q){h(!0);try{let Y=[];g&&d?Y=await d():Y=(await l("/v0/management/agents")).agents||[],p(Y)}catch(Y){Y instanceof at||console.error("Failed to fetch agents:",Y)}h(!1)}},[l,Q,g,d]);w.useEffect(()=>{Q?q():p([])},[Q,q]);const W=(Y,le)=>{navigator.clipboard.writeText(Y),o(`${le} copied to clipboard`,"success")},Z=Y=>{const le=Object.entries(Y).map(([G,ne])=>`${G}=${ne}`).join(` -`);W(le,"Environment variables")},ee=Y=>["claude-code","gemini-cli"].includes(Y),E=async Y=>{if(Y.id){_(Y.id);try{g&&m?await m(Y.id):await l(`/v0/management/agents/${Y.id}/configure`,{method:"POST"});const le=ee(Y.id)?`${Y.name} configured! Restart shell to apply.`:`${Y.name} configured!`;o(le,"success"),await q()}catch(le){o(le instanceof Error?le.message:String(le),"error")}_(null)}},L=async Y=>{if(Y.id){z(Y.id);try{g&&x?await x(Y.id):await l(`/v0/management/agents/${Y.id}/unconfigure`,{method:"POST"});const le=ee(Y.id)?`${Y.name} configuration removed. Restart shell to apply.`:`${Y.name} configuration removed.`;o(le,"success"),await q()}catch(le){o(le instanceof Error?le.message:String(le),"error")}z(null)}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsx(Yu,{className:`h-4 w-4 text-[var(--accent-primary)] ${b?"animate-pulse":""}`}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"CLI Agent Detection"}),u&&s.jsx(Nt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:q,disabled:b||!Q,className:"p-1.5 rounded hover:bg-[var(--bg-void)] text-[var(--text-muted)] hover:text-[var(--accent-primary)] transition-colors disabled:opacity-50",children:s.jsx(aa,{className:`h-3.5 w-3.5 ${b?"animate-spin":""}`})})]}),s.jsx("div",{className:"p-4",children:Q?v.length===0&&!b?s.jsx("div",{className:"text-center py-8 text-[var(--text-muted)] font-mono text-xs uppercase",children:"No agents detected"}):s.jsx("div",{className:"grid gap-3",children:v.map(Y=>s.jsxs("div",{className:` + `})]})}const q0=l=>typeof l=="boolean"?`${l}`:l===0?"0":l,Y0=Hp,gx=(l,o)=>c=>{var u;if(o?.variants==null)return Y0(l,c?.class,c?.className);const{variants:d,defaultVariants:m}=o,x=Object.keys(d).map(p=>{const y=c?.[p],h=m?.[p];if(y===null)return null;const j=q0(y)||q0(h);return d[p][j]}),g=c&&Object.entries(c).reduce((p,y)=>{let[h,j]=y;return j===void 0||(p[h]=j),p},{}),v=o==null||(u=o.compoundVariants)===null||u===void 0?void 0:u.reduce((p,y)=>{let{class:h,className:j,...S}=y;return Object.entries(S).every(M=>{let[A,U]=M;return Array.isArray(U)?U.includes({...m,...g}[A]):{...m,...g}[A]===U})?[...p,h,j]:p},[]);return Y0(l,x,v,c?.class,c?.className)},Zj=gx(["inline-flex items-center justify-center gap-2 whitespace-nowrap","text-sm font-semibold uppercase tracking-wide","rounded-md","border border-transparent","transition-[transform,box-shadow] duration-50 ease-out","active:translate-y-0.5 active:shadow-none","outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:pointer-events-none disabled:opacity-50","[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0"].join(" "),{variants:{variant:{default:["bg-[oklch(0.75_0.18_55)] text-[oklch(0.15_0.02_55)]","shadow-[0_2px_0_0_oklch(0_0_0/0.25)]","hover:bg-[oklch(0.78_0.19_55)] hover:border-[oklch(0.65_0.2_55)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),secondary:["bg-[oklch(0.18_0.04_260)] text-[oklch(0.85_0.02_260)]","border-[oklch(0.30_0.05_260)]","shadow-[0_2px_0_0_oklch(0_0_0/0.3)]","hover:bg-[oklch(0.22_0.05_260)] hover:border-[oklch(0.75_0.18_55)]","focus-visible:ring-[oklch(0.45_0.08_260)]"].join(" "),destructive:["bg-[oklch(0.35_0.12_25)] text-[oklch(0.90_0.02_25)]","border-[oklch(0.40_0.15_25)]","shadow-[0_2px_0_0_oklch(0_0_0/0.3)]","hover:bg-[oklch(0.40_0.14_25)] hover:border-[oklch(0.50_0.18_25)]","focus-visible:ring-[oklch(0.45_0.15_25)]"].join(" "),outline:["bg-transparent text-foreground","border-[oklch(0.35_0.05_260)]","shadow-[0_2px_0_0_oklch(0_0_0/0.1)]","hover:border-[oklch(0.75_0.18_55)] hover:text-[oklch(0.75_0.18_55)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),ghost:["bg-transparent text-foreground","shadow-none","hover:bg-[oklch(0.25_0.04_260)] hover:text-[oklch(0.85_0.02_260)]","active:translate-y-0 active:bg-[oklch(0.20_0.04_260)]","focus-visible:ring-[oklch(0.45_0.08_260)]"].join(" "),command:["bg-[oklch(0.20_0.05_260)] text-[oklch(0.75_0.18_55)]","border-[oklch(0.75_0.18_55)]","shadow-[0_2px_0_0_oklch(0.75_0.18_55/0.4),0_0_12px_0_oklch(0.75_0.18_55/0.2)]","hover:bg-[oklch(0.25_0.06_260)] hover:shadow-[0_2px_0_0_oklch(0.75_0.18_55/0.6),0_0_20px_0_oklch(0.75_0.18_55/0.35)]","hover:text-[oklch(0.80_0.20_55)]","active:shadow-[0_0_8px_0_oklch(0.75_0.18_55/0.4)]","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" "),link:["text-[oklch(0.75_0.18_55)] underline-offset-4","shadow-none","hover:underline hover:text-[oklch(0.80_0.20_55)]","active:translate-y-0","focus-visible:ring-[oklch(0.75_0.18_55)]"].join(" ")},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 text-xs has-[>svg]:px-2.5",lg:"h-11 rounded-md px-6 text-base has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function we({className:l,variant:o="default",size:c="default",asChild:u=!1,...d}){const m=u?px:"button";return s.jsx(m,{"data-slot":"button","data-variant":o,"data-size":c,className:ve(Zj({variant:o,size:c,className:l})),...d})}function Kj(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u,pp_detect_agents:d,pp_configure_agent:m,pp_unconfigure_agent:x,isDesktop:g}=vt(),[v,p]=w.useState([]),[y,h]=w.useState(!1),[j,S]=w.useState(null),[M,A]=w.useState(null),[U,k]=w.useState(null),Q=c?.running??!1,q=w.useCallback(async()=>{if(Q){h(!0);try{let Y=[];g&&d?Y=await d():Y=(await l("/v0/management/agents")).agents||[],p(Y)}catch(Y){Y instanceof et||console.error("Failed to fetch agents:",Y)}h(!1)}},[l,Q,g,d]);w.useEffect(()=>{Q?q():p([])},[Q,q]);const W=(Y,le)=>{navigator.clipboard.writeText(Y),o(`${le} copied to clipboard`,"success")},Z=Y=>{const le=Object.entries(Y).map(([G,ne])=>`${G}=${ne}`).join(` +`);W(le,"Environment variables")},ee=Y=>["claude-code","gemini-cli"].includes(Y),E=async Y=>{if(Y.id){S(Y.id);try{g&&m?await m(Y.id):await l(`/v0/management/agents/${Y.id}/configure`,{method:"POST"});const le=ee(Y.id)?`${Y.name} configured! Restart shell to apply.`:`${Y.name} configured!`;o(le,"success"),await q()}catch(le){o(le instanceof Error?le.message:String(le),"error")}S(null)}},L=async Y=>{if(Y.id){A(Y.id);try{g&&x?await x(Y.id):await l(`/v0/management/agents/${Y.id}/unconfigure`,{method:"POST"});const le=ee(Y.id)?`${Y.name} configuration removed. Restart shell to apply.`:`${Y.name} configuration removed.`;o(le,"success"),await q()}catch(le){o(le instanceof Error?le.message:String(le),"error")}A(null)}};return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsx(Xu,{className:`h-4 w-4 text-[var(--accent-primary)] ${y?"animate-pulse":""}`}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"CLI Agent Detection"}),u&&s.jsx(mt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsx("div",{className:"flex-1"}),s.jsx("button",{onClick:q,disabled:y||!Q,className:"p-1.5 rounded hover:bg-[var(--bg-void)] text-[var(--text-muted)] hover:text-[var(--accent-primary)] transition-colors disabled:opacity-50",children:s.jsx(Qt,{className:`h-3.5 w-3.5 ${y?"animate-spin":""}`})})]}),s.jsx("div",{className:"p-4",children:Q?v.length===0&&!y?s.jsx("div",{className:"text-center py-8 text-[var(--text-muted)] font-mono text-xs uppercase",children:"No agents detected"}):s.jsx("div",{className:"grid gap-3",children:v.map(Y=>s.jsxs("div",{className:` flex items-center gap-4 p-3 rounded border transition-all ${Y.detected?"bg-[var(--bg-elevated)]/50 border-[var(--border-default)]":"bg-[var(--bg-void)]/30 border-[var(--border-subtle)] opacity-60"} - `,children:[s.jsx("div",{className:"shrink-0",children:Y.configured?s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--status-online)]/10 text-[var(--status-online)]",children:s.jsx(rl,{className:"h-4 w-4"})}):Y.detected?s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--status-warning)]/10 text-[var(--status-warning)]",children:s.jsx(ld,{className:"h-4 w-4"})}):s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--bg-void)] text-[var(--text-muted)]",children:s.jsx(Yu,{className:"h-4 w-4"})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono text-sm font-bold text-[var(--text-primary)]",children:Y.name}),Y.detected&&!Y.configured&&s.jsx("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-[var(--status-warning)]/10 text-[var(--status-warning)] border border-[var(--status-warning)]/20",children:"Needs Config"})]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] truncate",children:Y.detected?Y.configured?"Fully configured and ready":"Detected but not configured":"Not found on this system"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[Y.detected&&Y.shell_config&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{onClick:()=>k(Y),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all font-mono text-xs uppercase tracking-wider",children:[s.jsx(Op,{className:"h-3.5 w-3.5"}),"Shell"]})}),s.jsx(ba,{children:"View Shell Profile Configuration"})]}),Y.detected&&!Y.configured&&Y.canAutoConfigure&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{onClick:()=>E(Y),disabled:j===Y.id,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--accent-primary)] bg-[var(--accent-primary)]/10 text-[var(--accent-primary)] hover:bg-[var(--accent-primary)]/20 transition-all disabled:opacity-50 font-mono text-xs uppercase tracking-wider",children:[j===Y.id?s.jsx(Nt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(sx,{className:"h-3.5 w-3.5"}),"Configure"]})}),s.jsxs(ba,{children:["Auto-configure ",Y.name," for ProxyPilot"]})]}),Y.detected&&Y.configured&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{onClick:()=>L(Y),disabled:A===Y.id,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--status-error)] bg-[var(--status-error)]/10 text-[var(--status-error)] hover:bg-[var(--status-error)]/20 transition-all disabled:opacity-50 font-mono text-xs uppercase tracking-wider",children:[A===Y.id?s.jsx(Nt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(fj,{className:"h-3.5 w-3.5"}),"Reset"]})}),s.jsxs(ba,{children:["Remove ProxyPilot configuration from ",Y.name]})]}),Y.envVars&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsx("button",{onClick:()=>Z(Y.envVars),className:"p-2 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all",children:s.jsx(ol,{className:"h-3.5 w-3.5"})})}),s.jsx(ba,{children:"Copy Environment Variables"})]}),Y.configInstructions&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsx("button",{onClick:()=>{o(Y.configInstructions,"success")},className:"p-2 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all",children:s.jsx(vw,{className:"h-3.5 w-3.5"})})}),s.jsx(ba,{children:"View Setup Instructions"})]})]})]},Y.name))}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"Engine Offline"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Start the proxy engine to detect agents"})]})})]}),H&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:s.jsxs("div",{className:"bg-[var(--bg-panel)] border border-[var(--border-default)] rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[80vh] flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border-subtle)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Op,{className:"h-4 w-4 text-[var(--accent-primary)]"}),s.jsxs("span",{className:"font-mono text-sm font-bold",children:[H.name," - Shell Configuration"]})]}),s.jsx("button",{onClick:()=>k(null),className:"p-1 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(rd,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[s.jsx("div",{className:"mb-3",children:s.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["Add these lines to your shell profile (",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.bashrc"}),", ",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.zshrc"}),", or ",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.profile"}),"):"]})}),s.jsx("pre",{className:"bg-[var(--bg-void)] border border-[var(--border-subtle)] rounded-lg p-4 text-xs font-mono text-[var(--text-secondary)] overflow-x-auto whitespace-pre-wrap",children:H.shell_config})]}),s.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-[var(--border-subtle)]",children:[s.jsx(we,{size:"sm",variant:"outline",onClick:()=>k(null),className:"text-xs font-mono",children:"Close"}),s.jsxs(we,{size:"sm",onClick:()=>{W(H.shell_config||"","Shell configuration")},className:"text-xs font-mono gap-1",children:[s.jsx(ol,{className:"h-3 w-3"}),"Copy to Clipboard"]})]})]})})]})}function Kj(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=St(),[m,x]=w.useState([]),[g,v]=w.useState(!1),[p,b]=w.useState(null),[h,j]=w.useState(0),_=u?.running??!1,A=w.useCallback(async()=>{if(!(!l||!_)){v(!0),j(k=>k+1);try{const Q=((await o("/v0/management/integrations/status")).integrations||[]).map(q=>({...q,detected:q.installed??q.detected??!1}));x(Q)}catch(k){k instanceof at||console.error("Failed to fetch integrations:",k)}v(!1)}},[l,o,_]),z=async k=>{b(k);try{await o(`/v0/management/integrations/${k}/configure`,{method:"POST"}),await A(),c(`Configured ${k}`,"success")}catch(Q){c(Q instanceof Error?Q.message:String(Q),"error")}b(null)};w.useEffect(()=>{l&&_?A():_||x([])},[l,_,A]);const H=(k,Q=35)=>{if(k.length<=Q)return k;const q=k.slice(0,15),W=k.slice(-17);return`${q}...${W}`};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Eu,{className:`h-4 w-4 text-[var(--accent-primary)] ${g||d?"animate-spin":""}`}),(g||d)&&s.jsx("div",{className:"absolute inset-0 rounded-full border border-[var(--accent-primary)] animate-ping opacity-50"})]}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"Ground Control"}),d&&s.jsx(Nt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsx("div",{className:"flex-1"}),s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:A,disabled:g||!_,className:` + `,children:[s.jsx("div",{className:"shrink-0",children:Y.configured?s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--status-online)]/10 text-[var(--status-online)]",children:s.jsx(rl,{className:"h-4 w-4"})}):Y.detected?s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--status-warning)]/10 text-[var(--status-warning)]",children:s.jsx(ud,{className:"h-4 w-4"})}):s.jsx("div",{className:"p-1.5 rounded-full bg-[var(--bg-void)] text-[var(--text-muted)]",children:s.jsx(Xu,{className:"h-4 w-4"})})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"font-mono text-sm font-bold text-[var(--text-primary)]",children:Y.name}),Y.detected&&!Y.configured&&s.jsx("span",{className:"text-[10px] font-mono uppercase px-1.5 py-0.5 rounded bg-[var(--status-warning)]/10 text-[var(--status-warning)] border border-[var(--status-warning)]/20",children:"Needs Config"})]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] truncate",children:Y.detected?Y.configured?"Fully configured and ready":"Detected but not configured":"Not found on this system"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[Y.detected&&Y.shell_config&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{onClick:()=>k(Y),className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all font-mono text-xs uppercase tracking-wider",children:[s.jsx(U0,{className:"h-3.5 w-3.5"}),"Shell"]})}),s.jsx(ya,{children:"View Shell Profile Configuration"})]}),Y.detected&&!Y.configured&&Y.canAutoConfigure&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{onClick:()=>E(Y),disabled:j===Y.id,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--accent-primary)] bg-[var(--accent-primary)]/10 text-[var(--accent-primary)] hover:bg-[var(--accent-primary)]/20 transition-all disabled:opacity-50 font-mono text-xs uppercase tracking-wider",children:[j===Y.id?s.jsx(mt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(ox,{className:"h-3.5 w-3.5"}),"Configure"]})}),s.jsxs(ya,{children:["Auto-configure ",Y.name," for ProxyPilot"]})]}),Y.detected&&Y.configured&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{onClick:()=>L(Y),disabled:M===Y.id,className:"flex items-center gap-1.5 px-2.5 py-1.5 rounded border border-[var(--status-error)] bg-[var(--status-error)]/10 text-[var(--status-error)] hover:bg-[var(--status-error)]/20 transition-all disabled:opacity-50 font-mono text-xs uppercase tracking-wider",children:[M===Y.id?s.jsx(mt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(mj,{className:"h-3.5 w-3.5"}),"Reset"]})}),s.jsxs(ya,{children:["Remove ProxyPilot configuration from ",Y.name]})]}),Y.envVars&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsx("button",{onClick:()=>Z(Y.envVars),className:"p-2 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all",children:s.jsx(ol,{className:"h-3.5 w-3.5"})})}),s.jsx(ya,{children:"Copy Environment Variables"})]}),Y.configInstructions&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsx("button",{onClick:()=>{o(Y.configInstructions,"success")},className:"p-2 rounded border border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] transition-all",children:s.jsx(bw,{className:"h-3.5 w-3.5"})})}),s.jsx(ya,{children:"View Setup Instructions"})]})]})]},Y.name))}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"Engine Offline"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Start the proxy engine to detect agents"})]})})]}),U&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:s.jsxs("div",{className:"bg-[var(--bg-panel)] border border-[var(--border-default)] rounded-lg shadow-2xl max-w-2xl w-full mx-4 max-h-[80vh] flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border-subtle)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(U0,{className:"h-4 w-4 text-[var(--accent-primary)]"}),s.jsxs("span",{className:"font-mono text-sm font-bold",children:[U.name," - Shell Configuration"]})]}),s.jsx("button",{onClick:()=>k(null),className:"p-1 rounded hover:bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(dd,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[s.jsx("div",{className:"mb-3",children:s.jsxs("p",{className:"text-xs text-[var(--text-muted)]",children:["Add these lines to your shell profile (",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.bashrc"}),", ",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.zshrc"}),", or ",s.jsx("code",{className:"text-[var(--accent-primary)]",children:"~/.profile"}),"):"]})}),s.jsx("pre",{className:"bg-[var(--bg-void)] border border-[var(--border-subtle)] rounded-lg p-4 text-xs font-mono text-[var(--text-secondary)] overflow-x-auto whitespace-pre-wrap",children:U.shell_config})]}),s.jsxs("div",{className:"flex items-center justify-end gap-2 px-4 py-3 border-t border-[var(--border-subtle)]",children:[s.jsx(we,{size:"sm",variant:"outline",onClick:()=>k(null),className:"text-xs font-mono",children:"Close"}),s.jsxs(we,{size:"sm",onClick:()=>{W(U.shell_config||"","Shell configuration")},className:"text-xs font-mono gap-1",children:[s.jsx(ol,{className:"h-3 w-3"}),"Copy to Clipboard"]})]})]})})]})}function Jj(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState([]),[g,v]=w.useState(!1),[p,y]=w.useState(null),[h,j]=w.useState(0),S=u?.running??!1,M=w.useCallback(async()=>{if(!(!l||!S)){v(!0),j(k=>k+1);try{const Q=((await o("/v0/management/integrations/status")).integrations||[]).map(q=>({...q,detected:q.installed??q.detected??!1}));x(Q)}catch(k){k instanceof et||console.error("Failed to fetch integrations:",k)}v(!1)}},[l,o,S]),A=async k=>{y(k);try{await o(`/v0/management/integrations/${k}/configure`,{method:"POST"}),await M(),c(`Configured ${k}`,"success")}catch(Q){c(Q instanceof Error?Q.message:String(Q),"error")}y(null)};w.useEffect(()=>{l&&S?M():S||x([])},[l,S,M]);const U=(k,Q=35)=>{if(k.length<=Q)return k;const q=k.slice(0,15),W=k.slice(-17);return`${q}...${W}`};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"rounded-lg border border-[var(--border-default)] bg-[var(--bg-panel)] shadow-xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 bg-[var(--bg-elevated)] border-b border-[var(--border-default)]",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Tu,{className:`h-4 w-4 text-[var(--accent-primary)] ${g||d?"animate-spin":""}`}),(g||d)&&s.jsx("div",{className:"absolute inset-0 rounded-full border border-[var(--accent-primary)] animate-ping opacity-50"})]}),s.jsx("span",{className:"font-mono text-xs font-bold uppercase tracking-widest text-[var(--text-secondary)]",children:"Ground Control"}),d&&s.jsx(mt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsx("div",{className:"flex-1"}),s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:M,disabled:g||!S,className:` relative flex items-center gap-1.5 px-3 py-1.5 rounded font-mono text-[10px] uppercase tracking-wider font-bold border transition-all duration-150 - ${g?"border-[var(--status-processing)] bg-[var(--status-processing)]/10 text-[var(--status-processing)]":_?"border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] hover:shadow-[0_0_10px_var(--accent-primary)]":"border-[var(--border-subtle)] bg-transparent text-[var(--text-muted)] cursor-not-allowed opacity-50"} + ${g?"border-[var(--status-processing)] bg-[var(--status-processing)]/10 text-[var(--status-processing)]":S?"border-[var(--border-default)] bg-[var(--bg-panel)] text-[var(--text-secondary)] hover:border-[var(--accent-primary)] hover:text-[var(--accent-primary)] hover:shadow-[0_0_10px_var(--accent-primary)]":"border-[var(--border-subtle)] bg-transparent text-[var(--text-muted)] cursor-not-allowed opacity-50"} active:translate-y-0.5 cursor-pointer overflow-hidden - `,children:[g&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-[var(--status-processing)]/30 to-transparent",style:{animation:"scan-sweep 1s ease-in-out infinite"}}),s.jsx(Eu,{className:`h-3 w-3 relative z-10 ${g?"animate-spin":""}`}),s.jsx("span",{className:"relative z-10",children:g?"Scanning":"Scan"})]})}),s.jsx(ba,{children:"Scan for CLI agent integrations"})]})]}),s.jsxs("div",{className:"p-4 relative",children:[g&&s.jsx("div",{className:"absolute inset-0 pointer-events-none z-10 overflow-hidden",style:{background:"linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%)",opacity:.08,animation:"radar-scan-horizontal 1.5s ease-in-out"}}),_?m.length===0&&!g&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx("div",{className:"relative mb-4",children:s.jsx("div",{className:"w-16 h-16 rounded-full border-2 border-dashed border-[var(--border-subtle)] flex items-center justify-center",children:s.jsx(Eu,{className:"h-6 w-6 text-[var(--text-muted)]"})})}),s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"No Signals Detected"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Click SCAN to search for CLI agents"})]}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"⚠️ Engine Offline"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Start the proxy engine to manage integrations"})]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map((k,Q)=>s.jsxs("div",{className:` + `,children:[g&&s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-[var(--status-processing)]/30 to-transparent",style:{animation:"scan-sweep 1s ease-in-out infinite"}}),s.jsx(Tu,{className:`h-3 w-3 relative z-10 ${g?"animate-spin":""}`}),s.jsx("span",{className:"relative z-10",children:g?"Scanning":"Scan"})]})}),s.jsx(ya,{children:"Scan for CLI agent integrations"})]})]}),s.jsxs("div",{className:"p-4 relative",children:[g&&s.jsx("div",{className:"absolute inset-0 pointer-events-none z-10 overflow-hidden",style:{background:"linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%)",opacity:.08,animation:"radar-scan-horizontal 1.5s ease-in-out"}}),S?m.length===0&&!g&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx("div",{className:"relative mb-4",children:s.jsx("div",{className:"w-16 h-16 rounded-full border-2 border-dashed border-[var(--border-subtle)] flex items-center justify-center",children:s.jsx(Tu,{className:"h-6 w-6 text-[var(--text-muted)]"})})}),s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"No Signals Detected"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Click SCAN to search for CLI agents"})]}):s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-muted)] uppercase tracking-wider mb-1",children:"⚠️ Engine Offline"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Start the proxy engine to manage integrations"})]}),s.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:m.map((k,Q)=>s.jsxs("div",{className:` group relative rounded-lg border overflow-hidden transition-all duration-300 ${k.detected?"border-[var(--status-online)]/50 bg-gradient-to-b from-[var(--bg-elevated)] to-[var(--bg-panel)]":"border-[var(--border-subtle)] bg-[var(--bg-void)]"} @@ -88,14 +88,14 @@ Error generating stack: `+n.message+` `,children:k.name||k.id})]}),s.jsxs("div",{className:"p-3 space-y-3",children:[s.jsx("div",{className:` flex items-center gap-2 font-mono text-xs uppercase tracking-wider ${k.detected?"text-[var(--status-online)]":"text-[var(--text-muted)]"} - `,children:k.detected?s.jsxs(s.Fragment,{children:[s.jsx(rl,{className:"h-3 w-3"}),s.jsx("span",{children:"Detected"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Qo,{className:"h-3 w-3"}),s.jsx("span",{children:"Not Detected"})]})}),k.detected&&s.jsxs("div",{className:"space-y-1.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:[k.binary_path&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-[var(--text-muted)] truncate cursor-help",children:[s.jsx(W0,{className:"h-2.5 w-2.5 shrink-0"}),s.jsx("span",{className:"truncate",children:H(k.binary_path)})]})}),s.jsx(ba,{side:"bottom",className:"max-w-xs",children:s.jsx("div",{className:"font-mono text-xs break-all",children:k.binary_path})})]}),k.config_path&&s.jsxs(va,{children:[s.jsx(ya,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-[var(--text-muted)] truncate cursor-help",children:[s.jsx(Bo,{className:"h-2.5 w-2.5 shrink-0"}),s.jsx("span",{className:"truncate",children:H(k.config_path)})]})}),s.jsx(ba,{side:"bottom",className:"max-w-xs",children:s.jsx("div",{className:"font-mono text-xs break-all",children:k.config_path})})]})]}),!k.detected&&s.jsx("div",{className:"h-[30px]"}),s.jsx("button",{type:"button",onClick:()=>k.detected&&z(k.id),disabled:!k.detected||p===k.id,className:` + `,children:k.detected?s.jsxs(s.Fragment,{children:[s.jsx(rl,{className:"h-3 w-3"}),s.jsx("span",{children:"Detected"})]}):s.jsxs(s.Fragment,{children:[s.jsx(pr,{className:"h-3 w-3"}),s.jsx("span",{children:"Not Detected"})]})}),k.detected&&s.jsxs("div",{className:"space-y-1.5 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:[k.binary_path&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-[var(--text-muted)] truncate cursor-help",children:[s.jsx(ex,{className:"h-2.5 w-2.5 shrink-0"}),s.jsx("span",{className:"truncate",children:U(k.binary_path)})]})}),s.jsx(ya,{side:"bottom",className:"max-w-xs",children:s.jsx("div",{className:"font-mono text-xs break-all",children:k.binary_path})})]}),k.config_path&&s.jsxs(va,{children:[s.jsx(ba,{asChild:!0,children:s.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-mono text-[var(--text-muted)] truncate cursor-help",children:[s.jsx(Vo,{className:"h-2.5 w-2.5 shrink-0"}),s.jsx("span",{className:"truncate",children:U(k.config_path)})]})}),s.jsx(ya,{side:"bottom",className:"max-w-xs",children:s.jsx("div",{className:"font-mono text-xs break-all",children:k.config_path})})]})]}),!k.detected&&s.jsx("div",{className:"h-[30px]"}),s.jsx("button",{type:"button",onClick:()=>k.detected&&A(k.id),disabled:!k.detected||p===k.id,className:` w-full flex items-center justify-center gap-2 px-3 py-2 rounded font-mono text-xs font-bold uppercase tracking-wider border transition-all duration-150 ${p===k.id?"border-[var(--status-processing)] bg-[var(--status-processing)]/10 text-[var(--status-processing)]":k.detected?"border-[var(--accent-primary)] bg-transparent text-[var(--accent-primary)] hover:bg-[var(--accent-primary)] hover:text-[var(--bg-panel)] hover:shadow-[0_0_15px_var(--accent-primary)]":"border-[var(--border-subtle)] bg-transparent text-[var(--text-muted)] cursor-not-allowed opacity-50"} active:translate-y-0.5 cursor-pointer disabled:active:translate-y-0 - `,children:p===k.id?s.jsxs(s.Fragment,{children:[s.jsx(Bo,{className:"h-3 w-3 animate-spin"}),s.jsx("span",{children:"Configuring"})]}):k.detected?s.jsxs(s.Fragment,{children:[s.jsx(Bo,{className:"h-3 w-3"}),s.jsx("span",{children:"Configure"})]}):s.jsxs(s.Fragment,{children:[s.jsx(fs,{className:"h-3 w-3"}),s.jsx("span",{children:"Install"})]})})]}),p===k.id&&s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(180deg, transparent 0%, var(--status-processing) 50%, transparent 100%)",opacity:.1,animation:"config-scan 1s ease-in-out infinite"}})]},k.id))},h)]}),m.length>0&&s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 bg-[var(--bg-void)] border-t border-[var(--border-subtle)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-[var(--status-online)]"}),s.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[m.filter(k=>k.detected).length," Online"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full border border-[var(--text-muted)]"}),s.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[m.filter(k=>!k.detected).length," Offline"]})]})]})]}),s.jsx(Zj,{}),s.jsx("style",{children:` + `,children:p===k.id?s.jsxs(s.Fragment,{children:[s.jsx(Vo,{className:"h-3 w-3 animate-spin"}),s.jsx("span",{children:"Configuring"})]}):k.detected?s.jsxs(s.Fragment,{children:[s.jsx(Vo,{className:"h-3 w-3"}),s.jsx("span",{children:"Configure"})]}):s.jsxs(s.Fragment,{children:[s.jsx(fs,{className:"h-3 w-3"}),s.jsx("span",{children:"Install"})]})})]}),p===k.id&&s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{background:"linear-gradient(180deg, transparent 0%, var(--status-processing) 50%, transparent 100%)",opacity:.1,animation:"config-scan 1s ease-in-out infinite"}})]},k.id))},h)]}),m.length>0&&s.jsxs("div",{className:"flex items-center gap-4 px-4 py-2 bg-[var(--bg-void)] border-t border-[var(--border-subtle)]",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full bg-[var(--status-online)]"}),s.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[m.filter(k=>k.detected).length," Online"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 rounded-full border border-[var(--text-muted)]"}),s.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[m.filter(k=>!k.detected).length," Offline"]})]})]})]}),s.jsx(Kj,{}),s.jsx("style",{children:` @keyframes station-fade-in { 0% { opacity: 0; @@ -144,10 +144,10 @@ Error generating stack: `+n.message+` transform: translateY(100%); } } - `})]})}function dt({className:l,...o}){return s.jsx("div",{"data-slot":"card",className:be("flex flex-col gap-6 rounded-md py-6","bg-[var(--bg-panel)] border border-[var(--border-subtle)]","text-card-foreground","shadow-[inset_0_1px_0_0_var(--border-subtle),inset_0_-1px_0_0_oklch(0_0_0/0.2),0_2px_0_0_oklch(0_0_0/0.1)]",l),...o})}function xt({className:l,...o}){return s.jsx("div",{"data-slot":"card-header",className:be("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6","has-data-[slot=card-action]:grid-cols-[1fr_auto]","border-b border-[var(--border-subtle)] pb-4 mb-2",l),...o})}function zt({className:l,...o}){return s.jsx("div",{"data-slot":"card-title",className:be("font-display text-lg font-bold leading-tight tracking-tight",l),...o})}function Ra({className:l,...o}){return s.jsx("div",{"data-slot":"card-description",className:be("text-muted-foreground text-xs uppercase tracking-wider",l),...o})}function ft({className:l,...o}){return s.jsx("div",{"data-slot":"card-content",className:be("px-6",l),...o})}function Jj(l,o){const c=[/^\[?(\d{4}-\d{2}-\d{2}\s+)?(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\]?\s*\[?(ERROR|WARN(?:ING)?|INFO|DEBUG)\]?:?\s*(.*)$/i,/^\[?(ERROR|WARN(?:ING)?|INFO|DEBUG)\]?:?\s*(.*)$/i,/^(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+(ERROR|WARN(?:ING)?|INFO|DEBUG)\s+(.*)$/i],d=new Date().toTimeString().slice(0,12).replace(",",".");for(const m of c){const x=l.match(m);if(x){if(m===c[0]){const g=x[2]||d,v=Cu(x[3]),p=x[4]||"";return{id:`log-${o}`,timestamp:Up(g),level:v,message:p,raw:l}}else if(m===c[1]){const g=Cu(x[1]),v=x[2]||"";return{id:`log-${o}`,timestamp:d,level:g,message:v,raw:l}}else if(m===c[2]){const g=x[1],v=Cu(x[2]),p=x[3]||"";return{id:`log-${o}`,timestamp:Up(g),level:v,message:p,raw:l}}}}return{id:`log-${o}`,timestamp:d,level:"INFO",message:l,raw:l}}function Cu(l){const o=l.toUpperCase();return o==="WARNING"?"WARN":["ERROR","WARN","INFO","DEBUG"].includes(o)?o:"INFO"}function Up(l){if(l.includes(".")){const[o,c]=l.split(".");return`${o}.${c.padEnd(3,"0").slice(0,3)}`}return`${l}.000`}function Fj(l){switch(l){case"ERROR":return"border-l-[var(--status-offline)]";case"WARN":return"border-l-[var(--status-warning)]";case"INFO":return"border-l-[var(--accent-glow)]";case"DEBUG":return"border-l-[var(--text-muted)]";default:return"border-l-[var(--text-muted)]"}}function Hp(l){switch(l){case"ERROR":return"bg-[var(--status-offline)]/20 text-[var(--status-offline)]";case"WARN":return"bg-[var(--status-warning)]/20 text-[var(--status-warning)]";case"INFO":return"bg-[var(--accent-glow)]/20 text-[var(--accent-glow)]";case"DEBUG":return"bg-[var(--text-muted)]/20 text-[var(--text-muted)]";default:return"bg-[var(--text-muted)]/20 text-[var(--text-muted)]"}}function Wj(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=St(),[d,m]=w.useState(""),[x,g]=w.useState(""),[v,p]=w.useState("stdout"),[b,h]=w.useState("ALL"),[j,_]=w.useState(!1),[A,z]=w.useState(!0),H=w.useRef(null),k=w.useRef(null),Q=c?.running??!1,q=async()=>{try{const M=await l("/v0/management/proxypilot/diagnostics?lines=120");m(M.text||"")}catch(M){M instanceof at||o(M instanceof Error?M.message:String(M),"error")}},W=async()=>{if(!d){o("No diagnostics to copy","error");return}try{await navigator.clipboard.writeText(d),o("Copied diagnostics to clipboard","success")}catch(M){o(M instanceof Error?M.message:String(M),"error")}},Z=w.useCallback(async M=>{try{p(M);const se=await l(`/v0/management/proxypilot/logs/tail?file=${M}&lines=200`);g((se.lines||[]).join(` -`))}catch(se){se instanceof at||o(se instanceof Error?se.message:String(se),"error")}},[l,o]),ee=async()=>{if(!x){o("No logs to copy","error");return}try{await navigator.clipboard.writeText(x),o("Copied logs to clipboard","success")}catch(M){o(M instanceof Error?M.message:String(M),"error")}},E=()=>{g(""),_(!1),k.current&&(clearInterval(k.current),k.current=null)},L=async()=>{try{const se=((await l(`/v0/management/proxypilot/logs/tail?file=${v}&lines=2000`)).lines||[]).join(` -`);if(!se){o("No logs available to download","error");return}const ie=new Blob([se],{type:"text/plain"}),T=URL.createObjectURL(ie),V=document.createElement("a");V.href=T,V.download=`proxypilot-${v}-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.log`,document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(T),o("Logs download started","success")}catch(M){o(M instanceof Error?M.message:String(M),"error")}},Y=()=>{j?(_(!1),k.current&&(clearInterval(k.current),k.current=null)):(_(!0),Z(v),k.current=setInterval(()=>{Z(v)},2e3))};w.useEffect(()=>{A&&H.current&&(H.current.scrollTop=H.current.scrollHeight)},[x,A]),w.useEffect(()=>()=>{k.current&&clearInterval(k.current)},[]);const le=x?x.split(` -`).filter(Boolean).map((M,se)=>Jj(M,se)):[],G=b==="ALL"?le:le.filter(M=>M.level===b),ne=["ALL","ERROR","WARN","INFO","DEBUG"];return s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsx(xt,{className:"pb-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:s.jsx(P0,{className:"h-5 w-5 text-blue-500"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Diagnostics"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Engine snapshot"})]})]}),u&&s.jsx(Nt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]})}),s.jsxs(ft,{className:"space-y-3",children:[!Q&&s.jsx("div",{className:"py-4 text-center text-muted-foreground",children:s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"})}),Q&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:q,children:[s.jsx(fs,{className:"h-4 w-4 mr-1"}),"Load"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:W,disabled:!d,className:"gap-2",children:[s.jsx(ol,{className:"h-4 w-4"}),"Copy"]})]}),s.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border border-border/50 bg-muted/30 p-2 text-xs font-mono",children:d||"No diagnostics loaded."})]})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl overflow-hidden",children:[s.jsxs(xt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Zo,{className:`h-3 w-3 fill-current ${j&&Q?"text-[var(--status-offline)] animate-pulse":"text-[var(--text-muted)]"}`}),s.jsx("span",{className:"font-mono text-sm font-semibold tracking-wider text-[var(--text-primary)]",children:"FLIGHT RECORDER"})]}),u&&s.jsx(Nt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsxs("button",{onClick:Y,disabled:!Q,className:`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono transition-all ${j&&Q?"bg-[var(--status-offline)]/20 text-[var(--status-offline)] animate-pulse":"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"} ${Q?"":"opacity-50 cursor-not-allowed"}`,children:[s.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${j&&Q?"bg-[var(--status-offline)]":"bg-[var(--text-muted)]"}`}),"LIVE"]})]}),s.jsx("div",{className:"flex items-center gap-1",children:ne.map(M=>s.jsx("button",{onClick:()=>h(M),className:`px-2 py-0.5 rounded text-xs font-mono uppercase transition-all ${b===M?M==="ALL"?"bg-[var(--accent-primary)] text-[var(--primary-foreground)]":Hp(M).replace("/20","/40"):"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:M==="ALL"?"ALL":M.slice(0,3)},M))})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsx(we,{size:"sm",variant:v==="stdout"?"default":"outline",onClick:()=>Z("stdout"),className:"text-xs h-7 font-mono",children:"STDOUT"}),s.jsx(we,{size:"sm",variant:v==="stderr"?"default":"outline",onClick:()=>Z("stderr"),className:"text-xs h-7 font-mono",children:"STDERR"}),s.jsx("div",{className:"flex-1"}),s.jsx(we,{size:"sm",variant:"ghost",onClick:ee,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(ol,{className:"h-3 w-3"})}),s.jsx(we,{size:"sm",variant:"ghost",onClick:L,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(fs,{className:"h-3 w-3"})}),s.jsx(we,{size:"sm",variant:"ghost",onClick:E,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--status-offline)]",children:s.jsx(il,{className:"h-3 w-3"})})]})]}),s.jsxs(ft,{className:"p-0 relative",children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none z-10 overflow-hidden","aria-hidden":"true",children:s.jsx("div",{className:"absolute left-0 right-0 h-8 bg-gradient-to-b from-[var(--accent-glow)]/[0.07] to-transparent animate-scanline",style:{top:"-10%"}})}),s.jsx("div",{ref:H,className:"max-h-64 overflow-auto bg-[var(--bg-void)] font-mono text-xs",onScroll:M=>{const se=M.target,ie=se.scrollHeight-se.scrollTop<=se.clientHeight+50;z(ie)},children:Q?G.length===0?s.jsx("div",{className:"p-4 text-center text-[var(--text-muted)]",children:x?"No matching log entries.":"No logs loaded. Click STDOUT or STDERR to load logs."}):s.jsx("div",{className:"divide-y divide-[var(--border-subtle)]/30",children:G.map(M=>s.jsxs("div",{className:`flex items-start gap-2 px-3 py-1.5 border-l-2 hover:bg-[var(--bg-panel)]/50 transition-colors ${Fj(M.level)}`,children:[s.jsx("span",{className:"text-[var(--text-muted)] shrink-0 tabular-nums",children:M.timestamp}),s.jsx("span",{className:"text-[var(--border-default)]",children:"|"}),s.jsx("span",{className:`shrink-0 px-1.5 py-0 rounded text-[10px] font-semibold uppercase ${Hp(M.level)}`,children:M.level.padEnd(5)}),s.jsx("span",{className:"text-[var(--border-default)]",children:"|"}),s.jsx("span",{className:"text-[var(--text-primary)] break-all",children:M.message})]},M.id))}):s.jsxs("div",{className:"p-8 text-center text-[var(--text-muted)]",children:[s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-[10px] mt-1",children:"Start the proxy engine to view logs"})]})}),!A&&G.length>0&&s.jsx("button",{onClick:()=>{z(!0),H.current&&(H.current.scrollTop=H.current.scrollHeight)},className:"absolute bottom-2 right-4 px-2 py-1 rounded bg-[var(--accent-primary)] text-[var(--primary-foreground)] text-xs font-mono shadow-lg hover:opacity-90 transition-opacity z-20",children:"SCROLL TO BOTTOM"})]}),s.jsxs("div",{className:"px-3 py-1.5 bg-[var(--bg-panel)] border-t border-[var(--border-subtle)] flex items-center justify-between text-[10px] font-mono text-[var(--text-muted)]",children:[s.jsxs("span",{children:[G.length," entries ",b!=="ALL"&&`(filtered: ${b})`]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:A?"text-[var(--status-online)]":"",children:A?"AUTO-SCROLL ON":"AUTO-SCROLL OFF"}),s.jsx("span",{children:"|"}),s.jsx("span",{children:v.toUpperCase()})]})]})]})]})}const Bp=["anthropic","google","openai","azure","bedrock","vertex","other"];function qp(l){const o=l.toLowerCase();return o.includes("anthropic")?"oklch(0.60 0.15 35)":o.includes("google")||o.includes("vertex")?"oklch(0.55 0.18 250)":o.includes("openai")||o.includes("azure")?"oklch(0.55 0.12 145)":o.includes("bedrock")||o.includes("aws")?"oklch(0.58 0.14 50)":"oklch(0.50 0.08 280)"}function Yp(l){const o=l.toLowerCase();return o.includes("anthropic")?"oklch(0.60 0.15 35 / 0.15)":o.includes("google")||o.includes("vertex")?"oklch(0.55 0.18 250 / 0.15)":o.includes("openai")||o.includes("azure")?"oklch(0.55 0.12 145 / 0.15)":o.includes("bedrock")||o.includes("aws")?"oklch(0.58 0.14 50 / 0.15)":"oklch(0.50 0.08 280 / 0.15)"}function Pj(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=St(),[m,x]=w.useState([]),[g,v]=w.useState(!1),[p,b]=w.useState({from:"",to:"",provider:""}),[h,j]=w.useState(null),[_,A]=w.useState({from:"",to:"",provider:""}),[z,H]=w.useState(""),[k,Q]=w.useState(null),[q,W]=w.useState(null),[Z,ee]=w.useState(null),E=u?.running??!1,L=async()=>{try{const M=await o("/v0/management/model-mappings");x(M.mappings||[])}catch(M){M instanceof at||console.error("Failed to fetch model mappings:",M)}},Y=async()=>{if(!p.from.trim()||!p.to.trim()){c('Both "from" and "to" fields are required',"error");return}try{await o("/v0/management/model-mappings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),b({from:"",to:"",provider:""}),v(!1),await L(),ee(m.length),setTimeout(()=>ee(null),500),c("Route added to flight plan","success")}catch(M){c(M instanceof Error?M.message:String(M),"error")}},le=async(M,se)=>{try{await o(`/v0/management/model-mappings/${M}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(se)}),j(null),await L(),c("Route updated","success")}catch(ie){c(ie instanceof Error?ie.message:String(ie),"error")}},G=async M=>{W(M);try{await o(`/v0/management/model-mappings/${M}`,{method:"DELETE"}),setTimeout(async()=>{await L(),W(null),c("Route removed","success")},300)}catch(se){W(null),c(se instanceof Error?se.message:String(se),"error")}},ne=async()=>{if(!z.trim()){Q({matched:!1});return}try{const M=await o(`/v0/management/model-mappings/test?model=${encodeURIComponent(z.trim())}`);Q({model:M.model||M.to||z,provider:M.provider,matched:M.model!==z||!!M.provider})}catch{Q({matched:!1})}};return w.useEffect(()=>{l&&E?L():E||x([])},[l,E]),l?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl overflow-hidden",children:[s.jsx("div",{className:"px-6 py-4 border-b border-border/50 bg-gradient-to-r from-orange-500/5 to-transparent",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:`h-3 w-3 rounded-full ${E?"bg-orange-500 animate-pulse":"bg-muted"}`}),E&&s.jsx("div",{className:"absolute inset-0 h-3 w-3 rounded-full bg-orange-500/50 animate-ping"})]}),s.jsx("h2",{className:"text-base font-semibold tracking-wide uppercase text-foreground/90",children:"Flight Plan"}),d&&s.jsx(Nt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),s.jsxs(we,{size:"sm",variant:"outline",disabled:!E,onClick:()=>v(!g),className:"gap-1.5 text-xs border-orange-500/30 hover:border-orange-500/50 hover:bg-orange-500/10",children:[s.jsx(Rw,{className:"h-3.5 w-3.5"}),"Add Route"]})]})}),s.jsxs(ft,{className:"p-4 space-y-3",children:[!E&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to manage model mappings"})]}),E&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-out ${g?"max-h-48 opacity-100":"max-h-0 opacity-0"}`,children:s.jsxs("div",{className:"p-4 rounded-lg bg-orange-500/5 border border-orange-500/20 space-y-3 mb-3",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"From Model"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",placeholder:"gpt-4",value:p.from,onChange:M=>b({...p,from:M.target.value})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"To Model"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",placeholder:"claude-3-opus",value:p.to,onChange:M=>b({...p,to:M.target.value})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Provider"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono appearance-none cursor-pointer focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",value:p.provider,onChange:M=>b({...p,provider:M.target.value}),children:[s.jsx("option",{value:"",children:"Select provider..."}),Bp.map(M=>s.jsx("option",{value:M,children:M.charAt(0).toUpperCase()+M.slice(1)},M))]}),s.jsx(Yn,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(we,{size:"sm",variant:"ghost",onClick:()=>{v(!1),b({from:"",to:"",provider:""})},className:"text-xs",children:"Cancel"}),s.jsx(we,{size:"sm",onClick:()=>Y().catch(M=>c(String(M),"error")),className:"text-xs bg-orange-500 hover:bg-orange-600 text-white",children:"Save Route"})]})]})}),s.jsxs("div",{className:"space-y-2",children:[m.length===0&&!g&&!d&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx("div",{className:"text-3xl mb-2",children:"---"}),s.jsx("p",{className:"text-sm",children:"No routes configured"}),s.jsx("p",{className:"text-xs mt-1",children:"Add a route to start mapping models"})]}),d&&m.length===0&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx(Nt,{className:"h-8 w-8 animate-spin mx-auto mb-2 opacity-20"}),s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono opacity-50",children:"Loading Flight Plan..."})]}),m.map((M,se)=>s.jsx("div",{className:`group relative rounded-lg border transition-all duration-300 ${q===se?"opacity-0 scale-95 max-h-0 overflow-hidden border-transparent":Z===se?"opacity-0 animate-fade-in border-border/50 bg-card/80 hover:bg-card hover:border-border":"border-border/50 bg-card/80 hover:bg-card hover:border-border"}`,style:{animation:Z===se?"fadeIn 0.3s ease-out forwards":void 0},children:h===se?s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"From"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:_.from,onChange:ie=>A(T=>({...T,from:ie.target.value}))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"To"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:_.to,onChange:ie=>A(T=>({...T,to:ie.target.value}))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"Provider"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono appearance-none cursor-pointer focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:_.provider,onChange:ie=>A(T=>({...T,provider:ie.target.value})),children:[s.jsx("option",{value:"",children:"None"}),Bp.map(ie=>s.jsx("option",{value:ie,children:ie.charAt(0).toUpperCase()+ie.slice(1)},ie))]}),s.jsx(Yn,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(we,{size:"sm",variant:"ghost",onClick:()=>j(null),className:"h-8 px-3 text-xs",children:[s.jsx(rd,{className:"h-3.5 w-3.5 mr-1"}),"Cancel"]}),s.jsxs(we,{size:"sm",onClick:()=>le(se,_).catch(ie=>c(String(ie),"error")),className:"h-8 px-3 text-xs bg-green-600 hover:bg-green-700 text-white",children:[s.jsx(rl,{className:"h-3.5 w-3.5 mr-1"}),"Save"]})]})]}):s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[s.jsx("div",{className:"flex-shrink-0 min-w-[100px]",children:s.jsx("code",{className:"text-sm font-mono font-medium text-foreground/90",children:M.from})}),s.jsxs("div",{className:"flex-shrink-0 flex items-center gap-0.5 text-orange-500/70 group-hover:text-orange-500 transition-colors",children:[s.jsx("span",{className:"inline-block w-8 h-[2px] bg-current rounded-full relative overflow-hidden",children:s.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-orange-300 to-transparent opacity-0 group-hover:opacity-100 group-hover:animate-flow"})}),s.jsx("span",{className:"inline-block w-8 h-[2px] bg-current rounded-full relative overflow-hidden",children:s.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-orange-300 to-transparent opacity-0 group-hover:opacity-100 group-hover:animate-flow animation-delay-100"})}),s.jsx("svg",{className:"h-4 w-4 -ml-0.5 transition-transform group-hover:translate-x-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})]}),s.jsx("div",{className:"flex-1 min-w-[100px]",children:s.jsx("code",{className:"text-sm font-mono font-medium text-orange-400",children:M.to})}),M.provider&&s.jsx("div",{className:"flex-shrink-0 px-2.5 py-1 rounded text-xs font-semibold uppercase tracking-wider",style:{color:qp(M.provider),backgroundColor:Yp(M.provider)},children:M.provider}),s.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(we,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted",onClick:()=>{j(se),A({from:M.from||"",to:M.to||"",provider:M.provider||""})},children:s.jsx(Tw,{className:"h-3.5 w-3.5"})}),s.jsx(we,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0 hover:bg-destructive/10 text-destructive",onClick:()=>G(se).catch(ie=>c(String(ie),"error")),children:s.jsx(il,{className:"h-3.5 w-3.5"})})]})]})},se))]}),s.jsx("div",{className:"mt-4 pt-4 border-t border-border/50",children:s.jsx("div",{className:"rounded-lg bg-muted/30 border border-border/50 p-4",children:s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[200px]",children:[s.jsx(Kw,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Test Route:"}),s.jsx("input",{type:"text",className:"flex-1 min-w-[120px] rounded-md border border-border bg-background/80 px-3 py-1.5 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",placeholder:"Enter model name...",value:z,onChange:M=>{H(M.target.value),M.target.value.trim()||Q(null)},onKeyDown:M=>{M.key==="Enter"&&ne().catch(se=>c(String(se),"error"))}}),s.jsx(we,{size:"sm",variant:"outline",onClick:()=>ne().catch(M=>c(String(M),"error")),className:"text-xs",children:"Lookup"})]}),k&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-orange-500",children:"---"}),k.matched?s.jsxs(s.Fragment,{children:[s.jsx("code",{className:"text-sm font-mono font-medium text-orange-400",children:k.model}),k.provider&&s.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-semibold uppercase",style:{color:qp(k.provider),backgroundColor:Yp(k.provider)},children:k.provider})]}):s.jsx("span",{className:"text-sm text-muted-foreground italic",children:"No match found"})]})]})})})]})]}),s.jsx("style",{children:` + `})]})}function dt({className:l,...o}){return s.jsx("div",{"data-slot":"card",className:ve("flex flex-col gap-6 rounded-md py-6","bg-[var(--bg-panel)] border border-[var(--border-subtle)]","text-card-foreground","shadow-[inset_0_1px_0_0_var(--border-subtle),inset_0_-1px_0_0_oklch(0_0_0/0.2),0_2px_0_0_oklch(0_0_0/0.1)]",l),...o})}function gt({className:l,...o}){return s.jsx("div",{"data-slot":"card-header",className:ve("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6","has-data-[slot=card-action]:grid-cols-[1fr_auto]","border-b border-[var(--border-subtle)] pb-4 mb-2",l),...o})}function zt({className:l,...o}){return s.jsx("div",{"data-slot":"card-title",className:ve("font-display text-lg font-bold leading-tight tracking-tight",l),...o})}function Da({className:l,...o}){return s.jsx("div",{"data-slot":"card-description",className:ve("text-muted-foreground text-xs uppercase tracking-wider",l),...o})}function ft({className:l,...o}){return s.jsx("div",{"data-slot":"card-content",className:ve("px-6",l),...o})}function Fj(l,o){const c=[/^\[?(\d{4}-\d{2}-\d{2}\s+)?(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\]?\s*\[?(ERROR|WARN(?:ING)?|INFO|DEBUG)\]?:?\s*(.*)$/i,/^\[?(ERROR|WARN(?:ING)?|INFO|DEBUG)\]?:?\s*(.*)$/i,/^(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+(ERROR|WARN(?:ING)?|INFO|DEBUG)\s+(.*)$/i],d=new Date().toTimeString().slice(0,12).replace(",",".");for(const m of c){const x=l.match(m);if(x){if(m===c[0]){const g=x[2]||d,v=Mu(x[3]),p=x[4]||"";return{id:`log-${o}`,timestamp:G0(g),level:v,message:p,raw:l}}else if(m===c[1]){const g=Mu(x[1]),v=x[2]||"";return{id:`log-${o}`,timestamp:d,level:g,message:v,raw:l}}else if(m===c[2]){const g=x[1],v=Mu(x[2]),p=x[3]||"";return{id:`log-${o}`,timestamp:G0(g),level:v,message:p,raw:l}}}}return{id:`log-${o}`,timestamp:d,level:"INFO",message:l,raw:l}}function Mu(l){const o=l.toUpperCase();return o==="WARNING"?"WARN":["ERROR","WARN","INFO","DEBUG"].includes(o)?o:"INFO"}function G0(l){if(l.includes(".")){const[o,c]=l.split(".");return`${o}.${c.padEnd(3,"0").slice(0,3)}`}return`${l}.000`}function Wj(l){switch(l){case"ERROR":return"border-l-[var(--status-offline)]";case"WARN":return"border-l-[var(--status-warning)]";case"INFO":return"border-l-[var(--accent-glow)]";case"DEBUG":return"border-l-[var(--text-muted)]";default:return"border-l-[var(--text-muted)]"}}function V0(l){switch(l){case"ERROR":return"bg-[var(--status-offline)]/20 text-[var(--status-offline)]";case"WARN":return"bg-[var(--status-warning)]/20 text-[var(--status-warning)]";case"INFO":return"bg-[var(--accent-glow)]/20 text-[var(--accent-glow)]";case"DEBUG":return"bg-[var(--text-muted)]/20 text-[var(--text-muted)]";default:return"bg-[var(--text-muted)]/20 text-[var(--text-muted)]"}}function Pj(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=vt(),[d,m]=w.useState(""),[x,g]=w.useState(""),[v,p]=w.useState("stdout"),[y,h]=w.useState("ALL"),[j,S]=w.useState(!1),[M,A]=w.useState(!0),U=w.useRef(null),k=w.useRef(null),Q=c?.running??!1,q=async()=>{try{const O=await l("/v0/management/proxypilot/diagnostics?lines=120");m(O.text||"")}catch(O){O instanceof et||o(O instanceof Error?O.message:String(O),"error")}},W=async()=>{if(!d){o("No diagnostics to copy","error");return}try{await navigator.clipboard.writeText(d),o("Copied diagnostics to clipboard","success")}catch(O){o(O instanceof Error?O.message:String(O),"error")}},Z=w.useCallback(async O=>{try{p(O);const se=await l(`/v0/management/proxypilot/logs/tail?file=${O}&lines=200`);g((se.lines||[]).join(` +`))}catch(se){se instanceof et||o(se instanceof Error?se.message:String(se),"error")}},[l,o]),ee=async()=>{if(!x){o("No logs to copy","error");return}try{await navigator.clipboard.writeText(x),o("Copied logs to clipboard","success")}catch(O){o(O instanceof Error?O.message:String(O),"error")}},E=()=>{g(""),S(!1),k.current&&(clearInterval(k.current),k.current=null)},L=async()=>{try{const se=((await l(`/v0/management/proxypilot/logs/tail?file=${v}&lines=2000`)).lines||[]).join(` +`);if(!se){o("No logs available to download","error");return}const ie=new Blob([se],{type:"text/plain"}),T=URL.createObjectURL(ie),V=document.createElement("a");V.href=T,V.download=`proxypilot-${v}-${new Date().toISOString().slice(0,19).replace(/:/g,"-")}.log`,document.body.appendChild(V),V.click(),document.body.removeChild(V),URL.revokeObjectURL(T),o("Logs download started","success")}catch(O){o(O instanceof Error?O.message:String(O),"error")}},Y=()=>{j?(S(!1),k.current&&(clearInterval(k.current),k.current=null)):(S(!0),Z(v),k.current=setInterval(()=>{Z(v)},2e3))};w.useEffect(()=>{M&&U.current&&(U.current.scrollTop=U.current.scrollHeight)},[x,M]),w.useEffect(()=>()=>{k.current&&clearInterval(k.current)},[]);const le=x?x.split(` +`).filter(Boolean).map((O,se)=>Fj(O,se)):[],G=y==="ALL"?le:le.filter(O=>O.level===y),ne=["ALL","ERROR","WARN","INFO","DEBUG"];return s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsx(gt,{className:"pb-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:s.jsx(tx,{className:"h-5 w-5 text-blue-500"})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Diagnostics"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Engine snapshot"})]})]}),u&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]})}),s.jsxs(ft,{className:"space-y-3",children:[!Q&&s.jsx("div",{className:"py-4 text-center text-muted-foreground",children:s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"})}),Q&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:q,children:[s.jsx(fs,{className:"h-4 w-4 mr-1"}),"Load"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:W,disabled:!d,className:"gap-2",children:[s.jsx(ol,{className:"h-4 w-4"}),"Copy"]})]}),s.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border border-border/50 bg-muted/30 p-2 text-xs font-mono",children:d||"No diagnostics loaded."})]})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl overflow-hidden",children:[s.jsxs(gt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Jo,{className:`h-3 w-3 fill-current ${j&&Q?"text-[var(--status-offline)] animate-pulse":"text-[var(--text-muted)]"}`}),s.jsx("span",{className:"font-mono text-sm font-semibold tracking-wider text-[var(--text-primary)]",children:"FLIGHT RECORDER"})]}),u&&s.jsx(mt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsxs("button",{onClick:Y,disabled:!Q,className:`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono transition-all ${j&&Q?"bg-[var(--status-offline)]/20 text-[var(--status-offline)] animate-pulse":"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"} ${Q?"":"opacity-50 cursor-not-allowed"}`,children:[s.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${j&&Q?"bg-[var(--status-offline)]":"bg-[var(--text-muted)]"}`}),"LIVE"]})]}),s.jsx("div",{className:"flex items-center gap-1",children:ne.map(O=>s.jsx("button",{onClick:()=>h(O),className:`px-2 py-0.5 rounded text-xs font-mono uppercase transition-all ${y===O?O==="ALL"?"bg-[var(--accent-primary)] text-[var(--primary-foreground)]":V0(O).replace("/20","/40"):"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:O==="ALL"?"ALL":O.slice(0,3)},O))})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.jsx(we,{size:"sm",variant:v==="stdout"?"default":"outline",onClick:()=>Z("stdout"),className:"text-xs h-7 font-mono",children:"STDOUT"}),s.jsx(we,{size:"sm",variant:v==="stderr"?"default":"outline",onClick:()=>Z("stderr"),className:"text-xs h-7 font-mono",children:"STDERR"}),s.jsx("div",{className:"flex-1"}),s.jsx(we,{size:"sm",variant:"ghost",onClick:ee,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(ol,{className:"h-3 w-3"})}),s.jsx(we,{size:"sm",variant:"ghost",onClick:L,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(fs,{className:"h-3 w-3"})}),s.jsx(we,{size:"sm",variant:"ghost",onClick:E,disabled:!x,className:"text-xs h-7 gap-1 text-[var(--text-muted)] hover:text-[var(--status-offline)]",children:s.jsx(il,{className:"h-3 w-3"})})]})]}),s.jsxs(ft,{className:"p-0 relative",children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none z-10 overflow-hidden","aria-hidden":"true",children:s.jsx("div",{className:"absolute left-0 right-0 h-8 bg-gradient-to-b from-[var(--accent-glow)]/[0.07] to-transparent animate-scanline",style:{top:"-10%"}})}),s.jsx("div",{ref:U,className:"max-h-64 overflow-auto bg-[var(--bg-void)] font-mono text-xs",onScroll:O=>{const se=O.target,ie=se.scrollHeight-se.scrollTop<=se.clientHeight+50;A(ie)},children:Q?G.length===0?s.jsx("div",{className:"p-4 text-center text-[var(--text-muted)]",children:x?"No matching log entries.":"No logs loaded. Click STDOUT or STDERR to load logs."}):s.jsx("div",{className:"divide-y divide-[var(--border-subtle)]/30",children:G.map(O=>s.jsxs("div",{className:`flex items-start gap-2 px-3 py-1.5 border-l-2 hover:bg-[var(--bg-panel)]/50 transition-colors ${Wj(O.level)}`,children:[s.jsx("span",{className:"text-[var(--text-muted)] shrink-0 tabular-nums",children:O.timestamp}),s.jsx("span",{className:"text-[var(--border-default)]",children:"|"}),s.jsx("span",{className:`shrink-0 px-1.5 py-0 rounded text-[10px] font-semibold uppercase ${V0(O.level)}`,children:O.level.padEnd(5)}),s.jsx("span",{className:"text-[var(--border-default)]",children:"|"}),s.jsx("span",{className:"text-[var(--text-primary)] break-all",children:O.message})]},O.id))}):s.jsxs("div",{className:"p-8 text-center text-[var(--text-muted)]",children:[s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-[10px] mt-1",children:"Start the proxy engine to view logs"})]})}),!M&&G.length>0&&s.jsx("button",{onClick:()=>{A(!0),U.current&&(U.current.scrollTop=U.current.scrollHeight)},className:"absolute bottom-2 right-4 px-2 py-1 rounded bg-[var(--accent-primary)] text-[var(--primary-foreground)] text-xs font-mono shadow-lg hover:opacity-90 transition-opacity z-20",children:"SCROLL TO BOTTOM"})]}),s.jsxs("div",{className:"px-3 py-1.5 bg-[var(--bg-panel)] border-t border-[var(--border-subtle)] flex items-center justify-between text-[10px] font-mono text-[var(--text-muted)]",children:[s.jsxs("span",{children:[G.length," entries ",y!=="ALL"&&`(filtered: ${y})`]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:M?"text-[var(--status-online)]":"",children:M?"AUTO-SCROLL ON":"AUTO-SCROLL OFF"}),s.jsx("span",{children:"|"}),s.jsx("span",{children:v.toUpperCase()})]})]})]})]})}const $0=["anthropic","google","openai","azure","bedrock","vertex","other"];function X0(l){const o=l.toLowerCase();return o.includes("anthropic")?"oklch(0.60 0.15 35)":o.includes("google")||o.includes("vertex")?"oklch(0.55 0.18 250)":o.includes("openai")||o.includes("azure")?"oklch(0.55 0.12 145)":o.includes("bedrock")||o.includes("aws")?"oklch(0.58 0.14 50)":"oklch(0.50 0.08 280)"}function Q0(l){const o=l.toLowerCase();return o.includes("anthropic")?"oklch(0.60 0.15 35 / 0.15)":o.includes("google")||o.includes("vertex")?"oklch(0.55 0.18 250 / 0.15)":o.includes("openai")||o.includes("azure")?"oklch(0.55 0.12 145 / 0.15)":o.includes("bedrock")||o.includes("aws")?"oklch(0.58 0.14 50 / 0.15)":"oklch(0.50 0.08 280 / 0.15)"}function Ij(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState([]),[g,v]=w.useState(!1),[p,y]=w.useState({from:"",to:"",provider:""}),[h,j]=w.useState(null),[S,M]=w.useState({from:"",to:"",provider:""}),[A,U]=w.useState(""),[k,Q]=w.useState(null),[q,W]=w.useState(null),[Z,ee]=w.useState(null),E=u?.running??!1,L=async()=>{try{const O=await o("/v0/management/model-mappings");x(O.mappings||[])}catch(O){O instanceof et||console.error("Failed to fetch model mappings:",O)}},Y=async()=>{if(!p.from.trim()||!p.to.trim()){c('Both "from" and "to" fields are required',"error");return}try{await o("/v0/management/model-mappings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),y({from:"",to:"",provider:""}),v(!1),await L(),ee(m.length),setTimeout(()=>ee(null),500),c("Route added to flight plan","success")}catch(O){c(O instanceof Error?O.message:String(O),"error")}},le=async(O,se)=>{try{await o(`/v0/management/model-mappings/${O}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(se)}),j(null),await L(),c("Route updated","success")}catch(ie){c(ie instanceof Error?ie.message:String(ie),"error")}},G=async O=>{W(O);try{await o(`/v0/management/model-mappings/${O}`,{method:"DELETE"}),setTimeout(async()=>{await L(),W(null),c("Route removed","success")},300)}catch(se){W(null),c(se instanceof Error?se.message:String(se),"error")}},ne=async()=>{if(!A.trim()){Q({matched:!1});return}try{const O=await o(`/v0/management/model-mappings/test?model=${encodeURIComponent(A.trim())}`);Q({model:O.model||O.to||A,provider:O.provider,matched:O.model!==A||!!O.provider})}catch{Q({matched:!1})}};return w.useEffect(()=>{l&&E?L():E||x([])},[l,E]),l?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl overflow-hidden",children:[s.jsx("div",{className:"px-6 py-4 border-b border-border/50 bg-gradient-to-r from-orange-500/5 to-transparent",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:`h-3 w-3 rounded-full ${E?"bg-orange-500 animate-pulse":"bg-muted"}`}),E&&s.jsx("div",{className:"absolute inset-0 h-3 w-3 rounded-full bg-orange-500/50 animate-ping"})]}),s.jsx("h2",{className:"text-base font-semibold tracking-wide uppercase text-foreground/90",children:"Flight Plan"}),d&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),s.jsxs(we,{size:"sm",variant:"outline",disabled:!E,onClick:()=>v(!g),className:"gap-1.5 text-xs border-orange-500/30 hover:border-orange-500/50 hover:bg-orange-500/10",children:[s.jsx(Dw,{className:"h-3.5 w-3.5"}),"Add Route"]})]})}),s.jsxs(ft,{className:"p-4 space-y-3",children:[!E&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to manage model mappings"})]}),E&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`overflow-hidden transition-all duration-300 ease-out ${g?"max-h-48 opacity-100":"max-h-0 opacity-0"}`,children:s.jsxs("div",{className:"p-4 rounded-lg bg-orange-500/5 border border-orange-500/20 space-y-3 mb-3",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"From Model"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",placeholder:"gpt-4",value:p.from,onChange:O=>y({...p,from:O.target.value})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"To Model"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",placeholder:"claude-3-opus",value:p.to,onChange:O=>y({...p,to:O.target.value})})]}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Provider"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono appearance-none cursor-pointer focus:outline-none focus:ring-2 focus:ring-orange-500/30 focus:border-orange-500/50 transition-all",value:p.provider,onChange:O=>y({...p,provider:O.target.value}),children:[s.jsx("option",{value:"",children:"Select provider..."}),$0.map(O=>s.jsx("option",{value:O,children:O.charAt(0).toUpperCase()+O.slice(1)},O))]}),s.jsx(cn,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(we,{size:"sm",variant:"ghost",onClick:()=>{v(!1),y({from:"",to:"",provider:""})},className:"text-xs",children:"Cancel"}),s.jsx(we,{size:"sm",onClick:()=>Y().catch(O=>c(String(O),"error")),className:"text-xs bg-orange-500 hover:bg-orange-600 text-white",children:"Save Route"})]})]})}),s.jsxs("div",{className:"space-y-2",children:[m.length===0&&!g&&!d&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx("div",{className:"text-3xl mb-2",children:"---"}),s.jsx("p",{className:"text-sm",children:"No routes configured"}),s.jsx("p",{className:"text-xs mt-1",children:"Add a route to start mapping models"})]}),d&&m.length===0&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[s.jsx(mt,{className:"h-8 w-8 animate-spin mx-auto mb-2 opacity-20"}),s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono opacity-50",children:"Loading Flight Plan..."})]}),m.map((O,se)=>s.jsx("div",{className:`group relative rounded-lg border transition-all duration-300 ${q===se?"opacity-0 scale-95 max-h-0 overflow-hidden border-transparent":Z===se?"opacity-0 animate-fade-in border-border/50 bg-card/80 hover:bg-card hover:border-border":"border-border/50 bg-card/80 hover:bg-card hover:border-border"}`,style:{animation:Z===se?"fadeIn 0.3s ease-out forwards":void 0},children:h===se?s.jsxs("div",{className:"p-4 space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"From"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:S.from,onChange:ie=>M(T=>({...T,from:ie.target.value}))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"To"}),s.jsx("input",{type:"text",className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:S.to,onChange:ie=>M(T=>({...T,to:ie.target.value}))})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs text-muted-foreground",children:"Provider"}),s.jsxs("div",{className:"relative",children:[s.jsxs("select",{className:"w-full rounded-md border border-border bg-background/80 px-3 py-2 text-sm font-mono appearance-none cursor-pointer focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",value:S.provider,onChange:ie=>M(T=>({...T,provider:ie.target.value})),children:[s.jsx("option",{value:"",children:"None"}),$0.map(ie=>s.jsx("option",{value:ie,children:ie.charAt(0).toUpperCase()+ie.slice(1)},ie))]}),s.jsx(cn,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"})]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(we,{size:"sm",variant:"ghost",onClick:()=>j(null),className:"h-8 px-3 text-xs",children:[s.jsx(dd,{className:"h-3.5 w-3.5 mr-1"}),"Cancel"]}),s.jsxs(we,{size:"sm",onClick:()=>le(se,S).catch(ie=>c(String(ie),"error")),className:"h-8 px-3 text-xs bg-green-600 hover:bg-green-700 text-white",children:[s.jsx(rl,{className:"h-3.5 w-3.5 mr-1"}),"Save"]})]})]}):s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3",children:[s.jsx("div",{className:"flex-shrink-0 min-w-[100px]",children:s.jsx("code",{className:"text-sm font-mono font-medium text-foreground/90",children:O.from})}),s.jsxs("div",{className:"flex-shrink-0 flex items-center gap-0.5 text-orange-500/70 group-hover:text-orange-500 transition-colors",children:[s.jsx("span",{className:"inline-block w-8 h-[2px] bg-current rounded-full relative overflow-hidden",children:s.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-orange-300 to-transparent opacity-0 group-hover:opacity-100 group-hover:animate-flow"})}),s.jsx("span",{className:"inline-block w-8 h-[2px] bg-current rounded-full relative overflow-hidden",children:s.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-orange-300 to-transparent opacity-0 group-hover:opacity-100 group-hover:animate-flow animation-delay-100"})}),s.jsx("svg",{className:"h-4 w-4 -ml-0.5 transition-transform group-hover:translate-x-0.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:s.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})]}),s.jsx("div",{className:"flex-1 min-w-[100px]",children:s.jsx("code",{className:"text-sm font-mono font-medium text-orange-400",children:O.to})}),O.provider&&s.jsx("div",{className:"flex-shrink-0 px-2.5 py-1 rounded text-xs font-semibold uppercase tracking-wider",style:{color:X0(O.provider),backgroundColor:Q0(O.provider)},children:O.provider}),s.jsxs("div",{className:"flex-shrink-0 flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(we,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted",onClick:()=>{j(se),M({from:O.from||"",to:O.to||"",provider:O.provider||""})},children:s.jsx(Aw,{className:"h-3.5 w-3.5"})}),s.jsx(we,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0 hover:bg-destructive/10 text-destructive",onClick:()=>G(se).catch(ie=>c(String(ie),"error")),children:s.jsx(il,{className:"h-3.5 w-3.5"})})]})]})},se))]}),s.jsx("div",{className:"mt-4 pt-4 border-t border-border/50",children:s.jsx("div",{className:"rounded-lg bg-muted/30 border border-border/50 p-4",children:s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[200px]",children:[s.jsx(Jw,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:"Test Route:"}),s.jsx("input",{type:"text",className:"flex-1 min-w-[120px] rounded-md border border-border bg-background/80 px-3 py-1.5 text-sm font-mono placeholder:text-muted-foreground/50 focus:outline-none focus:ring-2 focus:ring-orange-500/30 transition-all",placeholder:"Enter model name...",value:A,onChange:O=>{U(O.target.value),O.target.value.trim()||Q(null)},onKeyDown:O=>{O.key==="Enter"&&ne().catch(se=>c(String(se),"error"))}}),s.jsx(we,{size:"sm",variant:"outline",onClick:()=>ne().catch(O=>c(String(O),"error")),className:"text-xs",children:"Lookup"})]}),k&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-orange-500",children:"---"}),k.matched?s.jsxs(s.Fragment,{children:[s.jsx("code",{className:"text-sm font-mono font-medium text-orange-400",children:k.model}),k.provider&&s.jsx("span",{className:"px-2 py-0.5 rounded text-xs font-semibold uppercase",style:{color:X0(k.provider),backgroundColor:Q0(k.provider)},children:k.provider})]}):s.jsx("span",{className:"text-sm text-muted-foreground italic",children:"No match found"})]})]})})})]})]}),s.jsx("style",{children:` @keyframes fadeIn { from { opacity: 0; @@ -179,9 +179,9 @@ Error generating stack: `+n.message+` .animation-delay-100 { animation-delay: 0.15s; } - `})]}):null}const Gp=(l,o)=>{const c=URL.createObjectURL(l),u=document.createElement("a");u.href=c,u.download=o,u.click(),URL.revokeObjectURL(c)},Tu=l=>{if(!l)return"--:--:--";try{return new Date(l).toTimeString().slice(0,8)}catch{return l.slice(11,19)||l}},Ij=(l,o)=>{try{const c=new Date(l),d=new Date(o).getTime()-c.getTime(),m=Math.floor(d/36e5),x=Math.floor(d%36e5/6e4),g=Math.floor(d%6e4/1e3);return`${m.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}`}catch{return"--:--:--"}};function Uo({title:l,icon:o,count:c,children:u,defaultOpen:d=!1}){const[m,x]=w.useState(d),g=w.useRef(null),[v,p]=w.useState(d?void 0:0);return w.useEffect(()=>{if(m){const b=g.current;if(b){p(b.scrollHeight);const h=setTimeout(()=>p(void 0),300);return()=>clearTimeout(h)}}else p(0)},[m]),s.jsxs("div",{className:"border border-orange-500/30 rounded bg-black/40",children:[s.jsxs("button",{onClick:()=>x(!m),className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-orange-500/10 transition-colors",children:[m?s.jsx(Yn,{className:"h-4 w-4 text-orange-400"}):s.jsx(Xo,{className:"h-4 w-4 text-orange-400"}),s.jsx(o,{className:"h-4 w-4 text-orange-400"}),s.jsx("span",{className:"text-xs font-mono text-orange-300 uppercase tracking-wider",children:l}),c!==void 0&&s.jsx("span",{className:"ml-auto text-xs font-mono bg-orange-500/20 text-orange-300 px-2 py-0.5 rounded",children:c})]}),s.jsx("div",{style:{height:v!==void 0?`${v}px`:"auto"},className:"overflow-hidden transition-[height] duration-300 ease-in-out",children:s.jsx("div",{ref:g,className:"px-3 pb-3",children:u})})]})}function eN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=St(),[m,x]=w.useState([]),[g,v]=w.useState(""),[p,b]=w.useState(null),[h,j]=w.useState(""),[_,A]=w.useState(""),[z,H]=w.useState(""),[k,Q]=w.useState(!0),[q,W]=w.useState([]),[Z,ee]=w.useState([]),[E,L]=w.useState(120),[Y,le]=w.useState(20),[G,ne]=w.useState(!1),[M,se]=w.useState({maxAgeDays:30,maxSessions:200,maxBytesPerSession:2e6,maxNamespaces:200,maxBytesPerNamespace:2e6}),[ie,T]=w.useState(!1),V=u?.running??!1,B=w.useCallback(async()=>{try{const ve=(await o("/v0/management/memory/sessions?limit=200")).sessions||[];x(ve),!g&&ve.length>0&&v(ve[0].key)}catch(J){J instanceof at||c(J instanceof Error?J.message:String(J),"error")}},[o,c,g]),ue=w.useCallback(async()=>{if(!g){b(null);return}try{const ve=(await o(`/v0/management/memory/session?session=${encodeURIComponent(g)}`)).session||null;b(ve),ve&&(j(ve.summary||""),A(ve.pinned||""),H(ve.todo||""),Q(!ve.semantic_disabled))}catch(J){J instanceof at||c(J instanceof Error?J.message:String(J),"error")}},[g,o,c]),xe=w.useCallback(async()=>{if(!g){W([]);return}try{const ve=(await o(`/v0/management/memory/events?session=${encodeURIComponent(g)}&limit=${encodeURIComponent(E)}`)).events||[];if(!Array.isArray(ve)||ve.length===0){W([]);return}const nt=ve.map(Ct=>({ts:Ct.ts||"",kind:Ct.kind||"",role:Ct.role||"",text:(Ct.text||"").toString()}));W(nt)}catch(J){J instanceof at||c(J instanceof Error?J.message:String(J),"error")}},[g,E,o,c]),S=w.useCallback(async()=>{if(!g){ee([]);return}try{const ve=(await o(`/v0/management/memory/anchors?session=${encodeURIComponent(g)}&limit=${encodeURIComponent(Y)}`)).anchors||[];if(!Array.isArray(ve)||ve.length===0){ee([]);return}const nt=ve.map(Ct=>({ts:Ct.ts||"",summary:(Ct.summary||"").toString()}));ee(nt)}catch(J){J instanceof at||c(J instanceof Error?J.message:String(J),"error")}},[g,Y,o,c]),K=async()=>{if(g)try{await o("/v0/management/memory/todo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:z})}),await ue(),c("Saved TODO","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},X=async()=>{if(g)try{await o("/v0/management/memory/pinned",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:_})}),await ue(),c("Saved pinned context","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},ae=async()=>{if(g)try{await o("/v0/management/memory/summary",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:h})}),await ue(),c("Saved anchor summary","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},oe=async J=>{if(g)try{await o("/v0/management/memory/semantic",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,enabled:J})}),Q(J),await ue(),c(`Semantic ${J?"enabled":"disabled"}`,"success")}catch(ve){c(ve instanceof Error?ve.message:String(ve),"error")}},ge=async()=>{if(g)try{await o(`/v0/management/memory/session?session=${encodeURIComponent(g)}`,{method:"DELETE"}),v(""),b(null),W([]),ee([]),await B(),c("Deleted session","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},de=async()=>{if(!(!g||!l))try{const J=await fetch(`/v0/management/memory/export?session=${encodeURIComponent(g)}`,{headers:{"X-Management-Key":l}});if(!J.ok){const nt=await J.text();throw new Error(nt)}const ve=await J.blob();Gp(ve,`flight-log-${g}.zip`)}catch(J){c(J instanceof Error?J.message:String(J),"error")}},Ne=async()=>{if(l)try{const J=await fetch("/v0/management/memory/export-all",{headers:{"X-Management-Key":l}});if(!J.ok){const nt=await J.text();throw new Error(nt)}const ve=await J.blob();Gp(ve,"flight-data-complete.zip")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},Ce=async()=>{if(l&&window.confirm("PURGE ALL FLIGHT DATA? This action cannot be reversed."))try{await o("/v0/management/memory/delete-all?confirm=true",{method:"POST"}),v(""),b(null),W([]),ee([]),await B(),c("All flight data purged","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},We=async J=>{if(!(!J||!g||!l))try{const ve=new FormData;ve.append("file",J);const nt=await fetch(`/v0/management/memory/import?session=${encodeURIComponent(g)}&replace=${G?"true":"false"}`,{method:"POST",headers:{"X-Management-Key":l},body:ve});if(!nt.ok){const Ct=await nt.text();throw new Error(Ct)}await ue(),c("Flight data imported","success")}catch(ve){c(ve instanceof Error?ve.message:String(ve),"error")}},it=async()=>{try{await o("/v0/management/memory/prune",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({max_age_days:M.maxAgeDays,max_sessions:M.maxSessions,max_bytes_per_session:M.maxBytesPerSession,max_namespaces:M.maxNamespaces,max_bytes_per_namespace:M.maxBytesPerNamespace})}),await B(),c("Maintenance complete","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}};if(w.useEffect(()=>{l&&V?B():V||(x([]),b(null),W([]),ee([]))},[l,V,B]),w.useEffect(()=>{g&&V&&(ue(),S(),xe())},[g,V,ue,S,xe]),!l)return null;const qe=q.length>0?q[q.length-1]?.ts:"",I=q.length>0?q[0]?.ts:"",Ye=qe&&I?Ij(qe,I):"--:--:--";return s.jsxs("div",{className:"bg-gradient-to-b from-zinc-900 to-black border border-orange-500/40 rounded-lg shadow-2xl shadow-orange-500/10 overflow-hidden",children:[s.jsx("div",{className:"bg-gradient-to-r from-orange-950/80 via-orange-900/60 to-orange-950/80 border-b border-orange-500/40 px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Zo,{className:`h-4 w-4 ${V?"text-red-500 fill-red-500 animate-pulse":"text-muted"}`}),V&&s.jsx("div",{className:"absolute inset-0 h-4 w-4 bg-red-500 rounded-full blur-sm opacity-50 animate-pulse"})]}),s.jsx("span",{className:"text-sm font-mono font-bold text-orange-300 uppercase tracking-widest",children:"Black Box Recorder"}),d&&s.jsx(Nt,{className:"h-4 w-4 animate-spin text-orange-500/60"}),s.jsxs("span",{className:"text-xs font-mono text-orange-500/60",children:["[",m.length," LOGS]"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"ghost",onClick:de,disabled:!g||!V,className:"gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Ne,disabled:!V,className:"gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT ALL"]}),s.jsxs("label",{className:be("cursor-pointer",!V&&"opacity-50 pointer-events-none"),children:[s.jsx("input",{type:"file",accept:".zip",className:"hidden",disabled:!V,onChange:J=>We(J.target.files?.[0]||null)}),s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30 px-3 py-1.5 rounded-md transition-colors",children:[s.jsx(hj,{className:"h-3 w-3"}),"IMPORT"]})]})]})]})}),s.jsxs("div",{className:"p-4 space-y-4",children:[!V&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground border border-dashed border-orange-500/20 rounded bg-black/20",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to access flight data"})]}),V&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 uppercase tracking-wider",children:"Session:"}),s.jsxs("div",{className:"relative flex-1",children:[s.jsxs("button",{onClick:()=>T(!ie),className:"w-full flex items-center justify-between px-3 py-2 bg-black/60 border border-orange-500/30 rounded text-left hover:border-orange-500/50 transition-colors",children:[s.jsx("span",{className:"font-mono text-sm text-orange-200",children:g||"(no session selected)"}),s.jsx(Yn,{className:`h-4 w-4 text-orange-400 transition-transform ${ie?"rotate-180":""}`})]}),ie&&s.jsx("div",{className:"absolute z-10 w-full mt-1 max-h-60 overflow-auto bg-zinc-900 border border-orange-500/30 rounded shadow-xl",children:m.length===0?s.jsx("div",{className:"px-3 py-2 text-xs font-mono text-orange-500/60",children:"(no sessions)"}):m.map(J=>s.jsx("button",{onClick:()=>{v(J.key),T(!1)},className:`w-full px-3 py-2 text-left text-sm font-mono hover:bg-orange-500/10 transition-colors ${J.key===g?"bg-orange-500/20 text-orange-200":"text-orange-300/80"}`,children:J.key},J.key))})]}),s.jsx(we,{size:"sm",variant:"ghost",onClick:B,className:"text-orange-400 hover:text-orange-300 hover:bg-orange-500/10",children:s.jsx(aa,{className:"h-4 w-4"})})]}),g&&s.jsxs("div",{className:"bg-black/40 border border-orange-500/20 rounded p-3",children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs font-mono",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Started:"}),s.jsxs("div",{className:"text-orange-200",children:[Tu(qe)," UTC"]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Duration:"}),s.jsx("div",{className:"text-orange-200",children:Ye})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Anchors:"}),s.jsx("div",{className:"text-orange-200",children:Z.length})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Events:"}),s.jsx("div",{className:"text-orange-200",children:q.length})]})]}),s.jsxs("div",{className:"flex items-center gap-4 mt-3 pt-3 border-t border-orange-500/20",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hu,{className:"h-4 w-4 text-orange-400"}),s.jsx($t,{htmlFor:"semantic-toggle",className:"text-xs font-mono text-orange-300 cursor-pointer",children:"SEMANTIC"}),s.jsx(cl,{id:"semantic-toggle",checked:k,disabled:!g,onCheckedChange:oe})]}),s.jsx("span",{className:"text-xs font-mono text-orange-500/60",children:p?.updated_at?`Last update: ${p.updated_at}`:""})]})]})]}),s.jsx(Uo,{title:"Anchors",icon:Mp,count:Z.length,defaultOpen:!0,children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Limit:"}),s.jsx("input",{type:"number",min:5,max:200,className:"w-16 rounded bg-black/60 border border-orange-500/30 px-2 py-1 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:Y,onChange:J=>le(parseInt(J.target.value||"20",10))}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:S,className:"text-xs font-mono text-orange-400 hover:bg-orange-500/10",children:[s.jsx(aa,{className:"h-3 w-3 mr-1"}),"Reload"]})]}),s.jsx("div",{className:"bg-black/60 border border-orange-500/20 rounded max-h-48 overflow-auto",children:Z.length===0?s.jsx("div",{className:"px-3 py-4 text-xs font-mono text-orange-500/50 text-center",children:"No anchors recorded."}):s.jsx("div",{className:"divide-y divide-orange-500/10",children:Z.map((J,ve)=>s.jsx("div",{className:"px-3 py-2 hover:bg-orange-500/5",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 shrink-0",children:Tu(J.ts)}),s.jsx("span",{className:"text-xs font-mono text-orange-500/30",children:"|"}),s.jsx("span",{className:"text-xs font-mono text-orange-200/80 break-words",children:J.summary.length>100?J.summary.slice(0,100)+"...":J.summary})]})},ve))})}),s.jsxs("div",{className:"space-y-2 mt-3",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Anchor Summary:"}),s.jsx("textarea",{className:"w-full h-24 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:h,onChange:J=>j(J.target.value),placeholder:"Session anchor summary..."}),s.jsxs(we,{size:"sm",onClick:ae,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save Summary"]})]})]})}),s.jsx(Uo,{title:"Pinned Context",icon:Mw,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("textarea",{className:"w-full h-32 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:_,onChange:J=>A(J.target.value),placeholder:"Pinned context that persists across turns..."}),s.jsxs(we,{size:"sm",onClick:X,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save Pinned"]})]})}),s.jsx(Uo,{title:"TODO Log",icon:Mp,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("textarea",{className:"w-full h-32 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:z,onChange:J=>H(J.target.value),placeholder:"Session TODO list..."}),s.jsxs(we,{size:"sm",onClick:K,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save TODO"]})]})}),s.jsx(Uo,{title:"Event Log",icon:Zo,count:q.length,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Limit:"}),s.jsx("input",{type:"number",min:10,max:500,className:"w-16 rounded bg-black/60 border border-orange-500/30 px-2 py-1 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:E,onChange:J=>L(parseInt(J.target.value||"120",10))}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:xe,className:"text-xs font-mono text-orange-400 hover:bg-orange-500/10",children:[s.jsx(aa,{className:"h-3 w-3 mr-1"}),"Reload"]})]}),s.jsx("div",{className:"bg-black/60 border border-orange-500/20 rounded max-h-64 overflow-auto",children:q.length===0?s.jsx("div",{className:"px-3 py-4 text-xs font-mono text-orange-500/50 text-center",children:"No events recorded."}):s.jsx("div",{className:"divide-y divide-orange-500/10",children:q.map((J,ve)=>s.jsx("div",{className:"px-3 py-2 hover:bg-orange-500/5",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 shrink-0",children:Tu(J.ts)}),s.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-orange-500/20 text-orange-300 shrink-0",children:J.kind}),s.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-zinc-700/50 text-zinc-300 shrink-0",children:J.role}),s.jsx("span",{className:"text-xs font-mono text-orange-200/70 break-words",children:J.text.length>80?J.text.slice(0,80)+"...":J.text})]})},ve))})})]})}),s.jsxs("div",{className:"relative pt-6",children:[s.jsxs("div",{className:"absolute top-0 left-0 right-0 flex items-center",children:[s.jsx("div",{className:"flex-1 border-t border-dashed border-orange-500/30"}),s.jsxs("span",{className:"px-3 text-xs font-mono text-orange-500/60 uppercase tracking-widest flex items-center gap-2",children:[s.jsx(sx,{className:"h-3 w-3"}),"Maintenance"]}),s.jsx("div",{className:"flex-1 border-t border-dashed border-orange-500/30"})]}),s.jsxs("div",{className:"bg-black/40 border border-orange-500/20 rounded p-4 space-y-4",children:[s.jsx("div",{className:"flex items-center gap-4 pb-3 border-b border-orange-500/20",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"import-replace",checked:G,onCheckedChange:ne}),s.jsx($t,{htmlFor:"import-replace",className:"text-xs font-mono text-orange-300 cursor-pointer",children:"Replace on Import"})]})}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Sessions"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:M.maxSessions,onChange:J=>se({...M,maxSessions:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Age (days)"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:M.maxAgeDays,onChange:J=>se({...M,maxAgeDays:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Namespaces"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:M.maxNamespaces,onChange:J=>se({...M,maxNamespaces:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Bytes/Session"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:M.maxBytesPerSession,onChange:J=>se({...M,maxBytesPerSession:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Bytes/Namespace"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:M.maxBytesPerNamespace,onChange:J=>se({...M,maxBytesPerNamespace:parseInt(J.target.value||"0",10)})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[s.jsxs(we,{size:"sm",onClick:it,className:"gap-1.5 text-xs font-mono bg-amber-600/80 hover:bg-amber-600 text-black border border-amber-500",children:[s.jsx($w,{className:"h-3 w-3"}),"PRUNE NOW"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:ge,disabled:!g,className:"gap-1.5 text-xs font-mono bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"Delete Session"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Ce,className:"gap-1.5 text-xs font-mono bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/30",children:[s.jsx(ld,{className:"h-3 w-3"}),"Purge All Data"]})]})]})]})]})]})]})}const tN=hx("inline-flex items-center justify-center rounded-sm border px-1.5 py-0.5 w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden font-mono text-[0.65rem] uppercase tracking-wide",{variants:{variant:{default:"border-transparent bg-[hsl(var(--accent-primary))] text-[hsl(var(--bg-primary))] font-semibold [a&]:hover:bg-[hsl(var(--accent-primary))]/90",secondary:"border-[hsl(var(--border-primary))] bg-[hsl(var(--bg-secondary))] text-[hsl(var(--text-secondary))] [a&]:hover:bg-[hsl(var(--bg-tertiary))]",destructive:"border-transparent bg-[hsl(var(--status-offline))] text-white [a&]:hover:bg-[hsl(var(--status-offline))]/90 focus-visible:ring-[hsl(var(--status-offline))]/20",outline:"border-[hsl(var(--border-primary))] bg-transparent text-[hsl(var(--text-secondary))] [a&]:hover:bg-[hsl(var(--bg-tertiary))] [a&]:hover:text-[hsl(var(--text-primary))]",success:"border-transparent bg-[hsl(var(--status-online))] text-white font-semibold [a&]:hover:bg-[hsl(var(--status-online))]/90",warning:"border-transparent bg-[hsl(var(--status-warning))] text-[hsl(var(--bg-primary))] font-semibold [a&]:hover:bg-[hsl(var(--status-warning))]/90",processing:"border-transparent bg-[hsl(var(--status-processing))] text-white font-semibold [a&]:hover:bg-[hsl(var(--status-processing))]/90"}},defaultVariants:{variant:"default"}});function aN({className:l,variant:o,asChild:c=!1,...u}){const d=c?fx:"span";return s.jsx(d,{"data-slot":"badge",className:be(tN({variant:o}),l),...u})}function nN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=St(),[m,x]=w.useState(null),[g,v]=w.useState([]),[p,b]=w.useState(""),[h,j]=w.useState(50),[_,A]=w.useState(""),z=u?.running??!1,H=w.useCallback(async()=>{try{const q=await o("/v0/management/semantic/health");x(q)}catch(q){q instanceof at||c(q instanceof Error?q.message:String(q),"error")}},[o,c]),k=w.useCallback(async()=>{try{const W=(await o("/v0/management/semantic/namespaces")).namespaces||[];v(W),!p&&W.length>0&&b(W[0].key)}catch(q){q instanceof at||c(q instanceof Error?q.message:String(q),"error")}},[o,c,p]),Q=w.useCallback(async()=>{if(!p){A("Select a namespace.");return}try{const W=(await o(`/v0/management/semantic/items?namespace=${encodeURIComponent(p)}&limit=${encodeURIComponent(h)}`)).items||[];if(!Array.isArray(W)||W.length===0){A("No items.");return}const Z=W.map(ee=>{const E=ee.ts||"",L=ee.source||"",Y=ee.role||"",le=(ee.text||"").toString();return`[${E}][${L}][${Y}] ${le}`});A(Z.join(` + `})]}):null}const Z0=(l,o)=>{const c=URL.createObjectURL(l),u=document.createElement("a");u.href=c,u.download=o,u.click(),URL.revokeObjectURL(c)},Ou=l=>{if(!l)return"--:--:--";try{return new Date(l).toTimeString().slice(0,8)}catch{return l.slice(11,19)||l}},eN=(l,o)=>{try{const c=new Date(l),d=new Date(o).getTime()-c.getTime(),m=Math.floor(d/36e5),x=Math.floor(d%36e5/6e4),g=Math.floor(d%6e4/1e3);return`${m.toString().padStart(2,"0")}:${x.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}`}catch{return"--:--:--"}};function qo({title:l,icon:o,count:c,children:u,defaultOpen:d=!1}){const[m,x]=w.useState(d),g=w.useRef(null),[v,p]=w.useState(d?void 0:0);return w.useEffect(()=>{if(m){const y=g.current;if(y){p(y.scrollHeight);const h=setTimeout(()=>p(void 0),300);return()=>clearTimeout(h)}}else p(0)},[m]),s.jsxs("div",{className:"border border-orange-500/30 rounded bg-black/40",children:[s.jsxs("button",{onClick:()=>x(!m),className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-orange-500/10 transition-colors",children:[m?s.jsx(cn,{className:"h-4 w-4 text-orange-400"}):s.jsx(hr,{className:"h-4 w-4 text-orange-400"}),s.jsx(o,{className:"h-4 w-4 text-orange-400"}),s.jsx("span",{className:"text-xs font-mono text-orange-300 uppercase tracking-wider",children:l}),c!==void 0&&s.jsx("span",{className:"ml-auto text-xs font-mono bg-orange-500/20 text-orange-300 px-2 py-0.5 rounded",children:c})]}),s.jsx("div",{style:{height:v!==void 0?`${v}px`:"auto"},className:"overflow-hidden transition-[height] duration-300 ease-in-out",children:s.jsx("div",{ref:g,className:"px-3 pb-3",children:u})})]})}function tN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState([]),[g,v]=w.useState(""),[p,y]=w.useState(null),[h,j]=w.useState(""),[S,M]=w.useState(""),[A,U]=w.useState(""),[k,Q]=w.useState(!0),[q,W]=w.useState([]),[Z,ee]=w.useState([]),[E,L]=w.useState(120),[Y,le]=w.useState(20),[G,ne]=w.useState(!1),[O,se]=w.useState({maxAgeDays:30,maxSessions:200,maxBytesPerSession:2e6,maxNamespaces:200,maxBytesPerNamespace:2e6}),[ie,T]=w.useState(!1),V=u?.running??!1,B=w.useCallback(async()=>{try{const be=(await o("/v0/management/memory/sessions?limit=200")).sessions||[];x(be),!g&&be.length>0&&v(be[0].key)}catch(J){J instanceof et||c(J instanceof Error?J.message:String(J),"error")}},[o,c,g]),ue=w.useCallback(async()=>{if(!g){y(null);return}try{const be=(await o(`/v0/management/memory/session?session=${encodeURIComponent(g)}`)).session||null;y(be),be&&(j(be.summary||""),M(be.pinned||""),U(be.todo||""),Q(!be.semantic_disabled))}catch(J){J instanceof et||c(J instanceof Error?J.message:String(J),"error")}},[g,o,c]),xe=w.useCallback(async()=>{if(!g){W([]);return}try{const be=(await o(`/v0/management/memory/events?session=${encodeURIComponent(g)}&limit=${encodeURIComponent(E)}`)).events||[];if(!Array.isArray(be)||be.length===0){W([]);return}const nt=be.map(Ct=>({ts:Ct.ts||"",kind:Ct.kind||"",role:Ct.role||"",text:(Ct.text||"").toString()}));W(nt)}catch(J){J instanceof et||c(J instanceof Error?J.message:String(J),"error")}},[g,E,o,c]),_=w.useCallback(async()=>{if(!g){ee([]);return}try{const be=(await o(`/v0/management/memory/anchors?session=${encodeURIComponent(g)}&limit=${encodeURIComponent(Y)}`)).anchors||[];if(!Array.isArray(be)||be.length===0){ee([]);return}const nt=be.map(Ct=>({ts:Ct.ts||"",summary:(Ct.summary||"").toString()}));ee(nt)}catch(J){J instanceof et||c(J instanceof Error?J.message:String(J),"error")}},[g,Y,o,c]),K=async()=>{if(g)try{await o("/v0/management/memory/todo",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:A})}),await ue(),c("Saved TODO","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},X=async()=>{if(g)try{await o("/v0/management/memory/pinned",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:S})}),await ue(),c("Saved pinned context","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},ae=async()=>{if(g)try{await o("/v0/management/memory/summary",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,value:h})}),await ue(),c("Saved anchor summary","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},oe=async J=>{if(g)try{await o("/v0/management/memory/semantic",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session:g,enabled:J})}),Q(J),await ue(),c(`Semantic ${J?"enabled":"disabled"}`,"success")}catch(be){c(be instanceof Error?be.message:String(be),"error")}},ge=async()=>{if(g)try{await o(`/v0/management/memory/session?session=${encodeURIComponent(g)}`,{method:"DELETE"}),v(""),y(null),W([]),ee([]),await B(),c("Deleted session","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},de=async()=>{if(!(!g||!l))try{const J=await fetch(`/v0/management/memory/export?session=${encodeURIComponent(g)}`,{headers:{"X-Management-Key":l}});if(!J.ok){const nt=await J.text();throw new Error(nt)}const be=await J.blob();Z0(be,`flight-log-${g}.zip`)}catch(J){c(J instanceof Error?J.message:String(J),"error")}},Ne=async()=>{if(l)try{const J=await fetch("/v0/management/memory/export-all",{headers:{"X-Management-Key":l}});if(!J.ok){const nt=await J.text();throw new Error(nt)}const be=await J.blob();Z0(be,"flight-data-complete.zip")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},Ce=async()=>{if(l&&window.confirm("PURGE ALL FLIGHT DATA? This action cannot be reversed."))try{await o("/v0/management/memory/delete-all?confirm=true",{method:"POST"}),v(""),y(null),W([]),ee([]),await B(),c("All flight data purged","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}},We=async J=>{if(!(!J||!g||!l))try{const be=new FormData;be.append("file",J);const nt=await fetch(`/v0/management/memory/import?session=${encodeURIComponent(g)}&replace=${G?"true":"false"}`,{method:"POST",headers:{"X-Management-Key":l},body:be});if(!nt.ok){const Ct=await nt.text();throw new Error(Ct)}await ue(),c("Flight data imported","success")}catch(be){c(be instanceof Error?be.message:String(be),"error")}},it=async()=>{try{await o("/v0/management/memory/prune",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({max_age_days:O.maxAgeDays,max_sessions:O.maxSessions,max_bytes_per_session:O.maxBytesPerSession,max_namespaces:O.maxNamespaces,max_bytes_per_namespace:O.maxBytesPerNamespace})}),await B(),c("Maintenance complete","success")}catch(J){c(J instanceof Error?J.message:String(J),"error")}};if(w.useEffect(()=>{l&&V?B():V||(x([]),y(null),W([]),ee([]))},[l,V,B]),w.useEffect(()=>{g&&V&&(ue(),_(),xe())},[g,V,ue,_,xe]),!l)return null;const qe=q.length>0?q[q.length-1]?.ts:"",I=q.length>0?q[0]?.ts:"",Ye=qe&&I?eN(qe,I):"--:--:--";return s.jsxs("div",{className:"bg-gradient-to-b from-zinc-900 to-black border border-orange-500/40 rounded-lg shadow-2xl shadow-orange-500/10 overflow-hidden",children:[s.jsx("div",{className:"bg-gradient-to-r from-orange-950/80 via-orange-900/60 to-orange-950/80 border-b border-orange-500/40 px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Jo,{className:`h-4 w-4 ${V?"text-red-500 fill-red-500 animate-pulse":"text-muted"}`}),V&&s.jsx("div",{className:"absolute inset-0 h-4 w-4 bg-red-500 rounded-full blur-sm opacity-50 animate-pulse"})]}),s.jsx("span",{className:"text-sm font-mono font-bold text-orange-300 uppercase tracking-widest",children:"Black Box Recorder"}),d&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-orange-500/60"}),s.jsxs("span",{className:"text-xs font-mono text-orange-500/60",children:["[",m.length," LOGS]"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"ghost",onClick:de,disabled:!g||!V,className:"gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Ne,disabled:!V,className:"gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT ALL"]}),s.jsxs("label",{className:ve("cursor-pointer",!V&&"opacity-50 pointer-events-none"),children:[s.jsx("input",{type:"file",accept:".zip",className:"hidden",disabled:!V,onChange:J=>We(J.target.files?.[0]||null)}),s.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30 px-3 py-1.5 rounded-md transition-colors",children:[s.jsx(pj,{className:"h-3 w-3"}),"IMPORT"]})]})]})]})}),s.jsxs("div",{className:"p-4 space-y-4",children:[!V&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground border border-dashed border-orange-500/20 rounded bg-black/20",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to access flight data"})]}),V&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 uppercase tracking-wider",children:"Session:"}),s.jsxs("div",{className:"relative flex-1",children:[s.jsxs("button",{onClick:()=>T(!ie),className:"w-full flex items-center justify-between px-3 py-2 bg-black/60 border border-orange-500/30 rounded text-left hover:border-orange-500/50 transition-colors",children:[s.jsx("span",{className:"font-mono text-sm text-orange-200",children:g||"(no session selected)"}),s.jsx(cn,{className:`h-4 w-4 text-orange-400 transition-transform ${ie?"rotate-180":""}`})]}),ie&&s.jsx("div",{className:"absolute z-10 w-full mt-1 max-h-60 overflow-auto bg-zinc-900 border border-orange-500/30 rounded shadow-xl",children:m.length===0?s.jsx("div",{className:"px-3 py-2 text-xs font-mono text-orange-500/60",children:"(no sessions)"}):m.map(J=>s.jsx("button",{onClick:()=>{v(J.key),T(!1)},className:`w-full px-3 py-2 text-left text-sm font-mono hover:bg-orange-500/10 transition-colors ${J.key===g?"bg-orange-500/20 text-orange-200":"text-orange-300/80"}`,children:J.key},J.key))})]}),s.jsx(we,{size:"sm",variant:"ghost",onClick:B,className:"text-orange-400 hover:text-orange-300 hover:bg-orange-500/10",children:s.jsx(Qt,{className:"h-4 w-4"})})]}),g&&s.jsxs("div",{className:"bg-black/40 border border-orange-500/20 rounded p-3",children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs font-mono",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Started:"}),s.jsxs("div",{className:"text-orange-200",children:[Ou(qe)," UTC"]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Duration:"}),s.jsx("div",{className:"text-orange-200",children:Ye})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Anchors:"}),s.jsx("div",{className:"text-orange-200",children:Z.length})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-orange-500/60",children:"Events:"}),s.jsx("div",{className:"text-orange-200",children:q.length})]})]}),s.jsxs("div",{className:"flex items-center gap-4 mt-3 pt-3 border-t border-orange-500/20",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yu,{className:"h-4 w-4 text-orange-400"}),s.jsx($t,{htmlFor:"semantic-toggle",className:"text-xs font-mono text-orange-300 cursor-pointer",children:"SEMANTIC"}),s.jsx(cl,{id:"semantic-toggle",checked:k,disabled:!g,onCheckedChange:oe})]}),s.jsx("span",{className:"text-xs font-mono text-orange-500/60",children:p?.updated_at?`Last update: ${p.updated_at}`:""})]})]})]}),s.jsx(qo,{title:"Anchors",icon:L0,count:Z.length,defaultOpen:!0,children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Limit:"}),s.jsx("input",{type:"number",min:5,max:200,className:"w-16 rounded bg-black/60 border border-orange-500/30 px-2 py-1 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:Y,onChange:J=>le(parseInt(J.target.value||"20",10))}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:_,className:"text-xs font-mono text-orange-400 hover:bg-orange-500/10",children:[s.jsx(Qt,{className:"h-3 w-3 mr-1"}),"Reload"]})]}),s.jsx("div",{className:"bg-black/60 border border-orange-500/20 rounded max-h-48 overflow-auto",children:Z.length===0?s.jsx("div",{className:"px-3 py-4 text-xs font-mono text-orange-500/50 text-center",children:"No anchors recorded."}):s.jsx("div",{className:"divide-y divide-orange-500/10",children:Z.map((J,be)=>s.jsx("div",{className:"px-3 py-2 hover:bg-orange-500/5",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 shrink-0",children:Ou(J.ts)}),s.jsx("span",{className:"text-xs font-mono text-orange-500/30",children:"|"}),s.jsx("span",{className:"text-xs font-mono text-orange-200/80 break-words",children:J.summary.length>100?J.summary.slice(0,100)+"...":J.summary})]})},be))})}),s.jsxs("div",{className:"space-y-2 mt-3",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Anchor Summary:"}),s.jsx("textarea",{className:"w-full h-24 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:h,onChange:J=>j(J.target.value),placeholder:"Session anchor summary..."}),s.jsxs(we,{size:"sm",onClick:ae,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save Summary"]})]})]})}),s.jsx(qo,{title:"Pinned Context",icon:Ow,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("textarea",{className:"w-full h-32 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:S,onChange:J=>M(J.target.value),placeholder:"Pinned context that persists across turns..."}),s.jsxs(we,{size:"sm",onClick:X,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save Pinned"]})]})}),s.jsx(qo,{title:"TODO Log",icon:L0,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsx("textarea",{className:"w-full h-32 rounded bg-black/60 border border-orange-500/30 px-3 py-2 text-xs font-mono text-orange-200 resize-y focus:border-orange-500/50 focus:outline-none",value:A,onChange:J=>U(J.target.value),placeholder:"Session TODO list..."}),s.jsxs(we,{size:"sm",onClick:K,className:"gap-1 text-xs font-mono bg-orange-500/20 hover:bg-orange-500/30 text-orange-300 border border-orange-500/30",children:[s.jsx(nl,{className:"h-3 w-3"}),"Save TODO"]})]})}),s.jsx(qo,{title:"Event Log",icon:Jo,count:q.length,defaultOpen:!1,children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Limit:"}),s.jsx("input",{type:"number",min:10,max:500,className:"w-16 rounded bg-black/60 border border-orange-500/30 px-2 py-1 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:E,onChange:J=>L(parseInt(J.target.value||"120",10))}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:xe,className:"text-xs font-mono text-orange-400 hover:bg-orange-500/10",children:[s.jsx(Qt,{className:"h-3 w-3 mr-1"}),"Reload"]})]}),s.jsx("div",{className:"bg-black/60 border border-orange-500/20 rounded max-h-64 overflow-auto",children:q.length===0?s.jsx("div",{className:"px-3 py-4 text-xs font-mono text-orange-500/50 text-center",children:"No events recorded."}):s.jsx("div",{className:"divide-y divide-orange-500/10",children:q.map((J,be)=>s.jsx("div",{className:"px-3 py-2 hover:bg-orange-500/5",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-orange-400 shrink-0",children:Ou(J.ts)}),s.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-orange-500/20 text-orange-300 shrink-0",children:J.kind}),s.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-zinc-700/50 text-zinc-300 shrink-0",children:J.role}),s.jsx("span",{className:"text-xs font-mono text-orange-200/70 break-words",children:J.text.length>80?J.text.slice(0,80)+"...":J.text})]})},be))})})]})}),s.jsxs("div",{className:"relative pt-6",children:[s.jsxs("div",{className:"absolute top-0 left-0 right-0 flex items-center",children:[s.jsx("div",{className:"flex-1 border-t border-dashed border-orange-500/30"}),s.jsxs("span",{className:"px-3 text-xs font-mono text-orange-500/60 uppercase tracking-widest flex items-center gap-2",children:[s.jsx(ox,{className:"h-3 w-3"}),"Maintenance"]}),s.jsx("div",{className:"flex-1 border-t border-dashed border-orange-500/30"})]}),s.jsxs("div",{className:"bg-black/40 border border-orange-500/20 rounded p-4 space-y-4",children:[s.jsx("div",{className:"flex items-center gap-4 pb-3 border-b border-orange-500/20",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"import-replace",checked:G,onCheckedChange:ne}),s.jsx($t,{htmlFor:"import-replace",className:"text-xs font-mono text-orange-300 cursor-pointer",children:"Replace on Import"})]})}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Sessions"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:O.maxSessions,onChange:J=>se({...O,maxSessions:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Age (days)"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:O.maxAgeDays,onChange:J=>se({...O,maxAgeDays:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Max Namespaces"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:O.maxNamespaces,onChange:J=>se({...O,maxNamespaces:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Bytes/Session"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:O.maxBytesPerSession,onChange:J=>se({...O,maxBytesPerSession:parseInt(J.target.value||"0",10)})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx($t,{className:"text-xs font-mono text-orange-500/60",children:"Bytes/Namespace"}),s.jsx("input",{type:"number",min:0,className:"w-full rounded bg-black/60 border border-orange-500/30 px-2 py-1.5 text-xs font-mono text-orange-200 focus:border-orange-500/50 focus:outline-none",value:O.maxBytesPerNamespace,onChange:J=>se({...O,maxBytesPerNamespace:parseInt(J.target.value||"0",10)})})]})]}),s.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[s.jsxs(we,{size:"sm",onClick:it,className:"gap-1.5 text-xs font-mono bg-amber-600/80 hover:bg-amber-600 text-black border border-amber-500",children:[s.jsx(Xw,{className:"h-3 w-3"}),"PRUNE NOW"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:ge,disabled:!g,className:"gap-1.5 text-xs font-mono bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"Delete Session"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Ce,className:"gap-1.5 text-xs font-mono bg-red-500/20 hover:bg-red-500/30 text-red-400 border border-red-500/30",children:[s.jsx(ud,{className:"h-3 w-3"}),"Purge All Data"]})]})]})]})]})]})]})}const aN=gx("inline-flex items-center justify-center rounded-sm border px-1.5 py-0.5 w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden font-mono text-[0.65rem] uppercase tracking-wide",{variants:{variant:{default:"border-transparent bg-[hsl(var(--accent-primary))] text-[hsl(var(--bg-primary))] font-semibold [a&]:hover:bg-[hsl(var(--accent-primary))]/90",secondary:"border-[hsl(var(--border-primary))] bg-[hsl(var(--bg-secondary))] text-[hsl(var(--text-secondary))] [a&]:hover:bg-[hsl(var(--bg-tertiary))]",destructive:"border-transparent bg-[hsl(var(--status-offline))] text-white [a&]:hover:bg-[hsl(var(--status-offline))]/90 focus-visible:ring-[hsl(var(--status-offline))]/20",outline:"border-[hsl(var(--border-primary))] bg-transparent text-[hsl(var(--text-secondary))] [a&]:hover:bg-[hsl(var(--bg-tertiary))] [a&]:hover:text-[hsl(var(--text-primary))]",success:"border-transparent bg-[hsl(var(--status-online))] text-white font-semibold [a&]:hover:bg-[hsl(var(--status-online))]/90",warning:"border-transparent bg-[hsl(var(--status-warning))] text-[hsl(var(--bg-primary))] font-semibold [a&]:hover:bg-[hsl(var(--status-warning))]/90",processing:"border-transparent bg-[hsl(var(--status-processing))] text-white font-semibold [a&]:hover:bg-[hsl(var(--status-processing))]/90"}},defaultVariants:{variant:"default"}});function nN({className:l,variant:o,asChild:c=!1,...u}){const d=c?px:"span";return s.jsx(d,{"data-slot":"badge",className:ve(aN({variant:o}),l),...u})}function sN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState(null),[g,v]=w.useState([]),[p,y]=w.useState(""),[h,j]=w.useState(50),[S,M]=w.useState(""),A=u?.running??!1,U=w.useCallback(async()=>{try{const q=await o("/v0/management/semantic/health");x(q)}catch(q){q instanceof et||c(q instanceof Error?q.message:String(q),"error")}},[o,c]),k=w.useCallback(async()=>{try{const W=(await o("/v0/management/semantic/namespaces")).namespaces||[];v(W),!p&&W.length>0&&y(W[0].key)}catch(q){q instanceof et||c(q instanceof Error?q.message:String(q),"error")}},[o,c,p]),Q=w.useCallback(async()=>{if(!p){M("Select a namespace.");return}try{const W=(await o(`/v0/management/semantic/items?namespace=${encodeURIComponent(p)}&limit=${encodeURIComponent(h)}`)).items||[];if(!Array.isArray(W)||W.length===0){M("No items.");return}const Z=W.map(ee=>{const E=ee.ts||"",L=ee.source||"",Y=ee.role||"",le=(ee.text||"").toString();return`[${E}][${L}][${Y}] ${le}`});M(Z.join(` -`))}catch(q){q instanceof at||c(q instanceof Error?q.message:String(q),"error")}},[o,c,p,h]);return w.useEffect(()=>{l&&z?(H(),k()):z||(x(null),v([]),A(""))},[l,z,H,k]),l?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsx(xt,{className:"pb-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg",children:"Semantic Memory"}),s.jsx(Ra,{children:"Ollama embeddings + per-repo namespaces"})]}),d&&s.jsx(Nt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]})}),s.jsxs(ft,{className:"space-y-3",children:[!z&&s.jsx("div",{className:"py-4 text-center text-muted-foreground",children:s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"})}),z&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(we,{size:"sm",variant:"outline",onClick:H,children:"Refresh"}),s.jsx(aN,{variant:m?.status==="ok"?"default":"secondary",children:m?.status||"unknown"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[m?.model," ",m?.version?`v${m.version}`:""]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:m?.model_present===!1?"model missing":""})]}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[m?.latency_ms?`latency ${m.latency_ms}ms`:"latency n/a",m?.queue?` · queue q${m.queue.queued} d${m.queue.dropped} p${m.queue.processed} f${m.queue.failed}`:""]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{className:"min-w-[200px] rounded-md border border-border bg-background/60 px-2 py-1 text-xs font-mono",value:p,onChange:q=>b(q.target.value),children:[g.length===0&&s.jsx("option",{value:"",children:"(no namespaces)"}),g.map(q=>s.jsx("option",{value:q.key,children:q.label||q.key},q.key))]}),s.jsx("input",{type:"number",min:10,max:200,className:"w-20 rounded-md border border-border bg-background/60 px-2 py-1 text-xs",value:h,onChange:q=>j(parseInt(q.target.value||"50",10))}),s.jsx(we,{size:"sm",variant:"outline",onClick:Q,children:"Load"})]}),s.jsx("pre",{className:"max-h-56 overflow-auto rounded-md border border-border/50 bg-muted/30 p-2 text-xs",children:_||"No items loaded."})]})]})]}):null}function sN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=St(),[d,m]=w.useState(""),[x,g]=w.useState(!1),v=c?.running??!1,p=async()=>{try{const h=await l("/v0/management/config.yaml");m(typeof h=="string"?h:JSON.stringify(h,null,2))}catch(h){h instanceof at||o(h instanceof Error?h.message:String(h),"error")}},b=async()=>{g(!0);try{await l("/v0/management/config.yaml",{method:"PUT",headers:{"Content-Type":"application/yaml"},body:d}),o("Configuration saved successfully","success")}catch(h){o(h instanceof Error?h.message:String(h),"error")}finally{g(!1)}};return w.useEffect(()=>{v&&p()},[v]),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl overflow-hidden",children:[s.jsx(xt,{className:"pb-4 border-b border-border/50 bg-gradient-to-r from-purple-500/5 to-transparent",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-xl bg-purple-500/10 flex items-center justify-center",children:s.jsx(nw,{className:"h-5 w-5 text-purple-500"})}),s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg",children:"Config Editor"}),s.jsx(Ra,{children:"Edit config.yaml directly"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:p,disabled:!v||u,className:"gap-1.5 text-xs",children:[s.jsx(Bw,{className:"h-3.5 w-3.5"}),"Reset"]}),s.jsxs(we,{size:"sm",onClick:b,disabled:!v||x||u,className:"gap-1.5 text-xs bg-purple-600 hover:bg-purple-700 text-white",children:[x?s.jsx(Nt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(nl,{className:"h-3.5 w-3.5"}),"Save Changes"]})]})]})}),s.jsx(ft,{className:"p-0",children:v?s.jsxs("div",{className:"relative",children:[s.jsx("textarea",{value:d,onChange:h=>m(h.target.value),spellCheck:!1,className:"w-full h-[500px] p-6 bg-[var(--bg-void)] text-[var(--text-primary)] font-mono text-sm resize-none focus:outline-none selection:bg-purple-500/30",style:{fontFamily:'"JetBrains Mono", "Fira Code", monospace',lineHeight:"1.6"}}),s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03]",style:{backgroundImage:"linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px)",backgroundSize:"20px 20px"}})]}):s.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to edit configuration"})]})})]})}function lN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=St(),[d,m]=w.useState([]),[x,g]=w.useState(null),[v,p]=w.useState(!1),[b,h]=w.useState("live"),[j,_]=w.useState(new Set),A=w.useRef(null),z=c?.running??!1,[H,k]=w.useState(!1),[Q,q]=w.useState(""),[W,Z]=w.useState(""),[ee,E]=w.useState("all"),[L,Y]=w.useState(""),[le,G]=w.useState(""),[ne,M]=w.useState(1),[se]=w.useState(50),[ie,T]=w.useState(0),[V,B]=w.useState([]),[ue,xe]=w.useState([]),S=w.useCallback(async()=>{try{let I=[];window.pp_get_requests?I=await window.pp_get_requests():I=(await l("/v0/management/requests")).requests||[],m([...I].sort((ve,nt)=>new Date(nt.timestamp).getTime()-new Date(ve.timestamp).getTime()));const Ye=new Set,J=new Set;I.forEach(ve=>{ve.model&&Ye.add(ve.model),ve.provider&&J.add(ve.provider)}),B(Array.from(Ye).sort()),xe(Array.from(J).sort())}catch(I){I instanceof at||o(I instanceof Error?I.message:String(I),"error")}},[l,o]),K=w.useCallback(async()=>{try{const I=new URLSearchParams;I.set("limit",String(se)),I.set("offset",String((ne-1)*se)),Q&&I.set("model",Q),W&&I.set("provider",W),L&&I.set("start_date",new Date(L).toISOString()),le&&I.set("end_date",new Date(le).toISOString()),ee==="success"?(I.set("status_min","200"),I.set("status_max","299")):ee==="error"&&I.set("errors_only","true");const Ye=await l(`/v0/management/request-history?${I.toString()}`);m(Ye.entries||[]),T(Ye.total||0);const J=await l("/v0/management/request-history/stats");g(J.stats||null),J.stats?.by_model&&B(Object.keys(J.stats.by_model).sort()),J.stats?.by_provider&&xe(Object.keys(J.stats.by_provider).sort())}catch(I){I instanceof at||o(I instanceof Error?I.message:String(I),"error")}},[l,o,ne,se,Q,W,ee,L,le]),X=()=>{v?(p(!1),A.current&&(clearInterval(A.current),A.current=null)):(p(!0),S(),A.current=setInterval(()=>{S()},2e3))},ae=I=>{const Ye=new Set(j);Ye.has(I)?Ye.delete(I):Ye.add(I),_(Ye)},oe=async()=>{try{const I=await l("/v0/management/request-history/export"),Ye=new Blob([JSON.stringify(I,null,2)],{type:"application/json"}),J=URL.createObjectURL(Ye),ve=document.createElement("a");ve.href=J,ve.download=`proxypilot-request-history-${new Date().toISOString().split("T")[0]}.json`,ve.click(),URL.revokeObjectURL(J),o("Request history exported","success")}catch(I){o(I instanceof Error?I.message:String(I),"error")}},ge=async()=>{if(confirm("Are you sure you want to clear all request history? This cannot be undone."))try{await l("/v0/management/request-history",{method:"DELETE"}),o("Request history cleared","success"),m([]),T(0),g(null)}catch(I){o(I instanceof Error?I.message:String(I),"error")}},de=async()=>{try{await l("/v0/management/request-history/save",{method:"POST"}),o("Request history saved to disk","success")}catch(I){o(I instanceof Error?I.message:String(I),"error")}};w.useEffect(()=>(b==="live"?S():K(),()=>{A.current&&clearInterval(A.current)}),[b,S,K]),w.useEffect(()=>{M(1)},[Q,W,ee,L,le]);const Ne=I=>I>=200&&I<300?"text-[var(--status-online)]":I>=400&&I<500?"text-[var(--status-warning)]":I>=500?"text-[var(--status-offline)]":"text-[var(--text-muted)]",Ce=I=>I>=200&&I<300?s.jsx(J0,{className:"h-3 w-3"}):I>=400&&I<500?s.jsx(Qo,{className:"h-3 w-3"}):I>=500?s.jsx($2,{className:"h-3 w-3"}):s.jsx(Zo,{className:"h-3 w-3"}),We=I=>new Date(I).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=I=>new Date(I).toLocaleDateString([],{month:"short",day:"numeric"}),qe=Math.ceil(ie/se);return s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl overflow-hidden",children:[s.jsxs(xt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(xr,{className:`h-4 w-4 ${v&&z?"text-[var(--accent-glow)] animate-pulse":"text-[var(--text-muted)]"}`}),s.jsx("span",{className:"font-mono text-sm font-semibold tracking-wider text-[var(--text-primary)]",children:"REQUEST MONITOR"})]}),u&&s.jsx(aa,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsxs("div",{className:"flex items-center gap-1 bg-[var(--bg-elevated)] rounded p-0.5",children:[s.jsxs("button",{onClick:()=>{h("live"),p(!1)},className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs font-mono transition-all ${b==="live"?"bg-[var(--accent-primary)]/20 text-[var(--accent-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[s.jsx(ax,{className:"h-3 w-3"}),"LIVE"]}),s.jsxs("button",{onClick:()=>{h("history"),p(!1),A.current&&(clearInterval(A.current),A.current=null)},className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs font-mono transition-all ${b==="history"?"bg-[var(--accent-primary)]/20 text-[var(--accent-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[s.jsx(xw,{className:"h-3 w-3"}),"HISTORY"]})]}),b==="live"&&s.jsxs("button",{onClick:X,disabled:!z,className:`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono transition-all ${v&&z?"bg-[var(--accent-glow)]/20 text-[var(--accent-glow)]":"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"} ${z?"":"opacity-50 cursor-not-allowed"}`,children:[s.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${v&&z?"bg-[var(--accent-glow)]":"bg-[var(--text-muted)]"}`}),"AUTO"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[b==="history"&&s.jsxs(s.Fragment,{children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:()=>k(!H),className:`text-xs h-7 font-mono gap-1 ${H?"bg-[var(--accent-primary)]/10 border-[var(--accent-primary)]":""}`,children:[s.jsx(ow,{className:"h-3 w-3"}),"FILTER"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:de,disabled:!z||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(nl,{className:"h-3 w-3"}),"SAVE"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:oe,disabled:!z||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:ge,disabled:!z||u,className:"text-xs h-7 font-mono gap-1 text-[var(--status-offline)] hover:bg-[var(--status-offline)]/10",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:b==="live"?S:K,disabled:!z||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(aa,{className:"h-3 w-3"}),"REFRESH"]})]})]}),H&&b==="history"&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-[var(--border-subtle)] grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Model"}),s.jsxs("select",{value:Q,onChange:I=>q(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"",children:"All Models"}),V.map(I=>s.jsx("option",{value:I,children:I},I))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Provider"}),s.jsxs("select",{value:W,onChange:I=>Z(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"",children:"All Providers"}),ue.map(I=>s.jsx("option",{value:I,children:I},I))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Status"}),s.jsxs("select",{value:ee,onChange:I=>E(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"all",children:"All"}),s.jsx("option",{value:"success",children:"Success (2xx)"}),s.jsx("option",{value:"error",children:"Errors"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"From"}),s.jsx("input",{type:"date",value:L,onChange:I=>Y(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"To"}),s.jsx("input",{type:"date",value:le,onChange:I=>G(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono"})]})]}),b==="history"&&x&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-[var(--border-subtle)] grid grid-cols-3 md:grid-cols-6 gap-4 text-center",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:x.total_requests}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Total"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--status-online)]",children:x.success_count}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Success"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--status-offline)]",children:x.failure_count}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Failed"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:(x.total_tokens_in+x.total_tokens_out).toLocaleString()}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Tokens"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:["$",x.total_cost_usd.toFixed(2)]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Cost"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:["$",x.savings.toFixed(2)]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Saved"})]})]})]}),s.jsx(ft,{className:"p-0",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left border-collapse font-mono text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-[var(--bg-panel)]/50 text-[var(--text-muted)] border-b border-[var(--border-subtle)]",children:[s.jsx("th",{className:"px-4 py-2 font-medium",children:b==="history"?"DATE":"TIME"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"MODEL"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"PROVIDER"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"STATUS"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"LATENCY"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"TOKENS"}),s.jsx("th",{className:"px-4 py-2 font-medium w-10"})]})}),s.jsx("tbody",{className:"divide-y divide-[var(--border-subtle)]/30",children:z?d.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"p-8 text-center text-[var(--text-muted)]",children:b==="history"?"No request history found.":"No requests recorded yet."})}):d.map(I=>s.jsxs(re.Fragment,{children:[s.jsxs("tr",{className:"hover:bg-[var(--bg-panel)]/50 transition-colors cursor-pointer group",onClick:()=>ae(I.id),children:[s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-muted)] tabular-nums",children:b==="history"?s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:it(I.timestamp)}),s.jsx("span",{className:"text-[10px]",children:We(I.timestamp)})]}):We(I.timestamp)}),s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-primary)] font-medium",children:I.model||"-"}),s.jsx("td",{className:"px-4 py-2.5",children:s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-[var(--bg-elevated)] text-[var(--text-secondary)] text-[10px]",children:I.provider?.toUpperCase()||"UNKNOWN"})}),s.jsx("td",{className:`px-4 py-2.5 font-bold ${Ne(I.status)}`,children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce(I.status),I.status]})}),s.jsxs("td",{className:"px-4 py-2.5 text-[var(--text-secondary)] tabular-nums",children:[I.latencyMs,"ms"]}),s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-muted)] tabular-nums",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("span",{children:["In: ",I.inputTokens]}),s.jsxs("span",{children:["Out: ",I.outputTokens]})]})}),s.jsx("td",{className:"px-4 py-2.5 text-right",children:j.has(I.id)?s.jsx(Yn,{className:"h-4 w-4 text-[var(--text-muted)]"}):s.jsx(Xo,{className:"h-4 w-4 text-[var(--text-muted)] group-hover:text-[var(--text-primary)]"})})]}),j.has(I.id)&&s.jsx("tr",{className:"bg-[var(--bg-panel)]/30",children:s.jsx("td",{colSpan:7,className:"px-4 py-4 border-l-2 border-l-[var(--accent-glow)]",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)] text-[10px] uppercase tracking-wider",children:[s.jsx(F0,{className:"h-3 w-3"}),"Request Details"]}),s.jsxs("div",{className:"space-y-1 text-[var(--text-secondary)]",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Method:"}),s.jsx("span",{className:"text-[var(--text-primary)]",children:I.method})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Path:"}),s.jsx("span",{className:"text-[var(--text-primary)] break-all ml-4",children:I.path})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"ID:"}),s.jsx("span",{className:"text-[var(--text-primary)] text-[10px]",children:I.id})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)] text-[10px] uppercase tracking-wider",children:[s.jsx(ur,{className:"h-3 w-3"}),"Performance & Usage"]}),s.jsxs("div",{className:"space-y-1 text-[var(--text-secondary)]",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Latency:"}),s.jsxs("span",{className:"text-[var(--text-primary)]",children:[I.latencyMs,"ms"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Total Tokens:"}),s.jsx("span",{className:"text-[var(--text-primary)]",children:I.inputTokens+I.outputTokens})]}),I.error&&s.jsxs("div",{className:"mt-2 p-2 rounded bg-[var(--status-offline)]/10 border border-[var(--status-offline)]/20 text-[var(--status-offline)]",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1 font-bold",children:[s.jsx(Qo,{className:"h-3 w-3"}),"ERROR"]}),s.jsx("div",{className:"text-[10px] break-all",children:I.error})]})]})]})]})})})]},I.id)):s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"p-8 text-center text-[var(--text-muted)]",children:s.jsx("p",{className:"text-xs uppercase tracking-widest",children:"Engine Offline"})})})})]})})}),s.jsx("div",{className:"px-3 py-1.5 bg-[var(--bg-panel)] border-t border-[var(--border-subtle)] flex items-center justify-between text-[10px] font-mono text-[var(--text-muted)]",children:b==="live"?s.jsxs(s.Fragment,{children:[s.jsxs("span",{children:[d.length," requests tracked"]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:v?"text-[var(--accent-glow)]":"",children:v?"AUTO REFRESH ON":"AUTO REFRESH OFF"}),s.jsx("span",{children:"|"}),s.jsx("span",{children:"2s INTERVAL"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("span",{children:["Showing ",d.length," of ",ie," entries"]}),qe>1&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>M(1),disabled:ne===1,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(H2,{className:"h-3 w-3"})}),s.jsx("button",{onClick:()=>M(I=>Math.max(1,I-1)),disabled:ne===1,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(z2,{className:"h-3 w-3"})}),s.jsxs("span",{className:"px-2",children:["Page ",ne," of ",qe]}),s.jsx("button",{onClick:()=>M(I=>Math.min(qe,I+1)),disabled:ne===qe,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(Xo,{className:"h-3 w-3"})}),s.jsx("button",{onClick:()=>M(qe),disabled:ne===qe,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(q2,{className:"h-3 w-3"})})]})]})})]})}function rN(){const{mgmtFetch:l}=St(),[o,c]=w.useState(null),[u,d]=w.useState(null),[m,x]=w.useState(!0),g=async()=>{try{let h;if(window.pp_get_usage)h=await window.pp_get_usage();else if(l)h=await l("/v0/management/usage");else throw new Error("No method available to fetch usage data");const j=h?.usage||h;j&&typeof j=="object"&&(c({total_requests:j.total_requests??j.totalRequests??0,success_count:j.success_count??j.successCount??0,failure_count:j.failure_count??j.failureCount??0,total_input_tokens:j.total_input_tokens??j.totalInputTokens??0,total_output_tokens:j.total_output_tokens??j.totalOutputTokens??0,estimated_cost_saved:j.estimated_cost_saved??j.estimatedCostSaved??0,actual_cost:j.actual_cost??j.actualCost??0,direct_api_cost:j.direct_api_cost??j.directApiCost??0,savings:j.savings??0,savings_percent:j.savings_percent??j.savingsPercent??0,by_model:j.by_model??j.byModel??{},by_provider:j.by_provider??j.byProvider??{},cost_by_model:j.cost_by_model??j.costByModel??{},cost_by_provider:j.cost_by_provider??j.costByProvider??{},daily:j.daily??[]}),d(null))}catch(h){console.error("Failed to fetch usage stats:",h),d(h instanceof Error?h.message:String(h))}finally{x(!1)}};if(w.useEffect(()=>{g();const h=setInterval(g,3e4);return()=>clearInterval(h)},[]),m&&!o)return s.jsx("div",{className:"flex h-64 items-center justify-center",children:s.jsx(Nt,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(u&&!o)return s.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-6 text-center",children:[s.jsx("p",{className:"text-red-300",children:"Failed to load usage statistics"}),s.jsx("p",{className:"mt-2 text-xs text-red-400/70",children:u})]});if(!o)return s.jsxs("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-[var(--bg-panel)] p-8 text-center",children:[s.jsx(Bu,{className:"mx-auto h-12 w-12 text-[var(--text-muted)] opacity-50"}),s.jsx("p",{className:"mt-4 text-[var(--text-primary)]",children:"No usage data available yet"}),s.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"Start making requests through the proxy to see statistics here."})]});const v=Math.max(...o.daily.map(h=>h.requests),1),p=Object.entries(o.by_provider).sort((h,j)=>j[1]-h[1]),b=p.reduce((h,[j,_])=>h+_,0);return s.jsxs("div",{className:"space-y-6",children:[(o.direct_api_cost>0||o.actual_cost>0)&&s.jsxs(dt,{className:be("relative overflow-hidden","bg-gradient-to-br from-emerald-500/10 via-teal-500/5 to-cyan-500/10","border-emerald-500/30 shadow-xl shadow-emerald-500/5"),children:[s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-emerald-400/10 via-transparent to-transparent"}),s.jsx(xt,{className:"relative pb-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-emerald-500/20 ring-1 ring-emerald-500/30",children:s.jsx(ij,{className:"h-5 w-5 text-emerald-400"})}),s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg text-emerald-100",children:"Cost Savings"}),s.jsx(Ra,{className:"text-emerald-300/70",children:"ProxyPilot vs Direct API"})]})]})}),s.jsx(ft,{className:"relative",children:s.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-emerald-300/60",children:"You Saved"}),s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsxs("span",{className:"text-3xl font-bold text-emerald-400",children:["$",o.savings.toFixed(2)]}),o.savings_percent>0&&s.jsxs("span",{className:"rounded-full bg-emerald-500/20 px-2 py-0.5 text-xs font-medium text-emerald-300",children:[o.savings_percent.toFixed(0),"% off"]})]})]}),s.jsxs("div",{className:"md:col-span-2 space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-muted-foreground",children:"Direct API Cost"}),s.jsxs("span",{className:"font-medium text-red-400",children:["$",o.direct_api_cost.toFixed(2)]})]}),s.jsx("div",{className:"h-3 w-full overflow-hidden rounded-full bg-red-500/20",children:s.jsx("div",{className:"h-full bg-red-500/60",style:{width:"100%"}})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[s.jsx(nx,{className:"h-3 w-3 text-emerald-400"}),"ProxyPilot Cost"]}),s.jsxs("span",{className:"font-medium text-emerald-400",children:["$",o.actual_cost.toFixed(2)]})]}),s.jsx("div",{className:"h-3 w-full overflow-hidden rounded-full bg-emerald-500/20",children:s.jsx("div",{className:"h-full bg-emerald-500/60 transition-all",style:{width:o.direct_api_cost>0?`${o.actual_cost/o.direct_api_cost*100}%`:"0%"}})})]})]})]})})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Total Requests"}),s.jsx(xr,{className:"h-4 w-4 text-blue-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_requests.toLocaleString()}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.success_count.toLocaleString()," successful"]})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Input Tokens"}),s.jsx(Un,{className:"h-4 w-4 text-amber-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_input_tokens.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Prompt tokens"})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Output Tokens"}),s.jsx(Un,{className:"h-4 w-4 text-emerald-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_output_tokens.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Completion tokens"})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Total Cost"}),s.jsx(I2,{className:"h-4 w-4 text-purple-400"})]}),s.jsxs(ft,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",o.actual_cost.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Based on model pricing"})]})]})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bu,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Daily Activity"})]}),s.jsx(Ra,{children:"Requests over the last 7 days"})]}),s.jsx(ft,{children:s.jsx("div",{className:"flex h-48 items-end gap-2 pt-4",children:o.daily.map(h=>{const j=h.requests/v*100,_=new Date(h.date).toLocaleDateString(void 0,{weekday:"short"});return s.jsxs("div",{className:"group relative flex flex-1 flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full rounded-t-sm bg-blue-500/40 transition-all hover:bg-blue-500/60",style:{height:`${Math.max(j,4)}%`},children:s.jsxs("div",{className:"absolute -top-8 left-1/2 -translate-x-1/2 rounded bg-popover px-2 py-1 text-[10px] opacity-0 transition-opacity group-hover:opacity-100",children:[h.requests," reqs"]})}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:_})]},h.date)})})})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(T2,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Providers"})]}),s.jsx(Ra,{children:"Requests by backend provider"})]}),s.jsx(ft,{children:s.jsxs("div",{className:"space-y-4 pt-2",children:[p.length===0&&s.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No provider data available"}),p.map(([h,j])=>{const _=j/b*100;return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"font-medium capitalize",children:h}),s.jsxs("span",{className:"text-muted-foreground",children:[j," (",_.toFixed(1),"%)"]})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-muted/30",children:s.jsx("div",{className:"h-full bg-blue-500/50",style:{width:`${_}%`}})})]},h)})]})})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{children:[s.jsx(zt,{className:"text-lg",children:"Model Breakdown"}),s.jsx(Ra,{children:"Usage and cost statistics per model"})]}),s.jsx(ft,{children:s.jsx("div",{className:"overflow-hidden rounded-md border border-border/50",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/40",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Model"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Requests"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Share"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Cost"})]})}),s.jsxs("tbody",{className:"divide-y divide-border/40",children:[Object.entries(o.by_model).sort((h,j)=>j[1]-h[1]).map(([h,j])=>{const _=o.cost_by_model?.[h]??0;return s.jsxs("tr",{className:"hover:bg-muted/20 transition-colors",children:[s.jsx("td",{className:"px-4 py-3 font-mono text-xs",children:h}),s.jsx("td",{className:"px-4 py-3 text-right",children:j.toLocaleString()}),s.jsxs("td",{className:"px-4 py-3 text-right text-muted-foreground",children:[(j/o.total_requests*100).toFixed(1),"%"]}),s.jsxs("td",{className:"px-4 py-3 text-right font-medium text-emerald-400",children:["$",_.toFixed(4)]})]},h)}),Object.keys(o.by_model).length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:4,className:"px-4 py-8 text-center text-muted-foreground",children:"No model usage recorded yet."})})]})]})})})]})]})}const oN={claude:"oklch(0.60 0.15 35)",anthropic:"oklch(0.60 0.15 35)",gemini:"oklch(0.55 0.18 250)","gemini-cli":"oklch(0.58 0.16 240)",codex:"oklch(0.60 0.16 145)",qwen:"oklch(0.60 0.14 280)",antigravity:"oklch(0.65 0.20 320)",kiro:"oklch(0.58 0.17 200)",amazonq:"oklch(0.55 0.16 30)",minimax:"oklch(0.60 0.18 60)",zhipu:"oklch(0.55 0.15 180)"};function iN(l){const o=l?.toLowerCase()||"";for(const[c,u]of Object.entries(oN))if(o.includes(c))return u;return"oklch(0.55 0.15 220)"}function tl(l){return l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toString()}function cN(l){if(!l)return"N/A";const o=new Date(l),u=new Date().getTime()-o.getTime(),d=Math.floor(u/(1e3*60*60)),m=Math.floor(u/(1e3*60));return d>=24?`${Math.floor(d/24)}d ago`:d>0?`${d}h ago`:m>0?`${m}m ago`:"just now"}function uN({account:l,maxTotalTokens:o}){const c=l.usage,u=(c?.total_input_tokens||0)+(c?.total_output_tokens||0),d=(c?.daily_input_tokens||0)+(c?.daily_output_tokens||0),m=iN(l.provider||l.type||""),x=o>0?u/o*100:0,g=l.email||l.label||l.name||l.id,v=l.provider||l.type||"unknown";return s.jsxs("div",{className:be("relative p-4 rounded-lg border border-[var(--border-subtle)]","bg-[var(--bg-panel)] hover:border-transparent transition-all duration-200","group"),style:{"--provider-color":m},children:[s.jsx("div",{className:"absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{boxShadow:`0 0 20px color-mix(in oklch, ${m} 20%, transparent), inset 0 0 15px color-mix(in oklch, ${m} 5%, transparent)`}}),s.jsx("div",{className:"absolute inset-0 rounded-lg border-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{borderColor:m}}),s.jsx("div",{className:"relative flex items-start justify-between mb-3",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",style:{background:`color-mix(in oklch, ${m} 20%, transparent)`,color:m},children:v}),l.status&&s.jsx("span",{className:be("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",l.status==="active"||l.status==="ok"?"bg-[var(--status-online)]/15 text-[var(--status-online)]":"bg-[var(--text-muted)]/15 text-[var(--text-muted)]"),children:l.status})]}),s.jsx("p",{className:"text-sm font-medium text-[var(--text-primary)] truncate",title:g,children:g})]})}),s.jsxs("div",{className:"relative grid grid-cols-2 gap-3 mb-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[s.jsx(xr,{className:"h-3 w-3"}),"Requests"]}),s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:c?.request_count?.toLocaleString()||0})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[s.jsx(Un,{className:"h-3 w-3"}),"Total Tokens"]}),s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:tl(u)})]})]}),s.jsxs("div",{className:"relative mb-3",children:[s.jsxs("div",{className:"flex justify-between text-[10px] text-[var(--text-muted)] mb-1",children:[s.jsxs("span",{children:["In: ",tl(c?.total_input_tokens||0)]}),s.jsxs("span",{children:["Out: ",tl(c?.total_output_tokens||0)]})]}),s.jsx("div",{className:"h-2 w-full rounded-full bg-[var(--bg-elevated)] overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${Math.max(x,2)}%`,background:`linear-gradient(90deg, ${m}, color-mix(in oklch, ${m} 70%, white))`,boxShadow:`0 0 8px ${m}`}})})]}),s.jsx("div",{className:"relative border-t border-[var(--border-subtle)] pt-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[var(--text-muted)]",children:[s.jsx(F0,{className:"h-3 w-3"}),"Daily: ",c?.daily_request_count||0," reqs, ",tl(d)," tokens"]}),s.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:["Reset ",cN(c?.day_started_at)]})]})})]})}function dN(){const{mgmtFetch:l,status:o}=St(),[c,u]=w.useState([]),[d,m]=w.useState(!0),[x,g]=w.useState(null),v=o?.running??!1,p=async()=>{if(!v){u([]),m(!1);return}try{const _=(await l("/v0/management/auth-files")).files||[];u(_),g(null)}catch(j){console.error("Failed to fetch auth files:",j),g(j instanceof Error?j.message:String(j))}finally{m(!1)}};w.useEffect(()=>{p();const j=setInterval(p,3e4);return()=>clearInterval(j)},[v]);const b=Math.max(...c.map(j=>(j.usage?.total_input_tokens||0)+(j.usage?.total_output_tokens||0)),1),h=c.reduce((j,_)=>({requests:j.requests+(_.usage?.request_count||0),inputTokens:j.inputTokens+(_.usage?.total_input_tokens||0),outputTokens:j.outputTokens+(_.usage?.total_output_tokens||0),dailyRequests:j.dailyRequests+(_.usage?.daily_request_count||0)}),{requests:0,inputTokens:0,outputTokens:0,dailyRequests:0});return d&&c.length===0?s.jsx("div",{className:"flex h-64 items-center justify-center",children:s.jsx(Nt,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):v?x&&c.length===0?s.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-6 text-center",children:[s.jsx("p",{className:"text-red-300",children:"Failed to load account usage"}),s.jsx("p",{className:"mt-2 text-xs text-red-400/70",children:x})]}):c.length===0?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ku,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx(Ra,{children:"Per-account usage statistics"})]}),s.jsx(ft,{children:s.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No accounts configured. Add providers in the Providers tab."})})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ku,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx("button",{onClick:()=>{m(!0),p()},className:"p-1.5 rounded-md hover:bg-[var(--bg-elevated)] transition-colors",title:"Refresh",children:s.jsx(aa,{className:be("h-4 w-4 text-[var(--text-muted)]",d&&"animate-spin")})})]}),s.jsxs(Ra,{children:[c.length," account",c.length!==1?"s":""," across all providers"]})]}),s.jsx(ft,{children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Total Requests"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:h.requests.toLocaleString()})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Input Tokens"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:tl(h.inputTokens)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Output Tokens"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:tl(h.outputTokens)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Today's Requests"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:h.dailyRequests.toLocaleString()})]})]})})]}),s.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:c.map(j=>s.jsx(uN,{account:j,maxTotalTokens:b},j.id))})]}):s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(xt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ku,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx(Ra,{children:"Per-account usage statistics"})]}),s.jsx(ft,{children:s.jsx("div",{className:"p-4 rounded-lg border border-yellow-500/30 bg-yellow-500/5 text-yellow-500 text-xs text-center uppercase tracking-widest font-mono",children:"Start the proxy engine to view account usage"})})]})}const fN={low:{icon:s.jsx(Un,{className:"h-4 w-4"}),label:"Low",description:"2,048 tokens - Fast, minimal reasoning",color:"text-amber-400"},medium:{icon:s.jsx(cw,{className:"h-4 w-4"}),label:"Medium",description:"8,192 tokens - Balanced reasoning",color:"text-blue-400"},high:{icon:s.jsx(nx,{className:"h-4 w-4"}),label:"High",description:"32,768 tokens - Deep reasoning",color:"text-purple-400"},custom:{icon:s.jsx(Ww,{className:"h-4 w-4"}),label:"Custom",description:"Set your own token budget",color:"text-emerald-400"}};function mN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=St(),[d,m]=w.useState(null),[x,g]=w.useState("medium"),[v,p]=w.useState(16e3),[b,h]=w.useState(!0),[j,_]=w.useState(!1),[A,z]=w.useState(!1),H=c?.running??!1,k=w.useCallback(async()=>{try{const E=await l("/v0/management/thinking-budget");m(E),g(E.mode||"medium"),p(E.custom_tokens||16e3),h(E.enabled!==!1),_(!1)}catch(E){E instanceof at||console.error("Failed to fetch thinking budget:",E)}},[l]);w.useEffect(()=>{H&&k()},[H,k]);const Q=E=>{g(E),_(!0)},q=E=>{const L=parseInt(E,10);!isNaN(L)&&L>0&&(p(L),_(!0))},W=()=>{h(!b),_(!0)},Z=async()=>{z(!0);try{await l("/v0/management/thinking-budget",{method:"PUT",body:JSON.stringify({mode:x,custom_tokens:v,enabled:b})}),o("Thinking budget settings saved","success"),_(!1),await k()}catch(E){o(E instanceof Error?E.message:String(E),"error")}z(!1)},ee=()=>x==="custom"?v:d?.presets?.[x]||8192;return H?s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl",children:[s.jsxs(xt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hu,{className:`h-4 w-4 ${b?"text-[var(--accent-primary)]":"text-[var(--text-muted)]"}`}),s.jsx(zt,{className:"text-sm font-mono uppercase tracking-wider",children:"Thinking Budget"}),u&&s.jsx(aa,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:k,disabled:u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(aa,{className:"h-3 w-3"}),"REFRESH"]}),s.jsxs(we,{size:"sm",onClick:Z,disabled:!j||A,className:`text-xs h-7 font-mono gap-1 ${j?"bg-[var(--accent-primary)] text-white":""}`,children:[A?s.jsx(aa,{className:"h-3 w-3 animate-spin"}):s.jsx(nl,{className:"h-3 w-3"}),"SAVE"]})]})]}),s.jsx(Ra,{className:"text-xs text-[var(--text-muted)]",children:"Configure default thinking budget for reasoning models (Claude, Gemini with thinking)"})]}),s.jsxs(ft,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)]",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-primary)]",children:"Enable Thinking"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Allow models to use extended reasoning"})]}),s.jsx("button",{onClick:W,className:`relative w-12 h-6 rounded-full transition-colors ${b?"bg-[var(--accent-primary)]":"bg-[var(--bg-elevated)]"}`,children:s.jsx("span",{className:`absolute top-1 w-4 h-4 rounded-full bg-white transition-transform ${b?"left-7":"left-1"}`})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase tracking-wider",children:"Budget Preset"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:Object.entries(fN).map(([E,L])=>s.jsxs("button",{onClick:()=>Q(E),disabled:!b,className:`relative p-3 rounded-lg border transition-all text-left ${x===E?"border-[var(--accent-primary)] bg-[var(--accent-primary)]/10":"border-[var(--border-subtle)] bg-[var(--bg-panel)] hover:border-[var(--border-default)]"} ${b?"":"opacity-50 cursor-not-allowed"}`,children:[x===E&&s.jsx("div",{className:"absolute top-2 right-2",children:s.jsx(rl,{className:"h-3 w-3 text-[var(--accent-primary)]"})}),s.jsxs("div",{className:`flex items-center gap-2 ${L.color}`,children:[L.icon,s.jsx("span",{className:"font-mono text-sm font-bold",children:L.label})]}),s.jsx("div",{className:"text-[10px] text-[var(--text-muted)] mt-1",children:L.description})]},E))})]}),x==="custom"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase tracking-wider",children:"Custom Token Budget"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"number",value:v,onChange:E=>q(E.target.value),disabled:!b,min:1024,max:128e3,step:1024,className:"flex-1 px-3 py-2 rounded-lg border border-[var(--border-default)] bg-[var(--bg-elevated)] font-mono text-sm disabled:opacity-50"}),s.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"tokens"})]}),s.jsx("div",{className:"text-[10px] text-[var(--text-muted)]",children:"Recommended range: 1,024 - 128,000 tokens"})]}),s.jsx("div",{className:"p-3 rounded-lg bg-[var(--bg-elevated)] border border-[var(--border-subtle)]",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Effective Thinking Budget"}),s.jsxs("div",{className:`font-mono text-lg font-bold ${b?"text-[var(--accent-primary)]":"text-[var(--text-muted)]"}`,children:[b?ee().toLocaleString():"0"," ",s.jsx("span",{className:"text-xs font-normal",children:"tokens"})]})]})}),s.jsxs("div",{className:"text-xs text-[var(--text-muted)] p-3 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)]",children:[s.jsx("strong",{children:"Note:"})," Thinking budget applies to models that support extended reasoning, including Claude with thinking mode and Gemini Pro/Flash with thinking enabled. Higher budgets allow for more thorough reasoning but consume more tokens."]})]})]}):s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl",children:[s.jsx(xt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Hu,{className:"h-4 w-4 text-[var(--text-muted)]"}),s.jsx(zt,{className:"text-sm font-mono uppercase tracking-wider",children:"Thinking Budget"})]})}),s.jsx(ft,{className:"p-8 text-center text-[var(--text-muted)]",children:s.jsx("p",{className:"text-xs uppercase tracking-widest",children:"Engine Offline"})})]})}const Aa=l=>l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toLocaleString(),Vp=(l,o)=>{const c=l+o;return c===0?"0%":`${(l/c*100).toFixed(1)}%`};function hN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=St(),[m,x]=w.useState(null),[g,v]=w.useState(null),[p,b]=w.useState([]),[h,j]=w.useState(!0),[_,A]=w.useState(!1),z=u?.running??!1,H=w.useCallback(async()=>{if(z)try{j(!0);const[Z,ee,E]=await Promise.all([o("/v0/management/cache/stats"),o("/v0/management/prompt-cache/stats"),o("/v0/management/prompt-cache/top")]);x(Z),v(ee),b(E.prompts||[])}catch(Z){Z instanceof at||c(Z instanceof Error?Z.message:String(Z),"error")}finally{j(!1)}},[o,c,z]),k=async Z=>{try{await o("/v0/management/cache/enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:Z})}),x(ee=>ee?{...ee,enabled:Z}:null),c(`Response cache ${Z?"enabled":"disabled"}`,"success")}catch(ee){c(ee instanceof Error?ee.message:String(ee),"error")}},Q=async()=>{try{await o("/v0/management/cache/clear",{method:"POST"}),await H(),c("Response cache cleared","success")}catch(Z){c(Z instanceof Error?Z.message:String(Z),"error")}},q=async Z=>{try{await o("/v0/management/prompt-cache/enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:Z})}),v(ee=>ee?{...ee,enabled:Z}:null),c(`Prompt cache ${Z?"enabled":"disabled"}`,"success")}catch(ee){c(ee instanceof Error?ee.message:String(ee),"error")}},W=async()=>{try{await o("/v0/management/prompt-cache/clear",{method:"POST"}),await H(),c("Prompt cache cleared","success")}catch(Z){c(Z instanceof Error?Z.message:String(Z),"error")}};return w.useEffect(()=>{if(l&&z){H();const Z=setInterval(H,15e3);return()=>clearInterval(Z)}else z||(x(null),v(null),b([]))},[l,z,H]),l?s.jsxs("div",{className:"bg-gradient-to-b from-zinc-900 to-black border border-cyan-500/40 rounded-lg shadow-2xl shadow-cyan-500/10 overflow-hidden",children:[s.jsx("div",{className:"bg-gradient-to-r from-cyan-950/80 via-cyan-900/60 to-cyan-950/80 border-b border-cyan-500/40 px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ur,{className:be("h-5 w-5",z?"text-cyan-400":"text-muted")}),s.jsx("span",{className:"text-sm font-mono font-bold text-cyan-300 uppercase tracking-widest",children:"Cache Statistics"}),d&&s.jsx(Nt,{className:"h-4 w-4 animate-spin text-cyan-500/60"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:H,disabled:!z,className:"gap-1.5 text-xs font-mono bg-cyan-500/10 hover:bg-cyan-500/20 text-cyan-300 border border-cyan-500/30",children:[s.jsx(aa,{className:"h-3 w-3"}),"REFRESH"]})]})}),s.jsxs("div",{className:"p-4 space-y-6",children:[!z&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground border border-dashed border-cyan-500/20 rounded bg-black/20",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to view cache statistics"})]}),z&&h&&!m&&s.jsx("div",{className:"py-8 flex justify-center",children:s.jsx(Nt,{className:"h-8 w-8 animate-spin text-cyan-500/60"})}),z&&m&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mw,{className:"h-4 w-4 text-cyan-400"}),s.jsx("span",{className:"text-xs font-mono text-cyan-300 uppercase tracking-wider",children:"Response Cache"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"response-cache-toggle",checked:m.enabled,onCheckedChange:k}),s.jsx($t,{htmlFor:"response-cache-toggle",className:"text-xs font-mono text-cyan-300 cursor-pointer",children:m.enabled?"ON":"OFF"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Q,disabled:m.size===0,className:"gap-1 text-xs font-mono bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsx(Ma,{label:"Entries",value:Aa(m.size),icon:s.jsx(ur,{className:"h-4 w-4"})}),s.jsx(Ma,{label:"Hits",value:Aa(m.hits),icon:s.jsx(Un,{className:"h-4 w-4"}),accent:"green"}),s.jsx(Ma,{label:"Misses",value:Aa(m.misses),icon:s.jsx(_u,{className:"h-4 w-4"})}),s.jsx(Ma,{label:"Hit Rate",value:Vp(m.hits,m.misses),icon:s.jsx(zp,{className:"h-4 w-4"}),accent:"green"}),s.jsx(Ma,{label:"Tokens Saved",value:Aa(m.total_saved),icon:s.jsx(Un,{className:"h-4 w-4"}),accent:"amber"})]})]}),g&&s.jsxs("div",{className:"space-y-4 pt-4 border-t border-cyan-500/20",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(_u,{className:"h-4 w-4 text-purple-400"}),s.jsx("span",{className:"text-xs font-mono text-purple-300 uppercase tracking-wider",children:"Prompt Cache"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"prompt-cache-toggle",checked:g.enabled,onCheckedChange:q}),s.jsx($t,{htmlFor:"prompt-cache-toggle",className:"text-xs font-mono text-purple-300 cursor-pointer",children:g.enabled?"ON":"OFF"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:W,disabled:g.size===0,className:"gap-1 text-xs font-mono bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsx(Ma,{label:"Entries",value:Aa(g.size),icon:s.jsx(ur,{className:"h-4 w-4"}),color:"purple"}),s.jsx(Ma,{label:"Hits",value:Aa(g.hits),icon:s.jsx(Un,{className:"h-4 w-4"}),color:"purple",accent:"green"}),s.jsx(Ma,{label:"Misses",value:Aa(g.misses),icon:s.jsx(_u,{className:"h-4 w-4"}),color:"purple"}),s.jsx(Ma,{label:"Hit Rate",value:Vp(g.hits,g.misses),icon:s.jsx(zp,{className:"h-4 w-4"}),color:"purple",accent:"green"}),s.jsx(Ma,{label:"Tokens Saved",value:Aa(g.estimated_tokens_saved),icon:s.jsx(Un,{className:"h-4 w-4"}),color:"purple",accent:"amber"})]}),Object.keys(g.top_providers||{}).length>0&&s.jsxs("div",{className:"bg-black/40 border border-purple-500/20 rounded p-3",children:[s.jsx("span",{className:"text-xs font-mono text-purple-500/60 uppercase",children:"Hits by Provider"}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:Object.entries(g.top_providers).map(([Z,ee])=>s.jsxs("span",{className:"px-2 py-1 text-xs font-mono bg-purple-500/20 text-purple-300 rounded",children:[Z,": ",Aa(ee)]},Z))})]}),p.length>0&&s.jsxs("div",{className:"border border-purple-500/30 rounded bg-black/40",children:[s.jsxs("button",{onClick:()=>A(!_),className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-purple-500/10 transition-colors",children:[_?s.jsx(Yn,{className:"h-4 w-4 text-purple-400"}):s.jsx(Xo,{className:"h-4 w-4 text-purple-400"}),s.jsx("span",{className:"text-xs font-mono text-purple-300 uppercase tracking-wider",children:"Top Cached Prompts"}),s.jsx("span",{className:"ml-auto text-xs font-mono bg-purple-500/20 text-purple-300 px-2 py-0.5 rounded",children:p.length})]}),_&&s.jsx("div",{className:"px-3 pb-3",children:s.jsx("div",{className:"bg-black/60 border border-purple-500/20 rounded max-h-48 overflow-auto",children:s.jsx("div",{className:"divide-y divide-purple-500/10",children:p.map(Z=>s.jsx("div",{className:"px-3 py-2 hover:bg-purple-500/5",children:s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-purple-200/80 break-words flex-1",children:Z.prompt_preview}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsxs("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-green-500/20 text-green-300",children:[Z.hit_count," hits"]}),s.jsxs("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-300",children:["~",Aa(Z.token_estimate)," tok"]})]})]})},Z.hash))})})})]})]})]})]})]}):null}function Ma({label:l,value:o,icon:c,color:u="cyan",accent:d}){const m=u==="purple"?"border-purple-500/30":"border-cyan-500/30",x=u==="purple"?"text-purple-500/60":"text-cyan-500/60",g=u==="purple"?"text-purple-400":"text-cyan-400";let v=u==="purple"?"text-purple-200":"text-cyan-200";return d==="green"&&(v="text-green-400"),d==="amber"&&(v="text-amber-400"),s.jsxs("div",{className:be("bg-black/40 border rounded p-3",m),children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[s.jsx("span",{className:g,children:c}),s.jsx("span",{className:be("text-xs font-mono uppercase",x),children:l})]}),s.jsx("div",{className:be("text-lg font-mono font-bold",v),children:o})]})}function pN(){const[l,o]=w.useState(()=>typeof window>"u"?"dark":localStorage.getItem("pp-theme")||"dark");return w.useEffect(()=>{const u=document.documentElement,d=window.matchMedia("(prefers-color-scheme: dark)").matches,m=l==="system"?d?"dark":"light":l;u.classList.remove("light","dark"),u.classList.add(m),localStorage.setItem("pp-theme",l)},[l]),w.useEffect(()=>{if(l!=="system")return;const u=window.matchMedia("(prefers-color-scheme: dark)"),d=m=>{const x=document.documentElement;x.classList.remove("light","dark"),x.classList.add(m.matches?"dark":"light")};return u.addEventListener("change",d),()=>u.removeEventListener("change",d)},[l]),{theme:l,setTheme:u=>{o(u)}}}function xN(){const{theme:l,setTheme:o}=pN(),c=()=>{o(l==="dark"?"light":l==="light"?"system":"dark")};return s.jsxs(we,{variant:"ghost",size:"icon-sm",onClick:c,className:"text-muted-foreground hover:text-foreground",title:`Theme: ${l}`,children:[l==="dark"&&s.jsx(kw,{className:"h-4 w-4"}),l==="light"&&s.jsx(sj,{className:"h-4 w-4"}),l==="system"&&s.jsx(_w,{className:"h-4 w-4"})]})}function gN({isOpen:l,onClose:o}){const{mgmtFetch:c}=St(),[u,d]=w.useState(!1),[m,x]=w.useState(!1),[g,v]=w.useState(null),[p,b]=w.useState("idle"),[h,j]=w.useState(0),[_,A]=w.useState(null);w.useEffect(()=>{(async()=>{try{if(window.pp_get_oauth_private){const E=await window.pp_get_oauth_private();d(E)}}catch(E){console.error("Failed to load OAuth private setting:",E)}})()},[]),w.useEffect(()=>{if(p!=="downloading")return;const L=setInterval(async()=>{try{let Y;if(c)Y=await c("/v0/management/updates/status");else return;if(Y.error){A(Y.error),b("available");return}Y.downloading?j(Y.progress?.percent||0):Y.ready&&(b("ready"),j(100))}catch(Y){console.error("Failed to poll update status:",Y)}},500);return()=>clearInterval(L)},[p,c]);const z=async E=>{try{window.pp_set_oauth_private&&(await window.pp_set_oauth_private(E),d(E),jt.success(E?"Private browsing enabled":"Private browsing disabled"))}catch(L){jt.error(L instanceof Error?L.message:String(L))}},H=async()=>{try{window.pp_open_logs&&(await window.pp_open_logs(),jt.success("Opened logs folder"))}catch(E){jt.error(E instanceof Error?E.message:String(E))}},k=async()=>{try{window.pp_open_auth_folder&&(await window.pp_open_auth_folder(),jt.success("Opened auth folder"))}catch(E){jt.error(E instanceof Error?E.message:String(E))}},Q=async()=>{try{window.pp_copy_diagnostics&&(await window.pp_copy_diagnostics(),jt.success("Diagnostics copied to clipboard"))}catch(E){jt.error(E instanceof Error?E.message:String(E))}},q=async()=>{x(!0),b("checking"),A(null);try{let E=null;window.pp_check_updates?E=await window.pp_check_updates():c&&(E=await c("/v0/management/updates/check")),v(E),E?.available?(b("available"),jt.success(`Update available: v${E.version}`)):(b("idle"),jt.success("You are on the latest version"))}catch(E){b("idle"),jt.error(E instanceof Error?E.message:String(E))}finally{x(!1)}},W=async()=>{if(g?.version){b("downloading"),j(0),A(null);try{c?await c("/v0/management/updates/download",{method:"POST",body:JSON.stringify({version:g.version})}):window.pp_download_update&&(await window.pp_download_update(g.download_url),b("available"),jt.success("Opening download page..."))}catch(E){b("available"),A(E instanceof Error?E.message:String(E)),jt.error(E instanceof Error?E.message:String(E))}}},Z=async()=>{b("installing");try{if(c){const E=await c("/v0/management/updates/install",{method:"POST"});if(E?.success)jt.success(E.message||"Update installed! Restarting...");else throw new Error(E?.message||"Installation failed")}}catch(E){b("ready"),A(E instanceof Error?E.message:String(E)),jt.error(E instanceof Error?E.message:String(E))}},ee=()=>{g?.download_url&&window.open(g.download_url,"_blank")};return l?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40 animate-in fade-in duration-200",onClick:o}),s.jsxs("div",{className:be("fixed right-0 top-0 bottom-0 w-80 z-50","bg-[var(--bg-panel)] border-l border-[var(--border-subtle)]","shadow-2xl","animate-in slide-in-from-right duration-300"),children:[s.jsxs("div",{className:be("flex items-center justify-between px-5 py-4","border-b border-[var(--border-subtle)]"),children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-[0.15em] text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)"},children:"Settings"}),s.jsx(we,{variant:"ghost",size:"icon-sm",onClick:o,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(rd,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"p-5 space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Authentication"}),s.jsxs("div",{className:be("flex items-center justify-between p-3 rounded-lg","bg-[var(--bg-elevated)] border border-[var(--border-subtle)]"),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[u?s.jsx(ex,{className:"h-4 w-4 text-[var(--accent-glow)]"}):s.jsx(I0,{className:"h-4 w-4 text-[var(--text-muted)]"}),s.jsxs("div",{children:[s.jsx($t,{htmlFor:"private-oauth",className:"text-sm text-[var(--text-primary)] cursor-pointer",children:"Private Browsing"}),s.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Use InPrivate mode for OAuth"})]})]}),s.jsx(cl,{id:"private-oauth",checked:u,onCheckedChange:z})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Folders"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:H,children:[s.jsx(qu,{className:"h-4 w-4"}),"Open Logs Folder"]}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:k,children:[s.jsx(qu,{className:"h-4 w-4"}),"Open Auth Folder"]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Diagnostics"}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:Q,children:[s.jsx(Z2,{className:"h-4 w-4"}),"Copy Diagnostics"]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Updates"}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:q,disabled:m||p==="downloading"||p==="installing",children:[m?s.jsx(Nt,{className:"h-4 w-4 animate-spin"}):s.jsx(aa,{className:"h-4 w-4"}),"Check for Updates"]}),(g||p!=="idle")&&s.jsxs("div",{className:be("p-4 rounded-lg border text-sm space-y-3",p==="ready"||p==="installing"?"bg-emerald-500/10 border-emerald-500/30":g?.available?"bg-[var(--accent-primary)]/10 border-[var(--accent-primary)]/30":"bg-green-500/10 border-green-500/30"),children:[s.jsxs("div",{className:"flex items-start gap-2",children:[p==="ready"?s.jsx(Iw,{className:"h-4 w-4 text-emerald-500 mt-0.5 shrink-0"}):p==="installing"?s.jsx(Nt,{className:"h-4 w-4 text-emerald-500 mt-0.5 shrink-0 animate-spin"}):g?.available?s.jsx(Qo,{className:"h-4 w-4 text-[var(--accent-primary)] mt-0.5 shrink-0"}):s.jsx(J0,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"font-medium text-[var(--text-primary)]",children:[p==="downloading"&&"Downloading...",p==="ready"&&`v${g?.version} ready to install`,p==="installing"&&"Installing update...",p==="available"&&`v${g?.version} available`,p==="idle"&&!g?.available&&"Up to date"]}),g?.release_notes&&!g?.available&&s.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-1",children:g.release_notes})]})]}),p==="downloading"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-[var(--bg-void)]",children:s.jsx("div",{className:"h-full bg-[var(--accent-primary)] transition-all duration-300",style:{width:`${h}%`}})}),s.jsxs("p",{className:"text-xs text-[var(--text-muted)] text-center",children:[h.toFixed(0),"% complete"]})]}),_&&s.jsx("div",{className:"p-2 rounded bg-red-500/10 border border-red-500/30 text-red-400 text-xs",children:_}),s.jsxs("div",{className:"flex gap-2",children:[p==="available"&&s.jsxs(s.Fragment,{children:[s.jsxs(we,{size:"sm",onClick:W,className:"flex-1 gap-2",children:[s.jsx(fs,{className:"h-3 w-3"}),"Download & Install"]}),s.jsx(we,{size:"sm",variant:"outline",onClick:ee,className:"gap-2",children:s.jsx(W0,{className:"h-3 w-3"})})]}),p==="ready"&&s.jsxs(we,{size:"sm",onClick:Z,className:"flex-1 gap-2 bg-emerald-600 hover:bg-emerald-500",children:[s.jsx(tx,{className:"h-3 w-3"}),"Install & Restart"]}),p==="installing"&&s.jsx("div",{className:"flex-1 text-center text-xs text-emerald-400",children:"Please wait, do not close the application..."})]})]})]}),s.jsx("div",{className:"pt-4 border-t border-[var(--border-subtle)]",children:s.jsx("p",{className:"text-xs text-center text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"ProxyPilot v0.1.0"})})]})]})]}):null}function vN({isVisible:l}){return s.jsxs("svg",{viewBox:"0 0 200 12",className:be("absolute left-0 bottom-0 w-full h-3 pointer-events-none","transition-opacity duration-300",l?"opacity-100":"opacity-0"),preserveAspectRatio:"none",children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"flightPathGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"0%",stopColor:"var(--accent-primary)",stopOpacity:"0"}),s.jsx("stop",{offset:"20%",stopColor:"var(--accent-primary)",stopOpacity:"0.6"}),s.jsx("stop",{offset:"80%",stopColor:"var(--accent-glow)",stopOpacity:"0.8"}),s.jsx("stop",{offset:"100%",stopColor:"var(--accent-glow)",stopOpacity:"0"})]})}),s.jsx("path",{d:"M0 6 Q25 2, 50 6 T100 6 T150 6 T200 6",fill:"none",stroke:"url(#flightPathGradient)",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"200",strokeDashoffset:l?"0":"200",className:"transition-all duration-1000 ease-out"}),[40,80,120,160].map(o=>s.jsx("circle",{cx:o,cy:"6",r:"1.5",fill:"var(--accent-glow)",className:be("transition-all duration-500",l?"opacity-60":"opacity-0"),style:{transitionDelay:`${o*3}ms`}},o))]})}function yN({isRunning:l,port:o=8318,version:c="v0.1.0"}){const[u,d]=w.useState(!1),[m,x]=w.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(gN,{isOpen:m,onClose:()=>x(!1)}),s.jsxs("header",{className:be("relative h-16 flex items-center justify-between px-6","bg-[var(--bg-panel)] border-b border-[var(--border-subtle)]","before:absolute before:inset-0 before:pointer-events-none","before:bg-gradient-to-b before:from-white/[0.02] before:to-transparent"),children:[s.jsxs("div",{className:"relative flex items-center gap-4",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[s.jsx("div",{className:be("relative w-11 h-11 flex items-center justify-center","rounded-lg overflow-hidden","shadow-[0_2px_0_0_oklch(0_0_0/0.2)]","transition-all duration-300",u&&"shadow-[0_0_20px_0_var(--accent-glow)]",l&&"animate-glow-pulse"),children:s.jsx("img",{src:"/logo.png",alt:"ProxyPilot",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"relative flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:be("text-xl font-bold uppercase tracking-[0.2em]","text-[var(--text-primary)]","transition-colors duration-300"),style:{fontFamily:"var(--font-display)"},children:"PROXYPILOT"}),s.jsx("span",{className:be("px-2 py-0.5 rounded text-[10px] font-medium uppercase tracking-wider","bg-[var(--bg-elevated)] border border-[var(--border-subtle)]","text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:c})]}),s.jsx(vN,{isVisible:u})]})]}),s.jsx("div",{className:be("hidden md:block h-8 w-px mx-4","bg-gradient-to-b from-transparent via-[var(--border-default)] to-transparent")}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:be("flex items-center gap-2.5 px-4 py-2 rounded-lg","font-medium text-sm tracking-wide","border transition-all duration-300",l?["bg-[oklch(0.72_0.19_145/0.08)]","border-[oklch(0.72_0.19_145/0.4)]","text-[oklch(0.72_0.19_145)]","shadow-[0_0_16px_0_oklch(0.72_0.19_145/0.25),inset_0_1px_0_0_oklch(0.72_0.19_145/0.1)]"].join(" "):["bg-[var(--bg-elevated)]","border-[var(--border-subtle)]","text-[var(--text-muted)]"].join(" ")),children:[s.jsxs("span",{className:"relative flex items-center justify-center",children:[l&&s.jsx("span",{className:be("absolute w-4 h-4 rounded-full","bg-[oklch(0.72_0.19_145/0.3)]","animate-radar-pulse")}),s.jsx("span",{className:be("relative w-2.5 h-2.5 rounded-full",l?"bg-[oklch(0.72_0.19_145)] shadow-[0_0_8px_0_oklch(0.72_0.19_145)]":"bg-[var(--text-muted)]")})]}),s.jsx("span",{className:"uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:l?"ONLINE":"OFFLINE"}),l&&s.jsxs("span",{className:be("ml-1 px-1.5 py-0.5 rounded text-[10px]","bg-[oklch(0.72_0.19_145/0.15)]","text-[oklch(0.72_0.19_145/0.8)]"),style:{fontFamily:"var(--font-mono)"},children:[":",o]})]}),s.jsx("div",{className:be("h-6 w-px","bg-[var(--border-subtle)]")}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(xN,{}),s.jsx(we,{variant:"ghost",size:"icon-sm",onClick:()=>x(!0),className:be("text-[var(--text-muted)]","hover:text-[var(--text-primary)]","hover:bg-[var(--bg-active)]"),title:"Settings",children:s.jsx(Bo,{className:"h-4 w-4"})})]})]}),s.jsx("div",{className:be("absolute bottom-0 left-0 right-0 h-px","bg-gradient-to-r from-transparent via-[var(--accent-primary)] to-transparent","opacity-20")})]})]})}const bN=[{id:"claude",name:"Claude"},{id:"gemini",name:"Gemini"},{id:"codex",name:"Codex"},{id:"qwen",name:"Qwen"},{id:"anthropic",name:"Anthropic"}];function wN(l){const o=Math.floor(l/3600),c=Math.floor(l%3600/60),u=l%60;return`${o.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`}function jN(l){return l.toLocaleString()}const NN=({version:l="v0.1.0",requestCount:o=0,providerStatus:c})=>{const{status:u,authFiles:d}=St(),[m,x]=w.useState(0),[g]=w.useState(()=>Date.now()),v=w.useMemo(()=>c||{claude:d.some(h=>h.toLowerCase().includes("claude")),gemini:d.some(h=>h.toLowerCase().includes("gemini")),codex:d.some(h=>h.toLowerCase().includes("codex")),qwen:d.some(h=>h.toLowerCase().includes("qwen")),anthropic:d.some(h=>h.toLowerCase().includes("anthropic"))},[c,d]);w.useEffect(()=>{const h=setInterval(()=>{x(Math.floor((Date.now()-g)/1e3))},1e3);return()=>clearInterval(h)},[g]);const p=u?.running??!1,b=u?.port??8317;return s.jsxs("div",{className:"instrument-panel",children:[s.jsx("div",{className:"instrument-segment instrument-segment--providers",title:"Provider Status",children:s.jsx("div",{className:"provider-lights",children:bN.map(h=>s.jsx("span",{className:`provider-light ${v[h.id]?"provider-light--active":"provider-light--inactive"}`,title:`${h.name}: ${v[h.id]?"Connected":"Offline"}`},h.id))})}),s.jsxs("div",{className:"instrument-segment",title:"Proxy Port",children:[s.jsx("span",{className:"segment-label",children:"PORT"}),s.jsx("span",{className:"segment-value segment-value--accent",children:b})]}),s.jsxs("div",{className:"instrument-segment",title:"Session Uptime",children:[s.jsx("span",{className:"segment-label",children:"UPTIME"}),s.jsx("span",{className:"segment-value segment-value--uptime",children:wN(m)})]}),s.jsxs("div",{className:"instrument-segment",title:"Total Requests",children:[s.jsx("span",{className:"segment-label",children:"REQ"}),s.jsx("span",{className:"segment-value",children:jN(o)})]}),s.jsx("div",{className:"instrument-segment instrument-segment--version",title:"ProxyPilot Version",children:s.jsx("span",{className:"segment-value segment-value--muted",children:l})}),s.jsx("div",{className:"instrument-segment instrument-segment--status",title:"Proxy Status",children:s.jsxs("span",{className:`status-indicator ${p?"status-indicator--online":"status-indicator--offline"}`,children:[s.jsx("span",{className:"status-dot"}),s.jsx("span",{className:"status-text",children:p?"READY":"OFFLINE"})]})}),s.jsx("style",{children:` +`))}catch(q){q instanceof et||c(q instanceof Error?q.message:String(q),"error")}},[o,c,p,h]);return w.useEffect(()=>{l&&A?(U(),k()):A||(x(null),v([]),M(""))},[l,A,U,k]),l?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsx(gt,{className:"pb-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg",children:"Semantic Memory"}),s.jsx(Da,{children:"Ollama embeddings + per-repo namespaces"})]}),d&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-muted-foreground"})]})}),s.jsxs(ft,{className:"space-y-3",children:[!A&&s.jsx("div",{className:"py-4 text-center text-muted-foreground",children:s.jsx("p",{className:"text-xs uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"})}),A&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(we,{size:"sm",variant:"outline",onClick:U,children:"Refresh"}),s.jsx(nN,{variant:m?.status==="ok"?"default":"secondary",children:m?.status||"unknown"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[m?.model," ",m?.version?`v${m.version}`:""]}),s.jsx("span",{className:"text-xs text-muted-foreground",children:m?.model_present===!1?"model missing":""})]}),s.jsxs("div",{className:"text-xs text-muted-foreground",children:[m?.latency_ms?`latency ${m.latency_ms}ms`:"latency n/a",m?.queue?` · queue q${m.queue.queued} d${m.queue.dropped} p${m.queue.processed} f${m.queue.failed}`:""]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("select",{className:"min-w-[200px] rounded-md border border-border bg-background/60 px-2 py-1 text-xs font-mono",value:p,onChange:q=>y(q.target.value),children:[g.length===0&&s.jsx("option",{value:"",children:"(no namespaces)"}),g.map(q=>s.jsx("option",{value:q.key,children:q.label||q.key},q.key))]}),s.jsx("input",{type:"number",min:10,max:200,className:"w-20 rounded-md border border-border bg-background/60 px-2 py-1 text-xs",value:h,onChange:q=>j(parseInt(q.target.value||"50",10))}),s.jsx(we,{size:"sm",variant:"outline",onClick:Q,children:"Load"})]}),s.jsx("pre",{className:"max-h-56 overflow-auto rounded-md border border-border/50 bg-muted/30 p-2 text-xs",children:S||"No items loaded."})]})]})]}):null}function lN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=vt(),[d,m]=w.useState(""),[x,g]=w.useState(!1),v=c?.running??!1,p=async()=>{try{const h=await l("/v0/management/config.yaml");m(typeof h=="string"?h:JSON.stringify(h,null,2))}catch(h){h instanceof et||o(h instanceof Error?h.message:String(h),"error")}},y=async()=>{g(!0);try{await l("/v0/management/config.yaml",{method:"PUT",headers:{"Content-Type":"application/yaml"},body:d}),o("Configuration saved successfully","success")}catch(h){o(h instanceof Error?h.message:String(h),"error")}finally{g(!1)}};return w.useEffect(()=>{v&&p()},[v]),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl overflow-hidden",children:[s.jsx(gt,{className:"pb-4 border-b border-border/50 bg-gradient-to-r from-purple-500/5 to-transparent",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"h-10 w-10 rounded-xl bg-purple-500/10 flex items-center justify-center",children:s.jsx(lw,{className:"h-5 w-5 text-purple-500"})}),s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg",children:"Config Editor"}),s.jsx(Da,{children:"Edit config.yaml directly"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:p,disabled:!v||u,className:"gap-1.5 text-xs",children:[s.jsx(qw,{className:"h-3.5 w-3.5"}),"Reset"]}),s.jsxs(we,{size:"sm",onClick:y,disabled:!v||x||u,className:"gap-1.5 text-xs bg-purple-600 hover:bg-purple-700 text-white",children:[x?s.jsx(mt,{className:"h-3.5 w-3.5 animate-spin"}):s.jsx(nl,{className:"h-3.5 w-3.5"}),"Save Changes"]})]})]})}),s.jsx(ft,{className:"p-0",children:v?s.jsxs("div",{className:"relative",children:[s.jsx("textarea",{value:d,onChange:h=>m(h.target.value),spellCheck:!1,className:"w-full h-[500px] p-6 bg-[var(--bg-void)] text-[var(--text-primary)] font-mono text-sm resize-none focus:outline-none selection:bg-purple-500/30",style:{fontFamily:'"JetBrains Mono", "Fira Code", monospace',lineHeight:"1.6"}}),s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-[0.03]",style:{backgroundImage:"linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px)",backgroundSize:"20px 20px"}})]}):s.jsxs("div",{className:"py-12 text-center text-muted-foreground",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"⚠️ Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to edit configuration"})]})})]})}function rN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=vt(),[d,m]=w.useState([]),[x,g]=w.useState(null),[v,p]=w.useState(!1),[y,h]=w.useState("live"),[j,S]=w.useState(new Set),M=w.useRef(null),A=c?.running??!1,[U,k]=w.useState(!1),[Q,q]=w.useState(""),[W,Z]=w.useState(""),[ee,E]=w.useState("all"),[L,Y]=w.useState(""),[le,G]=w.useState(""),[ne,O]=w.useState(1),[se]=w.useState(50),[ie,T]=w.useState(0),[V,B]=w.useState([]),[ue,xe]=w.useState([]),_=w.useCallback(async()=>{try{let I=[];window.pp_get_requests?I=await window.pp_get_requests():I=(await l("/v0/management/requests")).requests||[],m([...I].sort((be,nt)=>new Date(nt.timestamp).getTime()-new Date(be.timestamp).getTime()));const Ye=new Set,J=new Set;I.forEach(be=>{be.model&&Ye.add(be.model),be.provider&&J.add(be.provider)}),B(Array.from(Ye).sort()),xe(Array.from(J).sort())}catch(I){I instanceof et||o(I instanceof Error?I.message:String(I),"error")}},[l,o]),K=w.useCallback(async()=>{try{const I=new URLSearchParams;I.set("limit",String(se)),I.set("offset",String((ne-1)*se)),Q&&I.set("model",Q),W&&I.set("provider",W),L&&I.set("start_date",new Date(L).toISOString()),le&&I.set("end_date",new Date(le).toISOString()),ee==="success"?(I.set("status_min","200"),I.set("status_max","299")):ee==="error"&&I.set("errors_only","true");const Ye=await l(`/v0/management/request-history?${I.toString()}`);m(Ye.entries||[]),T(Ye.total||0);const J=await l("/v0/management/request-history/stats");g(J.stats||null),J.stats?.by_model&&B(Object.keys(J.stats.by_model).sort()),J.stats?.by_provider&&xe(Object.keys(J.stats.by_provider).sort())}catch(I){I instanceof et||o(I instanceof Error?I.message:String(I),"error")}},[l,o,ne,se,Q,W,ee,L,le]),X=()=>{v?(p(!1),M.current&&(clearInterval(M.current),M.current=null)):(p(!0),_(),M.current=setInterval(()=>{_()},2e3))},ae=I=>{const Ye=new Set(j);Ye.has(I)?Ye.delete(I):Ye.add(I),S(Ye)},oe=async()=>{try{const I=await l("/v0/management/request-history/export"),Ye=new Blob([JSON.stringify(I,null,2)],{type:"application/json"}),J=URL.createObjectURL(Ye),be=document.createElement("a");be.href=J,be.download=`proxypilot-request-history-${new Date().toISOString().split("T")[0]}.json`,be.click(),URL.revokeObjectURL(J),o("Request history exported","success")}catch(I){o(I instanceof Error?I.message:String(I),"error")}},ge=async()=>{if(confirm("Are you sure you want to clear all request history? This cannot be undone."))try{await l("/v0/management/request-history",{method:"DELETE"}),o("Request history cleared","success"),m([]),T(0),g(null)}catch(I){o(I instanceof Error?I.message:String(I),"error")}},de=async()=>{try{await l("/v0/management/request-history/save",{method:"POST"}),o("Request history saved to disk","success")}catch(I){o(I instanceof Error?I.message:String(I),"error")}};w.useEffect(()=>(y==="live"?_():K(),()=>{M.current&&clearInterval(M.current)}),[y,_,K]),w.useEffect(()=>{O(1)},[Q,W,ee,L,le]);const Ne=I=>I>=200&&I<300?"text-[var(--status-online)]":I>=400&&I<500?"text-[var(--status-warning)]":I>=500?"text-[var(--status-offline)]":"text-[var(--text-muted)]",Ce=I=>I>=200&&I<300?s.jsx(si,{className:"h-3 w-3"}):I>=400&&I<500?s.jsx(pr,{className:"h-3 w-3"}):I>=500?s.jsx(cd,{className:"h-3 w-3"}):s.jsx(Jo,{className:"h-3 w-3"}),We=I=>new Date(I).toLocaleTimeString([],{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}),it=I=>new Date(I).toLocaleDateString([],{month:"short",day:"numeric"}),qe=Math.ceil(ie/se);return s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl overflow-hidden",children:[s.jsxs(gt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(br,{className:`h-4 w-4 ${v&&A?"text-[var(--accent-glow)] animate-pulse":"text-[var(--text-muted)]"}`}),s.jsx("span",{className:"font-mono text-sm font-semibold tracking-wider text-[var(--text-primary)]",children:"REQUEST MONITOR"})]}),u&&s.jsx(Qt,{className:"h-3 w-3 animate-spin text-muted-foreground"}),s.jsxs("div",{className:"flex items-center gap-1 bg-[var(--bg-elevated)] rounded p-0.5",children:[s.jsxs("button",{onClick:()=>{h("live"),p(!1)},className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs font-mono transition-all ${y==="live"?"bg-[var(--accent-primary)]/20 text-[var(--accent-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[s.jsx(lx,{className:"h-3 w-3"}),"LIVE"]}),s.jsxs("button",{onClick:()=>{h("history"),p(!1),M.current&&(clearInterval(M.current),M.current=null)},className:`flex items-center gap-1.5 px-2 py-1 rounded text-xs font-mono transition-all ${y==="history"?"bg-[var(--accent-primary)]/20 text-[var(--accent-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:[s.jsx(gw,{className:"h-3 w-3"}),"HISTORY"]})]}),y==="live"&&s.jsxs("button",{onClick:X,disabled:!A,className:`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-mono transition-all ${v&&A?"bg-[var(--accent-glow)]/20 text-[var(--accent-glow)]":"bg-[var(--bg-elevated)] text-[var(--text-muted)] hover:text-[var(--text-secondary)]"} ${A?"":"opacity-50 cursor-not-allowed"}`,children:[s.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${v&&A?"bg-[var(--accent-glow)]":"bg-[var(--text-muted)]"}`}),"AUTO"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[y==="history"&&s.jsxs(s.Fragment,{children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:()=>k(!U),className:`text-xs h-7 font-mono gap-1 ${U?"bg-[var(--accent-primary)]/10 border-[var(--accent-primary)]":""}`,children:[s.jsx(cw,{className:"h-3 w-3"}),"FILTER"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:de,disabled:!A||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(nl,{className:"h-3 w-3"}),"SAVE"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:oe,disabled:!A||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(fs,{className:"h-3 w-3"}),"EXPORT"]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:ge,disabled:!A||u,className:"text-xs h-7 font-mono gap-1 text-[var(--status-offline)] hover:bg-[var(--status-offline)]/10",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]}),s.jsxs(we,{size:"sm",variant:"outline",onClick:y==="live"?_:K,disabled:!A||u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(Qt,{className:"h-3 w-3"}),"REFRESH"]})]})]}),U&&y==="history"&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-[var(--border-subtle)] grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Model"}),s.jsxs("select",{value:Q,onChange:I=>q(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"",children:"All Models"}),V.map(I=>s.jsx("option",{value:I,children:I},I))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Provider"}),s.jsxs("select",{value:W,onChange:I=>Z(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"",children:"All Providers"}),ue.map(I=>s.jsx("option",{value:I,children:I},I))]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"Status"}),s.jsxs("select",{value:ee,onChange:I=>E(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono",children:[s.jsx("option",{value:"all",children:"All"}),s.jsx("option",{value:"success",children:"Success (2xx)"}),s.jsx("option",{value:"error",children:"Errors"})]})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"From"}),s.jsx("input",{type:"date",value:L,onChange:I=>Y(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase mb-1",children:"To"}),s.jsx("input",{type:"date",value:le,onChange:I=>G(I.target.value),className:"w-full px-2 py-1.5 rounded border border-[var(--border-default)] bg-[var(--bg-elevated)] text-xs font-mono"})]})]}),y==="history"&&x&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-[var(--border-subtle)] grid grid-cols-3 md:grid-cols-6 gap-4 text-center",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:x.total_requests}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Total"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--status-online)]",children:x.success_count}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Success"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--status-offline)]",children:x.failure_count}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Failed"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:(x.total_tokens_in+x.total_tokens_out).toLocaleString()}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Tokens"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:["$",x.total_cost_usd.toFixed(2)]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Cost"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"text-lg font-bold text-emerald-400",children:["$",x.savings.toFixed(2)]}),s.jsx("div",{className:"text-[10px] font-mono text-[var(--text-muted)] uppercase",children:"Saved"})]})]})]}),s.jsx(ft,{className:"p-0",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"w-full text-left border-collapse font-mono text-xs",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"bg-[var(--bg-panel)]/50 text-[var(--text-muted)] border-b border-[var(--border-subtle)]",children:[s.jsx("th",{className:"px-4 py-2 font-medium",children:y==="history"?"DATE":"TIME"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"MODEL"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"PROVIDER"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"STATUS"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"LATENCY"}),s.jsx("th",{className:"px-4 py-2 font-medium",children:"TOKENS"}),s.jsx("th",{className:"px-4 py-2 font-medium w-10"})]})}),s.jsx("tbody",{className:"divide-y divide-[var(--border-subtle)]/30",children:A?d.length===0?s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"p-8 text-center text-[var(--text-muted)]",children:y==="history"?"No request history found.":"No requests recorded yet."})}):d.map(I=>s.jsxs(re.Fragment,{children:[s.jsxs("tr",{className:"hover:bg-[var(--bg-panel)]/50 transition-colors cursor-pointer group",onClick:()=>ae(I.id),children:[s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-muted)] tabular-nums",children:y==="history"?s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:it(I.timestamp)}),s.jsx("span",{className:"text-[10px]",children:We(I.timestamp)})]}):We(I.timestamp)}),s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-primary)] font-medium",children:I.model||"-"}),s.jsx("td",{className:"px-4 py-2.5",children:s.jsx("span",{className:"px-1.5 py-0.5 rounded bg-[var(--bg-elevated)] text-[var(--text-secondary)] text-[10px]",children:I.provider?.toUpperCase()||"UNKNOWN"})}),s.jsx("td",{className:`px-4 py-2.5 font-bold ${Ne(I.status)}`,children:s.jsxs("div",{className:"flex items-center gap-1.5",children:[Ce(I.status),I.status]})}),s.jsxs("td",{className:"px-4 py-2.5 text-[var(--text-secondary)] tabular-nums",children:[I.latencyMs,"ms"]}),s.jsx("td",{className:"px-4 py-2.5 text-[var(--text-muted)] tabular-nums",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsxs("span",{children:["In: ",I.inputTokens]}),s.jsxs("span",{children:["Out: ",I.outputTokens]})]})}),s.jsx("td",{className:"px-4 py-2.5 text-right",children:j.has(I.id)?s.jsx(cn,{className:"h-4 w-4 text-[var(--text-muted)]"}):s.jsx(hr,{className:"h-4 w-4 text-[var(--text-muted)] group-hover:text-[var(--text-primary)]"})})]}),j.has(I.id)&&s.jsx("tr",{className:"bg-[var(--bg-panel)]/30",children:s.jsx("td",{colSpan:7,className:"px-4 py-4 border-l-2 border-l-[var(--accent-glow)]",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)] text-[10px] uppercase tracking-wider",children:[s.jsx(xr,{className:"h-3 w-3"}),"Request Details"]}),s.jsxs("div",{className:"space-y-1 text-[var(--text-secondary)]",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Method:"}),s.jsx("span",{className:"text-[var(--text-primary)]",children:I.method})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Path:"}),s.jsx("span",{className:"text-[var(--text-primary)] break-all ml-4",children:I.path})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"ID:"}),s.jsx("span",{className:"text-[var(--text-primary)] text-[10px]",children:I.id})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)] text-[10px] uppercase tracking-wider",children:[s.jsx(ur,{className:"h-3 w-3"}),"Performance & Usage"]}),s.jsxs("div",{className:"space-y-1 text-[var(--text-secondary)]",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Latency:"}),s.jsxs("span",{className:"text-[var(--text-primary)]",children:[I.latencyMs,"ms"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Total Tokens:"}),s.jsx("span",{className:"text-[var(--text-primary)]",children:I.inputTokens+I.outputTokens})]}),I.error&&s.jsxs("div",{className:"mt-2 p-2 rounded bg-[var(--status-offline)]/10 border border-[var(--status-offline)]/20 text-[var(--status-offline)]",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1 font-bold",children:[s.jsx(pr,{className:"h-3 w-3"}),"ERROR"]}),s.jsx("div",{className:"text-[10px] break-all",children:I.error})]})]})]})]})})})]},I.id)):s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"p-8 text-center text-[var(--text-muted)]",children:s.jsx("p",{className:"text-xs uppercase tracking-widest",children:"Engine Offline"})})})})]})})}),s.jsx("div",{className:"px-3 py-1.5 bg-[var(--bg-panel)] border-t border-[var(--border-subtle)] flex items-center justify-between text-[10px] font-mono text-[var(--text-muted)]",children:y==="live"?s.jsxs(s.Fragment,{children:[s.jsxs("span",{children:[d.length," requests tracked"]}),s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx("span",{className:v?"text-[var(--accent-glow)]":"",children:v?"AUTO REFRESH ON":"AUTO REFRESH OFF"}),s.jsx("span",{children:"|"}),s.jsx("span",{children:"2s INTERVAL"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("span",{children:["Showing ",d.length," of ",ie," entries"]}),qe>1&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>O(1),disabled:ne===1,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(Y2,{className:"h-3 w-3"})}),s.jsx("button",{onClick:()=>O(I=>Math.max(1,I-1)),disabled:ne===1,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(L2,{className:"h-3 w-3"})}),s.jsxs("span",{className:"px-2",children:["Page ",ne," of ",qe]}),s.jsx("button",{onClick:()=>O(I=>Math.min(qe,I+1)),disabled:ne===qe,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(hr,{className:"h-3 w-3"})}),s.jsx("button",{onClick:()=>O(qe),disabled:ne===qe,className:"p-1 rounded hover:bg-[var(--bg-elevated)] disabled:opacity-30",children:s.jsx(V2,{className:"h-3 w-3"})})]})]})})]})}function oN(){const{mgmtFetch:l}=vt(),[o,c]=w.useState(null),[u,d]=w.useState(null),[m,x]=w.useState(!0),g=async()=>{try{let h;if(window.pp_get_usage)h=await window.pp_get_usage();else if(l)h=await l("/v0/management/usage");else throw new Error("No method available to fetch usage data");const j=h?.usage||h;j&&typeof j=="object"&&(c({total_requests:j.total_requests??j.totalRequests??0,success_count:j.success_count??j.successCount??0,failure_count:j.failure_count??j.failureCount??0,total_input_tokens:j.total_input_tokens??j.totalInputTokens??0,total_output_tokens:j.total_output_tokens??j.totalOutputTokens??0,estimated_cost_saved:j.estimated_cost_saved??j.estimatedCostSaved??0,actual_cost:j.actual_cost??j.actualCost??0,direct_api_cost:j.direct_api_cost??j.directApiCost??0,savings:j.savings??0,savings_percent:j.savings_percent??j.savingsPercent??0,by_model:j.by_model??j.byModel??{},by_provider:j.by_provider??j.byProvider??{},cost_by_model:j.cost_by_model??j.costByModel??{},cost_by_provider:j.cost_by_provider??j.costByProvider??{},daily:j.daily??[]}),d(null))}catch(h){console.error("Failed to fetch usage stats:",h),d(h instanceof Error?h.message:String(h))}finally{x(!1)}};if(w.useEffect(()=>{g();const h=setInterval(g,3e4);return()=>clearInterval(h)},[]),m&&!o)return s.jsx("div",{className:"flex h-64 items-center justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(u&&!o)return s.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-6 text-center",children:[s.jsx("p",{className:"text-red-300",children:"Failed to load usage statistics"}),s.jsx("p",{className:"mt-2 text-xs text-red-400/70",children:u})]});if(!o)return s.jsxs("div",{className:"rounded-xl border border-[var(--border-subtle)] bg-[var(--bg-panel)] p-8 text-center",children:[s.jsx(Gu,{className:"mx-auto h-12 w-12 text-[var(--text-muted)] opacity-50"}),s.jsx("p",{className:"mt-4 text-[var(--text-primary)]",children:"No usage data available yet"}),s.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"Start making requests through the proxy to see statistics here."})]});const v=Math.max(...o.daily.map(h=>h.requests),1),p=Object.entries(o.by_provider).sort((h,j)=>j[1]-h[1]),y=p.reduce((h,[j,S])=>h+S,0);return s.jsxs("div",{className:"space-y-6",children:[(o.direct_api_cost>0||o.actual_cost>0)&&s.jsxs(dt,{className:ve("relative overflow-hidden","bg-gradient-to-br from-emerald-500/10 via-teal-500/5 to-cyan-500/10","border-emerald-500/30 shadow-xl shadow-emerald-500/5"),children:[s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-emerald-400/10 via-transparent to-transparent"}),s.jsx(gt,{className:"relative pb-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-lg bg-emerald-500/20 ring-1 ring-emerald-500/30",children:s.jsx(cj,{className:"h-5 w-5 text-emerald-400"})}),s.jsxs("div",{children:[s.jsx(zt,{className:"text-lg text-emerald-100",children:"Cost Savings"}),s.jsx(Da,{className:"text-emerald-300/70",children:"ProxyPilot vs Direct API"})]})]})}),s.jsx(ft,{className:"relative",children:s.jsxs("div",{className:"grid gap-6 md:grid-cols-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-emerald-300/60",children:"You Saved"}),s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsxs("span",{className:"text-3xl font-bold text-emerald-400",children:["$",o.savings.toFixed(2)]}),o.savings_percent>0&&s.jsxs("span",{className:"rounded-full bg-emerald-500/20 px-2 py-0.5 text-xs font-medium text-emerald-300",children:[o.savings_percent.toFixed(0),"% off"]})]})]}),s.jsxs("div",{className:"md:col-span-2 space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"text-muted-foreground",children:"Direct API Cost"}),s.jsxs("span",{className:"font-medium text-red-400",children:["$",o.direct_api_cost.toFixed(2)]})]}),s.jsx("div",{className:"h-3 w-full overflow-hidden rounded-full bg-red-500/20",children:s.jsx("div",{className:"h-full bg-red-500/60",style:{width:"100%"}})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[s.jsx(rx,{className:"h-3 w-3 text-emerald-400"}),"ProxyPilot Cost"]}),s.jsxs("span",{className:"font-medium text-emerald-400",children:["$",o.actual_cost.toFixed(2)]})]}),s.jsx("div",{className:"h-3 w-full overflow-hidden rounded-full bg-emerald-500/20",children:s.jsx("div",{className:"h-full bg-emerald-500/60 transition-all",style:{width:o.direct_api_cost>0?`${o.actual_cost/o.direct_api_cost*100}%`:"0%"}})})]})]})]})})]}),s.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Total Requests"}),s.jsx(br,{className:"h-4 w-4 text-blue-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_requests.toLocaleString()}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:[o.success_count.toLocaleString()," successful"]})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Input Tokens"}),s.jsx(Ra,{className:"h-4 w-4 text-amber-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_input_tokens.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Prompt tokens"})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Output Tokens"}),s.jsx(Ra,{className:"h-4 w-4 text-emerald-400"})]}),s.jsxs(ft,{children:[s.jsx("div",{className:"text-2xl font-bold",children:o.total_output_tokens.toLocaleString()}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Completion tokens"})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[s.jsx(zt,{className:"text-sm font-medium",children:"Total Cost"}),s.jsx(tw,{className:"h-4 w-4 text-purple-400"})]}),s.jsxs(ft,{children:[s.jsxs("div",{className:"text-2xl font-bold",children:["$",o.actual_cost.toFixed(2)]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Based on model pricing"})]})]})]}),s.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Gu,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Daily Activity"})]}),s.jsx(Da,{children:"Requests over the last 7 days"})]}),s.jsx(ft,{children:s.jsx("div",{className:"flex h-48 items-end gap-2 pt-4",children:o.daily.map(h=>{const j=h.requests/v*100,S=new Date(h.date).toLocaleDateString(void 0,{weekday:"short"});return s.jsxs("div",{className:"group relative flex flex-1 flex-col items-center gap-2",children:[s.jsx("div",{className:"w-full rounded-t-sm bg-blue-500/40 transition-all hover:bg-blue-500/60",style:{height:`${Math.max(j,4)}%`},children:s.jsxs("div",{className:"absolute -top-8 left-1/2 -translate-x-1/2 rounded bg-popover px-2 py-1 text-[10px] opacity-0 transition-opacity group-hover:opacity-100",children:[h.requests," reqs"]})}),s.jsx("span",{className:"text-[10px] text-muted-foreground",children:S})]},h.date)})})})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(O2,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Providers"})]}),s.jsx(Da,{children:"Requests by backend provider"})]}),s.jsx(ft,{children:s.jsxs("div",{className:"space-y-4 pt-2",children:[p.length===0&&s.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No provider data available"}),p.map(([h,j])=>{const S=j/y*100;return s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsx("span",{className:"font-medium capitalize",children:h}),s.jsxs("span",{className:"text-muted-foreground",children:[j," (",S.toFixed(1),"%)"]})]}),s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-muted/30",children:s.jsx("div",{className:"h-full bg-blue-500/50",style:{width:`${S}%`}})})]},h)})]})})]})]}),s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{children:[s.jsx(zt,{className:"text-lg",children:"Model Breakdown"}),s.jsx(Da,{children:"Usage and cost statistics per model"})]}),s.jsx(ft,{children:s.jsx("div",{className:"overflow-hidden rounded-md border border-border/50",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-muted/40",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-4 py-3 text-left font-medium",children:"Model"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Requests"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Share"}),s.jsx("th",{className:"px-4 py-3 text-right font-medium",children:"Cost"})]})}),s.jsxs("tbody",{className:"divide-y divide-border/40",children:[Object.entries(o.by_model).sort((h,j)=>j[1]-h[1]).map(([h,j])=>{const S=o.cost_by_model?.[h]??0;return s.jsxs("tr",{className:"hover:bg-muted/20 transition-colors",children:[s.jsx("td",{className:"px-4 py-3 font-mono text-xs",children:h}),s.jsx("td",{className:"px-4 py-3 text-right",children:j.toLocaleString()}),s.jsxs("td",{className:"px-4 py-3 text-right text-muted-foreground",children:[(j/o.total_requests*100).toFixed(1),"%"]}),s.jsxs("td",{className:"px-4 py-3 text-right font-medium text-emerald-400",children:["$",S.toFixed(4)]})]},h)}),Object.keys(o.by_model).length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:4,className:"px-4 py-8 text-center text-muted-foreground",children:"No model usage recorded yet."})})]})]})})})]})]})}const iN={claude:"oklch(0.60 0.15 35)",anthropic:"oklch(0.60 0.15 35)",gemini:"oklch(0.55 0.18 250)","gemini-cli":"oklch(0.58 0.16 240)",codex:"oklch(0.60 0.16 145)",qwen:"oklch(0.60 0.14 280)",antigravity:"oklch(0.65 0.20 320)",kiro:"oklch(0.58 0.17 200)",amazonq:"oklch(0.55 0.16 30)",minimax:"oklch(0.60 0.18 60)",zhipu:"oklch(0.55 0.15 180)"};function cN(l){const o=l?.toLowerCase()||"";for(const[c,u]of Object.entries(iN))if(o.includes(c))return u;return"oklch(0.55 0.15 220)"}function tl(l){return l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toString()}function uN(l){if(!l)return"N/A";const o=new Date(l),u=new Date().getTime()-o.getTime(),d=Math.floor(u/(1e3*60*60)),m=Math.floor(u/(1e3*60));return d>=24?`${Math.floor(d/24)}d ago`:d>0?`${d}h ago`:m>0?`${m}m ago`:"just now"}function dN({account:l,maxTotalTokens:o}){const c=l.usage,u=(c?.total_input_tokens||0)+(c?.total_output_tokens||0),d=(c?.daily_input_tokens||0)+(c?.daily_output_tokens||0),m=cN(l.provider||l.type||""),x=o>0?u/o*100:0,g=l.email||l.label||l.name||l.id,v=l.provider||l.type||"unknown";return s.jsxs("div",{className:ve("relative p-4 rounded-lg border border-[var(--border-subtle)]","bg-[var(--bg-panel)] hover:border-transparent transition-all duration-200","group"),style:{"--provider-color":m},children:[s.jsx("div",{className:"absolute inset-0 rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{boxShadow:`0 0 20px color-mix(in oklch, ${m} 20%, transparent), inset 0 0 15px color-mix(in oklch, ${m} 5%, transparent)`}}),s.jsx("div",{className:"absolute inset-0 rounded-lg border-2 opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none",style:{borderColor:m}}),s.jsx("div",{className:"relative flex items-start justify-between mb-3",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("span",{className:"inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",style:{background:`color-mix(in oklch, ${m} 20%, transparent)`,color:m},children:v}),l.status&&s.jsx("span",{className:ve("inline-flex px-1.5 py-0.5 rounded text-[10px] font-semibold uppercase tracking-wider",l.status==="active"||l.status==="ok"?"bg-[var(--status-online)]/15 text-[var(--status-online)]":"bg-[var(--text-muted)]/15 text-[var(--text-muted)]"),children:l.status})]}),s.jsx("p",{className:"text-sm font-medium text-[var(--text-primary)] truncate",title:g,children:g})]})}),s.jsxs("div",{className:"relative grid grid-cols-2 gap-3 mb-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[s.jsx(br,{className:"h-3 w-3"}),"Requests"]}),s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:c?.request_count?.toLocaleString()||0})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] uppercase tracking-wider text-[var(--text-muted)]",children:[s.jsx(Ra,{className:"h-3 w-3"}),"Total Tokens"]}),s.jsx("div",{className:"text-lg font-bold text-[var(--text-primary)]",children:tl(u)})]})]}),s.jsxs("div",{className:"relative mb-3",children:[s.jsxs("div",{className:"flex justify-between text-[10px] text-[var(--text-muted)] mb-1",children:[s.jsxs("span",{children:["In: ",tl(c?.total_input_tokens||0)]}),s.jsxs("span",{children:["Out: ",tl(c?.total_output_tokens||0)]})]}),s.jsx("div",{className:"h-2 w-full rounded-full bg-[var(--bg-elevated)] overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${Math.max(x,2)}%`,background:`linear-gradient(90deg, ${m}, color-mix(in oklch, ${m} 70%, white))`,boxShadow:`0 0 8px ${m}`}})})]}),s.jsx("div",{className:"relative border-t border-[var(--border-subtle)] pt-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-[var(--text-muted)]",children:[s.jsx(xr,{className:"h-3 w-3"}),"Daily: ",c?.daily_request_count||0," reqs, ",tl(d)," tokens"]}),s.jsxs("div",{className:"text-[10px] text-[var(--text-muted)]",children:["Reset ",uN(c?.day_started_at)]})]})})]})}function fN(){const{mgmtFetch:l,status:o}=vt(),[c,u]=w.useState([]),[d,m]=w.useState(!0),[x,g]=w.useState(null),v=o?.running??!1,p=async()=>{if(!v){u([]),m(!1);return}try{const S=(await l("/v0/management/auth-files")).files||[];u(S),g(null)}catch(j){console.error("Failed to fetch auth files:",j),g(j instanceof Error?j.message:String(j))}finally{m(!1)}};w.useEffect(()=>{p();const j=setInterval(p,3e4);return()=>clearInterval(j)},[v]);const y=Math.max(...c.map(j=>(j.usage?.total_input_tokens||0)+(j.usage?.total_output_tokens||0)),1),h=c.reduce((j,S)=>({requests:j.requests+(S.usage?.request_count||0),inputTokens:j.inputTokens+(S.usage?.total_input_tokens||0),outputTokens:j.outputTokens+(S.usage?.total_output_tokens||0),dailyRequests:j.dailyRequests+(S.usage?.daily_request_count||0)}),{requests:0,inputTokens:0,outputTokens:0,dailyRequests:0});return d&&c.length===0?s.jsx("div",{className:"flex h-64 items-center justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):v?x&&c.length===0?s.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-6 text-center",children:[s.jsx("p",{className:"text-red-300",children:"Failed to load account usage"}),s.jsx("p",{className:"mt-2 text-xs text-red-400/70",children:x})]}):c.length===0?s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Au,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx(Da,{children:"Per-account usage statistics"})]}),s.jsx(ft,{children:s.jsx("div",{className:"py-8 text-center text-sm text-muted-foreground",children:"No accounts configured. Add providers in the Providers tab."})})]}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{className:"pb-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Au,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx("button",{onClick:()=>{m(!0),p()},className:"p-1.5 rounded-md hover:bg-[var(--bg-elevated)] transition-colors",title:"Refresh",children:s.jsx(Qt,{className:ve("h-4 w-4 text-[var(--text-muted)]",d&&"animate-spin")})})]}),s.jsxs(Da,{children:[c.length," account",c.length!==1?"s":""," across all providers"]})]}),s.jsx(ft,{children:s.jsxs("div",{className:"grid gap-4 md:grid-cols-4",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Total Requests"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:h.requests.toLocaleString()})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Input Tokens"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:tl(h.inputTokens)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Output Tokens"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:tl(h.outputTokens)})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("p",{className:"text-xs text-[var(--text-muted)] uppercase tracking-wider",children:"Today's Requests"}),s.jsx("p",{className:"text-2xl font-bold text-[var(--text-primary)]",children:h.dailyRequests.toLocaleString()})]})]})})]}),s.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:"repeat(auto-fill, minmax(280px, 1fr))"},children:c.map(j=>s.jsx(dN,{account:j,maxTotalTokens:y},j.id))})]}):s.jsxs(dt,{className:"backdrop-blur-sm bg-card/60 border-border/50 shadow-xl",children:[s.jsxs(gt,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Au,{className:"h-4 w-4 text-muted-foreground"}),s.jsx(zt,{className:"text-lg",children:"Account Usage"})]}),s.jsx(Da,{children:"Per-account usage statistics"})]}),s.jsx(ft,{children:s.jsx("div",{className:"p-4 rounded-lg border border-yellow-500/30 bg-yellow-500/5 text-yellow-500 text-xs text-center uppercase tracking-widest font-mono",children:"Start the proxy engine to view account usage"})})]})}const mN={low:{icon:s.jsx(Ra,{className:"h-4 w-4"}),label:"Low",description:"2,048 tokens - Fast, minimal reasoning",color:"text-amber-400"},medium:{icon:s.jsx($u,{className:"h-4 w-4"}),label:"Medium",description:"8,192 tokens - Balanced reasoning",color:"text-blue-400"},high:{icon:s.jsx(rx,{className:"h-4 w-4"}),label:"High",description:"32,768 tokens - Deep reasoning",color:"text-purple-400"},custom:{icon:s.jsx(Pw,{className:"h-4 w-4"}),label:"Custom",description:"Set your own token budget",color:"text-emerald-400"}};function hN(){const{mgmtFetch:l,showToast:o,status:c,isMgmtLoading:u}=vt(),[d,m]=w.useState(null),[x,g]=w.useState("medium"),[v,p]=w.useState(16e3),[y,h]=w.useState(!0),[j,S]=w.useState(!1),[M,A]=w.useState(!1),U=c?.running??!1,k=w.useCallback(async()=>{try{const E=await l("/v0/management/thinking-budget");m(E),g(E.mode||"medium"),p(E.custom_tokens||16e3),h(E.enabled!==!1),S(!1)}catch(E){E instanceof et||console.error("Failed to fetch thinking budget:",E)}},[l]);w.useEffect(()=>{U&&k()},[U,k]);const Q=E=>{g(E),S(!0)},q=E=>{const L=parseInt(E,10);!isNaN(L)&&L>0&&(p(L),S(!0))},W=()=>{h(!y),S(!0)},Z=async()=>{A(!0);try{await l("/v0/management/thinking-budget",{method:"PUT",body:JSON.stringify({mode:x,custom_tokens:v,enabled:y})}),o("Thinking budget settings saved","success"),S(!1),await k()}catch(E){o(E instanceof Error?E.message:String(E),"error")}A(!1)},ee=()=>x==="custom"?v:d?.presets?.[x]||8192;return U?s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl",children:[s.jsxs(gt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yu,{className:`h-4 w-4 ${y?"text-[var(--accent-primary)]":"text-[var(--text-muted)]"}`}),s.jsx(zt,{className:"text-sm font-mono uppercase tracking-wider",children:"Thinking Budget"}),u&&s.jsx(Qt,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(we,{size:"sm",variant:"outline",onClick:k,disabled:u,className:"text-xs h-7 font-mono gap-1",children:[s.jsx(Qt,{className:"h-3 w-3"}),"REFRESH"]}),s.jsxs(we,{size:"sm",onClick:Z,disabled:!j||M,className:`text-xs h-7 font-mono gap-1 ${j?"bg-[var(--accent-primary)] text-white":""}`,children:[M?s.jsx(Qt,{className:"h-3 w-3 animate-spin"}):s.jsx(nl,{className:"h-3 w-3"}),"SAVE"]})]})]}),s.jsx(Da,{className:"text-xs text-[var(--text-muted)]",children:"Configure default thinking budget for reasoning models (Claude, Gemini with thinking)"})]}),s.jsxs(ft,{className:"p-4 space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)]",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-mono text-sm text-[var(--text-primary)]",children:"Enable Thinking"}),s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Allow models to use extended reasoning"})]}),s.jsx("button",{onClick:W,className:`relative w-12 h-6 rounded-full transition-colors ${y?"bg-[var(--accent-primary)]":"bg-[var(--bg-elevated)]"}`,children:s.jsx("span",{className:`absolute top-1 w-4 h-4 rounded-full bg-white transition-transform ${y?"left-7":"left-1"}`})})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase tracking-wider",children:"Budget Preset"}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2",children:Object.entries(mN).map(([E,L])=>s.jsxs("button",{onClick:()=>Q(E),disabled:!y,className:`relative p-3 rounded-lg border transition-all text-left ${x===E?"border-[var(--accent-primary)] bg-[var(--accent-primary)]/10":"border-[var(--border-subtle)] bg-[var(--bg-panel)] hover:border-[var(--border-default)]"} ${y?"":"opacity-50 cursor-not-allowed"}`,children:[x===E&&s.jsx("div",{className:"absolute top-2 right-2",children:s.jsx(rl,{className:"h-3 w-3 text-[var(--accent-primary)]"})}),s.jsxs("div",{className:`flex items-center gap-2 ${L.color}`,children:[L.icon,s.jsx("span",{className:"font-mono text-sm font-bold",children:L.label})]}),s.jsx("div",{className:"text-[10px] text-[var(--text-muted)] mt-1",children:L.description})]},E))})]}),x==="custom"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"block text-[10px] font-mono text-[var(--text-muted)] uppercase tracking-wider",children:"Custom Token Budget"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"number",value:v,onChange:E=>q(E.target.value),disabled:!y,min:1024,max:128e3,step:1024,className:"flex-1 px-3 py-2 rounded-lg border border-[var(--border-default)] bg-[var(--bg-elevated)] font-mono text-sm disabled:opacity-50"}),s.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"tokens"})]}),s.jsx("div",{className:"text-[10px] text-[var(--text-muted)]",children:"Recommended range: 1,024 - 128,000 tokens"})]}),s.jsx("div",{className:"p-3 rounded-lg bg-[var(--bg-elevated)] border border-[var(--border-subtle)]",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:"text-xs text-[var(--text-muted)]",children:"Effective Thinking Budget"}),s.jsxs("div",{className:`font-mono text-lg font-bold ${y?"text-[var(--accent-primary)]":"text-[var(--text-muted)]"}`,children:[y?ee().toLocaleString():"0"," ",s.jsx("span",{className:"text-xs font-normal",children:"tokens"})]})]})}),s.jsxs("div",{className:"text-xs text-[var(--text-muted)] p-3 rounded-lg bg-[var(--bg-panel)] border border-[var(--border-subtle)]",children:[s.jsx("strong",{children:"Note:"})," Thinking budget applies to models that support extended reasoning, including Claude with thinking mode and Gemini Pro/Flash with thinking enabled. Higher budgets allow for more thorough reasoning but consume more tokens."]})]})]}):s.jsxs(dt,{className:"backdrop-blur-sm bg-[var(--bg-void)] border-[var(--border-default)] shadow-xl",children:[s.jsx(gt,{className:"pb-3 border-b border-[var(--border-subtle)] bg-[var(--bg-panel)]",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yu,{className:"h-4 w-4 text-[var(--text-muted)]"}),s.jsx(zt,{className:"text-sm font-mono uppercase tracking-wider",children:"Thinking Budget"})]})}),s.jsx(ft,{className:"p-8 text-center text-[var(--text-muted)]",children:s.jsx("p",{className:"text-xs uppercase tracking-widest",children:"Engine Offline"})})]})}const Aa=l=>l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}K`:l.toLocaleString(),K0=(l,o)=>{const c=l+o;return c===0?"0%":`${(l/c*100).toFixed(1)}%`};function pN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState(null),[g,v]=w.useState(null),[p,y]=w.useState([]),[h,j]=w.useState(!0),[S,M]=w.useState(!1),A=u?.running??!1,U=w.useCallback(async()=>{if(A)try{j(!0);const[Z,ee,E]=await Promise.all([o("/v0/management/cache/stats"),o("/v0/management/prompt-cache/stats"),o("/v0/management/prompt-cache/top")]);x(Z),v(ee),y(E.prompts||[])}catch(Z){Z instanceof et||c(Z instanceof Error?Z.message:String(Z),"error")}finally{j(!1)}},[o,c,A]),k=async Z=>{try{await o("/v0/management/cache/enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:Z})}),x(ee=>ee?{...ee,enabled:Z}:null),c(`Response cache ${Z?"enabled":"disabled"}`,"success")}catch(ee){c(ee instanceof Error?ee.message:String(ee),"error")}},Q=async()=>{try{await o("/v0/management/cache/clear",{method:"POST"}),await U(),c("Response cache cleared","success")}catch(Z){c(Z instanceof Error?Z.message:String(Z),"error")}},q=async Z=>{try{await o("/v0/management/prompt-cache/enabled",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:Z})}),v(ee=>ee?{...ee,enabled:Z}:null),c(`Prompt cache ${Z?"enabled":"disabled"}`,"success")}catch(ee){c(ee instanceof Error?ee.message:String(ee),"error")}},W=async()=>{try{await o("/v0/management/prompt-cache/clear",{method:"POST"}),await U(),c("Prompt cache cleared","success")}catch(Z){c(Z instanceof Error?Z.message:String(Z),"error")}};return w.useEffect(()=>{if(l&&A){U();const Z=setInterval(U,15e3);return()=>clearInterval(Z)}else A||(x(null),v(null),y([]))},[l,A,U]),l?s.jsxs("div",{className:"bg-gradient-to-b from-zinc-900 to-black border border-cyan-500/40 rounded-lg shadow-2xl shadow-cyan-500/10 overflow-hidden",children:[s.jsx("div",{className:"bg-gradient-to-r from-cyan-950/80 via-cyan-900/60 to-cyan-950/80 border-b border-cyan-500/40 px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ur,{className:ve("h-5 w-5",A?"text-cyan-400":"text-muted")}),s.jsx("span",{className:"text-sm font-mono font-bold text-cyan-300 uppercase tracking-widest",children:"Cache Statistics"}),d&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-cyan-500/60"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:U,disabled:!A,className:"gap-1.5 text-xs font-mono bg-cyan-500/10 hover:bg-cyan-500/20 text-cyan-300 border border-cyan-500/30",children:[s.jsx(Qt,{className:"h-3 w-3"}),"REFRESH"]})]})}),s.jsxs("div",{className:"p-4 space-y-6",children:[!A&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground border border-dashed border-cyan-500/20 rounded bg-black/20",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to view cache statistics"})]}),A&&h&&!m&&s.jsx("div",{className:"py-8 flex justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin text-cyan-500/60"})}),A&&m&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hw,{className:"h-4 w-4 text-cyan-400"}),s.jsx("span",{className:"text-xs font-mono text-cyan-300 uppercase tracking-wider",children:"Response Cache"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"response-cache-toggle",checked:m.enabled,onCheckedChange:k}),s.jsx($t,{htmlFor:"response-cache-toggle",className:"text-xs font-mono text-cyan-300 cursor-pointer",children:m.enabled?"ON":"OFF"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:Q,disabled:m.size===0,className:"gap-1 text-xs font-mono bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsx(Ma,{label:"Entries",value:Aa(m.size),icon:s.jsx(ur,{className:"h-4 w-4"})}),s.jsx(Ma,{label:"Hits",value:Aa(m.hits),icon:s.jsx(Ra,{className:"h-4 w-4"}),accent:"green"}),s.jsx(Ma,{label:"Misses",value:Aa(m.misses),icon:s.jsx(Cu,{className:"h-4 w-4"})}),s.jsx(Ma,{label:"Hit Rate",value:K0(m.hits,m.misses),icon:s.jsx(H0,{className:"h-4 w-4"}),accent:"green"}),s.jsx(Ma,{label:"Tokens Saved",value:Aa(m.total_saved),icon:s.jsx(Ra,{className:"h-4 w-4"}),accent:"amber"})]})]}),g&&s.jsxs("div",{className:"space-y-4 pt-4 border-t border-cyan-500/20",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Cu,{className:"h-4 w-4 text-purple-400"}),s.jsx("span",{className:"text-xs font-mono text-purple-300 uppercase tracking-wider",children:"Prompt Cache"})]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(cl,{id:"prompt-cache-toggle",checked:g.enabled,onCheckedChange:q}),s.jsx($t,{htmlFor:"prompt-cache-toggle",className:"text-xs font-mono text-purple-300 cursor-pointer",children:g.enabled?"ON":"OFF"})]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:W,disabled:g.size===0,className:"gap-1 text-xs font-mono bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30",children:[s.jsx(il,{className:"h-3 w-3"}),"CLEAR"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsx(Ma,{label:"Entries",value:Aa(g.size),icon:s.jsx(ur,{className:"h-4 w-4"}),color:"purple"}),s.jsx(Ma,{label:"Hits",value:Aa(g.hits),icon:s.jsx(Ra,{className:"h-4 w-4"}),color:"purple",accent:"green"}),s.jsx(Ma,{label:"Misses",value:Aa(g.misses),icon:s.jsx(Cu,{className:"h-4 w-4"}),color:"purple"}),s.jsx(Ma,{label:"Hit Rate",value:K0(g.hits,g.misses),icon:s.jsx(H0,{className:"h-4 w-4"}),color:"purple",accent:"green"}),s.jsx(Ma,{label:"Tokens Saved",value:Aa(g.estimated_tokens_saved),icon:s.jsx(Ra,{className:"h-4 w-4"}),color:"purple",accent:"amber"})]}),Object.keys(g.top_providers||{}).length>0&&s.jsxs("div",{className:"bg-black/40 border border-purple-500/20 rounded p-3",children:[s.jsx("span",{className:"text-xs font-mono text-purple-500/60 uppercase",children:"Hits by Provider"}),s.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:Object.entries(g.top_providers).map(([Z,ee])=>s.jsxs("span",{className:"px-2 py-1 text-xs font-mono bg-purple-500/20 text-purple-300 rounded",children:[Z,": ",Aa(ee)]},Z))})]}),p.length>0&&s.jsxs("div",{className:"border border-purple-500/30 rounded bg-black/40",children:[s.jsxs("button",{onClick:()=>M(!S),className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-purple-500/10 transition-colors",children:[S?s.jsx(cn,{className:"h-4 w-4 text-purple-400"}):s.jsx(hr,{className:"h-4 w-4 text-purple-400"}),s.jsx("span",{className:"text-xs font-mono text-purple-300 uppercase tracking-wider",children:"Top Cached Prompts"}),s.jsx("span",{className:"ml-auto text-xs font-mono bg-purple-500/20 text-purple-300 px-2 py-0.5 rounded",children:p.length})]}),S&&s.jsx("div",{className:"px-3 pb-3",children:s.jsx("div",{className:"bg-black/60 border border-purple-500/20 rounded max-h-48 overflow-auto",children:s.jsx("div",{className:"divide-y divide-purple-500/10",children:p.map(Z=>s.jsx("div",{className:"px-3 py-2 hover:bg-purple-500/5",children:s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-purple-200/80 break-words flex-1",children:Z.prompt_preview}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s.jsxs("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-green-500/20 text-green-300",children:[Z.hit_count," hits"]}),s.jsxs("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-300",children:["~",Aa(Z.token_estimate)," tok"]})]})]})},Z.hash))})})})]})]})]})]})]}):null}function Ma({label:l,value:o,icon:c,color:u="cyan",accent:d}){const m=u==="purple"?"border-purple-500/30":"border-cyan-500/30",x=u==="purple"?"text-purple-500/60":"text-cyan-500/60",g=u==="purple"?"text-purple-400":"text-cyan-400";let v=u==="purple"?"text-purple-200":"text-cyan-200";return d==="green"&&(v="text-green-400"),d==="amber"&&(v="text-amber-400"),s.jsxs("div",{className:ve("bg-black/40 border rounded p-3",m),children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[s.jsx("span",{className:g,children:c}),s.jsx("span",{className:ve("text-xs font-mono uppercase",x),children:l})]}),s.jsx("div",{className:ve("text-lg font-mono font-bold",v),children:o})]})}function xN(){const{mgmtKey:l,mgmtFetch:o,showToast:c,status:u,isMgmtLoading:d}=vt(),[m,x]=w.useState(null),[g,v]=w.useState(!0),[p,y]=w.useState(!1),h=u?.running??!1,j=w.useCallback(async()=>{if(h)try{v(!0);const A=await o("/v0/management/rate-limits/summary");x(A)}catch(A){A instanceof et||c(A instanceof Error?A.message:String(A),"error")}finally{v(!1)}},[o,c,h]),S=async A=>{try{await o("/v0/management/auth/reset-cooldown",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A?{auth_id:A}:{})}),await j(),c(A?"Cooldown reset for credential":"All cooldowns reset","success")}catch(U){c(U instanceof Error?U.message:String(U),"error")}};if(w.useEffect(()=>{if(l&&h){j();const A=setInterval(j,1e4);return()=>clearInterval(A)}else h||x(null)},[l,h,j]),!l)return null;const M=m&&m.total>0?m.available/m.total*100:0;return s.jsxs("div",{className:"bg-gradient-to-b from-zinc-900 to-black border border-orange-500/40 rounded-lg shadow-2xl shadow-orange-500/10 overflow-hidden",children:[s.jsx("div",{className:"bg-gradient-to-r from-orange-950/80 via-orange-900/60 to-orange-950/80 border-b border-orange-500/40 px-4 py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx($u,{className:ve("h-5 w-5",h?"text-orange-400":"text-muted")}),s.jsx("span",{className:"text-sm font-mono font-bold text-orange-300 uppercase tracking-widest",children:"Rate Limits"}),d&&s.jsx(mt,{className:"h-4 w-4 animate-spin text-orange-500/60"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[m&&m.cooling_down>0&&s.jsxs(we,{size:"sm",variant:"ghost",onClick:()=>S(),className:"gap-1.5 text-xs font-mono bg-amber-500/10 hover:bg-amber-500/20 text-amber-300 border border-amber-500/30",children:[s.jsx(Ra,{className:"h-3 w-3"}),"RESET ALL"]}),s.jsxs(we,{size:"sm",variant:"ghost",onClick:j,disabled:!h,className:"gap-1.5 text-xs font-mono bg-orange-500/10 hover:bg-orange-500/20 text-orange-300 border border-orange-500/30",children:[s.jsx(Qt,{className:"h-3 w-3"}),"REFRESH"]})]})]})}),s.jsxs("div",{className:"p-4 space-y-4",children:[!h&&s.jsxs("div",{className:"py-8 text-center text-muted-foreground border border-dashed border-orange-500/20 rounded bg-black/20",children:[s.jsx("p",{className:"text-sm uppercase tracking-widest font-mono",children:"Engine Offline"}),s.jsx("p",{className:"text-xs mt-1",children:"Start the proxy engine to view rate limit status"})]}),h&&g&&!m&&s.jsx("div",{className:"py-8 flex justify-center",children:s.jsx(mt,{className:"h-8 w-8 animate-spin text-orange-500/60"})}),h&&m&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[s.jsx(Yo,{label:"Total",value:m.total.toString(),icon:s.jsx($u,{className:"h-4 w-4"})}),s.jsx(Yo,{label:"Available",value:m.available.toString(),icon:s.jsx(si,{className:"h-4 w-4"}),accent:m.available>0?"green":"red"}),s.jsx(Yo,{label:"Cooling Down",value:m.cooling_down.toString(),icon:s.jsx(xr,{className:"h-4 w-4"}),accent:m.cooling_down>0?"amber":void 0}),s.jsx(Yo,{label:"Disabled",value:m.disabled.toString(),icon:s.jsx(cd,{className:"h-4 w-4"}),accent:m.disabled>0?"red":void 0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between text-xs font-mono",children:[s.jsx("span",{className:"text-orange-300/60 uppercase",children:"Availability"}),s.jsxs("span",{className:ve("font-bold",M>=50?"text-green-400":M>0?"text-amber-400":"text-red-400"),children:[M.toFixed(0),"%"]})]}),s.jsx("div",{className:"h-3 w-full overflow-hidden rounded-full bg-black/60 border border-orange-500/20",children:s.jsxs("div",{className:"h-full flex",children:[s.jsx("div",{className:"h-full bg-green-500/70 transition-all",style:{width:`${m.available/Math.max(m.total,1)*100}%`}}),s.jsx("div",{className:"h-full bg-amber-500/70 transition-all",style:{width:`${m.cooling_down/Math.max(m.total,1)*100}%`}}),s.jsx("div",{className:"h-full bg-red-500/70 transition-all",style:{width:`${m.disabled/Math.max(m.total,1)*100}%`}})]})}),s.jsxs("div",{className:"flex items-center justify-center gap-4 text-xs font-mono text-muted-foreground",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-green-500/70"}),"Available"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-amber-500/70"}),"Cooling"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-red-500/70"}),"Disabled"]})]})]}),m.next_recovery_in&&s.jsxs("div",{className:"flex items-center justify-center gap-2 py-2 px-3 bg-amber-500/10 border border-amber-500/20 rounded text-xs font-mono text-amber-300",children:[s.jsx(xr,{className:"h-3 w-3"}),"Next credential recovers in: ",m.next_recovery_in]}),m.credentials&&m.credentials.length>0&&s.jsxs("div",{className:"border border-orange-500/30 rounded bg-black/40",children:[s.jsxs("button",{onClick:()=>y(!p),className:"w-full flex items-center gap-2 px-3 py-2 text-left hover:bg-orange-500/10 transition-colors",children:[p?s.jsx(cn,{className:"h-4 w-4 text-orange-400"}):s.jsx(hr,{className:"h-4 w-4 text-orange-400"}),s.jsx("span",{className:"text-xs font-mono text-orange-300 uppercase tracking-wider",children:"Credential Details"}),s.jsx("span",{className:"ml-auto text-xs font-mono bg-orange-500/20 text-orange-300 px-2 py-0.5 rounded",children:m.credentials.length})]}),p&&s.jsx("div",{className:"px-3 pb-3",children:s.jsx("div",{className:"bg-black/60 border border-orange-500/20 rounded max-h-64 overflow-auto",children:s.jsx("div",{className:"divide-y divide-orange-500/10",children:m.credentials.map(A=>s.jsx("div",{className:"px-3 py-2 hover:bg-orange-500/5",children:s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[s.jsx(gN,{status:A.status}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx("span",{className:"text-xs font-mono text-orange-200 truncate",children:A.label||A.id.substring(0,8)}),s.jsx("span",{className:"text-xs font-mono text-muted-foreground capitalize",children:A.provider})]})]}),s.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[A.cooldown_remaining&&s.jsx("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-300",children:A.cooldown_remaining}),s.jsxs("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded bg-blue-500/20 text-blue-300",children:[A.requests_today," today"]}),A.status==="cooling_down"&&s.jsx(we,{size:"sm",variant:"ghost",onClick:()=>S(A.id),className:"h-6 px-2 text-xs font-mono bg-amber-500/10 hover:bg-amber-500/20 text-amber-300 border border-amber-500/30",children:s.jsx(Ra,{className:"h-3 w-3"})})]})]})},A.id))})})})]})]})]})]})}function gN({status:l}){switch(l){case"available":return s.jsx(si,{className:"h-4 w-4 text-green-400"});case"cooling_down":return s.jsx(xr,{className:"h-4 w-4 text-amber-400"});case"disabled":return s.jsx(cd,{className:"h-4 w-4 text-red-400"});default:return s.jsx(pr,{className:"h-4 w-4 text-muted-foreground"})}}function Yo({label:l,value:o,icon:c,accent:u}){let d="text-orange-200";return u==="green"&&(d="text-green-400"),u==="amber"&&(d="text-amber-400"),u==="red"&&(d="text-red-400"),s.jsxs("div",{className:"bg-black/40 border border-orange-500/30 rounded p-3",children:[s.jsxs("div",{className:"flex items-center gap-1.5 mb-1",children:[s.jsx("span",{className:"text-orange-400",children:c}),s.jsx("span",{className:"text-xs font-mono uppercase text-orange-500/60",children:l})]}),s.jsx("div",{className:ve("text-lg font-mono font-bold",d),children:o})]})}function vN(){const[l,o]=w.useState(()=>typeof window>"u"?"dark":localStorage.getItem("pp-theme")||"dark");return w.useEffect(()=>{const u=document.documentElement,d=window.matchMedia("(prefers-color-scheme: dark)").matches,m=l==="system"?d?"dark":"light":l;u.classList.remove("light","dark"),u.classList.add(m),localStorage.setItem("pp-theme",l)},[l]),w.useEffect(()=>{if(l!=="system")return;const u=window.matchMedia("(prefers-color-scheme: dark)"),d=m=>{const x=document.documentElement;x.classList.remove("light","dark"),x.classList.add(m.matches?"dark":"light")};return u.addEventListener("change",d),()=>u.removeEventListener("change",d)},[l]),{theme:l,setTheme:u=>{o(u)}}}function bN(){const{theme:l,setTheme:o}=vN(),c=()=>{o(l==="dark"?"light":l==="light"?"system":"dark")};return s.jsxs(we,{variant:"ghost",size:"icon-sm",onClick:c,className:"text-muted-foreground hover:text-foreground",title:`Theme: ${l}`,children:[l==="dark"&&s.jsx(Cw,{className:"h-4 w-4"}),l==="light"&&s.jsx(lj,{className:"h-4 w-4"}),l==="system"&&s.jsx(Ew,{className:"h-4 w-4"})]})}function yN({isOpen:l,onClose:o}){const{mgmtFetch:c}=vt(),[u,d]=w.useState(!1),[m,x]=w.useState(!1),[g,v]=w.useState(null),[p,y]=w.useState("idle"),[h,j]=w.useState(0),[S,M]=w.useState(null);w.useEffect(()=>{(async()=>{try{if(window.pp_get_oauth_private){const E=await window.pp_get_oauth_private();d(E)}}catch(E){console.error("Failed to load OAuth private setting:",E)}})()},[]),w.useEffect(()=>{if(p!=="downloading")return;const L=setInterval(async()=>{try{let Y;if(c)Y=await c("/v0/management/updates/status");else return;if(Y.error){M(Y.error),y("available");return}Y.downloading?j(Y.progress?.percent||0):Y.ready&&(y("ready"),j(100))}catch(Y){console.error("Failed to poll update status:",Y)}},500);return()=>clearInterval(L)},[p,c]);const A=async E=>{try{window.pp_set_oauth_private&&(await window.pp_set_oauth_private(E),d(E),St.success(E?"Private browsing enabled":"Private browsing disabled"))}catch(L){St.error(L instanceof Error?L.message:String(L))}},U=async()=>{try{window.pp_open_logs&&(await window.pp_open_logs(),St.success("Opened logs folder"))}catch(E){St.error(E instanceof Error?E.message:String(E))}},k=async()=>{try{window.pp_open_auth_folder&&(await window.pp_open_auth_folder(),St.success("Opened auth folder"))}catch(E){St.error(E instanceof Error?E.message:String(E))}},Q=async()=>{try{window.pp_copy_diagnostics&&(await window.pp_copy_diagnostics(),St.success("Diagnostics copied to clipboard"))}catch(E){St.error(E instanceof Error?E.message:String(E))}},q=async()=>{x(!0),y("checking"),M(null);try{let E=null;window.pp_check_updates?E=await window.pp_check_updates():c&&(E=await c("/v0/management/updates/check")),v(E),E?.available?(y("available"),St.success(`Update available: v${E.version}`)):(y("idle"),St.success("You are on the latest version"))}catch(E){y("idle"),St.error(E instanceof Error?E.message:String(E))}finally{x(!1)}},W=async()=>{if(g?.version){y("downloading"),j(0),M(null);try{c?await c("/v0/management/updates/download",{method:"POST",body:JSON.stringify({version:g.version})}):window.pp_download_update&&(await window.pp_download_update(g.download_url),y("available"),St.success("Opening download page..."))}catch(E){y("available"),M(E instanceof Error?E.message:String(E)),St.error(E instanceof Error?E.message:String(E))}}},Z=async()=>{y("installing");try{if(c){const E=await c("/v0/management/updates/install",{method:"POST"});if(E?.success)St.success(E.message||"Update installed! Restarting...");else throw new Error(E?.message||"Installation failed")}}catch(E){y("ready"),M(E instanceof Error?E.message:String(E)),St.error(E instanceof Error?E.message:String(E))}},ee=()=>{g?.download_url&&window.open(g.download_url,"_blank")};return l?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-40 animate-in fade-in duration-200",onClick:o}),s.jsxs("div",{className:ve("fixed right-0 top-0 bottom-0 w-80 z-50","bg-[var(--bg-panel)] border-l border-[var(--border-subtle)]","shadow-2xl","animate-in slide-in-from-right duration-300"),children:[s.jsxs("div",{className:ve("flex items-center justify-between px-5 py-4","border-b border-[var(--border-subtle)]"),children:[s.jsx("h2",{className:"text-sm font-bold uppercase tracking-[0.15em] text-[var(--text-primary)]",style:{fontFamily:"var(--font-display)"},children:"Settings"}),s.jsx(we,{variant:"ghost",size:"icon-sm",onClick:o,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)]",children:s.jsx(dd,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"p-5 space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Authentication"}),s.jsxs("div",{className:ve("flex items-center justify-between p-3 rounded-lg","bg-[var(--bg-elevated)] border border-[var(--border-subtle)]"),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[u?s.jsx(nx,{className:"h-4 w-4 text-[var(--accent-glow)]"}):s.jsx(ax,{className:"h-4 w-4 text-[var(--text-muted)]"}),s.jsxs("div",{children:[s.jsx($t,{htmlFor:"private-oauth",className:"text-sm text-[var(--text-primary)] cursor-pointer",children:"Private Browsing"}),s.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"Use InPrivate mode for OAuth"})]})]}),s.jsx(cl,{id:"private-oauth",checked:u,onCheckedChange:A})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Folders"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:U,children:[s.jsx(Vu,{className:"h-4 w-4"}),"Open Logs Folder"]}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:k,children:[s.jsx(Vu,{className:"h-4 w-4"}),"Open Auth Folder"]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Diagnostics"}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:Q,children:[s.jsx(J2,{className:"h-4 w-4"}),"Copy Diagnostics"]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"Updates"}),s.jsxs(we,{variant:"outline",className:"w-full justify-start gap-3",onClick:q,disabled:m||p==="downloading"||p==="installing",children:[m?s.jsx(mt,{className:"h-4 w-4 animate-spin"}):s.jsx(Qt,{className:"h-4 w-4"}),"Check for Updates"]}),(g||p!=="idle")&&s.jsxs("div",{className:ve("p-4 rounded-lg border text-sm space-y-3",p==="ready"||p==="installing"?"bg-emerald-500/10 border-emerald-500/30":g?.available?"bg-[var(--accent-primary)]/10 border-[var(--accent-primary)]/30":"bg-green-500/10 border-green-500/30"),children:[s.jsxs("div",{className:"flex items-start gap-2",children:[p==="ready"?s.jsx(ej,{className:"h-4 w-4 text-emerald-500 mt-0.5 shrink-0"}):p==="installing"?s.jsx(mt,{className:"h-4 w-4 text-emerald-500 mt-0.5 shrink-0 animate-spin"}):g?.available?s.jsx(pr,{className:"h-4 w-4 text-[var(--accent-primary)] mt-0.5 shrink-0"}):s.jsx(si,{className:"h-4 w-4 text-green-500 mt-0.5 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("p",{className:"font-medium text-[var(--text-primary)]",children:[p==="downloading"&&"Downloading...",p==="ready"&&`v${g?.version} ready to install`,p==="installing"&&"Installing update...",p==="available"&&`v${g?.version} available`,p==="idle"&&!g?.available&&"Up to date"]}),g?.release_notes&&!g?.available&&s.jsx("p",{className:"text-xs text-[var(--text-muted)] mt-1",children:g.release_notes})]})]}),p==="downloading"&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("div",{className:"h-2 w-full overflow-hidden rounded-full bg-[var(--bg-void)]",children:s.jsx("div",{className:"h-full bg-[var(--accent-primary)] transition-all duration-300",style:{width:`${h}%`}})}),s.jsxs("p",{className:"text-xs text-[var(--text-muted)] text-center",children:[h.toFixed(0),"% complete"]})]}),S&&s.jsx("div",{className:"p-2 rounded bg-red-500/10 border border-red-500/30 text-red-400 text-xs",children:S}),s.jsxs("div",{className:"flex gap-2",children:[p==="available"&&s.jsxs(s.Fragment,{children:[s.jsxs(we,{size:"sm",onClick:W,className:"flex-1 gap-2",children:[s.jsx(fs,{className:"h-3 w-3"}),"Download & Install"]}),s.jsx(we,{size:"sm",variant:"outline",onClick:ee,className:"gap-2",children:s.jsx(ex,{className:"h-3 w-3"})})]}),p==="ready"&&s.jsxs(we,{size:"sm",onClick:Z,className:"flex-1 gap-2 bg-emerald-600 hover:bg-emerald-500",children:[s.jsx(sx,{className:"h-3 w-3"}),"Install & Restart"]}),p==="installing"&&s.jsx("div",{className:"flex-1 text-center text-xs text-emerald-400",children:"Please wait, do not close the application..."})]})]})]}),s.jsx("div",{className:"pt-4 border-t border-[var(--border-subtle)]",children:s.jsx("p",{className:"text-xs text-center text-[var(--text-muted)]",style:{fontFamily:"var(--font-mono)"},children:"ProxyPilot v0.1.0"})})]})]})]}):null}function wN({isVisible:l}){return s.jsxs("svg",{viewBox:"0 0 200 12",className:ve("absolute left-0 bottom-0 w-full h-3 pointer-events-none","transition-opacity duration-300",l?"opacity-100":"opacity-0"),preserveAspectRatio:"none",children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"flightPathGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[s.jsx("stop",{offset:"0%",stopColor:"var(--accent-primary)",stopOpacity:"0"}),s.jsx("stop",{offset:"20%",stopColor:"var(--accent-primary)",stopOpacity:"0.6"}),s.jsx("stop",{offset:"80%",stopColor:"var(--accent-glow)",stopOpacity:"0.8"}),s.jsx("stop",{offset:"100%",stopColor:"var(--accent-glow)",stopOpacity:"0"})]})}),s.jsx("path",{d:"M0 6 Q25 2, 50 6 T100 6 T150 6 T200 6",fill:"none",stroke:"url(#flightPathGradient)",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"200",strokeDashoffset:l?"0":"200",className:"transition-all duration-1000 ease-out"}),[40,80,120,160].map(o=>s.jsx("circle",{cx:o,cy:"6",r:"1.5",fill:"var(--accent-glow)",className:ve("transition-all duration-500",l?"opacity-60":"opacity-0"),style:{transitionDelay:`${o*3}ms`}},o))]})}function jN({isRunning:l,port:o=8318,version:c="v0.1.0"}){const[u,d]=w.useState(!1),[m,x]=w.useState(!1);return s.jsxs(s.Fragment,{children:[s.jsx(yN,{isOpen:m,onClose:()=>x(!1)}),s.jsxs("header",{className:ve("relative h-16 flex items-center justify-between px-6","bg-[var(--bg-panel)] border-b border-[var(--border-subtle)]","before:absolute before:inset-0 before:pointer-events-none","before:bg-gradient-to-b before:from-white/[0.02] before:to-transparent"),children:[s.jsxs("div",{className:"relative flex items-center gap-4",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[s.jsx("div",{className:ve("relative w-11 h-11 flex items-center justify-center","rounded-lg overflow-hidden","shadow-[0_2px_0_0_oklch(0_0_0/0.2)]","transition-all duration-300",u&&"shadow-[0_0_20px_0_var(--accent-glow)]",l&&"animate-glow-pulse"),children:s.jsx("img",{src:"/logo.png",alt:"ProxyPilot",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"relative flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:ve("text-xl font-bold uppercase tracking-[0.2em]","text-[var(--text-primary)]","transition-colors duration-300"),style:{fontFamily:"var(--font-display)"},children:"PROXYPILOT"}),s.jsx("span",{className:ve("px-2 py-0.5 rounded text-[10px] font-medium uppercase tracking-wider","bg-[var(--bg-elevated)] border border-[var(--border-subtle)]","text-[var(--text-muted)]"),style:{fontFamily:"var(--font-mono)"},children:c})]}),s.jsx(wN,{isVisible:u})]})]}),s.jsx("div",{className:ve("hidden md:block h-8 w-px mx-4","bg-gradient-to-b from-transparent via-[var(--border-default)] to-transparent")}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:ve("flex items-center gap-2.5 px-4 py-2 rounded-lg","font-medium text-sm tracking-wide","border transition-all duration-300",l?["bg-[oklch(0.72_0.19_145/0.08)]","border-[oklch(0.72_0.19_145/0.4)]","text-[oklch(0.72_0.19_145)]","shadow-[0_0_16px_0_oklch(0.72_0.19_145/0.25),inset_0_1px_0_0_oklch(0.72_0.19_145/0.1)]"].join(" "):["bg-[var(--bg-elevated)]","border-[var(--border-subtle)]","text-[var(--text-muted)]"].join(" ")),children:[s.jsxs("span",{className:"relative flex items-center justify-center",children:[l&&s.jsx("span",{className:ve("absolute w-4 h-4 rounded-full","bg-[oklch(0.72_0.19_145/0.3)]","animate-radar-pulse")}),s.jsx("span",{className:ve("relative w-2.5 h-2.5 rounded-full",l?"bg-[oklch(0.72_0.19_145)] shadow-[0_0_8px_0_oklch(0.72_0.19_145)]":"bg-[var(--text-muted)]")})]}),s.jsx("span",{className:"uppercase tracking-wider",style:{fontFamily:"var(--font-mono)"},children:l?"ONLINE":"OFFLINE"}),l&&s.jsxs("span",{className:ve("ml-1 px-1.5 py-0.5 rounded text-[10px]","bg-[oklch(0.72_0.19_145/0.15)]","text-[oklch(0.72_0.19_145/0.8)]"),style:{fontFamily:"var(--font-mono)"},children:[":",o]})]}),s.jsx("div",{className:ve("h-6 w-px","bg-[var(--border-subtle)]")}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(bN,{}),s.jsx(we,{variant:"ghost",size:"icon-sm",onClick:()=>x(!0),className:ve("text-[var(--text-muted)]","hover:text-[var(--text-primary)]","hover:bg-[var(--bg-active)]"),title:"Settings",children:s.jsx(Vo,{className:"h-4 w-4"})})]})]}),s.jsx("div",{className:ve("absolute bottom-0 left-0 right-0 h-px","bg-gradient-to-r from-transparent via-[var(--accent-primary)] to-transparent","opacity-20")})]})]})}const NN=[{id:"claude",name:"Claude"},{id:"gemini",name:"Gemini"},{id:"codex",name:"Codex"},{id:"qwen",name:"Qwen"},{id:"anthropic",name:"Anthropic"}];function SN(l){const o=Math.floor(l/3600),c=Math.floor(l%3600/60),u=l%60;return`${o.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}:${u.toString().padStart(2,"0")}`}function _N(l){return l.toLocaleString()}const EN=({version:l="v0.1.0",requestCount:o=0,providerStatus:c})=>{const{status:u,authFiles:d}=vt(),[m,x]=w.useState(0),[g]=w.useState(()=>Date.now()),v=w.useMemo(()=>c||{claude:d.some(h=>h.toLowerCase().includes("claude")),gemini:d.some(h=>h.toLowerCase().includes("gemini")),codex:d.some(h=>h.toLowerCase().includes("codex")),qwen:d.some(h=>h.toLowerCase().includes("qwen")),anthropic:d.some(h=>h.toLowerCase().includes("anthropic"))},[c,d]);w.useEffect(()=>{const h=setInterval(()=>{x(Math.floor((Date.now()-g)/1e3))},1e3);return()=>clearInterval(h)},[g]);const p=u?.running??!1,y=u?.port??8317;return s.jsxs("div",{className:"instrument-panel",children:[s.jsx("div",{className:"instrument-segment instrument-segment--providers",title:"Provider Status",children:s.jsx("div",{className:"provider-lights",children:NN.map(h=>s.jsx("span",{className:`provider-light ${v[h.id]?"provider-light--active":"provider-light--inactive"}`,title:`${h.name}: ${v[h.id]?"Connected":"Offline"}`},h.id))})}),s.jsxs("div",{className:"instrument-segment",title:"Proxy Port",children:[s.jsx("span",{className:"segment-label",children:"PORT"}),s.jsx("span",{className:"segment-value segment-value--accent",children:y})]}),s.jsxs("div",{className:"instrument-segment",title:"Session Uptime",children:[s.jsx("span",{className:"segment-label",children:"UPTIME"}),s.jsx("span",{className:"segment-value segment-value--uptime",children:SN(m)})]}),s.jsxs("div",{className:"instrument-segment",title:"Total Requests",children:[s.jsx("span",{className:"segment-label",children:"REQ"}),s.jsx("span",{className:"segment-value",children:_N(o)})]}),s.jsx("div",{className:"instrument-segment instrument-segment--version",title:"ProxyPilot Version",children:s.jsx("span",{className:"segment-value segment-value--muted",children:l})}),s.jsx("div",{className:"instrument-segment instrument-segment--status",title:"Proxy Status",children:s.jsxs("span",{className:`status-indicator ${p?"status-indicator--online":"status-indicator--offline"}`,children:[s.jsx("span",{className:"status-dot"}),s.jsx("span",{className:"status-text",children:p?"READY":"OFFLINE"})]})}),s.jsx("style",{children:` .instrument-panel { height: 30px; background: linear-gradient(to bottom, var(--bg-panel), var(--bg-void)); @@ -326,7 +326,7 @@ Error generating stack: `+n.message+` background: var(--border-default); opacity: 0.4; } - `})]})},$p=[{id:"command",icon:Yu,label:"Command",color:"var(--accent-primary)",shortcut:"Ctrl+1"},{id:"providers",icon:bw,label:"Providers",color:"var(--accent-glow)",shortcut:"Ctrl+2"},{id:"routing",icon:dw,label:"Routing",color:"var(--status-processing)",shortcut:"Ctrl+3"},{id:"memory",icon:ur,label:"Memory",color:"var(--accent-secondary)",shortcut:"Ctrl+4"},{id:"logs",icon:Qw,label:"Logs",color:"var(--text-secondary)",shortcut:"Ctrl+5"},{id:"requests",icon:xr,label:"Monitor",color:"var(--accent-glow)",shortcut:"Ctrl+6"},{id:"analytics",icon:Bu,label:"Analytics",color:"var(--accent-primary)",shortcut:"Ctrl+7"}];function SN({items:l,activeId:o,onSelect:c}){return s.jsxs("nav",{className:"relative flex flex-col items-center py-3 gap-1",style:{width:"64px",minWidth:"64px",height:"100%",backgroundColor:"var(--bg-panel)",borderRight:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-30",style:{backgroundImage:` + `})]})},J0=[{id:"command",icon:Xu,label:"Command",color:"var(--accent-primary)",shortcut:"Ctrl+1"},{id:"providers",icon:ww,label:"Providers",color:"var(--accent-glow)",shortcut:"Ctrl+2"},{id:"routing",icon:fw,label:"Routing",color:"var(--status-processing)",shortcut:"Ctrl+3"},{id:"memory",icon:ur,label:"Memory",color:"var(--accent-secondary)",shortcut:"Ctrl+4"},{id:"logs",icon:Zw,label:"Logs",color:"var(--text-secondary)",shortcut:"Ctrl+5"},{id:"requests",icon:br,label:"Monitor",color:"var(--accent-glow)",shortcut:"Ctrl+6"},{id:"analytics",icon:Gu,label:"Analytics",color:"var(--accent-primary)",shortcut:"Ctrl+7"}];function kN({items:l,activeId:o,onSelect:c}){return s.jsxs("nav",{className:"relative flex flex-col items-center py-3 gap-1",style:{width:"64px",minWidth:"64px",height:"100%",backgroundColor:"var(--bg-panel)",borderRight:"1px solid var(--border-subtle)"},children:[s.jsx("div",{className:"absolute inset-0 pointer-events-none opacity-30",style:{backgroundImage:` linear-gradient(to right, var(--border-subtle) 1px, transparent 1px), linear-gradient(to bottom, var(--border-subtle) 1px, transparent 1px) `,backgroundSize:"8px 8px"}}),s.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 pointer-events-none opacity-20",style:{top:"12px",bottom:"12px",width:"2px",background:`repeating-linear-gradient( @@ -335,4 +335,4 @@ Error generating stack: `+n.message+` var(--border-default) 8px, transparent 8px, transparent 16px - )`}}),l.map(u=>{const d=u.id===o,m=u.icon,x=u.color||"var(--text-muted)";return s.jsxs("div",{className:"relative group z-10",children:[s.jsxs("button",{onClick:()=>c(u.id),className:be("relative flex items-center justify-center transition-all duration-300 ease-out","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","group-hover:scale-105"),style:{width:"48px",height:"48px",borderRadius:"8px",backgroundColor:d?`color-mix(in srgb, ${x} 15%, transparent)`:"transparent",boxShadow:d?`inset 0 0 12px color-mix(in srgb, ${x} 20%, transparent)`:"none"},"aria-label":u.label,"aria-current":d?"page":void 0,children:[d&&s.jsx("span",{className:"absolute left-0 top-0 bottom-0 rounded-r-sm animate-glow-pulse",style:{width:"3px",backgroundColor:x,boxShadow:`0 0 8px ${x}, 0 0 16px ${x}`}}),s.jsx("div",{className:be("relative flex items-center justify-center transition-all duration-300",d&&"animate-signal-pulse","group-hover:scale-110"),style:{filter:d?`drop-shadow(0 0 8px ${x})`:"none"},children:s.jsx(m,{size:20,className:"transition-all duration-300",style:{color:d?x:"var(--text-muted)",filter:d?void 0:"drop-shadow(0 0 0px transparent)"}})}),s.jsx("span",{className:be("absolute inset-0 rounded-lg transition-all duration-300","opacity-0 group-hover:opacity-100",d&&"group-hover:opacity-0"),style:{backgroundColor:"var(--bg-elevated)",boxShadow:`0 0 15px color-mix(in srgb, ${x} 15%, transparent), inset 0 0 8px color-mix(in srgb, ${x} 10%, transparent)`}})]}),s.jsx("div",{className:be("absolute left-full top-1/2 -translate-y-1/2 ml-3","opacity-0 invisible group-hover:opacity-100 group-hover:visible","transition-all duration-200 ease-out","pointer-events-none z-50"),children:s.jsxs("div",{className:"relative px-3 py-2 rounded",style:{backgroundColor:"var(--bg-void)",border:"1px solid var(--accent-glow)",boxShadow:"0 0 12px color-mix(in srgb, var(--accent-glow) 30%, transparent), 0 4px 16px rgba(0, 0, 0, 0.4)"},children:[s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",style:{fontFamily:"var(--font-mono)",fontSize:"11px",fontWeight:600,letterSpacing:"0.05em",color:"var(--text-primary)"},children:[s.jsx("span",{style:{color:x},children:"▸"}),s.jsx("span",{children:u.label.toUpperCase()})]}),u.shortcut&&s.jsx("div",{className:"whitespace-nowrap",style:{fontFamily:"var(--font-mono)",fontSize:"9px",color:"var(--text-muted)",letterSpacing:"0.02em",paddingLeft:"14px"},children:u.shortcut})]}),s.jsx("span",{className:"absolute right-full top-1/2 -translate-y-1/2",style:{width:0,height:0,borderTop:"6px solid transparent",borderBottom:"6px solid transparent",borderRight:"6px solid var(--accent-glow)"}}),s.jsx("span",{className:"absolute right-full top-1/2 -translate-y-1/2",style:{width:0,height:0,marginRight:"-1px",borderTop:"5px solid transparent",borderBottom:"5px solid transparent",borderRight:"5px solid var(--bg-void)"}})]})})]},u.id)})]})}function _N(){const{status:l,isDesktop:o,mgmtKey:c}=St(),[u,d]=w.useState("command"),m=l?.running??!1;w.useEffect(()=>{const g=v=>{if(v.ctrlKey&&v.key>="1"&&v.key<="7"){v.preventDefault();const p=parseInt(v.key,10)-1,b=$p[p];b&&d(b.id)}};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[]);const x=()=>{switch(u){case"command":return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid gap-6 lg:grid-cols-2",children:s.jsx(bj,{})}),s.jsx(Kj,{})]});case"providers":return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Xj,{}),!o&&!c&&s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key missing. Start ProxyPilot from the tray app to inject a local key, or set `MANAGEMENT_PASSWORD` before loading this page."})]});case"routing":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(Pj,{}),s.jsx(mN,{}),s.jsx(sN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access routing settings."})});case"memory":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(eN,{}),s.jsx(nN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access memory settings."})});case"logs":return s.jsx("div",{className:"space-y-6",children:c?s.jsx(Wj,{}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access logs."})});case"requests":return s.jsx("div",{className:"space-y-6",children:c?s.jsx(lN,{}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access request monitor."})});case"analytics":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(hN,{}),s.jsx(rN,{}),s.jsx(dN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access analytics."})});default:return null}};return s.jsxs("div",{className:"text-foreground transition-colors duration-500",style:{display:"grid",gridTemplateRows:"64px 1fr 32px",gridTemplateColumns:"64px 1fr",height:"100vh",background:"var(--bg-void)"},children:[s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(yN,{isRunning:m,port:l?.port})}),s.jsx("div",{style:{gridRow:2},children:s.jsx(SN,{items:$p,activeId:u,onSelect:g=>d(g)})}),s.jsx("main",{className:"animate-fade-in-up",style:{gridRow:2,overflow:"auto",padding:"24px"},children:x()},u),s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(NN,{})}),s.jsx(g2,{position:"bottom-center",theme:"dark"})]})}function EN(){return s.jsx(Q0,{children:s.jsx(v2,{children:s.jsx(_N,{})})})}Dv.createRoot(document.getElementById("root")).render(s.jsx(w.StrictMode,{children:s.jsx(EN,{})})); + )`}}),l.map(u=>{const d=u.id===o,m=u.icon,x=u.color||"var(--text-muted)";return s.jsxs("div",{className:"relative group z-10",children:[s.jsxs("button",{onClick:()=>c(u.id),className:ve("relative flex items-center justify-center transition-all duration-300 ease-out","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","group-hover:scale-105"),style:{width:"48px",height:"48px",borderRadius:"8px",backgroundColor:d?`color-mix(in srgb, ${x} 15%, transparent)`:"transparent",boxShadow:d?`inset 0 0 12px color-mix(in srgb, ${x} 20%, transparent)`:"none"},"aria-label":u.label,"aria-current":d?"page":void 0,children:[d&&s.jsx("span",{className:"absolute left-0 top-0 bottom-0 rounded-r-sm animate-glow-pulse",style:{width:"3px",backgroundColor:x,boxShadow:`0 0 8px ${x}, 0 0 16px ${x}`}}),s.jsx("div",{className:ve("relative flex items-center justify-center transition-all duration-300",d&&"animate-signal-pulse","group-hover:scale-110"),style:{filter:d?`drop-shadow(0 0 8px ${x})`:"none"},children:s.jsx(m,{size:20,className:"transition-all duration-300",style:{color:d?x:"var(--text-muted)",filter:d?void 0:"drop-shadow(0 0 0px transparent)"}})}),s.jsx("span",{className:ve("absolute inset-0 rounded-lg transition-all duration-300","opacity-0 group-hover:opacity-100",d&&"group-hover:opacity-0"),style:{backgroundColor:"var(--bg-elevated)",boxShadow:`0 0 15px color-mix(in srgb, ${x} 15%, transparent), inset 0 0 8px color-mix(in srgb, ${x} 10%, transparent)`}})]}),s.jsx("div",{className:ve("absolute left-full top-1/2 -translate-y-1/2 ml-3","opacity-0 invisible group-hover:opacity-100 group-hover:visible","transition-all duration-200 ease-out","pointer-events-none z-50"),children:s.jsxs("div",{className:"relative px-3 py-2 rounded",style:{backgroundColor:"var(--bg-void)",border:"1px solid var(--accent-glow)",boxShadow:"0 0 12px color-mix(in srgb, var(--accent-glow) 30%, transparent), 0 4px 16px rgba(0, 0, 0, 0.4)"},children:[s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-1.5 whitespace-nowrap",style:{fontFamily:"var(--font-mono)",fontSize:"11px",fontWeight:600,letterSpacing:"0.05em",color:"var(--text-primary)"},children:[s.jsx("span",{style:{color:x},children:"▸"}),s.jsx("span",{children:u.label.toUpperCase()})]}),u.shortcut&&s.jsx("div",{className:"whitespace-nowrap",style:{fontFamily:"var(--font-mono)",fontSize:"9px",color:"var(--text-muted)",letterSpacing:"0.02em",paddingLeft:"14px"},children:u.shortcut})]}),s.jsx("span",{className:"absolute right-full top-1/2 -translate-y-1/2",style:{width:0,height:0,borderTop:"6px solid transparent",borderBottom:"6px solid transparent",borderRight:"6px solid var(--accent-glow)"}}),s.jsx("span",{className:"absolute right-full top-1/2 -translate-y-1/2",style:{width:0,height:0,marginRight:"-1px",borderTop:"5px solid transparent",borderBottom:"5px solid transparent",borderRight:"5px solid var(--bg-void)"}})]})})]},u.id)})]})}function CN(){const{status:l,isDesktop:o,mgmtKey:c}=vt(),[u,d]=w.useState("command"),m=l?.running??!1;w.useEffect(()=>{const g=v=>{if(v.ctrlKey&&v.key>="1"&&v.key<="7"){v.preventDefault();const p=parseInt(v.key,10)-1,y=J0[p];y&&d(y.id)}};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[]);const x=()=>{switch(u){case"command":return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid gap-6 lg:grid-cols-2",children:s.jsx(wj,{})}),s.jsx(Jj,{})]});case"providers":return s.jsxs("div",{className:"space-y-6",children:[s.jsx(Qj,{}),!o&&!c&&s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key missing. Start ProxyPilot from the tray app to inject a local key, or set `MANAGEMENT_PASSWORD` before loading this page."})]});case"routing":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(Ij,{}),s.jsx(hN,{}),s.jsx(lN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access routing settings."})});case"memory":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(tN,{}),s.jsx(sN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access memory settings."})});case"logs":return s.jsx("div",{className:"space-y-6",children:c?s.jsx(Pj,{}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access logs."})});case"requests":return s.jsx("div",{className:"space-y-6",children:c?s.jsx(rN,{}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access request monitor."})});case"analytics":return s.jsx("div",{className:"space-y-6",children:c?s.jsxs(s.Fragment,{children:[s.jsx(xN,{}),s.jsx(pN,{}),s.jsx(oN,{}),s.jsx(fN,{})]}):s.jsx("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-4 text-sm text-amber-300",children:"Management key required to access analytics."})});default:return null}};return s.jsxs("div",{className:"text-foreground transition-colors duration-500",style:{display:"grid",gridTemplateRows:"64px 1fr 32px",gridTemplateColumns:"64px 1fr",height:"100vh",background:"var(--bg-void)"},children:[s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(jN,{isRunning:m,port:l?.port})}),s.jsx("div",{style:{gridRow:2},children:s.jsx(kN,{items:J0,activeId:u,onSelect:g=>d(g)})}),s.jsx("main",{className:"animate-fade-in-up",style:{gridRow:2,overflow:"auto",padding:"24px"},children:x()},u),s.jsx("div",{style:{gridColumn:"1 / -1"},children:s.jsx(EN,{})}),s.jsx(y2,{position:"bottom-center",theme:"dark"})]})}function TN(){return s.jsx(Wp,{children:s.jsx(w2,{children:s.jsx(CN,{})})})}Hv.createRoot(document.getElementById("root")).render(s.jsx(w.StrictMode,{children:s.jsx(TN,{})}));