@sigmashake/ssg 0.22.3 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -9
- package/public/assets/app.css +1 -1
- package/public/assets/app.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sigmashake/ssg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "AI Agent Governance CLI — evaluate tool calls against rules, block dangerous operations, and surface blocked commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"README.md"
|
|
14
14
|
],
|
|
15
15
|
"optionalDependencies": {
|
|
16
|
-
"@sigmashake/ssg-linux-x64": "0.
|
|
17
|
-
"@sigmashake/ssg-linux-arm64": "0.
|
|
18
|
-
"@sigmashake/ssg-darwin-arm64": "0.
|
|
19
|
-
"@sigmashake/ssg-darwin-x64": "0.
|
|
20
|
-
"@sigmashake/ssg-win32-x64": "0.
|
|
16
|
+
"@sigmashake/ssg-linux-x64": "0.23.1",
|
|
17
|
+
"@sigmashake/ssg-linux-arm64": "0.23.1",
|
|
18
|
+
"@sigmashake/ssg-darwin-arm64": "0.23.1",
|
|
19
|
+
"@sigmashake/ssg-darwin-x64": "0.23.1",
|
|
20
|
+
"@sigmashake/ssg-win32-x64": "0.23.1"
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
23
|
"postinstall": "node ./bin/cleanup-globals.cjs",
|
|
@@ -115,8 +115,5 @@
|
|
|
115
115
|
"typescript-eslint": "8.58.0",
|
|
116
116
|
"urlpattern-polyfill": "10.1.0",
|
|
117
117
|
"vite": "8.0.1"
|
|
118
|
-
},
|
|
119
|
-
"dependencies": {
|
|
120
|
-
"re2": "^1.24.0"
|
|
121
118
|
}
|
|
122
119
|
}
|
package/public/assets/app.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
2
|
-
@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-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--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}}}@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:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", 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-red-900:oklch(39.6% .141 25.723);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--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-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--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-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--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;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-7{top:calc(var(--spacing) * 7)}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-\[-18px\]{right:-18px}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-50{z-index:50}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-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-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.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-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:calc(var(--spacing) * 1)}.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-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-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-56{height:calc(var(--spacing) * 56)}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.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-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-72{width:calc(var(--spacing) * 72)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[65\%\]{max-width:65%}.max-w-\[180px\]{max-width:180px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[160px\]{min-width:160px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing) * 0)}.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)}: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-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-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-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}: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-\[\#1a1a1a\]>:not(:last-child)){border-color:#1a1a1a}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-\[\#1a1a1a\]{border-color:#1a1a1a}.border-\[\#1c1c1c\]{border-color:#1c1c1c}.border-\[\#1e1e1e\]{border-color:#1e1e1e}.border-\[\#2a2a2a\]{border-color:#2a2a2a}.border-\[\#111\]{border-color:#111}.border-\[\#222\]{border-color:#222}.border-\[\#333\]{border-color:#333}.border-\[\#181818\]{border-color:#181818}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-400\/10{border-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/10{border-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.border-amber-400\/20{border-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/20{border-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.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\/60{border-color:#f99c0099}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/60{border-color:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.border-blue-400\/20{border-color:#54a2ff33}@supports (color:color-mix(in lab, red, red)){.border-blue-400\/20{border-color:color-mix(in oklab, var(--color-blue-400) 20%, transparent)}}.border-blue-500\/20{border-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.border-blue-500\/20{border-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.border-current\/30{border-color:currentColor}@supports (color:color-mix(in lab, red, red)){.border-current\/30{border-color:color-mix(in oklab, currentcolor 30%, transparent)}}.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-gray-500\/20{border-color:#6a728233}@supports (color:color-mix(in lab, red, red)){.border-gray-500\/20{border-color:color-mix(in oklab, var(--color-gray-500) 20%, transparent)}}.border-green-400\/20{border-color:#05df7233}@supports (color:color-mix(in lab, red, red)){.border-green-400\/20{border-color:color-mix(in oklab, var(--color-green-400) 20%, transparent)}}.border-green-400\/30{border-color:#05df724d}@supports (color:color-mix(in lab, red, red)){.border-green-400\/30{border-color:color-mix(in oklab, var(--color-green-400) 30%, transparent)}}.border-green-500\/15{border-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.border-green-500\/15{border-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.border-green-500\/20{border-color:#00c75833}@supports (color:color-mix(in lab, red, red)){.border-green-500\/20{border-color:color-mix(in oklab, var(--color-green-500) 20%, 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-purple-400\/20{border-color:#c07eff33}@supports (color:color-mix(in lab, red, red)){.border-purple-400\/20{border-color:color-mix(in oklab, var(--color-purple-400) 20%, 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-red-400\/10{border-color:#ff65681a}@supports (color:color-mix(in lab, red, red)){.border-red-400\/10{border-color:color-mix(in oklab, var(--color-red-400) 10%, transparent)}}.border-red-400\/20{border-color:#ff656833}@supports (color:color-mix(in lab, red, red)){.border-red-400\/20{border-color:color-mix(in oklab, var(--color-red-400) 20%, transparent)}}.border-red-400\/30{border-color:#ff65684d}@supports (color:color-mix(in lab, red, red)){.border-red-400\/30{border-color:color-mix(in oklab, var(--color-red-400) 30%, transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.border-red-500\/20{border-color:color-mix(in oklab, var(--color-red-500) 20%, 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-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.border-red-500\/40{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.border-transparent{border-color:#0000}.border-l-\[\#222\]{border-left-color:#222}.border-l-amber-400\/60{border-left-color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.border-l-amber-400\/60{border-left-color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.border-l-blue-500\/50{border-left-color:#3080ff80}@supports (color:color-mix(in lab, red, red)){.border-l-blue-500\/50{border-left-color:color-mix(in oklab, var(--color-blue-500) 50%, transparent)}}.border-l-gray-600\/40{border-left-color:#4a556566}@supports (color:color-mix(in lab, red, red)){.border-l-gray-600\/40{border-left-color:color-mix(in oklab, var(--color-gray-600) 40%, transparent)}}.border-l-green-500\/50{border-left-color:#00c75880}@supports (color:color-mix(in lab, red, red)){.border-l-green-500\/50{border-left-color:color-mix(in oklab, var(--color-green-500) 50%, transparent)}}.border-l-red-500\/60{border-left-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-l-red-500\/60{border-left-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.bg-\[\#0a0a0a\]{background-color:#0a0a0a}.bg-\[\#0d0d0d\]{background-color:#0d0d0d}.bg-\[\#1a1a1a\]{background-color:#1a1a1a}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[\#111\]{background-color:#111}.bg-\[\#444\]{background-color:#444}.bg-\[\#080808\]{background-color:#080808}.bg-\[\#080808\]\/95{background-color:oklab(13.4409% 3.72529e-9 7.45058e-9/.95)}.bg-\[\#090909\]{background-color:#090909}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/5{background-color:#fcbb000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/5{background-color:color-mix(in oklab, var(--color-amber-400) 5%, transparent)}}.bg-amber-400\/10{background-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/10{background-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.bg-amber-400\/60{background-color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/60{background-color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/5{background-color:color-mix(in oklab, var(--color-amber-500) 5%, 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-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-400\/10{background-color:color-mix(in oklab, var(--color-blue-400) 10%, transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.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\/60{background-color:#3080ff99}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/60{background-color:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.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-gray-500\/15{background-color:#6a728226}@supports (color:color-mix(in lab, red, red)){.bg-gray-500\/15{background-color:color-mix(in oklab, var(--color-gray-500) 15%, transparent)}}.bg-green-400\/10{background-color:#05df721a}@supports (color:color-mix(in lab, red, red)){.bg-green-400\/10{background-color:color-mix(in oklab, var(--color-green-400) 10%, transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/5{background-color:#00c7580d}@supports (color:color-mix(in lab, red, red)){.bg-green-500\/5{background-color:color-mix(in oklab, var(--color-green-500) 5%, transparent)}}.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-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-purple-400\/10{background-color:#c07eff1a}@supports (color:color-mix(in lab, red, red)){.bg-purple-400\/10{background-color:color-mix(in oklab, var(--color-purple-400) 10%, transparent)}}.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-red-400\/10{background-color:#ff65681a}@supports (color:color-mix(in lab, red, red)){.bg-red-400\/10{background-color:color-mix(in oklab, var(--color-red-400) 10%, transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/5{background-color:color-mix(in oklab, var(--color-red-500) 5%, transparent)}}.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-900\/10{background-color:#82181a1a}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/10{background-color:color-mix(in oklab, var(--color-red-900) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.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)}.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-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-44{padding-left:calc(var(--spacing) * 44)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--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-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.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)}.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-\[\#2a2a2a\]{color:#2a2a2a}.text-\[\#3a3a3a\]{color:#3a3a3a}.text-\[\#222\]{color:#222}.text-\[\#333\]{color:#333}.text-\[\#444\]{color:#444}.text-\[\#555\]{color:#555}.text-\[\#666\]{color:#666}.text-\[\#777\]{color:#777}.text-\[\#888\]{color:#888}.text-\[\#999\]{color:#999}.text-\[\#aaa\]{color:#aaa}.text-\[\#bbb\]{color:#bbb}.text-\[\#ccc\]{color:#ccc}.text-\[\#ddd\]{color:#ddd}.text-\[\#e0e0e0\]{color:#e0e0e0}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab, red, red)){.text-amber-300\/70{color:color-mix(in oklab, var(--color-amber-300) 70%, transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/60{color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/60{color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.text-amber-400\/70{color:#fcbb00b3}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/70{color:color-mix(in oklab, var(--color-amber-400) 70%, transparent)}}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/80{color:color-mix(in oklab, var(--color-amber-400) 80%, transparent)}}.text-amber-500\/50{color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.text-amber-500\/50{color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.text-amber-600{color:var(--color-amber-600)}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-600{color:var(--color-cyan-600)}.text-gray-400{color:var(--color-gray-400)}.text-green-400{color:var(--color-green-400)}.text-orange-400{color:var(--color-orange-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-300\/70{color:#ffa3a3b3}@supports (color:color-mix(in lab, red, red)){.text-red-300\/70{color:color-mix(in oklab, var(--color-red-300) 70%, transparent)}}.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-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.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,)}.line-through{text-decoration-line:line-through}.placeholder-\[\#444\]::placeholder{color:#444}.accent-amber-400{accent-color:var(--color-amber-400)}.opacity-60{opacity:.6}.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-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-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)}.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-red-900\/10{--tw-shadow-color:#82181a1a}@supports (color:color-mix(in lab, red, red)){.shadow-red-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-green-500\/40{--tw-ring-color:#00c75866}@supports (color:color-mix(in lab, red, red)){.ring-green-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-green-500) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.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))}.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}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:text-\[\#555\]:is(:where(.group):hover *){color:#555}}.placeholder\:text-\[\#3a3a3a\]::placeholder{color:#3a3a3a}.placeholder\:text-\[\#333\]::placeholder{color:#333}.placeholder\:text-\[\#444\]::placeholder{color:#444}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:calc(var(--spacing) * 0)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:border-l-2:hover{border-left-style:var(--tw-border-style);border-left-width:2px}.hover\:border-\[\#2a2a2a\]:hover{border-color:#2a2a2a}.hover\:border-\[\#3a3a3a\]:hover{border-color:#3a3a3a}.hover\:border-\[\#333\]:hover{border-color:#333}.hover\:border-\[\#262626\]:hover{border-color:#262626}.hover\:border-amber-500\/30:hover{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/30:hover{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.hover\:border-amber-500\/40:hover{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/40:hover{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.hover\:border-blue-500\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab, red, red)){.hover\:border-blue-500\/40:hover{border-color:color-mix(in oklab, var(--color-blue-500) 40%, transparent)}}.hover\:border-green-500\/30:hover{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.hover\:border-green-500\/30:hover{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.hover\:border-red-500\/40:hover{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.hover\:border-red-500\/40:hover{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.hover\:border-red-500\/60:hover{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.hover\:border-red-500\/60:hover{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.hover\:bg-\[\#0d0d0d\]:hover{background-color:#0d0d0d}.hover\:bg-\[\#0d0d0d\]\/50:hover{background-color:oklab(15.9066% 0 0/.5)}.hover\:bg-\[\#111\]:hover{background-color:#111}.hover\:bg-\[\#101010\]:hover{background-color:#101010}.hover\:bg-\[\#141414\]:hover{background-color:#141414}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.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-blue-500\/20:hover{background-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.hover\:bg-blue-500\/20:hover{background-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.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-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\:text-\[\#666\]:hover{color:#666}.hover\:text-\[\#888\]:hover{color:#888}.hover\:text-\[\#aaa\]:hover{color:#aaa}.hover\:text-\[\#bbb\]:hover{color:#bbb}.hover\:text-\[\#ccc\]:hover{color:#ccc}.hover\:text-\[\#ddd\]:hover{color:#ddd}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-400:hover{color:var(--color-amber-400)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-\[\#2a2a2a\]:focus{border-color:#2a2a2a}.focus\:border-\[\#333\]:focus{border-color:#333}.focus\:border-amber-400:focus{border-color:var(--color-amber-400)}.focus\:border-amber-400\/30:focus{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-400\/30:focus{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.focus\:border-amber-400\/50:focus{border-color:#fcbb0080}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-400\/50:focus{border-color:color-mix(in oklab, var(--color-amber-400) 50%, transparent)}}.focus\:border-amber-500:focus{border-color:var(--color-amber-500)}.focus\:ring-1:focus{--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)}.focus\:ring-amber-400\/10:focus{--tw-ring-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.focus\:ring-amber-400\/10:focus{--tw-ring-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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-amber-500:focus-visible{--tw-ring-color:var(--color-amber-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}}@media (width>=48rem){.md\:block{display:block}}@media (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))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}*{box-sizing:border-box}html,body,#app-root{height:100%;margin:0;padding:0}body{color:#e0e0e0;-webkit-font-smoothing:antialiased;background:#0a0a0a;font-family:system-ui,-apple-system,sans-serif}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:#3a3a3a}code,pre,.font-mono{font-family:SF Mono,Fira Code,Cascadia Code,monospace}@keyframes log-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.log-detail{animation:.15s ease-out log-detail-in}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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:"<percentage>";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:"<percentage>";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:"<length>";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:"<percentage>";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}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
|
2
|
+
@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-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--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}}}@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:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", 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-red-900:oklch(39.6% .141 25.723);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--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-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--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-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-lg:32rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--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:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--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;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,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;-webkit-text-decoration:inherit;-webkit-text-decoration: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}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-7{top:calc(var(--spacing) * 7)}.right-0{right:calc(var(--spacing) * 0)}.right-3{right:calc(var(--spacing) * 3)}.right-\[-18px\]{right:-18px}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.z-50{z-index:50}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-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-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.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-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1{height:calc(var(--spacing) * 1)}.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-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-12{height:calc(var(--spacing) * 12)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-56{height:calc(var(--spacing) * 56)}.h-full{height:100%}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-96{max-height:calc(var(--spacing) * 96)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-screen{min-height:100vh}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-2\/3{width:66.6667%}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.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-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-72{width:calc(var(--spacing) * 72)}.w-full{width:100%}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[65\%\]{max-width:65%}.max-w-\[180px\]{max-width:180px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[160px\]{min-width:160px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.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-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing) * 0)}.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)}: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-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-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-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:calc(var(--spacing) * 1)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}: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-\[\#1a1a1a\]>:not(:last-child)){border-color:#1a1a1a}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-\[\#1a1a1a\]{border-color:#1a1a1a}.border-\[\#1c1c1c\]{border-color:#1c1c1c}.border-\[\#1e1e1e\]{border-color:#1e1e1e}.border-\[\#2a2a2a\]{border-color:#2a2a2a}.border-\[\#111\]{border-color:#111}.border-\[\#222\]{border-color:#222}.border-\[\#333\]{border-color:#333}.border-\[\#181818\]{border-color:#181818}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-400\/10{border-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/10{border-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.border-amber-400\/20{border-color:#fcbb0033}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/20{border-color:color-mix(in oklab, var(--color-amber-400) 20%, transparent)}}.border-amber-400\/30{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.border-amber-400\/30{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.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\/60{border-color:#f99c0099}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/60{border-color:color-mix(in oklab, var(--color-amber-500) 60%, transparent)}}.border-blue-400\/20{border-color:#54a2ff33}@supports (color:color-mix(in lab, red, red)){.border-blue-400\/20{border-color:color-mix(in oklab, var(--color-blue-400) 20%, transparent)}}.border-blue-500\/20{border-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.border-blue-500\/20{border-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.border-current\/30{border-color:currentColor}@supports (color:color-mix(in lab, red, red)){.border-current\/30{border-color:color-mix(in oklab, currentcolor 30%, transparent)}}.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-gray-500\/20{border-color:#6a728233}@supports (color:color-mix(in lab, red, red)){.border-gray-500\/20{border-color:color-mix(in oklab, var(--color-gray-500) 20%, transparent)}}.border-green-400\/20{border-color:#05df7233}@supports (color:color-mix(in lab, red, red)){.border-green-400\/20{border-color:color-mix(in oklab, var(--color-green-400) 20%, transparent)}}.border-green-400\/30{border-color:#05df724d}@supports (color:color-mix(in lab, red, red)){.border-green-400\/30{border-color:color-mix(in oklab, var(--color-green-400) 30%, transparent)}}.border-green-500\/15{border-color:#00c75826}@supports (color:color-mix(in lab, red, red)){.border-green-500\/15{border-color:color-mix(in oklab, var(--color-green-500) 15%, transparent)}}.border-green-500\/20{border-color:#00c75833}@supports (color:color-mix(in lab, red, red)){.border-green-500\/20{border-color:color-mix(in oklab, var(--color-green-500) 20%, 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-purple-400\/20{border-color:#c07eff33}@supports (color:color-mix(in lab, red, red)){.border-purple-400\/20{border-color:color-mix(in oklab, var(--color-purple-400) 20%, 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-red-400\/10{border-color:#ff65681a}@supports (color:color-mix(in lab, red, red)){.border-red-400\/10{border-color:color-mix(in oklab, var(--color-red-400) 10%, transparent)}}.border-red-400\/20{border-color:#ff656833}@supports (color:color-mix(in lab, red, red)){.border-red-400\/20{border-color:color-mix(in oklab, var(--color-red-400) 20%, transparent)}}.border-red-400\/30{border-color:#ff65684d}@supports (color:color-mix(in lab, red, red)){.border-red-400\/30{border-color:color-mix(in oklab, var(--color-red-400) 30%, transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab, red, red)){.border-red-500\/20{border-color:color-mix(in oklab, var(--color-red-500) 20%, 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-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.border-red-500\/40{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.border-transparent{border-color:#0000}.border-l-\[\#222\]{border-left-color:#222}.border-l-amber-400\/60{border-left-color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.border-l-amber-400\/60{border-left-color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.border-l-blue-500\/50{border-left-color:#3080ff80}@supports (color:color-mix(in lab, red, red)){.border-l-blue-500\/50{border-left-color:color-mix(in oklab, var(--color-blue-500) 50%, transparent)}}.border-l-gray-600\/40{border-left-color:#4a556566}@supports (color:color-mix(in lab, red, red)){.border-l-gray-600\/40{border-left-color:color-mix(in oklab, var(--color-gray-600) 40%, transparent)}}.border-l-green-500\/50{border-left-color:#00c75880}@supports (color:color-mix(in lab, red, red)){.border-l-green-500\/50{border-left-color:color-mix(in oklab, var(--color-green-500) 50%, transparent)}}.border-l-red-500\/60{border-left-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.border-l-red-500\/60{border-left-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.bg-\[\#0a0a0a\]{background-color:#0a0a0a}.bg-\[\#0d0d0d\]{background-color:#0d0d0d}.bg-\[\#1a1a1a\]{background-color:#1a1a1a}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[\#111\]{background-color:#111}.bg-\[\#444\]{background-color:#444}.bg-\[\#080808\]{background-color:#080808}.bg-\[\#080808\]\/95{background-color:oklab(13.4409% 3.72529e-9 7.45058e-9/.95)}.bg-\[\#090909\]{background-color:#090909}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-400\/5{background-color:#fcbb000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/5{background-color:color-mix(in oklab, var(--color-amber-400) 5%, transparent)}}.bg-amber-400\/10{background-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/10{background-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.bg-amber-400\/60{background-color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.bg-amber-400\/60{background-color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\/5{background-color:#f99c000d}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/5{background-color:color-mix(in oklab, var(--color-amber-500) 5%, 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-blue-400\/10{background-color:#54a2ff1a}@supports (color:color-mix(in lab, red, red)){.bg-blue-400\/10{background-color:color-mix(in oklab, var(--color-blue-400) 10%, transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.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\/60{background-color:#3080ff99}@supports (color:color-mix(in lab, red, red)){.bg-blue-500\/60{background-color:color-mix(in oklab, var(--color-blue-500) 60%, transparent)}}.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-gray-500\/15{background-color:#6a728226}@supports (color:color-mix(in lab, red, red)){.bg-gray-500\/15{background-color:color-mix(in oklab, var(--color-gray-500) 15%, transparent)}}.bg-green-400\/10{background-color:#05df721a}@supports (color:color-mix(in lab, red, red)){.bg-green-400\/10{background-color:color-mix(in oklab, var(--color-green-400) 10%, transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/5{background-color:#00c7580d}@supports (color:color-mix(in lab, red, red)){.bg-green-500\/5{background-color:color-mix(in oklab, var(--color-green-500) 5%, transparent)}}.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-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-purple-400\/10{background-color:#c07eff1a}@supports (color:color-mix(in lab, red, red)){.bg-purple-400\/10{background-color:color-mix(in oklab, var(--color-purple-400) 10%, transparent)}}.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-red-400\/10{background-color:#ff65681a}@supports (color:color-mix(in lab, red, red)){.bg-red-400\/10{background-color:color-mix(in oklab, var(--color-red-400) 10%, transparent)}}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/5{background-color:color-mix(in oklab, var(--color-red-500) 5%, transparent)}}.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-900\/10{background-color:#82181a1a}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/10{background-color:color-mix(in oklab, var(--color-red-900) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.px-1{padding-inline:calc(var(--spacing) * 1)}.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)}.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-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-24{padding-block:calc(var(--spacing) * 24)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-0{padding-bottom:calc(var(--spacing) * 0)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-44{padding-left:calc(var(--spacing) * 44)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--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-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.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\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.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)}.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-\[\#2a2a2a\]{color:#2a2a2a}.text-\[\#3a3a3a\]{color:#3a3a3a}.text-\[\#222\]{color:#222}.text-\[\#333\]{color:#333}.text-\[\#444\]{color:#444}.text-\[\#555\]{color:#555}.text-\[\#666\]{color:#666}.text-\[\#777\]{color:#777}.text-\[\#888\]{color:#888}.text-\[\#999\]{color:#999}.text-\[\#aaa\]{color:#aaa}.text-\[\#bbb\]{color:#bbb}.text-\[\#ccc\]{color:#ccc}.text-\[\#ddd\]{color:#ddd}.text-\[\#e0e0e0\]{color:#e0e0e0}.text-amber-300{color:var(--color-amber-300)}.text-amber-300\/70{color:#ffd236b3}@supports (color:color-mix(in lab, red, red)){.text-amber-300\/70{color:color-mix(in oklab, var(--color-amber-300) 70%, transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-400\/60{color:#fcbb0099}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/60{color:color-mix(in oklab, var(--color-amber-400) 60%, transparent)}}.text-amber-400\/70{color:#fcbb00b3}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/70{color:color-mix(in oklab, var(--color-amber-400) 70%, transparent)}}.text-amber-400\/80{color:#fcbb00cc}@supports (color:color-mix(in lab, red, red)){.text-amber-400\/80{color:color-mix(in oklab, var(--color-amber-400) 80%, transparent)}}.text-amber-500\/50{color:#f99c0080}@supports (color:color-mix(in lab, red, red)){.text-amber-500\/50{color:color-mix(in oklab, var(--color-amber-500) 50%, transparent)}}.text-amber-600{color:var(--color-amber-600)}.text-black{color:var(--color-black)}.text-blue-400{color:var(--color-blue-400)}.text-cyan-400{color:var(--color-cyan-400)}.text-cyan-600{color:var(--color-cyan-600)}.text-gray-400{color:var(--color-gray-400)}.text-green-400{color:var(--color-green-400)}.text-orange-400{color:var(--color-orange-400)}.text-purple-300{color:var(--color-purple-300)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-300\/70{color:#ffa3a3b3}@supports (color:color-mix(in lab, red, red)){.text-red-300\/70{color:color-mix(in oklab, var(--color-red-300) 70%, transparent)}}.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-white{color:var(--color-white)}.text-yellow-400{color:var(--color-yellow-400)}.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,)}.line-through{text-decoration-line:line-through}.placeholder-\[\#444\]::placeholder{color:#444}.accent-amber-400{accent-color:var(--color-amber-400)}.opacity-60{opacity:.6}.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-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-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)}.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-red-900\/10{--tw-shadow-color:#82181a1a}@supports (color:color-mix(in lab, red, red)){.shadow-red-900\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-900) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-green-500\/40{--tw-ring-color:#00c75866}@supports (color:color-mix(in lab, red, red)){.ring-green-500\/40{--tw-ring-color:color-mix(in oklab, var(--color-green-500) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.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))}.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}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:text-\[\#555\]:is(:where(.group):hover *){color:#555}}.placeholder\:text-\[\#3a3a3a\]::placeholder{color:#3a3a3a}.placeholder\:text-\[\#333\]::placeholder{color:#333}.placeholder\:text-\[\#444\]::placeholder{color:#444}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.first\:pt-0:first-child{padding-top:calc(var(--spacing) * 0)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media (hover:hover){.hover\:border-l-2:hover{border-left-style:var(--tw-border-style);border-left-width:2px}.hover\:border-\[\#2a2a2a\]:hover{border-color:#2a2a2a}.hover\:border-\[\#3a3a3a\]:hover{border-color:#3a3a3a}.hover\:border-\[\#333\]:hover{border-color:#333}.hover\:border-\[\#262626\]:hover{border-color:#262626}.hover\:border-amber-500\/30:hover{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/30:hover{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.hover\:border-amber-500\/40:hover{border-color:#f99c0066}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber-500\/40:hover{border-color:color-mix(in oklab, var(--color-amber-500) 40%, transparent)}}.hover\:border-blue-500\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab, red, red)){.hover\:border-blue-500\/40:hover{border-color:color-mix(in oklab, var(--color-blue-500) 40%, transparent)}}.hover\:border-green-500\/30:hover{border-color:#00c7584d}@supports (color:color-mix(in lab, red, red)){.hover\:border-green-500\/30:hover{border-color:color-mix(in oklab, var(--color-green-500) 30%, transparent)}}.hover\:border-red-500\/40:hover{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.hover\:border-red-500\/40:hover{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.hover\:border-red-500\/60:hover{border-color:#fb2c3699}@supports (color:color-mix(in lab, red, red)){.hover\:border-red-500\/60:hover{border-color:color-mix(in oklab, var(--color-red-500) 60%, transparent)}}.hover\:bg-\[\#0d0d0d\]:hover{background-color:#0d0d0d}.hover\:bg-\[\#0d0d0d\]\/50:hover{background-color:oklab(15.9066% 0 0/.5)}.hover\:bg-\[\#111\]:hover{background-color:#111}.hover\:bg-\[\#101010\]:hover{background-color:#101010}.hover\:bg-\[\#141414\]:hover{background-color:#141414}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.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-blue-500\/20:hover{background-color:#3080ff33}@supports (color:color-mix(in lab, red, red)){.hover\:bg-blue-500\/20:hover{background-color:color-mix(in oklab, var(--color-blue-500) 20%, transparent)}}.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-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.hover\:text-\[\#666\]:hover{color:#666}.hover\:text-\[\#888\]:hover{color:#888}.hover\:text-\[\#aaa\]:hover{color:#aaa}.hover\:text-\[\#bbb\]:hover{color:#bbb}.hover\:text-\[\#ccc\]:hover{color:#ccc}.hover\:text-\[\#ddd\]:hover{color:#ddd}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-400:hover{color:var(--color-amber-400)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-\[\#2a2a2a\]:focus{border-color:#2a2a2a}.focus\:border-\[\#333\]:focus{border-color:#333}.focus\:border-amber-400:focus{border-color:var(--color-amber-400)}.focus\:border-amber-400\/30:focus{border-color:#fcbb004d}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-400\/30:focus{border-color:color-mix(in oklab, var(--color-amber-400) 30%, transparent)}}.focus\:border-amber-400\/50:focus{border-color:#fcbb0080}@supports (color:color-mix(in lab, red, red)){.focus\:border-amber-400\/50:focus{border-color:color-mix(in oklab, var(--color-amber-400) 50%, transparent)}}.focus\:border-amber-500:focus{border-color:var(--color-amber-500)}.focus\:ring-1:focus{--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)}.focus\:ring-amber-400\/10:focus{--tw-ring-color:#fcbb001a}@supports (color:color-mix(in lab, red, red)){.focus\:ring-amber-400\/10:focus{--tw-ring-color:color-mix(in oklab, var(--color-amber-400) 10%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.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-amber-500:focus-visible{--tw-ring-color:var(--color-amber-500)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}}@media (width>=48rem){.md\:block{display:block}}@media (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))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}*{box-sizing:border-box}html,body,#app-root{height:100%;margin:0;padding:0}body{color:#e0e0e0;-webkit-font-smoothing:antialiased;background:#0a0a0a;font-family:system-ui,-apple-system,sans-serif}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:999px}::-webkit-scrollbar-thumb:hover{background:#3a3a3a}code,pre,.font-mono{font-family:SF Mono,Fira Code,Cascadia Code,monospace}@keyframes log-detail-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}.log-detail{animation:.15s ease-out log-detail-in}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-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:"<percentage>";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:"<percentage>";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:"<length>";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:"<percentage>";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}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}
|
package/public/assets/app.js
CHANGED
|
@@ -14,5 +14,6 @@ Error generating stack: `+e.message+`
|
|
|
14
14
|
disabled:opacity-40 disabled:cursor-not-allowed`,children:i?(0,I.jsxs)(`span`,{className:`flex items-center justify-center gap-1.5`,children:[(0,I.jsx)(`svg`,{className:`animate-spin`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})}),`Installing…`]}):`Install`})})]})}function Zn(){let[e,t]=(0,_.useState)(``),[n,r]=(0,_.useState)(`downloads`),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)(``),[c,l]=(0,_.useState)(`all`),[u,d]=(0,_.useState)([]),[f,p]=(0,_.useState)(!1),[m,h]=(0,_.useState)(0),[g,v]=(0,_.useState)(!1),[y,b]=(0,_.useState)(null),[x,ee]=(0,_.useState)(null),[S,C]=(0,_.useState)(null),w=(0,_.useCallback)((t=0)=>{let r=new URLSearchParams({page:String(t)});return e&&r.set(`search`,e),n&&n!==`downloads`&&r.set(`sort`,n),i&&r.set(`decision`,i),o&&r.set(`severity`,o),r},[e,n,i,o]);(0,_.useEffect)(()=>{let e=!1;return v(!0),h(0),fetch(`/api/json/hub?${w(0)}`).then(e=>e.json()).then(t=>{e||(d(t.data),p(t.has_more),h(0))}).catch(()=>{}).finally(()=>{e||v(!1)}),()=>{e=!0}},[w]);async function te(){let e=m+1;v(!0);try{let t=await fetch(`/api/json/hub?${w(e)}`);if(!t.ok)return;let n=await t.json();d(e=>[...e,...n.data]),p(n.has_more),h(e)}catch{}finally{v(!1)}}async function ne(){let e=await fetch(`/api/json/hub?${w(0)}`);if(!e.ok)return;let t=await e.json();d(t.data),p(t.has_more),h(0)}async function T(e){b(e);try{let t=await(await fetch(`/api/hub/install`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({id:e})})).json();t.ok?(ee(e),setTimeout(()=>ee(null),2e3),C({msg:t.already_installed?`${t.message??e} — already installed`:t.message??`Installed ${e}`,type:`ok`}),await ne()):C({msg:t.error??`Install failed`,type:`error`})}catch(e){C({msg:e instanceof Error?e.message:`Network error`,type:`error`})}finally{b(null),setTimeout(()=>C(null),5e3)}}let re=c===`installed`?u.filter(e=>e.installed):u,ie=u.filter(e=>e.installed).length;return(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Hub`}),(0,I.jsx)(`p`,{className:`text-xs text-[#444] mt-0.5`,children:`Install community rule packs from hub.sigmashake.com`})]}),(0,I.jsxs)(`a`,{href:`/hub/connect`,className:`inline-flex items-center gap-1.5 text-xs text-[#555] hover:text-amber-400 transition-colors border border-[#222] hover:border-amber-500/30 rounded-lg px-3 h-7`,children:[(0,I.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,I.jsx)(`path`,{d:`M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22`})}),`Connect GitHub`]})]}),S&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg px-4 py-2.5 text-xs font-medium border
|
|
15
15
|
${S.type===`ok`?`bg-green-500/10 border-green-500/20 text-green-400`:`bg-red-500/10 border-red-500/20 text-red-400`}`,children:[(0,I.jsxs)(`span`,{children:[S.type===`ok`?`✓ `:`✗ `,S.msg]}),(0,I.jsx)(`button`,{onClick:()=>C(null),className:`ml-3 opacity-60 hover:opacity-100 cursor-pointer`,children:`✕`})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center bg-[#0d0d0d] border border-[#1c1c1c] rounded-lg p-0.5 shrink-0`,children:[(0,I.jsx)(`button`,{onClick:()=>l(`all`),className:`px-3 h-6 rounded-md text-[11px] font-medium transition-all cursor-pointer
|
|
16
16
|
${c===`all`?`bg-[#1e1e1e] text-white`:`text-[#555] hover:text-[#888]`}`,children:`All`}),(0,I.jsxs)(`button`,{onClick:()=>l(`installed`),className:`px-3 h-6 rounded-md text-[11px] font-medium transition-all cursor-pointer flex items-center gap-1.5
|
|
17
|
-
${c===`installed`?`bg-[#1e1e1e] text-white`:`text-[#555] hover:text-[#888]`}`,children:[`Installed`,ie>0&&(0,I.jsx)(`span`,{className:`text-[9px] bg-green-500/20 text-green-400 rounded-full px-1.5 py-0.5 font-bold`,children:ie})]})]}),(0,I.jsxs)(`div`,{className:`relative flex-1 min-w-[160px]`,children:[(0,I.jsxs)(`svg`,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-[#444]`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search rulesets…`,value:e,onChange:e=>t(e.target.value),className:`w-full bg-[#0d0d0d] border border-[#1c1c1c] text-[#aaa] text-xs rounded-lg pl-8 pr-3 h-8 focus:outline-none focus:border-[#333] placeholder:text-[#333]`})]}),(0,I.jsx)(`select`,{value:n,onChange:e=>r(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:Gn.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,I.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:[(0,I.jsx)(`option`,{value:``,children:`Any decision`}),qn.filter(Boolean).map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]}),(0,I.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:[(0,I.jsx)(`option`,{value:``,children:`Any severity`}),Kn.filter(Boolean).map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),g&&u.length===0?(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,I.jsx)(Jn,{},t))}):re.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,I.jsxs)(`svg`,{className:`text-[#222] mb-3`,width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`p`,{className:`text-sm text-[#444]`,children:c===`installed`?`No rulesets installed yet. Browse the hub and click Install.`:`No rulesets found${e?` matching "${e}"`:``}.`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:re.map(e=>(0,I.jsx)(Xn,{rs:e,installingId:y,onInstall:T,flashId:x},e.id))}),f&&c===`all`&&(0,I.jsx)(`div`,{className:`flex justify-center pt-2`,children:(0,I.jsx)(`button`,{onClick:te,disabled:g,className:`h-8 px-5 rounded-lg text-xs font-medium text-[#666] border border-[#1c1c1c] hover:text-[#aaa] hover:border-[#2a2a2a] transition-all cursor-pointer disabled:opacity-40`,children:g?`Loading…`:`Load more`})})]})]})}var Qn={deny:`red`,block:`red`,ask:`amber`,allow:`green`,log:`gray`,force:`blue`};function $n({id:e}){let{data:t,error:n}=E(`/api/json/hub/${e}`),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1);if(n)return(0,I.jsxs)(`div`,{className:`text-sm text-red-400`,children:[(0,I.jsx)(`p`,{children:n}),(0,I.jsx)(`a`,{href:`/hub`,className:`text-amber-400 hover:underline mt-2 block`,children:`← Back to Hub`})]});if(!t)return(0,I.jsx)(`p`,{className:`text-sm text-[#555]`,children:`Loading ruleset…`});async function s(){o(!0);try{(await fetch(`/api/hub/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:e})})).ok&&i(!0)}finally{o(!1)}}return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`a`,{href:`/hub`,className:`text-xs text-[#555] hover:text-amber-400`,children:`← Hub`}),(0,I.jsx)(`h1`,{className:`text-xl font-semibold mt-1`,children:t.title}),(0,I.jsxs)(`p`,{className:`text-sm text-[#555] mt-0.5`,children:[`by `,t.author,` · v`,t.version,` ·`,` `,t.rule_count,` rule`,t.rule_count===1?``:`s`]})]}),(0,I.jsx)(zt,{variant:r?`secondary`:`primary`,onClick:s,disabled:a||r,children:r?`Installed`:a?`Installing…`:`Install`})]}),t.technologies.length>0&&(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.technologies.map(e=>(0,I.jsx)(Lt,{variant:`blue`,children:e},e))}),t.github_repo&&(0,I.jsxs)(`p`,{className:`text-xs text-[#555]`,children:[`Source:`,` `,(0,I.jsx)(`span`,{className:`text-[#888]`,children:t.github_repo})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{children:(0,I.jsxs)(`span`,{className:`text-sm font-medium`,children:[`Rules (`,t.rules.length,`)`]})}),(0,I.jsx)(z,{className:`pt-0 space-y-4`,children:t.rules.map(e=>(0,I.jsxs)(`div`,{className:`border-t border-[#1a1a1a] pt-4 first:border-t-0 first:pt-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Lt,{variant:Qn[e.decision]??`gray`,children:e.decision}),(0,I.jsx)(`code`,{className:`text-xs text-amber-400`,children:e.name}),e.capability&&(0,I.jsx)(Lt,{variant:`gray`,children:e.capability})]}),(0,I.jsx)(`p`,{className:`text-sm text-[#aaa] mb-2`,children:e.message}),(0,I.jsx)(Jt,{children:e.raw_text})]},e.id))})]})]})}function er(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(`idle`),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!1);async function u(){l(!0),a(``);try{let e=await fetch(`/api/hub/device-start`,{method:`POST`,headers:{Accept:`application/json`}}),n=await e.json();if(!e.ok){let t=n;t.error===`not_configured`?(r(`not_configured`),s(t.setup_steps??[]),a(t.message??`GitHub OAuth not configured.`)):(a(n.error??`HTTP ${e.status}`),r(`error`));return}t(n),r(`polling`)}catch(e){a(e instanceof Error?e.message:`Failed to start`),r(`error`)}finally{l(!1)}}return(0,_.useEffect)(()=>{if(n!==`polling`||!e)return;let t=setInterval(async()=>{try{let n=await(await fetch(`/api/hub/device-poll?flow=${e.flow_id}`,{headers:{Accept:`application/json`}})).json();n.status===`complete`?(clearInterval(t),r(`done`),a(`Connected as @${n.session?.login??`GitHub`}! You can now publish rulesets.`)):(n.status===`expired`||n.status===`error`)&&(clearInterval(t),r(`error`),a(n.error??`Authentication failed`))}catch{}},3e3);return()=>clearInterval(t)},[n,e]),(0,I.jsxs)(`div`,{className:`max-w-lg mx-auto space-y-5`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`a`,{href:`/hub`,className:`inline-flex items-center gap-1.5 text-xs text-[#444] hover:text-amber-400 transition-colors mb-3`,children:[(0,I.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,I.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),`Back to Hub`]}),(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Connect GitHub`}),(0,I.jsx)(`p`,{className:`text-xs text-[#444] mt-0.5`,children:`Authenticate with GitHub to publish rulesets to the Hub.`})]}),n===`not_configured`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)(`span`,{className:`text-amber-400 shrink-0 mt-0.5`,children:(0,I.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,I.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-medium text-[#ccc]`,children:`GitHub OAuth not configured`}),(0,I.jsx)(`p`,{className:`text-xs text-[#555] mt-1 leading-relaxed`,children:i})]})]}),(0,I.jsxs)(`div`,{className:`border-t border-[#111] pt-4`,children:[(0,I.jsx)(`p`,{className:`text-xs font-medium text-[#888] mb-3`,children:`Setup steps:`}),(0,I.jsx)(`ol`,{className:`space-y-2`,children:o.map((e,t)=>(0,I.jsxs)(`li`,{className:`flex items-start gap-2.5 text-xs text-[#555]`,children:[(0,I.jsx)(`span`,{className:`shrink-0 w-5 h-5 rounded-full bg-[#1a1a1a] border border-[#222] text-[#444] text-[10px] flex items-center justify-center font-medium`,children:t+1}),(0,I.jsx)(`span`,{className:`mt-0.5 leading-relaxed`,children:e.replace(/^\d+\.\s+/,``)})]},t))})]}),(0,I.jsxs)(`div`,{className:`bg-[#0a0a0a] border border-[#1a1a1a] rounded-lg p-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-[#333] mb-1.5 uppercase tracking-wide font-medium`,children:`Quick start`}),(0,I.jsx)(`code`,{className:`text-[11px] text-amber-400/80 font-mono`,children:`export SSG_GITHUB_CLIENT_ID=<your-client-id>`}),(0,I.jsxs)(`p`,{className:`text-[11px] text-[#444] mt-1`,children:[`Then restart: `,(0,I.jsx)(`code`,{className:`text-[#666]`,children:`ssg serve`})]})]}),(0,I.jsx)(`a`,{href:`https://github.com/settings/applications/new`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-amber-400 hover:underline`,children:`Create GitHub OAuth App →`})]})}),n===`idle`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5`,children:[(0,I.jsx)(`p`,{className:`text-xs text-[#555] mb-4 leading-relaxed`,children:`This uses GitHub's device authorization flow — no redirect URIs needed. You'll be shown a code to enter at github.com.`}),(0,I.jsx)(zt,{onClick:u,disabled:c,variant:`primary`,children:c?`Starting…`:`Connect with GitHub`})]})}),e&&n===`polling`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`text-xs text-[#555] mb-2`,children:`Open this URL in your browser:`}),(0,I.jsx)(`a`,{href:e.verification_uri,target:`_blank`,rel:`noreferrer`,className:`text-sm text-amber-400 hover:underline font-mono`,children:e.verification_uri})]}),(0,I.jsxs)(`div`,{className:`border border-[#222] bg-[#0d0d0d] rounded-xl py-5 text-center`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-[#444] uppercase tracking-widest mb-2`,children:`Enter this code`}),(0,I.jsx)(`div`,{className:`text-4xl font-mono font-bold tracking-[0.25em] text-white`,children:e.user_code})]}),(0,I.jsxs)(`p`,{className:`text-[11px] text-[#444] text-center flex items-center justify-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`animate-spin text-[#333]`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})}),`Waiting for GitHub authorization…`]})]})}),n===`done`&&(0,I.jsxs)(`div`,{className:`rounded-xl border border-green-500/20 bg-green-500/5 p-5 text-sm text-green-400 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,I.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),(0,I.jsx)(`span`,{children:i})]}),(0,I.jsx)(`a`,{href:`/hub/publish`,className:`text-xs text-amber-400 hover:underline block mt-1`,children:`Publish a ruleset →`})]}),n===`error`&&i&&(0,I.jsxs)(`div`,{className:`rounded-xl border border-red-500/20 bg-red-500/5 p-4`,children:[(0,I.jsx)(`p`,{className:`text-sm text-red-400`,children:i}),(0,I.jsx)(`button`,{onClick:()=>{r(`idle`),a(``)},className:`text-xs text-[#555] hover:text-[#888] mt-3 cursor-pointer`,children:`← Try again`})]})]})}function tr(){let[e,t]=(0,_.useState)(``),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(null);async function o(t){if(t.preventDefault(),e.trim()){r(!0),a(null);try{a(await(await fetch(`/api/hub/publish`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo_url:e.trim()})})).json())}catch(e){a({ok:!1,error:e instanceof Error?e.message:`Unknown error`})}finally{r(!1)}}}return(0,I.jsxs)(`div`,{className:`max-w-md mx-auto space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`a`,{href:`/hub`,className:`text-xs text-[#555] hover:text-amber-400`,children:`← Hub`}),(0,I.jsx)(`h1`,{className:`text-xl font-semibold mt-1`,children:`Publish Ruleset`}),(0,I.jsx)(`p`,{className:`text-sm text-[#555] mt-1`,children:`Publish a GitHub repository containing .rules files to the Hub.`})]}),(0,I.jsx)(L,{children:(0,I.jsx)(z,{className:`py-4`,children:(0,I.jsxs)(`form`,{onSubmit:o,className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-xs text-[#888] mb-1`,children:`GitHub Repository URL`}),(0,I.jsx)(`input`,{type:`url`,placeholder:`https://github.com/owner/repo`,value:e,onChange:e=>t(e.target.value),required:!0,className:`w-full bg-[#0a0a0a] border border-[#222] text-[#ddd] text-sm rounded px-3 py-2 focus:outline-none focus:border-amber-400 placeholder:text-[#444]`})]}),(0,I.jsx)(zt,{type:`submit`,variant:`primary`,disabled:n,children:n?`Publishing…`:`Publish to Hub`})]})})}),i&&(0,I.jsx)(`div`,{className:`text-sm ${i.ok?`text-green-400`:`text-red-400`}`,children:i.ok?(0,I.jsxs)(I.Fragment,{children:[`Published!`,` `,i.id&&(0,I.jsx)(`a`,{href:`/hub/${i.id}`,className:`text-amber-400 hover:underline`,children:`View ruleset →`})]}):i.error??`Publish failed`})]})}function nr(e){return e===0?`—`:e<1e3?`${e}ns`:e<1e6?`${(e/1e3).toFixed(1)}µs`:`${(e/1e6).toFixed(1)}ms`}function rr(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function ir(e){let t=e<1e10?e*1e3:e,n=new Date(t);return`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}:${String(n.getSeconds()).padStart(2,`0`)}`}function ar(e){let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function or({label:e,value:t,sub:n,accent:r}){return(0,I.jsxs)(`div`,{className:`bg-[#111] border border-[#222] rounded p-3`,children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#555] uppercase tracking-wider mb-1`,children:e}),(0,I.jsx)(`div`,{className:`text-xl font-mono font-semibold ${r??`text-[#e0e0e0]`}`,children:t}),n&&(0,I.jsx)(`div`,{className:`text-[10px] text-[#555] mt-0.5`,children:n})]})}var sr={allow:`text-green-400`,block:`text-red-400`,force:`text-purple-400`,log:`text-yellow-400`,ask:`text-cyan-400`,shadow:`text-[#666]`},cr={allow:`✓`,block:`✗`,force:`→`,log:`·`,ask:`?`,shadow:`~`};function lr({label:e,ns:t,maxNs:n}){let r=n>0?Math.min(100,t/n*100):0;return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555] w-7 text-right`,children:e}),(0,I.jsx)(`div`,{className:`flex-1 bg-[#1a1a1a] rounded-full h-1.5 overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-300 ${t<1e5?`bg-green-500`:t<1e6?`bg-yellow-500`:`bg-red-500`}`,style:{width:`${r}%`}})}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa] w-14 text-right`,children:nr(t)})]})}function ur({value:e,max:t,threshold:n,breached:r}){let i=t>0?Math.min(100,e/t*100):0,a=t>0?Math.min(100,n/t*100):0;return(0,I.jsxs)(`div`,{className:`relative w-full bg-[#1a1a1a] rounded-full h-1.5`,children:[(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500 ${r?`bg-red-500`:e/t>=.6?`bg-yellow-500`:`bg-green-500`}`,style:{width:`${i}%`}}),(0,I.jsx)(`div`,{className:`absolute top-0 h-full w-0.5 bg-amber-400/60`,style:{left:`${a}%`},title:`Limit: ${n}`})]})}function dr({limitsData:e,onSaved:t}){let[n,r]=(0,_.useState)(String(e.config.cpuLimitPct)),[i,a]=(0,_.useState)(String(e.config.memoryLimitMb)),[o,s]=(0,_.useState)(e.config.breachAction),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null);async function f(){l(!0),d(null);try{let e=await fetch(`/api/json/limits`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cpu_limit_pct:parseFloat(n),memory_limit_mb:parseFloat(i),breach_action:o})});e.ok?t():d((await e.json()).error??`Save failed`)}catch{d(`Network error`)}finally{l(!1)}}return(0,I.jsxs)(`div`,{className:`space-y-3 text-xs`,children:[(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`CPU Limit (%)`}),(0,I.jsx)(`input`,{type:`number`,min:1,max:100,value:n,onChange:e=>r(e.target.value),className:`w-full bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] font-mono focus:outline-none focus:border-amber-500`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`Memory Limit (MB)`}),(0,I.jsx)(`input`,{type:`number`,min:1,value:i,onChange:e=>a(e.target.value),className:`w-full bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] font-mono focus:outline-none focus:border-amber-500`})]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`On breach`}),(0,I.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] focus:outline-none focus:border-amber-500`,children:[(0,I.jsx)(`option`,{value:`warn`,children:`Warn in UI only`}),(0,I.jsx)(`option`,{value:`log`,children:`Warn + write to audit log`})]})]}),u&&(0,I.jsx)(`p`,{className:`text-red-400`,children:u}),(0,I.jsx)(`button`,{onClick:f,disabled:c,className:`px-3 py-1.5 bg-amber-500 hover:bg-amber-400 disabled:opacity-50 text-black rounded text-xs font-medium transition-colors`,children:c?`Saving…`:`Save limits`})]})}function fr(){let e=se([`metrics-tick`,`audit-changed`,`limits-breach`]),[t,n]=(0,_.useState)(Date.now()),[r,i]=(0,_.useState)(0),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let{data:f}=E(`/api/json/daemon-metrics`,[e[`metrics-tick`]]),{data:p,refetch:m}=E(`/api/json/limits`,[e[`limits-breach`]]),{data:h}=E(`/api/json/audit-tail?after=${r}&limit=50`,[e[`audit-changed`],e[`metrics-tick`]]);(0,_.useEffect)(()=>{h&&h.rows.length>0&&(i(e=>Math.max(e,h.maxId)),o(e=>{let t=new Set(e.map(e=>e.id));return[...h.rows.filter(e=>!t.has(e.id)),...e].slice(0,100)}))},[h]),(0,_.useEffect)(()=>{let e=f!==null;d.current===!1&&e&&c(e=>e+1),d.current=e},[f]);let g=f?rr(f.uptime_ms):null,v=f&&f.last_eval_at>0?ar(f.last_eval_at):null,y=f?p?.breaches.cpu?`text-red-400`:(f.cpu_pct??0)>=60?`text-yellow-400`:`text-green-400`:`text-[#e0e0e0]`,b=p?.breaches.memory?`text-red-400`:`text-[#e0e0e0]`;return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Daemon Monitor`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s>0&&(0,I.jsxs)(Lt,{variant:`amber`,children:[s,` restart`,s===1?``:`s`]}),(0,I.jsx)(`span`,{className:`text-xs text-[#444] font-mono`,children:ir(t)})]})]}),p&&(p.breaches.cpu||p.breaches.memory)&&(0,I.jsxs)(`div`,{className:`border border-red-500/30 bg-red-500/5 rounded p-3 text-xs flex items-start gap-2`,children:[(0,I.jsx)(`span`,{className:`text-red-400 shrink-0`,children:`⚠`}),(0,I.jsxs)(`div`,{className:`space-y-0.5`,children:[p.breaches.cpu&&(0,I.jsxs)(`div`,{className:`text-red-300`,children:[`CPU limit exceeded: `,f?.cpu_pct??`?`,`% >`,` `,p.config.cpuLimitPct,`%`]}),p.breaches.memory&&(0,I.jsxs)(`div`,{className:`text-red-300`,children:[`Memory limit exceeded: `,f?.memory_rss_mb??`?`,`MB >`,` `,p.config.memoryLimitMb,`MB`]})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`Daemon Status`}),(0,I.jsx)(z,{children:f===null?(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-red-500 shrink-0`}),(0,I.jsx)(`span`,{className:`text-red-400 font-semibold`,children:`DOWN`}),(0,I.jsx)(`span`,{className:`text-[#555] text-xs`,children:`— socket not reachable`})]}):(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-sm flex-wrap`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse shrink-0`}),(0,I.jsx)(`span`,{className:`text-green-400 font-semibold`,children:`UP`})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`PID `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:f.pid})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`uptime`,` `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:g})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`mem`,` `,(0,I.jsxs)(`span`,{className:`text-[#aaa] font-mono`,children:[f.memory_rss_mb,`MB`]})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`cpu`,` `,(0,I.jsxs)(`span`,{className:`font-mono ${y}`,children:[f.cpu_pct,`%`]})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`last eval`,` `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:v??`—`})]})]})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[`System Resources`,p&&(p.breaches.cpu||p.breaches.memory)&&(0,I.jsx)(`span`,{className:`text-[10px] text-red-400 border border-red-500/30 rounded px-1`,children:`limit exceeded`})]}),(0,I.jsx)(`button`,{onClick:()=>u(e=>!e),className:`text-[10px] text-[#555] hover:text-[#aaa] transition-colors`,children:l?`Hide limits`:`Configure limits`})]}),(0,I.jsxs)(z,{children:[f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data — daemon not running`}):(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`CPU`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(f.history.cpu_pct.length??0)>1&&(0,I.jsx)(Yt,{data:f.history.cpu_pct,width:80,height:20,color:p?.breaches.cpu?`#ef4444`:`#22c55e`,threshold:p?.config.cpuLimitPct,maxValue:100}),(0,I.jsxs)(`span`,{className:`font-mono font-semibold w-12 text-right ${y}`,children:[f.cpu_pct,`%`]})]})]}),(0,I.jsx)(ur,{value:f.cpu_pct,max:100,threshold:p?.config.cpuLimitPct??90,breached:p?.breaches.cpu??!1}),p&&(0,I.jsxs)(`div`,{className:`text-[10px] text-[#555]`,children:[`limit: `,p.config.cpuLimitPct,`%`]})]}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Memory RSS`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(f.history.memory_rss_mb.length??0)>1&&(0,I.jsx)(Yt,{data:f.history.memory_rss_mb,width:80,height:20,color:p?.breaches.memory?`#ef4444`:`#3b82f6`,threshold:p?.config.memoryLimitMb}),(0,I.jsxs)(`span`,{className:`font-mono font-semibold w-16 text-right ${b}`,children:[f.memory_rss_mb,`MB`]})]})]}),(0,I.jsx)(ur,{value:f.memory_rss_mb,max:Math.max(f.memory_rss_mb*1.5,p?.config.memoryLimitMb??512),threshold:p?.config.memoryLimitMb??512,breached:p?.breaches.memory??!1}),p&&(0,I.jsxs)(`div`,{className:`text-[10px] text-[#555]`,children:[`limit: `,p.config.memoryLimitMb,`MB`]})]}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Heap`}),(0,I.jsxs)(`span`,{className:`font-mono text-[#aaa]`,children:[f.heap_used_mb,`MB / `,f.heap_total_mb,`MB`]})]}),(0,I.jsx)(`div`,{className:`w-full bg-[#1a1a1a] rounded-full h-1 overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full bg-blue-500/60 transition-all duration-500`,style:{width:`${f.heap_total_mb>0?Math.min(100,f.heap_used_mb/f.heap_total_mb*100):0}%`}})})]})]}),l&&p&&(0,I.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-[#1e1e1e]`,children:[(0,I.jsxs)(`p`,{className:`text-[11px] text-[#555] mb-3`,children:[`Thresholds trigger UI warnings. Values are persisted to`,` `,(0,I.jsx)(`code`,{children:`.sigmashake/config.toml`}),`.`]}),(0,I.jsx)(dr,{limitsData:p,onSaved:()=>{m(),u(!1)}})]})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2`,children:[(0,I.jsx)(or,{label:`Total evals`,value:f?.evals_total??`—`,accent:`text-[#e0e0e0]`}),(0,I.jsx)(or,{label:`Allow`,value:f?.decisions.allow??`—`,accent:`text-green-400`}),(0,I.jsx)(or,{label:`Block`,value:f?.decisions.block??`—`,accent:`text-red-400`}),(0,I.jsx)(or,{label:`Force`,value:f?.decisions.force??`—`,accent:`text-purple-400`}),(0,I.jsx)(or,{label:`Log`,value:f?.decisions.log??`—`,accent:`text-yellow-400`}),(0,I.jsx)(or,{label:`Ask`,value:f?.decisions.ask??`—`,accent:`text-cyan-400`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Eval Latency`}),f&&(0,I.jsxs)(`span`,{className:`text-[10px] text-[#555]`,children:[f.latency.samples,` samples`]})]}),(0,I.jsx)(z,{children:f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data`}):(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(lr,{label:`p50`,ns:f.latency.p50_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`p95`,ns:f.latency.p95_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`p99`,ns:f.latency.p99_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`max`,ns:f.latency.max_ns,maxNs:f.latency.max_ns})]})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`Engine`}),(0,I.jsx)(z,{children:f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data`}):(0,I.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Native evals`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.engine.native_evals})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`TS evals`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.engine.ts_evals})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Native %`}),(0,I.jsxs)(`span`,{className:`font-mono text-[#aaa]`,children:[f.engine.native_pct,`%`]})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Rule reloads`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.rule_reloads})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Rate limit trips`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.rate_limit_trips})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Loop guard blocks`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.loop_guard_blocks})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Connection errors`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.connection_errors})]})]})})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Live Event Tail`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#444]`,children:`newest first · auto-updating`})]}),(0,I.jsx)(z,{children:a.length===0?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No events yet`}):(0,I.jsx)(`div`,{className:`space-y-0.5 font-mono text-xs max-h-96 overflow-y-auto`,children:a.map(e=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2 py-0.5 border-b border-[#111] last:border-0`,children:[(0,I.jsx)(`span`,{className:`text-[#444] shrink-0 w-16`,children:ir(e.timestamp)}),e.tool===`__daemon`?(0,I.jsxs)(`span`,{className:`text-cyan-600`,children:[`⚙ daemon`,` `,(()=>{try{let t=JSON.parse(e.input??`{}`);return`${t.event??e.decision}${t.detail?` (${t.detail})`:``}`}catch{return e.decision}})()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`shrink-0 w-16 ${sr[e.decision]??`text-[#666]`}`,children:[cr[e.decision]??`·`,` `,e.decision.padEnd(5)]}),(0,I.jsx)(`span`,{className:`text-[#aaa] shrink-0 w-24 truncate`,children:e.tool}),(0,I.jsx)(`span`,{className:`text-[#444] shrink-0 w-14 text-right`,children:nr(e.duration_ns)}),e.rule_id&&(0,I.jsx)(`a`,{href:`/rules?highlight=${encodeURIComponent(e.rule_id)}`,className:`text-amber-600 hover:text-amber-400 truncate`,title:e.rule_id,children:e.rule_id})]})]},e.id))})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`AI Agent Debug Endpoints`}),(0,I.jsxs)(z,{children:[(0,I.jsx)(`p`,{className:`text-[11px] text-[#555] mb-2`,children:`Agents can query these endpoints directly for automated triage:`}),(0,I.jsxs)(`div`,{className:`space-y-1 font-mono text-[11px]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/daemon-metrics`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/daemon-metrics`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— full metrics snapshot (cpu, memory, history, latency)`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/limits`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/limits`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— resource limits config + breach state`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/audit-tail?after=0&limit=20`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/audit-tail?after=0&limit=20`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— recent eval events`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/daemon-status`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/daemon-status`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— status, PID, log tail`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/healthz`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/healthz`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— process uptime`})]})]})]})]})]})}function pr(e){return e===0?`0 B`:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function mr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function hr(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function gr(e){return e?new Date(e*1e3).toLocaleString():`—`}function _r(e){if(!e||e===0)return`never`;let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function vr({children:e,className:t}){return(0,I.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-[#444] mb-3 ${t??``}`,children:e})}function yr({label:e,value:t,mono:n=!0,accent:r}){return(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4 py-1.5 border-b border-[#111] last:border-0`,children:[(0,I.jsx)(`span`,{className:`text-xs text-[#555] shrink-0`,children:e}),(0,I.jsx)(`span`,{className:`text-xs text-right truncate max-w-[65%] ${n?`font-mono`:``} ${r??`text-[#bbb]`}`,children:t})]})}function br({ok:e,label:t,badLabel:n}){return e?(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-green-400 border border-green-400/20 rounded px-1.5 py-0.5`,children:[`✓ `,t]}):(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-red-400 border border-red-400/20 rounded px-1.5 py-0.5`,children:[`✗ `,n??t]})}function xr({pct:e,total:t,max:n}){let r=e<60?`bg-green-500`:e<85?`bg-amber-400`:`bg-red-500`;return(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsxs)(`span`,{className:`text-[#555]`,children:[t.toLocaleString(),` / `,n.toLocaleString(),` rows`]}),(0,I.jsxs)(`span`,{className:`font-mono ${e>=85?`text-red-400`:e>=60?`text-amber-400`:`text-green-400`}`,children:[e,`%`]})]}),(0,I.jsx)(`div`,{className:`h-2 bg-[#111] rounded-full overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500 ${r}`,style:{width:`${Math.min(100,e)}%`}})})]})}var Sr=3e3,Cr={log:`text-[#aaa]`,info:`text-blue-400`,warn:`text-amber-400`,error:`text-red-400`,debug:`text-[#666]`};function wr(e){return e.value==null?e.description?e.description:`[${e.type}]`:String(e.value)}function Tr(){let e=kn(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=(0,_.useRef)(0);(0,_.useEffect)(()=>{p.current?.scrollIntoView({behavior:`smooth`})},[a]),(0,_.useEffect)(()=>{if(e.connected)return e.sendCommand(`Runtime.enable`).catch(()=>{}),e.onEvent(`Runtime.consoleAPICalled`,e=>{let t=e;o(e=>{let n=[...e,{id:m.current++,type:t.type??`log`,args:t.args??[],timestamp:t.timestamp??Date.now()}];return n.length>500?n.slice(-500):n})})},[e.connected]),(0,_.useEffect)(()=>{e.preconfiguredTarget&&!e.connected&&!e.connecting&&e.connect(e.preconfiguredTarget.id)},[e]),(0,_.useEffect)(()=>{!e.connected||d||t||r||(f(!0),(async()=>{try{await e.sendCommand(`Profiler.enable`),await e.sendCommand(`Profiler.start`),n(!0),setTimeout(async()=>{try{let t=await e.sendCommand(`Profiler.stop`);n(!1),i(t.profile)}catch{n(!1)}},Sr)}catch{}})(),e.sendCommand(`Runtime.evaluate`,{expression:`JSON.stringify(process.memoryUsage())`,returnByValue:!0}).then(e=>{c(JSON.parse(e.result.value))}).catch(()=>{}))},[e.connected,d,t,r]);let h=(0,_.useCallback)(async()=>{try{await e.sendCommand(`Profiler.enable`),await e.sendCommand(`Profiler.start`),n(!0),i(null)}catch(e){console.error(`Profiler.start failed:`,e)}},[e]),g=(0,_.useCallback)(async()=>{try{let t=await e.sendCommand(`Profiler.stop`);n(!1),i(t.profile)}catch(e){console.error(`Profiler.stop failed:`,e),n(!1)}},[e]),v=(0,_.useCallback)(async()=>{u(!0);try{let t=await e.sendCommand(`Runtime.evaluate`,{expression:`JSON.stringify(process.memoryUsage())`,returnByValue:!0});c(JSON.parse(t.result.value))}catch{}finally{u(!1)}},[e]),y=(0,_.useCallback)(()=>{e.preconfiguredTarget&&e.connect(e.preconfiguredTarget.id)},[e]);return e.active?e.connected?(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,I.jsxs)(`span`,{className:`text-xs text-green-400`,children:[`● Connected`,e.bunVersion?` — Bun v${e.bunVersion}`:``]}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:e.disconnect,children:`Disconnect`})]})]}),e.error&&(0,I.jsx)(z,{children:(0,I.jsx)(`p`,{className:`text-xs text-red-400`,children:e.error})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`CPU Profiler`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[t&&(0,I.jsx)(`span`,{className:`text-xs text-red-400 animate-pulse`,children:`● Recording`}),t?(0,I.jsx)(zt,{variant:`danger`,size:`sm`,onClick:g,children:`Stop & Render`}):(0,I.jsx)(zt,{variant:`primary`,size:`sm`,onClick:h,children:`Start Recording`})]})]}),(0,I.jsx)(z,{children:r?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-[#555]`,children:[(0,I.jsxs)(`span`,{children:[`Nodes: `,(0,I.jsx)(`span`,{className:`text-[#aaa]`,children:r.nodes.length})]}),(0,I.jsxs)(`span`,{children:[`Duration:`,` `,(0,I.jsxs)(`span`,{className:`text-[#aaa]`,children:[((r.endTime-r.startTime)/1e3).toFixed(0),`ms`]})]}),(0,I.jsxs)(`span`,{children:[`Samples: `,(0,I.jsx)(`span`,{className:`text-[#aaa]`,children:r.samples?.length??0})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-3 text-[10px] text-[#555]`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#451a03`}}),`User code`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#172554`}}),`Runtime (bun:/node:)`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#1f2937`}}),`Native/other`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#450a0a`}}),`GC/idle`]})]}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] rounded-lg p-2 overflow-x-hidden`,children:(0,I.jsx)(In,{profile:r})})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#555]`,children:t?`Recording CPU profile (auto-captures ${Sr/1e3}s)… perform actions in ssg to generate data.`:`Click "Start Recording", or wait for auto-capture on page load.`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Memory`}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:v,disabled:l,className:`ml-auto`,children:l?`…`:`↻ Refresh`})]}),(0,I.jsx)(z,{children:s?(0,I.jsx)(`div`,{className:`grid grid-cols-4 gap-3`,children:[{label:`RSS`,value:mr(s.rss)},{label:`Heap Total`,value:mr(s.heapTotal)},{label:`Heap Used`,value:mr(s.heapUsed)},{label:`External`,value:mr(s.external)}].map(e=>(0,I.jsxs)(`div`,{className:`bg-[#0d0d0d] rounded-lg p-3 text-center`,children:[(0,I.jsx)(`div`,{className:`text-lg font-bold text-white tabular-nums`,children:e.value}),(0,I.jsx)(`div`,{className:`text-xs text-[#555] mt-0.5`,children:e.label})]},e.label))}):(0,I.jsx)(`p`,{className:`text-xs text-[#555]`,children:d?`Fetching memory metrics…`:`Click Refresh to fetch process.memoryUsage().`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Console`}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:()=>o([]),className:`ml-auto`,children:`Clear`})]}),(0,I.jsx)(z,{children:(0,I.jsxs)(`div`,{className:`bg-[#0a0a0a] rounded-lg p-2 h-40 overflow-y-auto font-mono text-[11px]`,children:[a.length===0?(0,I.jsx)(`p`,{className:`text-[#444]`,children:`Console output will appear here…`}):a.map(e=>(0,I.jsxs)(`div`,{className:`py-0.5 border-b border-[#111] ${Cr[e.type]??`text-[#aaa]`}`,children:[(0,I.jsxs)(`span`,{className:`text-[#444] mr-2`,children:[`[`,e.type.toUpperCase(),`]`]}),e.args.map(wr).join(` `)]},e.id)),(0,I.jsx)(`div`,{ref:p})]})})]})]}):(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,I.jsx)(Lt,{variant:`amber`,children:e.connecting?`Connecting…`:`Available`}),!e.connecting&&(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:y,children:`Connect`})]})]}),(0,I.jsx)(z,{children:(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:e.connecting?`Establishing WebSocket connection to Bun inspector…`:`Inspector is active but not connected. Click Connect to start profiling.`})})]}):(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsx)(Lt,{variant:`outline`,className:`ml-auto`,children:`Inactive`})]}),(0,I.jsx)(z,{children:(0,I.jsxs)(`p`,{className:`text-xs text-[#444]`,children:[`The Bun inspector is not active. Restart `,(0,I.jsx)(`code`,{className:`bg-[#111] px-1 rounded text-[10px]`,children:`ssg serve`}),` to enable it automatically.`]})})]})}function Er(){let e=se([`metrics-tick`,`rules-changed`]),{data:t,refetch:n}=E(`/api/json/observability`,[e[`metrics-tick`],e[`rules-changed`]]),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(Date.now()),[s,c]=(0,_.useState)(`idle`),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(`idle`);(0,_.useEffect)(()=>{t&&o(Date.now())},[t]);let p=(0,_.useCallback)(async()=>{c(`loading`);try{let e=await(await fetch(`/api/rules/sync-to-db`,{method:`POST`})).json();if(e.ok){c(`done`);let t=(e.pruned_count??0)>0?` (${e.pruned_count} orphan(s) pruned)`:``;u((e.message??`Synced ${e.synced} rules`)+t),n()}else c(`error`),u(e.error??`Sync failed`)}catch(e){c(`error`),u(String(e))}},[n]),m=(0,_.useCallback)(async()=>{f(`loading`);try{await fetch(`/api/rules/force-reload`,{method:`POST`}),f(`done`),n(),setTimeout(()=>f(`idle`),3e3)}catch{f(`idle`)}},[n]),h=t?.db,g=t?.rules,v=t?.audit,y=t?.process,b=t?.flight_recorder,x=g?.drift_detected??!1;return(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Observability`}),(0,I.jsx)(`p`,{className:`text-xs text-[#444] mt-0.5`,children:`SQLite health, rule drift detection, runtime profiler, and diagnostics`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] text-[#333] font-mono`,children:[`refreshed `,_r(a)]}),(0,I.jsx)(`button`,{onClick:n,className:`text-xs text-[#555] hover:text-amber-400 transition-colors px-2 py-1 border border-[#222] rounded`,children:`↻ Refresh`})]})]}),(0,I.jsxs)(L,{className:x?`border-red-500/40 shadow-red-900/10 shadow-lg`:`border-green-500/20`,children:[(0,I.jsxs)(R,{className:`flex items-center justify-between pb-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-semibold`,children:`Rule Drift Detector`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#444]`,children:`— .rules files vs SQLite`})]}),g&&(x?(0,I.jsx)(`span`,{className:`flex items-center gap-1.5 text-xs font-bold text-red-400 border border-red-400/30 rounded px-2 py-1 bg-red-500/5`,children:`⚠ DRIFT DETECTED`}):(0,I.jsx)(`span`,{className:`flex items-center gap-1.5 text-xs font-bold text-green-400 border border-green-400/30 rounded px-2 py-1 bg-green-500/5`,children:`✓ IN SYNC`}))]}),(0,I.jsx)(z,{children:g?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3`,children:[{label:`.rules Files`,value:g.file_count,sub:`${g.file_rule_count} rules total`},{label:`DB Rules`,value:g.db_rule_count,sub:`${g.db_enabled_count} enabled`},{label:`Only in Files`,value:g.drift_details.only_in_files.length,accent:g.drift_details.only_in_files.length>0?`text-amber-400`:`text-[#555]`},{label:`Only in DB`,value:g.drift_details.only_in_db.length,accent:g.drift_details.only_in_db.length>0?`text-red-400`:`text-[#555]`}].map(({label:e,value:t,sub:n,accent:r})=>(0,I.jsxs)(`div`,{className:`bg-[#0d0d0d] border border-[#1a1a1a] rounded p-3`,children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:e}),(0,I.jsx)(`div`,{className:`text-xl font-mono font-semibold ${r??`text-[#ddd]`}`,children:t}),n&&(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] mt-0.5`,children:n})]},e))}),x&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`button`,{onClick:()=>i(e=>!e),className:`text-xs text-amber-400 hover:text-amber-300 flex items-center gap-1 transition-colors`,children:[r?`▾`:`▸`,` View drift details`]}),r&&(0,I.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[g.drift_details.only_in_files.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`text-[10px] text-amber-400/70 mb-1.5 uppercase tracking-wide`,children:[`In .rules files but NOT in DB — run `,(0,I.jsx)(`code`,{className:`bg-[#111] px-1 rounded`,children:`ssg sync`})]}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] border border-amber-400/10 rounded p-2 space-y-0.5 max-h-40 overflow-y-auto`,children:g.drift_details.only_in_files.map(e=>(0,I.jsxs)(`div`,{className:`font-mono text-[11px] text-amber-300/70`,children:[`+ `,e]},e))})]}),g.drift_details.only_in_db.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-red-400/70 mb-1.5 uppercase tracking-wide`,children:`In DB but NOT in any .rules file — orphaned rules`}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] border border-red-400/10 rounded p-2 space-y-0.5 max-h-40 overflow-y-auto`,children:g.drift_details.only_in_db.map(e=>(0,I.jsxs)(`div`,{className:`font-mono text-[11px] text-red-300/70`,children:[`− `,e]},e))})]})]})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-3 border-t border-[#111]`,children:[(0,I.jsx)(`button`,{onClick:p,disabled:s===`loading`,className:`inline-flex items-center gap-1.5 h-7 px-3 rounded-md text-xs font-medium bg-amber-500/10 text-amber-400 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/40 transition-all cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,title:`Reads all .rules files and upserts them into SQLite. This eliminates drift and enables faster DB-based rule loading.`,children:s===`loading`?`⟳ Syncing…`:`↑ Sync Files → DB`}),(0,I.jsx)(`button`,{onClick:m,disabled:d===`loading`,className:`inline-flex items-center gap-1.5 h-7 px-3 rounded-md text-xs font-medium bg-[#1a1a1a] text-[#888] border border-[#222] hover:text-[#bbb] hover:border-[#333] transition-all cursor-pointer disabled:opacity-50`,title:`Invalidates the in-memory rules cache. The daemon will reload rules from DB (or files) on the next eval.`,children:d===`loading`?`⟳`:d===`done`?`✓ Reloaded`:`↻ Force Reload`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#333] ml-auto`,children:g.db_rule_count===0?`⚠ DB empty — daemon falls back to file-based loading (slower reload)`:`DB has ${g.db_rule_count} rules — daemon uses fast indexed queries`})]}),s===`done`&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-md px-3 py-2 mt-2 text-xs font-medium bg-green-500/10 border border-green-500/20 text-green-400`,children:[(0,I.jsxs)(`span`,{children:[`✓ `,l]}),(0,I.jsx)(`button`,{onClick:()=>c(`idle`),className:`ml-3 shrink-0 px-2 py-0.5 rounded border border-current/30 hover:bg-white/5 transition-colors cursor-pointer`,children:`Dismiss`})]}),s===`error`&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-md px-3 py-2 mt-2 text-xs font-medium bg-red-500/10 border border-red-500/20 text-red-400`,children:[(0,I.jsxs)(`span`,{children:[`✗ `,l]}),(0,I.jsx)(`button`,{onClick:()=>c(`idle`),className:`ml-3 shrink-0 px-2 py-0.5 rounded border border-current/30 hover:bg-white/5 transition-colors cursor-pointer`,children:`Dismiss`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] text-[#444] pt-1 border-t border-[#111]`,children:[(0,I.jsxs)(`span`,{children:[`rules dir: `,(0,I.jsx)(`span`,{className:`font-mono text-[#555]`,children:g.rules_dir})]}),(0,I.jsxs)(`span`,{className:`ml-auto`,children:[`last reload: `,(0,I.jsx)(`span`,{className:`font-mono text-[#555]`,children:_r(g.last_reload_at)})]})]})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`flex items-center justify-between pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`SQLite Database`}),h&&!h.error&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(br,{ok:h.journal_mode===`wal`,label:`WAL`,badLabel:`NO WAL`}),(0,I.jsx)(br,{ok:h.synchronous===`NORMAL`,label:`NORMAL`,badLabel:h.synchronous})]})]}),(0,I.jsx)(z,{children:h?h.error?(0,I.jsx)(`div`,{className:`text-xs text-red-400 font-mono bg-red-900/10 border border-red-500/20 rounded p-2`,children:h.error}):(0,I.jsxs)(`div`,{children:[(0,I.jsx)(vr,{children:`Storage`}),(0,I.jsx)(yr,{label:`File path`,value:h.path.replace(`/home/`,`~/../`)}),(0,I.jsx)(yr,{label:`File size`,value:pr(h.file_size_bytes)}),(0,I.jsx)(yr,{label:`Allocated`,value:`${pr(h.allocated_bytes)} (${h.page_count.toLocaleString()} pages × ${h.page_size}B)`}),(0,I.jsx)(vr,{className:`mt-4`,children:`PRAGMA Configuration`}),(0,I.jsx)(yr,{label:`journal_mode`,value:h.journal_mode,accent:h.journal_mode===`wal`?`text-green-400`:`text-amber-400`}),(0,I.jsx)(yr,{label:`synchronous`,value:h.synchronous,accent:h.synchronous===`NORMAL`?`text-green-400`:`text-amber-400`}),(0,I.jsx)(yr,{label:`cache_size`,value:`${h.cache_size_kb.toLocaleString()} KB (${Math.round(h.cache_size_kb/1024)} MB)`}),(0,I.jsx)(yr,{label:`page_size`,value:`${h.page_size.toLocaleString()} B`}),h.wal_checkpoint&&(0,I.jsx)(yr,{label:`WAL checkpoint`,value:`log ${h.wal_checkpoint.log}, checkpointed ${h.wal_checkpoint.checkpointed}, busy ${h.wal_checkpoint.busy}`}),(0,I.jsx)(vr,{className:`mt-4`,children:`Table Row Counts`}),h.tables.map(e=>(0,I.jsx)(yr,{label:e.name,value:e.row_count>=0?e.row_count.toLocaleString():`error`,accent:e.row_count<0?`text-red-400`:`text-[#bbb]`},e.name))]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Audit Log Capacity`})}),(0,I.jsx)(z,{children:v?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsx)(xr,{pct:v.utilization_pct,total:v.total_rows,max:v.max_rows}),(0,I.jsxs)(`div`,{className:`space-y-0`,children:[(0,I.jsx)(yr,{label:`Total rows`,value:v.total_rows.toLocaleString()}),(0,I.jsx)(yr,{label:`Rotation limit`,value:v.max_rows.toLocaleString()}),(0,I.jsx)(yr,{label:`Utilization`,value:`${v.utilization_pct}%`,accent:v.utilization_pct>=85?`text-red-400`:v.utilization_pct>=60?`text-amber-400`:`text-green-400`}),(0,I.jsx)(yr,{label:`Oldest entry`,value:gr(v.oldest_timestamp)}),(0,I.jsx)(yr,{label:`Newest entry`,value:gr(v.newest_timestamp)})]}),v.utilization_pct>=85&&(0,I.jsx)(`div`,{className:`text-[11px] text-red-400 bg-red-500/5 border border-red-500/20 rounded p-2`,children:`⚠ Audit log nearing rotation limit. Oldest entries will be purged automatically.`})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Process & Runtime`})}),(0,I.jsx)(z,{children:y?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(yr,{label:`PID`,value:y.pid}),(0,I.jsx)(yr,{label:`Uptime`,value:hr(y.uptime_ms)}),(0,I.jsx)(yr,{label:`Memory (RSS)`,value:`${y.memory_rss_mb} MB`}),(0,I.jsx)(yr,{label:`Bun version`,value:y.bun_version}),(0,I.jsx)(yr,{label:`Node compat`,value:y.node_version}),(0,I.jsx)(yr,{label:`Platform`,value:`${y.platform} / ${y.arch}`})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Flight Recorder`})}),(0,I.jsx)(z,{children:b?(0,I.jsxs)(`div`,{className:`grid grid-cols-3 gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`Log File`}),(0,I.jsx)(`div`,{className:`text-xs font-mono text-[#bbb] truncate`,children:`…${b.path.slice(-50)}`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`File Size`}),(0,I.jsx)(`div`,{className:`text-xs font-mono ${b.file_size_bytes===0?`text-[#444]`:`text-[#bbb]`}`,children:pr(b.file_size_bytes)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`Approx. Entries`}),(0,I.jsx)(`div`,{className:`text-xs font-mono ${b.approx_entries===0?`text-[#444]`:`text-[#bbb]`}`,children:b.approx_entries===0?`—`:b.approx_entries.toLocaleString()})]})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsx)(Tr,{}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Observability API`})}),(0,I.jsxs)(z,{children:[(0,I.jsx)(`p`,{className:`text-[11px] text-[#444] mb-3`,children:`Machine-readable endpoints for automated monitoring and AI agent triage:`}),(0,I.jsx)(`div`,{className:`space-y-1.5 font-mono text-[11px]`,children:[[`/api/json/observability`,`SQLite health, rule drift, process info`],[`/api/json/daemon-metrics`,`Eval latency, decision counters, memory`],[`/api/json/audit-tail?after=0&limit=20`,`Recent eval events (live feed)`],[`/api/json/daemon-status`,`Daemon PID, status, log tail`],[`/healthz`,`Process liveness`],[`/readyz`,`SQLite liveness`]].map(([e,t])=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#333]`,children:`GET`}),(0,I.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400 transition-colors`,children:e}),(0,I.jsxs)(`span`,{className:`text-[#333] hidden sm:inline`,children:[`— `,t]})]},e))})]})]})]})}var Dr=`ssg-dashboard-tabs`,Or=2e3,kr=6e3;function Ar(){return`tab-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}function jr(){let[e,t]=(0,_.useState)(0),[n,r]=(0,_.useState)(!0),i=(0,_.useRef)(Ar()),a=(0,_.useRef)(new Map);return(0,_.useEffect)(()=>{if(typeof BroadcastChannel>`u`)return;let e=new BroadcastChannel(Dr);function n(){let e=Date.now();for(let[t,n]of a.current.entries())e-n>kr&&a.current.delete(t);let n=a.current.size;t(n),r([...a.current.keys(),i.current].sort()[0]===i.current)}function o(e){let t=e.data;!t||t.id===i.current||(t.type===`leave`?a.current.delete(t.id):a.current.set(t.id,Date.now()),n())}e.addEventListener(`message`,o),e.postMessage({type:`join`,id:i.current});let s=setInterval(()=>{e.postMessage({type:`heartbeat`,id:i.current}),n()},Or),c=()=>{e.postMessage({type:`leave`,id:i.current})};return window.addEventListener(`beforeunload`,c),()=>{clearInterval(s),e.postMessage({type:`leave`,id:i.current}),e.removeEventListener(`message`,o),e.close(),window.removeEventListener(`beforeunload`,c)}},[]),{otherTabCount:e,isLeader:n}}var Mr=[{path:`/`,label:`Dashboard`},{path:`/rules`,label:`Rules`},{path:`/audit`,label:`Audit`},{path:`/approvals`,label:`Approvals`},{path:`/hub`,label:`Hub`},{path:`/profile`,label:`Profile`},{path:`/monitor`,label:`Monitor`},{path:`/observability`,label:`Observability`}];function Nr(){let{data:e}=E(`/api/json/daemon-status`,[se([`stats-changed`])[`stats-changed`]]),[t,n]=(0,_.useState)(!1),r=e?.status??`starting`,i=r===`running`?`bg-green-500`:r===`starting`?`bg-amber-400`:`bg-red-500`,a=r===`running`?`Daemon running`:r===`starting`?`Daemon starting…`:r===`error`?`Daemon error`:`Daemon stopped`;return(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`button`,{onClick:()=>n(e=>!e),className:`flex items-center gap-1.5 text-xs text-[#666] hover:text-[#aaa] transition-colors`,title:a,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full ${i}`}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:a})]}),t&&(0,I.jsxs)(`div`,{className:`absolute right-0 top-7 z-50 w-72 bg-[#111] border border-[#222] rounded-lg shadow-xl p-3 text-xs`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,I.jsx)(`span`,{className:`font-medium text-[#ddd]`,children:`Eval Daemon`}),(0,I.jsx)(`button`,{onClick:()=>n(!1),className:`text-[#555] hover:text-[#aaa]`,children:`✕`})]}),(0,I.jsxs)(`div`,{className:`space-y-1 text-[#888]`,children:[(0,I.jsxs)(`div`,{children:[`Status:`,` `,(0,I.jsx)(`span`,{className:r===`running`?`text-green-400`:r===`starting`?`text-amber-400`:`text-red-400`,children:r})]}),e?.pid&&(0,I.jsxs)(`div`,{children:[`PID: `,e.pid]})]}),e?.logTail&&e.logTail.length>0&&(0,I.jsxs)(`div`,{className:`mt-2`,children:[(0,I.jsx)(`div`,{className:`text-[#555] mb-1`,children:`Recent log:`}),(0,I.jsx)(`pre`,{className:`bg-[#0a0a0a] rounded p-2 text-[10px] text-[#777] overflow-x-auto whitespace-pre-wrap break-all max-h-32 overflow-y-auto`,children:e.logTail.join(`
|
|
18
|
-
`)})]})]})]})}function Pr(){let{data:e}=E(`/api/json/mcp-status`,[se([`audit-changed`])[`audit-changed`]]),t=e?.status??`inactive`;if(t===`inactive`)return null;let n=t===`active`?`bg-blue-500`:`bg-[#444]`,r=t===`active`?`MCP active`:`MCP idle`;return(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-[#555]`,title:t===`active`?`MCP server: ${e?.recentCount??0} evals in last 5 min`:`MCP server: ${e?.totalCount??0} total evals`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full ${n}`}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:r})]})}function Fr(e){if(e===`/`)return(0,I.jsx)(cn,{});if(e===`/rules`)return(0,I.jsx)(hn,{});if(e===`/audit`)return(0,I.jsx)(yn,{});if(e===`/approvals`)return(0,I.jsx)(On,{});if(e===`/profile`)return(0,I.jsx)(Un,{});if(e===`/hub/connect`)return(0,I.jsx)(er,{});if(e===`/hub/publish`)return(0,I.jsx)(tr,{});if(e.startsWith(`/hub/`)){let t=e.slice(5);if(t)return(0,I.jsx)($n,{id:t})}return e===`/hub`?(0,I.jsx)(Zn,{}):e===`/monitor`?(0,I.jsx)(fr,{}):e===`/observability`?(0,I.jsx)(Er,{}):(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-24 text-[#555]`,children:[(0,I.jsx)(`p`,{className:`text-lg`,children:`404 — Page not found`}),(0,I.jsx)(`a`,{href:`/`,className:`mt-4 text-amber-400 hover:underline text-sm`,children:`Back to Dashboard`})]})}function Ir(e){history.pushState(null,``,e),window.dispatchEvent(new PopStateEvent(`popstate`))}function Lr({count:e}){let[t,n]=(0,_.useState)(!1);return t||e===0?null:(0,I.jsx)(`div`,{className:`border-b border-amber-500/20 bg-amber-500/5 px-4 py-2`,children:(0,I.jsxs)(`div`,{className:`max-w-7xl mx-auto flex items-center gap-3`,children:[(0,I.jsxs)(`svg`,{className:`shrink-0 text-amber-400`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,I.jsx)(`path`,{d:`M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z`}),(0,I.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,I.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),(0,I.jsxs)(`p`,{className:`text-xs text-amber-300 flex-1`,children:[(0,I.jsxs)(`span`,{className:`font-semibold`,children:[e,` other `,e===1?`tab is`:`tabs are`,` open.`]}),` `,`Each tab holds a live SSE connection. Browsers limit connections per origin — too many tabs will prevent this page from loading CSS and JS.`,` `,(0,I.jsx)(`span`,{className:`text-amber-400/70`,children:`Close other tabs to restore full live-update functionality.`})]}),(0,I.jsx)(`button`,{onClick:()=>n(!0),className:`text-amber-500/50 hover:text-amber-400 transition-colors shrink-0 cursor-pointer`,title:`Dismiss`,children:(0,I.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,I.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,I.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})})}function Rr(){let[e,t]=(0,_.useState)(window.location.pathname),{otherTabCount:n}=jr();(0,_.useEffect)(()=>{let e=()=>t(window.location.pathname);return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,_.useEffect)(()=>{let e=e=>{let t=e.target.closest(`a`);if(!t)return;let n=t.getAttribute(`href`);!n||n.startsWith(`http`)||n.startsWith(`//`)||(e.preventDefault(),Ir(n))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let r=t=>t===`/`?e===`/`:e.startsWith(t);return(0,I.jsxs)(`div`,{className:`min-h-screen bg-[#080808] text-white`,children:[(0,I.jsxs)(`header`,{className:`border-b border-[#1e1e1e] sticky top-0 z-50 bg-[#080808]/95 backdrop-blur`,children:[(0,I.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 flex items-center h-12 gap-6`,children:[(0,I.jsx)(`span`,{className:`text-amber-400 font-bold text-sm tracking-tight select-none`,children:`ssg`}),(0,I.jsx)(`nav`,{className:`flex items-center gap-1`,children:Mr.map(e=>(0,I.jsx)(`a`,{href:e.path,className:`px-3 py-1.5 rounded text-sm transition-colors ${r(e.path)?`bg-[#1a1a1a] text-white`:`text-[#888] hover:text-white hover:bg-[#111]`}`,children:e.label},e.path))}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 ml-auto`,children:[n>0&&(0,I.jsxs)(`span`,{className:`text-xs text-amber-400/70 border border-amber-500/20 rounded px-1.5 py-0.5`,title:`${n} other tab${n===1?``:`s`} open — may cause connection issues`,children:[n+1,` tabs open`]}),(0,I.jsx)(Pr,{}),(0,I.jsx)(Nr,{})]})]}),(0,I.jsx)(Lr,{count:n})]}),(0,I.jsx)(`main`,{className:`max-w-7xl mx-auto px-4 py-6`,children:Fr(e)})]})}var zr=document.getElementById(`app-root`);if(!zr)throw Error(`Missing #app-root`);g.createRoot(zr).render((0,I.jsx)(_.StrictMode,{children:(0,I.jsx)(Rr,{})}));
|
|
17
|
+
${c===`installed`?`bg-[#1e1e1e] text-white`:`text-[#555] hover:text-[#888]`}`,children:[`Installed`,ie>0&&(0,I.jsx)(`span`,{className:`text-[9px] bg-green-500/20 text-green-400 rounded-full px-1.5 py-0.5 font-bold`,children:ie})]})]}),(0,I.jsxs)(`div`,{className:`relative flex-1 min-w-[160px]`,children:[(0,I.jsxs)(`svg`,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 text-[#444]`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`input`,{type:`text`,placeholder:`Search rulesets…`,value:e,onChange:e=>t(e.target.value),className:`w-full bg-[#0d0d0d] border border-[#1c1c1c] text-[#aaa] text-xs rounded-lg pl-8 pr-3 h-8 focus:outline-none focus:border-[#333] placeholder:text-[#333]`})]}),(0,I.jsx)(`select`,{value:n,onChange:e=>r(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:Gn.map(e=>(0,I.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,I.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:[(0,I.jsx)(`option`,{value:``,children:`Any decision`}),qn.filter(Boolean).map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]}),(0,I.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`bg-[#0d0d0d] border border-[#1c1c1c] text-[#666] text-[11px] rounded-lg px-2.5 h-8 focus:outline-none focus:border-[#333] cursor-pointer`,children:[(0,I.jsx)(`option`,{value:``,children:`Any severity`}),Kn.filter(Boolean).map(e=>(0,I.jsx)(`option`,{value:e,children:e},e))]})]}),g&&u.length===0?(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:Array.from({length:6}).map((e,t)=>(0,I.jsx)(Jn,{},t))}):re.length===0?(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,I.jsxs)(`svg`,{className:`text-[#222] mb-3`,width:`40`,height:`40`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,children:[(0,I.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,I.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,I.jsx)(`p`,{className:`text-sm text-[#444]`,children:c===`installed`?`No rulesets installed yet. Browse the hub and click Install.`:`No rulesets found${e?` matching "${e}"`:``}.`})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3`,children:re.map(e=>(0,I.jsx)(Xn,{rs:e,installingId:y,onInstall:T,flashId:x},e.id))}),f&&c===`all`&&(0,I.jsx)(`div`,{className:`flex justify-center pt-2`,children:(0,I.jsx)(`button`,{onClick:te,disabled:g,className:`h-8 px-5 rounded-lg text-xs font-medium text-[#666] border border-[#1c1c1c] hover:text-[#aaa] hover:border-[#2a2a2a] transition-all cursor-pointer disabled:opacity-40`,children:g?`Loading…`:`Load more`})})]})]})}var Qn={deny:`red`,block:`red`,ask:`amber`,allow:`green`,log:`gray`,force:`blue`};function $n({id:e}){let{data:t,error:n}=E(`/api/json/hub/${e}`),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(!1);if(n)return(0,I.jsxs)(`div`,{className:`text-sm text-red-400`,children:[(0,I.jsx)(`p`,{children:n}),(0,I.jsx)(`a`,{href:`/hub`,className:`text-amber-400 hover:underline mt-2 block`,children:`← Back to Hub`})]});if(!t)return(0,I.jsx)(`p`,{className:`text-sm text-[#555]`,children:`Loading ruleset…`});async function s(){o(!0);try{(await fetch(`/api/hub/install`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({id:e})})).ok&&i(!0)}finally{o(!1)}}return(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`a`,{href:`/hub`,className:`text-xs text-[#555] hover:text-amber-400`,children:`← Hub`}),(0,I.jsx)(`h1`,{className:`text-xl font-semibold mt-1`,children:t.title}),(0,I.jsxs)(`p`,{className:`text-sm text-[#555] mt-0.5`,children:[`by `,t.author,` · v`,t.version,` ·`,` `,t.rule_count,` rule`,t.rule_count===1?``:`s`]})]}),(0,I.jsx)(zt,{variant:r?`secondary`:`primary`,onClick:s,disabled:a||r,children:r?`Installed`:a?`Installing…`:`Install`})]}),t.technologies.length>0&&(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.technologies.map(e=>(0,I.jsx)(Lt,{variant:`blue`,children:e},e))}),t.github_repo&&(0,I.jsxs)(`p`,{className:`text-xs text-[#555]`,children:[`Source:`,` `,(0,I.jsx)(`span`,{className:`text-[#888]`,children:t.github_repo})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{children:(0,I.jsxs)(`span`,{className:`text-sm font-medium`,children:[`Rules (`,t.rules.length,`)`]})}),(0,I.jsx)(z,{className:`pt-0 space-y-4`,children:t.rules.map(e=>(0,I.jsxs)(`div`,{className:`border-t border-[#1a1a1a] pt-4 first:border-t-0 first:pt-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,I.jsx)(Lt,{variant:Qn[e.decision]??`gray`,children:e.decision}),(0,I.jsx)(`code`,{className:`text-xs text-amber-400`,children:e.name}),e.capability&&(0,I.jsx)(Lt,{variant:`gray`,children:e.capability})]}),(0,I.jsx)(`p`,{className:`text-sm text-[#aaa] mb-2`,children:e.message}),(0,I.jsx)(Jt,{children:e.raw_text})]},e.id))})]})]})}function er(){let[e,t]=(0,_.useState)(null),[n,r]=(0,_.useState)(`idle`),[i,a]=(0,_.useState)(``),[o,s]=(0,_.useState)([]),[c,l]=(0,_.useState)(!1);async function u(){l(!0),a(``);try{let e=await fetch(`/api/hub/device-start`,{method:`POST`,headers:{Accept:`application/json`}}),n=await e.json();if(!e.ok){let t=n;t.error===`not_configured`?(r(`not_configured`),s(t.setup_steps??[]),a(t.message??`GitHub OAuth not configured.`)):(a(n.error??`HTTP ${e.status}`),r(`error`));return}t(n),r(`polling`)}catch(e){a(e instanceof Error?e.message:`Failed to start`),r(`error`)}finally{l(!1)}}return(0,_.useEffect)(()=>{if(n!==`polling`||!e)return;let t=setInterval(async()=>{try{let n=await(await fetch(`/api/hub/device-poll?flow=${e.flow_id}`,{headers:{Accept:`application/json`}})).json();n.status===`complete`?(clearInterval(t),r(`done`),a(`Connected as @${n.session?.login??`GitHub`}! You can now publish rulesets.`)):(n.status===`expired`||n.status===`error`)&&(clearInterval(t),r(`error`),a(n.error??`Authentication failed`))}catch{}},3e3);return()=>clearInterval(t)},[n,e]),(0,I.jsxs)(`div`,{className:`max-w-lg mx-auto space-y-5`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`a`,{href:`/hub`,className:`inline-flex items-center gap-1.5 text-xs text-[#444] hover:text-amber-400 transition-colors mb-3`,children:[(0,I.jsx)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:(0,I.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),`Back to Hub`]}),(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Connect GitHub`}),(0,I.jsx)(`p`,{className:`text-xs text-[#444] mt-0.5`,children:`Authenticate with GitHub to publish rulesets to the Hub.`})]}),n===`not_configured`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,I.jsx)(`span`,{className:`text-amber-400 shrink-0 mt-0.5`,children:(0,I.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,I.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,I.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,I.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]})}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-sm font-medium text-[#ccc]`,children:`GitHub OAuth not configured`}),(0,I.jsx)(`p`,{className:`text-xs text-[#555] mt-1 leading-relaxed`,children:i})]})]}),(0,I.jsxs)(`div`,{className:`border-t border-[#111] pt-4`,children:[(0,I.jsx)(`p`,{className:`text-xs font-medium text-[#888] mb-3`,children:`Setup steps:`}),(0,I.jsx)(`ol`,{className:`space-y-2`,children:o.map((e,t)=>(0,I.jsxs)(`li`,{className:`flex items-start gap-2.5 text-xs text-[#555]`,children:[(0,I.jsx)(`span`,{className:`shrink-0 w-5 h-5 rounded-full bg-[#1a1a1a] border border-[#222] text-[#444] text-[10px] flex items-center justify-center font-medium`,children:t+1}),(0,I.jsx)(`span`,{className:`mt-0.5 leading-relaxed`,children:e.replace(/^\d+\.\s+/,``)})]},t))})]}),(0,I.jsxs)(`div`,{className:`bg-[#0a0a0a] border border-[#1a1a1a] rounded-lg p-3`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-[#333] mb-1.5 uppercase tracking-wide font-medium`,children:`Quick start`}),(0,I.jsx)(`code`,{className:`text-[11px] text-amber-400/80 font-mono`,children:`export SSG_GITHUB_CLIENT_ID=<your-client-id>`}),(0,I.jsxs)(`p`,{className:`text-[11px] text-[#444] mt-1`,children:[`Then restart: `,(0,I.jsx)(`code`,{className:`text-[#666]`,children:`ssg serve`})]})]}),(0,I.jsx)(`a`,{href:`https://github.com/settings/applications/new`,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1.5 text-xs text-amber-400 hover:underline`,children:`Create GitHub OAuth App →`})]})}),n===`idle`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5`,children:[(0,I.jsx)(`p`,{className:`text-xs text-[#555] mb-4 leading-relaxed`,children:`This uses GitHub's device authorization flow — no redirect URIs needed. You'll be shown a code to enter at github.com.`}),(0,I.jsx)(zt,{onClick:u,disabled:c,variant:`primary`,children:c?`Starting…`:`Connect with GitHub`})]})}),e&&n===`polling`&&(0,I.jsx)(L,{children:(0,I.jsxs)(z,{className:`py-5 space-y-4`,children:[(0,I.jsxs)(`div`,{className:`text-center`,children:[(0,I.jsx)(`p`,{className:`text-xs text-[#555] mb-2`,children:`Open this URL in your browser:`}),(0,I.jsx)(`a`,{href:e.verification_uri,target:`_blank`,rel:`noreferrer`,className:`text-sm text-amber-400 hover:underline font-mono`,children:e.verification_uri})]}),(0,I.jsxs)(`div`,{className:`border border-[#222] bg-[#0d0d0d] rounded-xl py-5 text-center`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-[#444] uppercase tracking-widest mb-2`,children:`Enter this code`}),(0,I.jsx)(`div`,{className:`text-4xl font-mono font-bold tracking-[0.25em] text-white`,children:e.user_code})]}),(0,I.jsxs)(`p`,{className:`text-[11px] text-[#444] text-center flex items-center justify-center gap-2`,children:[(0,I.jsx)(`svg`,{className:`animate-spin text-[#333]`,width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,I.jsx)(`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`})}),`Waiting for GitHub authorization…`]})]})}),n===`done`&&(0,I.jsxs)(`div`,{className:`rounded-xl border border-green-500/20 bg-green-500/5 p-5 text-sm text-green-400 space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:(0,I.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),(0,I.jsx)(`span`,{children:i})]}),(0,I.jsx)(`a`,{href:`/hub/publish`,className:`text-xs text-amber-400 hover:underline block mt-1`,children:`Publish a ruleset →`})]}),n===`error`&&i&&(0,I.jsxs)(`div`,{className:`rounded-xl border border-red-500/20 bg-red-500/5 p-4`,children:[(0,I.jsx)(`p`,{className:`text-sm text-red-400`,children:i}),(0,I.jsx)(`button`,{onClick:()=>{r(`idle`),a(``)},className:`text-xs text-[#555] hover:text-[#888] mt-3 cursor-pointer`,children:`← Try again`})]})]})}function tr(){let[e,t]=(0,_.useState)(``),[n,r]=(0,_.useState)(!1),[i,a]=(0,_.useState)(null);async function o(t){if(t.preventDefault(),e.trim()){r(!0),a(null);try{a(await(await fetch(`/api/hub/publish`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({repo_url:e.trim()})})).json())}catch(e){a({ok:!1,error:e instanceof Error?e.message:`Unknown error`})}finally{r(!1)}}}return(0,I.jsxs)(`div`,{className:`max-w-md mx-auto space-y-6`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`a`,{href:`/hub`,className:`text-xs text-[#555] hover:text-amber-400`,children:`← Hub`}),(0,I.jsx)(`h1`,{className:`text-xl font-semibold mt-1`,children:`Publish Ruleset`}),(0,I.jsx)(`p`,{className:`text-sm text-[#555] mt-1`,children:`Publish a GitHub repository containing .rules files to the Hub.`})]}),(0,I.jsx)(L,{children:(0,I.jsx)(z,{className:`py-4`,children:(0,I.jsxs)(`form`,{onSubmit:o,className:`space-y-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`block text-xs text-[#888] mb-1`,children:`GitHub Repository URL`}),(0,I.jsx)(`input`,{type:`url`,placeholder:`https://github.com/owner/repo`,value:e,onChange:e=>t(e.target.value),required:!0,className:`w-full bg-[#0a0a0a] border border-[#222] text-[#ddd] text-sm rounded px-3 py-2 focus:outline-none focus:border-amber-400 placeholder:text-[#444]`})]}),(0,I.jsx)(zt,{type:`submit`,variant:`primary`,disabled:n,children:n?`Publishing…`:`Publish to Hub`})]})})}),i&&(0,I.jsx)(`div`,{className:`text-sm ${i.ok?`text-green-400`:`text-red-400`}`,children:i.ok?(0,I.jsxs)(I.Fragment,{children:[`Published!`,` `,i.id&&(0,I.jsx)(`a`,{href:`/hub/${i.id}`,className:`text-amber-400 hover:underline`,children:`View ruleset →`})]}):i.error??`Publish failed`})]})}function nr(e){return e===0?`—`:e<1e3?`${e}ns`:e<1e6?`${(e/1e3).toFixed(1)}µs`:`${(e/1e6).toFixed(1)}ms`}function rr(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function ir(e){let t=e<1e10?e*1e3:e,n=new Date(t);return`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}:${String(n.getSeconds()).padStart(2,`0`)}`}function ar(e){let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function or({label:e,value:t,sub:n,accent:r}){return(0,I.jsxs)(`div`,{className:`bg-[#111] border border-[#222] rounded p-3`,children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#555] uppercase tracking-wider mb-1`,children:e}),(0,I.jsx)(`div`,{className:`text-xl font-mono font-semibold ${r??`text-[#e0e0e0]`}`,children:t}),n&&(0,I.jsx)(`div`,{className:`text-[10px] text-[#555] mt-0.5`,children:n})]})}var sr={allow:`text-green-400`,block:`text-red-400`,force:`text-purple-400`,log:`text-yellow-400`,ask:`text-cyan-400`,shadow:`text-[#666]`},cr={allow:`✓`,block:`✗`,force:`→`,log:`·`,ask:`?`,shadow:`~`};function lr({label:e,ns:t,maxNs:n}){let r=n>0?Math.min(100,t/n*100):0;return(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555] w-7 text-right`,children:e}),(0,I.jsx)(`div`,{className:`flex-1 bg-[#1a1a1a] rounded-full h-1.5 overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-300 ${t<1e5?`bg-green-500`:t<1e6?`bg-yellow-500`:`bg-red-500`}`,style:{width:`${r}%`}})}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa] w-14 text-right`,children:nr(t)})]})}function ur({value:e,max:t,threshold:n,breached:r}){let i=t>0?Math.min(100,e/t*100):0,a=t>0?Math.min(100,n/t*100):0;return(0,I.jsxs)(`div`,{className:`relative w-full bg-[#1a1a1a] rounded-full h-1.5`,children:[(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500 ${r?`bg-red-500`:e/t>=.6?`bg-yellow-500`:`bg-green-500`}`,style:{width:`${i}%`}}),(0,I.jsx)(`div`,{className:`absolute top-0 h-full w-0.5 bg-amber-400/60`,style:{left:`${a}%`},title:`Limit: ${n}`})]})}function dr({limitsData:e,onSaved:t}){let[n,r]=(0,_.useState)(String(e.config.cpuLimitPct)),[i,a]=(0,_.useState)(String(e.config.memoryLimitMb)),[o,s]=(0,_.useState)(e.config.breachAction),[c,l]=(0,_.useState)(!1),[u,d]=(0,_.useState)(null);async function f(){l(!0),d(null);try{let e=await fetch(`/api/json/limits`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({cpu_limit_pct:parseFloat(n),memory_limit_mb:parseFloat(i),breach_action:o})});e.ok?t():d((await e.json()).error??`Save failed`)}catch{d(`Network error`)}finally{l(!1)}}return(0,I.jsxs)(`div`,{className:`space-y-3 text-xs`,children:[(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`CPU Limit (%)`}),(0,I.jsx)(`input`,{type:`number`,min:1,max:100,value:n,onChange:e=>r(e.target.value),className:`w-full bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] font-mono focus:outline-none focus:border-amber-500`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`Memory Limit (MB)`}),(0,I.jsx)(`input`,{type:`number`,min:1,value:i,onChange:e=>a(e.target.value),className:`w-full bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] font-mono focus:outline-none focus:border-amber-500`})]})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`label`,{className:`text-[#555] block mb-1`,children:`On breach`}),(0,I.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),className:`bg-[#0a0a0a] border border-[#333] rounded px-2 py-1 text-[#e0e0e0] focus:outline-none focus:border-amber-500`,children:[(0,I.jsx)(`option`,{value:`warn`,children:`Warn in UI only`}),(0,I.jsx)(`option`,{value:`log`,children:`Warn + write to audit log`})]})]}),u&&(0,I.jsx)(`p`,{className:`text-red-400`,children:u}),(0,I.jsx)(`button`,{onClick:f,disabled:c,className:`px-3 py-1.5 bg-amber-500 hover:bg-amber-400 disabled:opacity-50 text-black rounded text-xs font-medium transition-colors`,children:c?`Saving…`:`Save limits`})]})}function fr(){let e=se([`metrics-tick`,`audit-changed`,`limits-breach`]),[t,n]=(0,_.useState)(Date.now()),[r,i]=(0,_.useState)(0),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(0),[l,u]=(0,_.useState)(!1),d=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let{data:f}=E(`/api/json/daemon-metrics`,[e[`metrics-tick`]]),{data:p,refetch:m}=E(`/api/json/limits`,[e[`limits-breach`]]),{data:h}=E(`/api/json/audit-tail?after=${r}&limit=50`,[e[`audit-changed`],e[`metrics-tick`]]);(0,_.useEffect)(()=>{h&&h.rows.length>0&&(i(e=>Math.max(e,h.maxId)),o(e=>{let t=new Set(e.map(e=>e.id));return[...h.rows.filter(e=>!t.has(e.id)),...e].slice(0,100)}))},[h]),(0,_.useEffect)(()=>{let e=f!==null;d.current===!1&&e&&c(e=>e+1),d.current=e},[f]);let g=f?rr(f.uptime_ms):null,v=f&&f.last_eval_at>0?ar(f.last_eval_at):null,y=f?p?.breaches.cpu?`text-red-400`:(f.cpu_pct??0)>=60?`text-yellow-400`:`text-green-400`:`text-[#e0e0e0]`,b=p?.breaches.memory?`text-red-400`:`text-[#e0e0e0]`;return(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Daemon Monitor`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s>0&&(0,I.jsxs)(Lt,{variant:`amber`,children:[s,` restart`,s===1?``:`s`]}),(0,I.jsx)(`span`,{className:`text-xs text-[#444] font-mono`,children:ir(t)})]})]}),p&&(p.breaches.cpu||p.breaches.memory)&&(0,I.jsxs)(`div`,{className:`border border-red-500/30 bg-red-500/5 rounded p-3 text-xs flex items-start gap-2`,children:[(0,I.jsx)(`span`,{className:`text-red-400 shrink-0`,children:`⚠`}),(0,I.jsxs)(`div`,{className:`space-y-0.5`,children:[p.breaches.cpu&&(0,I.jsxs)(`div`,{className:`text-red-300`,children:[`CPU limit exceeded: `,f?.cpu_pct??`?`,`% >`,` `,p.config.cpuLimitPct,`%`]}),p.breaches.memory&&(0,I.jsxs)(`div`,{className:`text-red-300`,children:[`Memory limit exceeded: `,f?.memory_rss_mb??`?`,`MB >`,` `,p.config.memoryLimitMb,`MB`]})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`Daemon Status`}),(0,I.jsx)(z,{children:f===null?(0,I.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-red-500 shrink-0`}),(0,I.jsx)(`span`,{className:`text-red-400 font-semibold`,children:`DOWN`}),(0,I.jsx)(`span`,{className:`text-[#555] text-xs`,children:`— socket not reachable`})]}):(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-sm flex-wrap`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse shrink-0`}),(0,I.jsx)(`span`,{className:`text-green-400 font-semibold`,children:`UP`})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`PID `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:f.pid})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`uptime`,` `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:g})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`mem`,` `,(0,I.jsxs)(`span`,{className:`text-[#aaa] font-mono`,children:[f.memory_rss_mb,`MB`]})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`cpu`,` `,(0,I.jsxs)(`span`,{className:`font-mono ${y}`,children:[f.cpu_pct,`%`]})]}),(0,I.jsxs)(`span`,{className:`text-[#666] text-xs`,children:[`last eval`,` `,(0,I.jsx)(`span`,{className:`text-[#aaa] font-mono`,children:v??`—`})]})]})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsxs)(`span`,{className:`flex items-center gap-2`,children:[`System Resources`,p&&(p.breaches.cpu||p.breaches.memory)&&(0,I.jsx)(`span`,{className:`text-[10px] text-red-400 border border-red-500/30 rounded px-1`,children:`limit exceeded`})]}),(0,I.jsx)(`button`,{onClick:()=>u(e=>!e),className:`text-[10px] text-[#555] hover:text-[#aaa] transition-colors`,children:l?`Hide limits`:`Configure limits`})]}),(0,I.jsxs)(z,{children:[f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data — daemon not running`}):(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`CPU`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(f.history.cpu_pct.length??0)>1&&(0,I.jsx)(Yt,{data:f.history.cpu_pct,width:80,height:20,color:p?.breaches.cpu?`#ef4444`:`#22c55e`,threshold:p?.config.cpuLimitPct,maxValue:100}),(0,I.jsxs)(`span`,{className:`font-mono font-semibold w-12 text-right ${y}`,children:[f.cpu_pct,`%`]})]})]}),(0,I.jsx)(ur,{value:f.cpu_pct,max:100,threshold:p?.config.cpuLimitPct??90,breached:p?.breaches.cpu??!1}),p&&(0,I.jsxs)(`div`,{className:`text-[10px] text-[#555]`,children:[`limit: `,p.config.cpuLimitPct,`%`]})]}),(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Memory RSS`}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(f.history.memory_rss_mb.length??0)>1&&(0,I.jsx)(Yt,{data:f.history.memory_rss_mb,width:80,height:20,color:p?.breaches.memory?`#ef4444`:`#3b82f6`,threshold:p?.config.memoryLimitMb}),(0,I.jsxs)(`span`,{className:`font-mono font-semibold w-16 text-right ${b}`,children:[f.memory_rss_mb,`MB`]})]})]}),(0,I.jsx)(ur,{value:f.memory_rss_mb,max:Math.max(f.memory_rss_mb*1.5,p?.config.memoryLimitMb??512),threshold:p?.config.memoryLimitMb??512,breached:p?.breaches.memory??!1}),p&&(0,I.jsxs)(`div`,{className:`text-[10px] text-[#555]`,children:[`limit: `,p.config.memoryLimitMb,`MB`]})]}),(0,I.jsxs)(`div`,{className:`space-y-1`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Heap`}),(0,I.jsxs)(`span`,{className:`font-mono text-[#aaa]`,children:[f.heap_used_mb,`MB / `,f.heap_total_mb,`MB`]})]}),(0,I.jsx)(`div`,{className:`w-full bg-[#1a1a1a] rounded-full h-1 overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full bg-blue-500/60 transition-all duration-500`,style:{width:`${f.heap_total_mb>0?Math.min(100,f.heap_used_mb/f.heap_total_mb*100):0}%`}})})]})]}),l&&p&&(0,I.jsxs)(`div`,{className:`mt-4 pt-4 border-t border-[#1e1e1e]`,children:[(0,I.jsxs)(`p`,{className:`text-[11px] text-[#555] mb-3`,children:[`Thresholds trigger UI warnings. Values are persisted to`,` `,(0,I.jsx)(`code`,{children:`.sigmashake/config.toml`}),`.`]}),(0,I.jsx)(dr,{limitsData:p,onSaved:()=>{m(),u(!1)}})]})]})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-2`,children:[(0,I.jsx)(or,{label:`Total evals`,value:f?.evals_total??`—`,accent:`text-[#e0e0e0]`}),(0,I.jsx)(or,{label:`Allow`,value:f?.decisions.allow??`—`,accent:`text-green-400`}),(0,I.jsx)(or,{label:`Block`,value:f?.decisions.block??`—`,accent:`text-red-400`}),(0,I.jsx)(or,{label:`Force`,value:f?.decisions.force??`—`,accent:`text-purple-400`}),(0,I.jsx)(or,{label:`Log`,value:f?.decisions.log??`—`,accent:`text-yellow-400`}),(0,I.jsx)(or,{label:`Ask`,value:f?.decisions.ask??`—`,accent:`text-cyan-400`})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Eval Latency`}),f&&(0,I.jsxs)(`span`,{className:`text-[10px] text-[#555]`,children:[f.latency.samples,` samples`]})]}),(0,I.jsx)(z,{children:f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data`}):(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsx)(lr,{label:`p50`,ns:f.latency.p50_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`p95`,ns:f.latency.p95_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`p99`,ns:f.latency.p99_ns,maxNs:f.latency.max_ns}),(0,I.jsx)(lr,{label:`max`,ns:f.latency.max_ns,maxNs:f.latency.max_ns})]})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`Engine`}),(0,I.jsx)(z,{children:f===null?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No data`}):(0,I.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Native evals`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.engine.native_evals})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`TS evals`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.engine.ts_evals})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Native %`}),(0,I.jsxs)(`span`,{className:`font-mono text-[#aaa]`,children:[f.engine.native_pct,`%`]})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Rule reloads`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.rule_reloads})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Rate limit trips`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.rate_limit_trips})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Loop guard blocks`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.loop_guard_blocks})]}),(0,I.jsxs)(`div`,{className:`flex justify-between`,children:[(0,I.jsx)(`span`,{className:`text-[#555]`,children:`Connection errors`}),(0,I.jsx)(`span`,{className:`font-mono text-[#aaa]`,children:f.connection_errors})]})]})})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`text-xs font-medium text-[#888] pb-2 flex items-center justify-between`,children:[(0,I.jsx)(`span`,{children:`Live Event Tail`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#444]`,children:`newest first · auto-updating`})]}),(0,I.jsx)(z,{children:a.length===0?(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`No events yet`}):(0,I.jsx)(`div`,{className:`space-y-0.5 font-mono text-xs max-h-96 overflow-y-auto`,children:a.map(e=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2 py-0.5 border-b border-[#111] last:border-0`,children:[(0,I.jsx)(`span`,{className:`text-[#444] shrink-0 w-16`,children:ir(e.timestamp)}),e.tool===`__daemon`?(0,I.jsxs)(`span`,{className:`text-cyan-600`,children:[`⚙ daemon`,` `,(()=>{try{let t=JSON.parse(e.input??`{}`);return`${t.event??e.decision}${t.detail?` (${t.detail})`:``}`}catch{return e.decision}})()]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`span`,{className:`shrink-0 w-16 ${sr[e.decision]??`text-[#666]`}`,children:[cr[e.decision]??`·`,` `,e.decision.padEnd(5)]}),(0,I.jsx)(`span`,{className:`text-[#aaa] shrink-0 w-24 truncate`,children:e.tool}),(0,I.jsx)(`span`,{className:`text-[#444] shrink-0 w-14 text-right`,children:nr(e.duration_ns)}),e.rule_id&&(0,I.jsx)(`a`,{href:`/rules?highlight=${encodeURIComponent(e.rule_id)}`,className:`text-amber-600 hover:text-amber-400 truncate`,title:e.rule_id,children:e.rule_id})]})]},e.id))})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`text-xs font-medium text-[#888] pb-2`,children:`AI Agent Debug Endpoints`}),(0,I.jsxs)(z,{children:[(0,I.jsx)(`p`,{className:`text-[11px] text-[#555] mb-2`,children:`Agents can query these endpoints directly for automated triage:`}),(0,I.jsxs)(`div`,{className:`space-y-1 font-mono text-[11px]`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/daemon-metrics`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/daemon-metrics`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— full metrics snapshot (cpu, memory, history, latency)`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/limits`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/limits`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— resource limits config + breach state`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/audit-tail?after=0&limit=20`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/audit-tail?after=0&limit=20`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— recent eval events`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/api/json/daemon-status`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/api/json/daemon-status`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— status, PID, log tail`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#444]`,children:`GET`}),(0,I.jsx)(`a`,{href:`/healthz`,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400`,children:`/healthz`}),(0,I.jsx)(`span`,{className:`text-[#444]`,children:`— process uptime`})]})]})]})]})]})}function pr(e){return e===0?`0 B`:e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`}function mr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/1024/1024).toFixed(1)}MB`}function hr(e){let t=Math.floor(e/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);return n<60?`${n}m ${t%60}s`:`${Math.floor(n/60)}h ${n%60}m`}function gr(e){return e?new Date(e*1e3).toLocaleString():`—`}function _r(e){if(!e||e===0)return`never`;let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}function vr({children:e,className:t}){return(0,I.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-[#444] mb-3 ${t??``}`,children:e})}function yr({label:e,value:t,mono:n=!0,accent:r}){return(0,I.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4 py-1.5 border-b border-[#111] last:border-0`,children:[(0,I.jsx)(`span`,{className:`text-xs text-[#555] shrink-0`,children:e}),(0,I.jsx)(`span`,{className:`text-xs text-right truncate max-w-[65%] ${n?`font-mono`:``} ${r??`text-[#bbb]`}`,children:t})]})}function br({ok:e,label:t,badLabel:n}){return e?(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-green-400 border border-green-400/20 rounded px-1.5 py-0.5`,children:[`✓ `,t]}):(0,I.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-[10px] font-semibold uppercase tracking-wide text-red-400 border border-red-400/20 rounded px-1.5 py-0.5`,children:[`✗ `,n??t]})}function xr({pct:e,total:t,max:n}){let r=e<60?`bg-green-500`:e<85?`bg-amber-400`:`bg-red-500`;return(0,I.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,I.jsxs)(`span`,{className:`text-[#555]`,children:[t.toLocaleString(),` / `,n.toLocaleString(),` rows`]}),(0,I.jsxs)(`span`,{className:`font-mono ${e>=85?`text-red-400`:e>=60?`text-amber-400`:`text-green-400`}`,children:[e,`%`]})]}),(0,I.jsx)(`div`,{className:`h-2 bg-[#111] rounded-full overflow-hidden`,children:(0,I.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500 ${r}`,style:{width:`${Math.min(100,e)}%`}})})]})}var Sr=3e3,Cr={log:`text-[#aaa]`,info:`text-blue-400`,warn:`text-amber-400`,error:`text-red-400`,debug:`text-[#666]`};function wr(e){return e.value==null?e.description?e.description:`[${e.type}]`:String(e.value)}function Tr(){let e=kn(),[t,n]=(0,_.useState)(!1),[r,i]=(0,_.useState)(null),[a,o]=(0,_.useState)([]),[s,c]=(0,_.useState)(null),[l,u]=(0,_.useState)(!1),[d,f]=(0,_.useState)(!1),p=(0,_.useRef)(null),m=(0,_.useRef)(0);(0,_.useEffect)(()=>{p.current?.scrollIntoView({behavior:`smooth`})},[a]),(0,_.useEffect)(()=>{if(e.connected)return e.sendCommand(`Runtime.enable`).catch(()=>{}),e.onEvent(`Runtime.consoleAPICalled`,e=>{let t=e;o(e=>{let n=[...e,{id:m.current++,type:t.type??`log`,args:t.args??[],timestamp:t.timestamp??Date.now()}];return n.length>500?n.slice(-500):n})})},[e.connected]),(0,_.useEffect)(()=>{e.preconfiguredTarget&&!e.connected&&!e.connecting&&e.connect(e.preconfiguredTarget.id)},[e]),(0,_.useEffect)(()=>{!e.connected||d||t||r||(f(!0),(async()=>{try{await e.sendCommand(`Profiler.enable`),await e.sendCommand(`Profiler.start`),n(!0),setTimeout(async()=>{try{let t=await e.sendCommand(`Profiler.stop`);n(!1),i(t.profile)}catch{n(!1)}},Sr)}catch{}})(),e.sendCommand(`Runtime.evaluate`,{expression:`JSON.stringify(process.memoryUsage())`,returnByValue:!0}).then(e=>{c(JSON.parse(e.result.value))}).catch(()=>{}))},[e.connected,d,t,r]);let h=(0,_.useCallback)(async()=>{try{await e.sendCommand(`Profiler.enable`),await e.sendCommand(`Profiler.start`),n(!0),i(null)}catch(e){console.error(`Profiler.start failed:`,e)}},[e]),g=(0,_.useCallback)(async()=>{try{let t=await e.sendCommand(`Profiler.stop`);n(!1),i(t.profile)}catch(e){console.error(`Profiler.stop failed:`,e),n(!1)}},[e]),v=(0,_.useCallback)(async()=>{u(!0);try{let t=await e.sendCommand(`Runtime.evaluate`,{expression:`JSON.stringify(process.memoryUsage())`,returnByValue:!0});c(JSON.parse(t.result.value))}catch{}finally{u(!1)}},[e]),y=(0,_.useCallback)(()=>{e.preconfiguredTarget&&e.connect(e.preconfiguredTarget.id)},[e]);return e.active?e.connected?(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-3`,children:[(0,I.jsxs)(`span`,{className:`text-xs text-green-400`,children:[`● Connected`,e.bunVersion?` — Bun v${e.bunVersion}`:``]}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:e.disconnect,children:`Disconnect`})]})]}),e.error&&(0,I.jsx)(z,{children:(0,I.jsx)(`p`,{className:`text-xs text-red-400`,children:e.error})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`CPU Profiler`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[t&&(0,I.jsx)(`span`,{className:`text-xs text-red-400 animate-pulse`,children:`● Recording`}),t?(0,I.jsx)(zt,{variant:`danger`,size:`sm`,onClick:g,children:`Stop & Render`}):(0,I.jsx)(zt,{variant:`primary`,size:`sm`,onClick:h,children:`Start Recording`})]})]}),(0,I.jsx)(z,{children:r?(0,I.jsxs)(`div`,{className:`space-y-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-xs text-[#555]`,children:[(0,I.jsxs)(`span`,{children:[`Nodes: `,(0,I.jsx)(`span`,{className:`text-[#aaa]`,children:r.nodes.length})]}),(0,I.jsxs)(`span`,{children:[`Duration:`,` `,(0,I.jsxs)(`span`,{className:`text-[#aaa]`,children:[((r.endTime-r.startTime)/1e3).toFixed(0),`ms`]})]}),(0,I.jsxs)(`span`,{children:[`Samples: `,(0,I.jsx)(`span`,{className:`text-[#aaa]`,children:r.samples?.length??0})]})]}),(0,I.jsxs)(`div`,{className:`flex gap-3 text-[10px] text-[#555]`,children:[(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#451a03`}}),`User code`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#172554`}}),`Runtime (bun:/node:)`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#1f2937`}}),`Native/other`]}),(0,I.jsxs)(`span`,{children:[(0,I.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-sm mr-1`,style:{background:`#450a0a`}}),`GC/idle`]})]}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] rounded-lg p-2 overflow-x-hidden`,children:(0,I.jsx)(In,{profile:r})})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#555]`,children:t?`Recording CPU profile (auto-captures ${Sr/1e3}s)… perform actions in ssg to generate data.`:`Click "Start Recording", or wait for auto-capture on page load.`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Memory`}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:v,disabled:l,className:`ml-auto`,children:l?`…`:`↻ Refresh`})]}),(0,I.jsx)(z,{children:s?(0,I.jsx)(`div`,{className:`grid grid-cols-4 gap-3`,children:[{label:`RSS`,value:mr(s.rss)},{label:`Heap Total`,value:mr(s.heapTotal)},{label:`Heap Used`,value:mr(s.heapUsed)},{label:`External`,value:mr(s.external)}].map(e=>(0,I.jsxs)(`div`,{className:`bg-[#0d0d0d] rounded-lg p-3 text-center`,children:[(0,I.jsx)(`div`,{className:`text-lg font-bold text-white tabular-nums`,children:e.value}),(0,I.jsx)(`div`,{className:`text-xs text-[#555] mt-0.5`,children:e.label})]},e.label))}):(0,I.jsx)(`p`,{className:`text-xs text-[#555]`,children:d?`Fetching memory metrics…`:`Click Refresh to fetch process.memoryUsage().`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Console`}),(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:()=>o([]),className:`ml-auto`,children:`Clear`})]}),(0,I.jsx)(z,{children:(0,I.jsxs)(`div`,{className:`bg-[#0a0a0a] rounded-lg p-2 h-40 overflow-y-auto font-mono text-[11px]`,children:[a.length===0?(0,I.jsx)(`p`,{className:`text-[#444]`,children:`Console output will appear here…`}):a.map(e=>(0,I.jsxs)(`div`,{className:`py-0.5 border-b border-[#111] ${Cr[e.type]??`text-[#aaa]`}`,children:[(0,I.jsxs)(`span`,{className:`text-[#444] mr-2`,children:[`[`,e.type.toUpperCase(),`]`]}),e.args.map(wr).join(` `)]},e.id)),(0,I.jsx)(`div`,{ref:p})]})})]})]}):(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,I.jsx)(Lt,{variant:`amber`,children:e.connecting?`Connecting…`:`Available`}),!e.connecting&&(0,I.jsx)(zt,{variant:`ghost`,size:`sm`,onClick:y,children:`Connect`})]})]}),(0,I.jsx)(z,{children:(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:e.connecting?`Establishing WebSocket connection to Bun inspector…`:`Inspector is active but not connected. Click Connect to start profiling.`})})]}):(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Runtime Inspector`}),(0,I.jsx)(Lt,{variant:`outline`,className:`ml-auto`,children:`Inactive`})]}),(0,I.jsx)(z,{children:(0,I.jsxs)(`p`,{className:`text-xs text-[#444]`,children:[`The Bun inspector is not active. Restart `,(0,I.jsx)(`code`,{className:`bg-[#111] px-1 rounded text-[10px]`,children:`ssg serve`}),` to enable it automatically.`]})})]})}function Er(){let[e,t]=(0,_.useState)(0),{data:n}=E(`/api/json/evald-log`,[e]),r=(0,_.useRef)(null);(0,_.useEffect)(()=>{let e=setInterval(()=>t(e=>e+1),5e3);return()=>clearInterval(e)},[]),(0,_.useEffect)(()=>{r.current&&r.current.scrollIntoView({behavior:`smooth`,block:`end`})},[n?.lines.length]);let i=n?.lines??[];return(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`pb-2 flex flex-row items-center justify-between`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Daemon Log`}),(0,I.jsxs)(`span`,{className:`text-[10px] text-[#444]`,children:[n?.path?n.path:`loading…`,` · last 200 lines · 5s refresh`]})]}),(0,I.jsxs)(z,{children:[n?.error&&(0,I.jsx)(`p`,{className:`text-xs text-red-400 mb-2`,children:n.error}),i.length===0&&!n?.error&&(0,I.jsxs)(`p`,{className:`text-xs text-[#555]`,children:[`No log entries yet. Start the daemon with`,` `,(0,I.jsx)(`code`,{className:`font-mono text-amber-600`,children:`ssg serve`}),` to generate log output.`]}),i.length>0&&(0,I.jsxs)(`pre`,{className:`bg-[#0a0a0a] rounded p-3 text-[10px] text-[#777] overflow-x-auto whitespace-pre-wrap break-all max-h-80 overflow-y-auto font-mono leading-relaxed`,children:[i.join(`
|
|
18
|
+
`),(0,I.jsx)(`div`,{ref:r})]})]})]})}function Dr(){let e=se([`metrics-tick`,`rules-changed`]),{data:t,refetch:n}=E(`/api/json/observability`,[e[`metrics-tick`],e[`rules-changed`]]),[r,i]=(0,_.useState)(!1),[a,o]=(0,_.useState)(Date.now()),[s,c]=(0,_.useState)(`idle`),[l,u]=(0,_.useState)(``),[d,f]=(0,_.useState)(`idle`);(0,_.useEffect)(()=>{t&&o(Date.now())},[t]);let p=(0,_.useCallback)(async()=>{c(`loading`);try{let e=await(await fetch(`/api/rules/sync-to-db`,{method:`POST`})).json();if(e.ok){c(`done`);let t=(e.pruned_count??0)>0?` (${e.pruned_count} orphan(s) pruned)`:``;u((e.message??`Synced ${e.synced} rules`)+t),n()}else c(`error`),u(e.error??`Sync failed`)}catch(e){c(`error`),u(String(e))}},[n]),m=(0,_.useCallback)(async()=>{f(`loading`);try{await fetch(`/api/rules/force-reload`,{method:`POST`}),f(`done`),n(),setTimeout(()=>f(`idle`),3e3)}catch{f(`idle`)}},[n]),h=t?.db,g=t?.rules,v=t?.audit,y=t?.process,b=t?.flight_recorder,x=g?.drift_detected??!1;return(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h1`,{className:`text-base font-semibold`,children:`Observability`}),(0,I.jsx)(`p`,{className:`text-xs text-[#444] mt-0.5`,children:`SQLite health, rule drift detection, runtime profiler, and diagnostics`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,I.jsxs)(`span`,{className:`text-[10px] text-[#333] font-mono`,children:[`refreshed `,_r(a)]}),(0,I.jsx)(`button`,{onClick:n,className:`text-xs text-[#555] hover:text-amber-400 transition-colors px-2 py-1 border border-[#222] rounded`,children:`↻ Refresh`})]})]}),(0,I.jsxs)(L,{className:x?`border-red-500/40 shadow-red-900/10 shadow-lg`:`border-green-500/20`,children:[(0,I.jsxs)(R,{className:`flex items-center justify-between pb-2`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-semibold`,children:`Rule Drift Detector`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#444]`,children:`— .rules files vs SQLite`})]}),g&&(x?(0,I.jsx)(`span`,{className:`flex items-center gap-1.5 text-xs font-bold text-red-400 border border-red-400/30 rounded px-2 py-1 bg-red-500/5`,children:`⚠ DRIFT DETECTED`}):(0,I.jsx)(`span`,{className:`flex items-center gap-1.5 text-xs font-bold text-green-400 border border-green-400/30 rounded px-2 py-1 bg-green-500/5`,children:`✓ IN SYNC`}))]}),(0,I.jsx)(z,{children:g?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsx)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3`,children:[{label:`.rules Files`,value:g.file_count,sub:`${g.file_rule_count} rules total`},{label:`DB Rules`,value:g.db_rule_count,sub:`${g.db_enabled_count} enabled`},{label:`Only in Files`,value:g.drift_details.only_in_files.length,accent:g.drift_details.only_in_files.length>0?`text-amber-400`:`text-[#555]`},{label:`Only in DB`,value:g.drift_details.only_in_db.length,accent:g.drift_details.only_in_db.length>0?`text-red-400`:`text-[#555]`}].map(({label:e,value:t,sub:n,accent:r})=>(0,I.jsxs)(`div`,{className:`bg-[#0d0d0d] border border-[#1a1a1a] rounded p-3`,children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:e}),(0,I.jsx)(`div`,{className:`text-xl font-mono font-semibold ${r??`text-[#ddd]`}`,children:t}),n&&(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] mt-0.5`,children:n})]},e))}),x&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`button`,{onClick:()=>i(e=>!e),className:`text-xs text-amber-400 hover:text-amber-300 flex items-center gap-1 transition-colors`,children:[r?`▾`:`▸`,` View drift details`]}),r&&(0,I.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[g.drift_details.only_in_files.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsxs)(`div`,{className:`text-[10px] text-amber-400/70 mb-1.5 uppercase tracking-wide`,children:[`In .rules files but NOT in DB — run `,(0,I.jsx)(`code`,{className:`bg-[#111] px-1 rounded`,children:`ssg sync`})]}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] border border-amber-400/10 rounded p-2 space-y-0.5 max-h-40 overflow-y-auto`,children:g.drift_details.only_in_files.map(e=>(0,I.jsxs)(`div`,{className:`font-mono text-[11px] text-amber-300/70`,children:[`+ `,e]},e))})]}),g.drift_details.only_in_db.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-red-400/70 mb-1.5 uppercase tracking-wide`,children:`In DB but NOT in any .rules file — orphaned rules`}),(0,I.jsx)(`div`,{className:`bg-[#0a0a0a] border border-red-400/10 rounded p-2 space-y-0.5 max-h-40 overflow-y-auto`,children:g.drift_details.only_in_db.map(e=>(0,I.jsxs)(`div`,{className:`font-mono text-[11px] text-red-300/70`,children:[`− `,e]},e))})]})]})]}),(0,I.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pt-3 border-t border-[#111]`,children:[(0,I.jsx)(`button`,{onClick:p,disabled:s===`loading`,className:`inline-flex items-center gap-1.5 h-7 px-3 rounded-md text-xs font-medium bg-amber-500/10 text-amber-400 border border-amber-500/20 hover:bg-amber-500/20 hover:border-amber-500/40 transition-all cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed`,title:`Reads all .rules files and upserts them into SQLite. This eliminates drift and enables faster DB-based rule loading.`,children:s===`loading`?`⟳ Syncing…`:`↑ Sync Files → DB`}),(0,I.jsx)(`button`,{onClick:m,disabled:d===`loading`,className:`inline-flex items-center gap-1.5 h-7 px-3 rounded-md text-xs font-medium bg-[#1a1a1a] text-[#888] border border-[#222] hover:text-[#bbb] hover:border-[#333] transition-all cursor-pointer disabled:opacity-50`,title:`Invalidates the in-memory rules cache. The daemon will reload rules from DB (or files) on the next eval.`,children:d===`loading`?`⟳`:d===`done`?`✓ Reloaded`:`↻ Force Reload`}),(0,I.jsx)(`span`,{className:`text-[10px] text-[#333] ml-auto`,children:g.db_rule_count===0?`⚠ DB empty — daemon falls back to file-based loading (slower reload)`:`DB has ${g.db_rule_count} rules — daemon uses fast indexed queries`})]}),s===`done`&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-md px-3 py-2 mt-2 text-xs font-medium bg-green-500/10 border border-green-500/20 text-green-400`,children:[(0,I.jsxs)(`span`,{children:[`✓ `,l]}),(0,I.jsx)(`button`,{onClick:()=>c(`idle`),className:`ml-3 shrink-0 px-2 py-0.5 rounded border border-current/30 hover:bg-white/5 transition-colors cursor-pointer`,children:`Dismiss`})]}),s===`error`&&(0,I.jsxs)(`div`,{className:`flex items-center justify-between rounded-md px-3 py-2 mt-2 text-xs font-medium bg-red-500/10 border border-red-500/20 text-red-400`,children:[(0,I.jsxs)(`span`,{children:[`✗ `,l]}),(0,I.jsx)(`button`,{onClick:()=>c(`idle`),className:`ml-3 shrink-0 px-2 py-0.5 rounded border border-current/30 hover:bg-white/5 transition-colors cursor-pointer`,children:`Dismiss`})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-4 text-[11px] text-[#444] pt-1 border-t border-[#111]`,children:[(0,I.jsxs)(`span`,{children:[`rules dir: `,(0,I.jsx)(`span`,{className:`font-mono text-[#555]`,children:g.rules_dir})]}),(0,I.jsxs)(`span`,{className:`ml-auto`,children:[`last reload: `,(0,I.jsx)(`span`,{className:`font-mono text-[#555]`,children:_r(g.last_reload_at)})]})]})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsxs)(R,{className:`flex items-center justify-between pb-2`,children:[(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`SQLite Database`}),h&&!h.error&&(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,I.jsx)(br,{ok:h.journal_mode===`wal`,label:`WAL`,badLabel:`NO WAL`}),(0,I.jsx)(br,{ok:h.synchronous===`NORMAL`,label:`NORMAL`,badLabel:h.synchronous})]})]}),(0,I.jsx)(z,{children:h?h.error?(0,I.jsx)(`div`,{className:`text-xs text-red-400 font-mono bg-red-900/10 border border-red-500/20 rounded p-2`,children:h.error}):(0,I.jsxs)(`div`,{children:[(0,I.jsx)(vr,{children:`Storage`}),(0,I.jsx)(yr,{label:`File path`,value:h.path.replace(`/home/`,`~/../`)}),(0,I.jsx)(yr,{label:`File size`,value:pr(h.file_size_bytes)}),(0,I.jsx)(yr,{label:`Allocated`,value:`${pr(h.allocated_bytes)} (${h.page_count.toLocaleString()} pages × ${h.page_size}B)`}),(0,I.jsx)(vr,{className:`mt-4`,children:`PRAGMA Configuration`}),(0,I.jsx)(yr,{label:`journal_mode`,value:h.journal_mode,accent:h.journal_mode===`wal`?`text-green-400`:`text-amber-400`}),(0,I.jsx)(yr,{label:`synchronous`,value:h.synchronous,accent:h.synchronous===`NORMAL`?`text-green-400`:`text-amber-400`}),(0,I.jsx)(yr,{label:`cache_size`,value:`${h.cache_size_kb.toLocaleString()} KB (${Math.round(h.cache_size_kb/1024)} MB)`}),(0,I.jsx)(yr,{label:`page_size`,value:`${h.page_size.toLocaleString()} B`}),h.wal_checkpoint&&(0,I.jsx)(yr,{label:`WAL checkpoint`,value:`log ${h.wal_checkpoint.log}, checkpointed ${h.wal_checkpoint.checkpointed}, busy ${h.wal_checkpoint.busy}`}),(0,I.jsx)(vr,{className:`mt-4`,children:`Table Row Counts`}),h.tables.map(e=>(0,I.jsx)(yr,{label:e.name,value:e.row_count>=0?e.row_count.toLocaleString():`error`,accent:e.row_count<0?`text-red-400`:`text-[#bbb]`},e.name))]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(`div`,{className:`space-y-5`,children:[(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Audit Log Capacity`})}),(0,I.jsx)(z,{children:v?(0,I.jsxs)(`div`,{className:`space-y-4`,children:[(0,I.jsx)(xr,{pct:v.utilization_pct,total:v.total_rows,max:v.max_rows}),(0,I.jsxs)(`div`,{className:`space-y-0`,children:[(0,I.jsx)(yr,{label:`Total rows`,value:v.total_rows.toLocaleString()}),(0,I.jsx)(yr,{label:`Rotation limit`,value:v.max_rows.toLocaleString()}),(0,I.jsx)(yr,{label:`Utilization`,value:`${v.utilization_pct}%`,accent:v.utilization_pct>=85?`text-red-400`:v.utilization_pct>=60?`text-amber-400`:`text-green-400`}),(0,I.jsx)(yr,{label:`Oldest entry`,value:gr(v.oldest_timestamp)}),(0,I.jsx)(yr,{label:`Newest entry`,value:gr(v.newest_timestamp)})]}),v.utilization_pct>=85&&(0,I.jsx)(`div`,{className:`text-[11px] text-red-400 bg-red-500/5 border border-red-500/20 rounded p-2`,children:`⚠ Audit log nearing rotation limit. Oldest entries will be purged automatically.`})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Process & Runtime`})}),(0,I.jsx)(z,{children:y?(0,I.jsxs)(`div`,{children:[(0,I.jsx)(yr,{label:`PID`,value:y.pid}),(0,I.jsx)(yr,{label:`Uptime`,value:hr(y.uptime_ms)}),(0,I.jsx)(yr,{label:`Memory (RSS)`,value:`${y.memory_rss_mb} MB`}),(0,I.jsx)(yr,{label:`Bun version`,value:y.bun_version}),(0,I.jsx)(yr,{label:`Node compat`,value:y.node_version}),(0,I.jsx)(yr,{label:`Platform`,value:`${y.platform} / ${y.arch}`})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]})]})]}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Flight Recorder`})}),(0,I.jsx)(z,{children:b?(0,I.jsxs)(`div`,{className:`grid grid-cols-3 gap-4`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`Log File`}),(0,I.jsx)(`div`,{className:`text-xs font-mono text-[#bbb] truncate`,children:`…${b.path.slice(-50)}`})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`File Size`}),(0,I.jsx)(`div`,{className:`text-xs font-mono ${b.file_size_bytes===0?`text-[#444]`:`text-[#bbb]`}`,children:pr(b.file_size_bytes)})]}),(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`div`,{className:`text-[10px] text-[#444] uppercase tracking-wider mb-1`,children:`Approx. Entries`}),(0,I.jsx)(`div`,{className:`text-xs font-mono ${b.approx_entries===0?`text-[#444]`:`text-[#bbb]`}`,children:b.approx_entries===0?`—`:b.approx_entries.toLocaleString()})]})]}):(0,I.jsx)(`p`,{className:`text-xs text-[#444]`,children:`Loading…`})})]}),(0,I.jsx)(Tr,{}),(0,I.jsx)(Er,{}),(0,I.jsxs)(L,{children:[(0,I.jsx)(R,{className:`pb-2`,children:(0,I.jsx)(`span`,{className:`text-sm font-medium`,children:`Observability API`})}),(0,I.jsxs)(z,{children:[(0,I.jsx)(`p`,{className:`text-[11px] text-[#444] mb-3`,children:`Machine-readable endpoints for automated monitoring and AI agent triage:`}),(0,I.jsx)(`div`,{className:`space-y-1.5 font-mono text-[11px]`,children:[[`/api/json/observability`,`SQLite health, rule drift, process info`],[`/api/json/daemon-metrics`,`Eval latency, decision counters, memory`],[`/api/json/audit-tail?after=0&limit=20`,`Recent eval events (live feed)`],[`/api/json/daemon-status`,`Daemon PID, status, log tail`],[`/api/json/evald-log`,`Last 200 lines of evald.log (daemon stderr)`],[`/healthz`,`Process liveness`],[`/readyz`,`SQLite liveness`]].map(([e,t])=>(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsx)(`span`,{className:`text-[#333]`,children:`GET`}),(0,I.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-amber-600 hover:text-amber-400 transition-colors`,children:e}),(0,I.jsxs)(`span`,{className:`text-[#333] hidden sm:inline`,children:[`— `,t]})]},e))})]})]})]})}var Or=`ssg-dashboard-tabs`,kr=2e3,Ar=6e3;function jr(){return`tab-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}function Mr(){let[e,t]=(0,_.useState)(0),[n,r]=(0,_.useState)(!0),i=(0,_.useRef)(jr()),a=(0,_.useRef)(new Map);return(0,_.useEffect)(()=>{if(typeof BroadcastChannel>`u`)return;let e=new BroadcastChannel(Or);function n(){let e=Date.now();for(let[t,n]of a.current.entries())e-n>Ar&&a.current.delete(t);let n=a.current.size;t(n),r([...a.current.keys(),i.current].sort()[0]===i.current)}function o(e){let t=e.data;!t||t.id===i.current||(t.type===`leave`?a.current.delete(t.id):a.current.set(t.id,Date.now()),n())}e.addEventListener(`message`,o),e.postMessage({type:`join`,id:i.current});let s=setInterval(()=>{e.postMessage({type:`heartbeat`,id:i.current}),n()},kr),c=()=>{e.postMessage({type:`leave`,id:i.current})};return window.addEventListener(`beforeunload`,c),()=>{clearInterval(s),e.postMessage({type:`leave`,id:i.current}),e.removeEventListener(`message`,o),e.close(),window.removeEventListener(`beforeunload`,c)}},[]),{otherTabCount:e,isLeader:n}}var Nr=[{path:`/`,label:`Dashboard`},{path:`/rules`,label:`Rules`},{path:`/audit`,label:`Audit`},{path:`/approvals`,label:`Approvals`},{path:`/hub`,label:`Hub`},{path:`/profile`,label:`Profile`},{path:`/monitor`,label:`Monitor`},{path:`/observability`,label:`Observability`}];function Pr(){let{data:e}=E(`/api/json/daemon-status`,[se([`stats-changed`])[`stats-changed`]]),[t,n]=(0,_.useState)(!1),r=e?.status??`starting`,i=r===`running`?`bg-green-500`:r===`starting`?`bg-amber-400`:`bg-red-500`,a=r===`running`?`Daemon running`:r===`starting`?`Daemon starting…`:r===`error`?`Daemon error`:`Daemon stopped`;return(0,I.jsxs)(`div`,{className:`relative`,children:[(0,I.jsxs)(`button`,{onClick:()=>n(e=>!e),className:`flex items-center gap-1.5 text-xs text-[#666] hover:text-[#aaa] transition-colors`,title:a,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full ${i}`}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:a})]}),t&&(0,I.jsxs)(`div`,{className:`absolute right-0 top-7 z-50 w-72 bg-[#111] border border-[#222] rounded-lg shadow-xl p-3 text-xs`,children:[(0,I.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,I.jsx)(`span`,{className:`font-medium text-[#ddd]`,children:`Eval Daemon`}),(0,I.jsx)(`button`,{onClick:()=>n(!1),className:`text-[#555] hover:text-[#aaa]`,children:`✕`})]}),(0,I.jsxs)(`div`,{className:`space-y-1 text-[#888]`,children:[(0,I.jsxs)(`div`,{children:[`Status:`,` `,(0,I.jsx)(`span`,{className:r===`running`?`text-green-400`:r===`starting`?`text-amber-400`:`text-red-400`,children:r})]}),e?.pid&&(0,I.jsxs)(`div`,{children:[`PID: `,e.pid]})]}),e?.logTail&&e.logTail.length>0&&(0,I.jsxs)(`div`,{className:`mt-2`,children:[(0,I.jsx)(`div`,{className:`text-[#555] mb-1`,children:`Recent log:`}),(0,I.jsx)(`pre`,{className:`bg-[#0a0a0a] rounded p-2 text-[10px] text-[#777] overflow-x-auto whitespace-pre-wrap break-all max-h-32 overflow-y-auto`,children:e.logTail.join(`
|
|
19
|
+
`)})]})]})]})}function Fr(){let{data:e}=E(`/api/json/mcp-status`,[se([`audit-changed`])[`audit-changed`]]),t=e?.status??`inactive`;if(t===`inactive`)return null;let n=t===`active`?`bg-blue-500`:`bg-[#444]`,r=t===`active`?`MCP active`:`MCP idle`;return(0,I.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs text-[#555]`,title:t===`active`?`MCP server: ${e?.recentCount??0} evals in last 5 min`:`MCP server: ${e?.totalCount??0} total evals`,children:[(0,I.jsx)(`span`,{className:`inline-block w-2 h-2 rounded-full ${n}`}),(0,I.jsx)(`span`,{className:`hidden sm:inline`,children:r})]})}function Ir(e){if(e===`/`)return(0,I.jsx)(cn,{});if(e===`/rules`)return(0,I.jsx)(hn,{});if(e===`/audit`)return(0,I.jsx)(yn,{});if(e===`/approvals`)return(0,I.jsx)(On,{});if(e===`/profile`)return(0,I.jsx)(Un,{});if(e===`/hub/connect`)return(0,I.jsx)(er,{});if(e===`/hub/publish`)return(0,I.jsx)(tr,{});if(e.startsWith(`/hub/`)){let t=e.slice(5);if(t)return(0,I.jsx)($n,{id:t})}return e===`/hub`?(0,I.jsx)(Zn,{}):e===`/monitor`?(0,I.jsx)(fr,{}):e===`/observability`?(0,I.jsx)(Dr,{}):(0,I.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-24 text-[#555]`,children:[(0,I.jsx)(`p`,{className:`text-lg`,children:`404 — Page not found`}),(0,I.jsx)(`a`,{href:`/`,className:`mt-4 text-amber-400 hover:underline text-sm`,children:`Back to Dashboard`})]})}function Lr(e){history.pushState(null,``,e),window.dispatchEvent(new PopStateEvent(`popstate`))}function Rr({count:e}){let[t,n]=(0,_.useState)(!1);return t||e===0?null:(0,I.jsx)(`div`,{className:`border-b border-amber-500/20 bg-amber-500/5 px-4 py-2`,children:(0,I.jsxs)(`div`,{className:`max-w-7xl mx-auto flex items-center gap-3`,children:[(0,I.jsxs)(`svg`,{className:`shrink-0 text-amber-400`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,I.jsx)(`path`,{d:`M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z`}),(0,I.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,I.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}),(0,I.jsxs)(`p`,{className:`text-xs text-amber-300 flex-1`,children:[(0,I.jsxs)(`span`,{className:`font-semibold`,children:[e,` other `,e===1?`tab is`:`tabs are`,` open.`]}),` `,`Each tab holds a live SSE connection. Browsers limit connections per origin — too many tabs will prevent this page from loading CSS and JS.`,` `,(0,I.jsx)(`span`,{className:`text-amber-400/70`,children:`Close other tabs to restore full live-update functionality.`})]}),(0,I.jsx)(`button`,{onClick:()=>n(!0),className:`text-amber-500/50 hover:text-amber-400 transition-colors shrink-0 cursor-pointer`,title:`Dismiss`,children:(0,I.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,I.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,I.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})})}function zr(){let[e,t]=(0,_.useState)(window.location.pathname),{otherTabCount:n}=Mr();(0,_.useEffect)(()=>{let e=()=>t(window.location.pathname);return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,_.useEffect)(()=>{let e=e=>{let t=e.target.closest(`a`);if(!t)return;let n=t.getAttribute(`href`);!n||n.startsWith(`http`)||n.startsWith(`//`)||(e.preventDefault(),Lr(n))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[]);let r=t=>t===`/`?e===`/`:e.startsWith(t);return(0,I.jsxs)(`div`,{className:`min-h-screen bg-[#080808] text-white`,children:[(0,I.jsxs)(`header`,{className:`border-b border-[#1e1e1e] sticky top-0 z-50 bg-[#080808]/95 backdrop-blur`,children:[(0,I.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 flex items-center h-12 gap-6`,children:[(0,I.jsx)(`span`,{className:`text-amber-400 font-bold text-sm tracking-tight select-none`,children:`ssg`}),(0,I.jsx)(`nav`,{className:`flex items-center gap-1`,children:Nr.map(e=>(0,I.jsx)(`a`,{href:e.path,className:`px-3 py-1.5 rounded text-sm transition-colors ${r(e.path)?`bg-[#1a1a1a] text-white`:`text-[#888] hover:text-white hover:bg-[#111]`}`,children:e.label},e.path))}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 ml-auto`,children:[n>0&&(0,I.jsxs)(`span`,{className:`text-xs text-amber-400/70 border border-amber-500/20 rounded px-1.5 py-0.5`,title:`${n} other tab${n===1?``:`s`} open — may cause connection issues`,children:[n+1,` tabs open`]}),(0,I.jsx)(Fr,{}),(0,I.jsx)(Pr,{})]})]}),(0,I.jsx)(Rr,{count:n})]}),(0,I.jsx)(`main`,{className:`max-w-7xl mx-auto px-4 py-6`,children:Ir(e)})]})}var Br=document.getElementById(`app-root`);if(!Br)throw Error(`Missing #app-root`);g.createRoot(Br).render((0,I.jsx)(_.StrictMode,{children:(0,I.jsx)(zr,{})}));
|