@xenon-device-management/xenon 1.7.7 → 1.7.9

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.
Files changed (66) hide show
  1. package/lib/package.json +1 -1
  2. package/lib/public/assets/{ApiKeyGate-BVaB1Eg_.js → ApiKeyGate-DstjGHCV.js} +1 -1
  3. package/lib/public/assets/{BugReportButton-CioDV7QP.js → BugReportButton-CCFNeE8T.js} +1 -1
  4. package/lib/public/assets/DeviceMosaicView-CeSU4Cin.js +2 -0
  5. package/lib/public/assets/{EmptyState-UcJej2vi.js → EmptyState-BLKITXvX.js} +1 -1
  6. package/lib/public/assets/{FieldGroup-CYlyr34Q.js → FieldGroup-DnJ8AU1V.js} +1 -1
  7. package/lib/public/assets/{Modal-CjmzIR4Y.js → Modal-QVER5CZo.js} +1 -1
  8. package/lib/public/assets/{SegmentedControl-wRDvkYAQ.js → SegmentedControl-C2vcRRnn.js} +1 -1
  9. package/lib/public/assets/{SettingCard-BzjYlAYS.js → SettingCard-BCRyZfOg.js} +1 -1
  10. package/lib/public/assets/{Table-ta1UYEeC.js → Table-CEvMaA5P.js} +1 -1
  11. package/lib/public/assets/{activity-jltyhcrF.js → activity-C9XYmP_g.js} +1 -1
  12. package/lib/public/assets/{ai-settings-Dfjxb1SZ.js → ai-settings-CUkrWRb4.js} +1 -1
  13. package/lib/public/assets/{api-keys-cFOese97.js → api-keys-DOEqEyCC.js} +1 -1
  14. package/lib/public/assets/{apps-sHtZU8T_.js → apps-kS8notsd.js} +1 -1
  15. package/lib/public/assets/{arrow-left-DGZzN6Sl.js → arrow-left-USNjWr3g.js} +1 -1
  16. package/lib/public/assets/{arrow-up-right-DtZUe0YH.js → arrow-up-right-CA-0ObXb.js} +1 -1
  17. package/lib/public/assets/{auth-shell-D0eF5eyS.js → auth-shell-0GDuDM6t.js} +1 -1
  18. package/lib/public/assets/builds-page-B3hcVeUY.js +6 -0
  19. package/lib/public/assets/{button-3RkAu6xE.js → button-30pnTauc.js} +1 -1
  20. package/lib/public/assets/{check-D6DDcFwM.js → check-CVbtgHOC.js} +1 -1
  21. package/lib/public/assets/{chevron-right-BtA7DR8A.js → chevron-right-BpHMOuL1.js} +1 -1
  22. package/lib/public/assets/{circle-check-Bjgvpq5F.js → circle-check-BR3SeBx6.js} +1 -1
  23. package/lib/public/assets/{circle-x-_TOawobA.js → circle-x-BISG5iH-.js} +1 -1
  24. package/lib/public/assets/{clock-pm4LDp97.js → clock-BiZmZWEe.js} +1 -1
  25. package/lib/public/assets/{copy-x-UuUQkc.js → copy-E317aAW3.js} +1 -1
  26. package/lib/public/assets/{device-explorer-BDih8ZO9.js → device-explorer-DTj4kvcs.js} +8 -8
  27. package/lib/public/assets/{download-CuDjBGgs.js → download-Blklg-SX.js} +1 -1
  28. package/lib/public/assets/{forgot-password-lgHuL3gW.js → forgot-password-Bwo7pGp7.js} +1 -1
  29. package/lib/public/assets/{funnel-DQuWVevA.js → funnel-C8pl8r9F.js} +1 -1
  30. package/lib/public/assets/{index--TKsSVZp.js → index-Doq8HO3X.js} +14 -14
  31. package/lib/public/assets/index-TkL430dq.css +1 -0
  32. package/lib/public/assets/{layers-CdE4q4fN.js → layers-C2U3k-wh.js} +1 -1
  33. package/lib/public/assets/{lock-D2Vg6I6G.js → lock-pCxyVW83.js} +1 -1
  34. package/lib/public/assets/{login-C2dtnYcH.js → login-Cn6qENaF.js} +1 -1
  35. package/lib/public/assets/{maintenance-settings-Ck0suBTt.js → maintenance-settings-DybzeKfb.js} +1 -1
  36. package/lib/public/assets/{mouse-pointer-2-JuM7rDhC.js → mouse-pointer-2-cmVLOY6H.js} +1 -1
  37. package/lib/public/assets/overview-Dqw_olJm.js +11 -0
  38. package/lib/public/assets/{page-header-D5tpZwkI.js → page-header-Qk9pGEaH.js} +1 -1
  39. package/lib/public/assets/{plus-tcA3_CAo.js → plus-DkzZBN8d.js} +1 -1
  40. package/lib/public/assets/{profile-page-BuuLTEtS.js → profile-page-D_BlUsba.js} +1 -1
  41. package/lib/public/assets/{reset-password-ERq0WAyA.js → reset-password-vxmC3PEa.js} +1 -1
  42. package/lib/public/assets/{runbook-page-BubL06xm.js → runbook-page-rzVHVBte.js} +1 -1
  43. package/lib/public/assets/{selector-detail-page-DgL7bNdy.js → selector-detail-page-DUPHHW7E.js} +1 -1
  44. package/lib/public/assets/selector-health-C4Sv_nTk.css +1 -0
  45. package/lib/public/assets/{selector-health-B-V7vomq.js → selector-health-CS_wYWYA.js} +1 -1
  46. package/lib/public/assets/{selector-health-page-DWy7bTdU.js → selector-health-page-CQT_ghIj.js} +1 -1
  47. package/lib/public/assets/{session-detail-page-COgS5oAy.js → session-detail-page-Md2BJeDW.js} +1 -1
  48. package/lib/public/assets/{settings-D0fQ4JNR.js → settings-DcRs-Ksu.js} +1 -1
  49. package/lib/public/assets/{shield-DINNxWHp.js → shield-DKOl26Qj.js} +1 -1
  50. package/lib/public/assets/{shield-alert-DDDbE5ER.js → shield-alert-B6RlIJqv.js} +1 -1
  51. package/lib/public/assets/status-pill-outline-Df9QaRNJ.js +1 -0
  52. package/lib/public/assets/{tablet-DoE7LIzI.js → tablet-1xXXhpqC.js} +1 -1
  53. package/lib/public/assets/{teams-DpW-IUPC.js → teams-DnBnZECm.js} +1 -1
  54. package/lib/public/assets/{trash-2-Dvr08Dpq.js → trash-2-D-ONhY9W.js} +1 -1
  55. package/lib/public/assets/{useSocket-COssbQIj.js → useSocket-D9iZtppJ.js} +1 -1
  56. package/lib/public/assets/{users-DKmLh2WK.js → users-BFrjP_42.js} +1 -1
  57. package/lib/public/assets/{webhook-settings-nwtLvp2Q.js → webhook-settings-DgJKt5Wf.js} +1 -1
  58. package/lib/public/assets/{zap-CM2cWetx.js → zap-C8F21kM1.js} +1 -1
  59. package/lib/public/index.html +2 -2
  60. package/package.json +1 -1
  61. package/lib/public/assets/DeviceMosaicView-BtRxZTXc.js +0 -2
  62. package/lib/public/assets/builds-page-DxDwaq_t.js +0 -6
  63. package/lib/public/assets/index-BW3kENYH.css +0 -1
  64. package/lib/public/assets/overview-BBzmQBEl.js +0 -11
  65. package/lib/public/assets/selector-health-BwHGcem9.css +0 -1
  66. package/lib/public/assets/status-pill-outline-CFz5xaoF.js +0 -1
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap";:root{--bg: #0a0d0c;--surface: #111514;--surface-2: #161b1a;--border: #1f2624;--border-strong: #2a3331;--text: #e6ebe9;--text-muted: #8a938f;--text-dim: #5b6460;--green: #22c55e;--green-dim: #16a34a;--amber: #f59e0b;--red: #ef4444;--blue: #3b82f6;--accent-subtle: rgba(34, 197, 94, .1);--accent-border: rgba(34, 197, 94, .3);--status-ready-fg: var(--green);--status-busy-fg: var(--amber);--status-reserved-fg: var(--blue);--status-error-fg: var(--red);--status-offline-fg: var(--text-muted);--status-ready-bg: rgba(34, 197, 94, .1);--status-busy-bg: rgba(245, 158, 11, .1);--status-reserved-bg: rgba(59, 130, 246, .1);--status-error-bg: rgba(239, 68, 68, .1);--status-offline-bg: rgba(138, 147, 143, .08);--status-ready-border: rgba(34, 197, 94, .3);--status-busy-border: rgba(245, 158, 11, .3);--status-reserved-border: rgba(59, 130, 246, .3);--status-error-border: rgba(239, 68, 68, .3);--status-offline-border: rgba(138, 147, 143, .25);--space-1: 4px;--space-2: 8px;--space-3: 12px;--space-4: 16px;--space-5: 20px;--space-6: 24px;--space-8: 32px;--space-12: 48px;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 8px;--shadow-sm: 0 1px 2px rgba(0, 0, 0, .25);--shadow-md: 0 4px 12px rgba(0, 0, 0, .35);--shadow-lg: 0 12px 32px rgba(0, 0, 0, .45);--motion-fast: .15s cubic-bezier(.2, 0, 0, 1);--motion-slow: .25s cubic-bezier(.2, 0, 0, 1)}.scanline,.header-container:after{display:none!important}.animate-pulse-success,.animate-pulse-running{animation:none!important}.text-glow{text-shadow:none!important}@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-top-12{top:-3rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-2{bottom:.5rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1\/2{left:50%}.left-14{left:3.5rem}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-3{left:.75rem}.left-full{left:100%}.right-0{right:0}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-video{aspect-ratio:16 / 9}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[2px\]{height:2px}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-full{max-height:100%}.min-h-0{min-height:0px}.min-h-\[120px\]{min-height:120px}.min-h-\[280px\]{min-height:280px}.min-h-screen{min-height:100vh}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[104px\]{width:104px}.w-\[108px\]{width:108px}.w-\[160px\]{width:160px}.w-\[18px\]{width:18px}.w-\[280px\]{width:280px}.w-\[2px\]{width:2px}.w-\[32px\]{width:32px}.w-\[36px\]{width:36px}.w-\[3px\]{width:3px}.w-\[64px\]{width:64px}.w-\[92px\]{width:92px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\[18px\]{min-width:18px}.max-w-3xl{max-width:48rem}.max-w-7xl{max-width:80rem}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[240px\]{max-width:240px}.max-w-\[420px\]{max-width:420px}.max-w-\[45\%\]{max-width:45%}.max-w-full{max-width:100%}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate: -90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes ping{75%,to{transform:scale(2);opacity:0}}.animate-ping{animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;user-select:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\[260px_1fr\]{grid-template-columns:260px 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-\[var\(--border\)\]>:not([hidden])~:not([hidden]){border-color:var(--border)}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[var\(--border\)\]{border-color:var(--border)}.border-\[var\(--border-strong\)\]{border-color:var(--border-strong)}.border-\[var\(--green\)\]{border-color:var(--green)}.border-\[var\(--red\,\#dc2626\)\]{border-color:var(--red,#dc2626)}.border-emerald-300\/80{border-color:#6ee7b7cc}.border-emerald-500\/40{border-color:#10b98166}.border-emerald-500\/60{border-color:#10b98199}.border-neutral-800{--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity, 1))}.border-red-500\/40{border-color:#ef444466}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-t-neutral-400{--tw-border-opacity: 1;border-top-color:rgb(163 163 163 / var(--tw-border-opacity, 1))}.bg-\[\#000\]{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-\[var\(--accent\,\#3b82f6\)\]{background-color:var(--accent,#3b82f6)}.bg-\[var\(--amber\)\]{background-color:var(--amber)}.bg-\[var\(--bg\)\]{background-color:var(--bg)}.bg-\[var\(--blue\)\]{background-color:var(--blue)}.bg-\[var\(--border\)\]{background-color:var(--border)}.bg-\[var\(--border-strong\)\]{background-color:var(--border-strong)}.bg-\[var\(--green\)\]{background-color:var(--green)}.bg-\[var\(--green-dim\)\]{background-color:var(--green-dim)}.bg-\[var\(--red\)\]{background-color:var(--red)}.bg-\[var\(--red-soft\,rgba\(220\,38\,38\,0\.08\)\)\]{background-color:var(--red-soft,rgba(220,38,38,.08))}.bg-\[var\(--surface\)\]{background-color:var(--surface)}.bg-\[var\(--surface-1\,rgba\(255\,255\,255\,0\.02\)\)\]{background-color:var(--surface-1,rgba(255,255,255,.02))}.bg-\[var\(--surface-2\)\]{background-color:var(--surface-2)}.bg-\[var\(--surface-2\,\#2a2a2a\)\]{background-color:var(--surface-2,#2a2a2a)}.bg-\[var\(--surface-2\,rgba\(255\,255\,255\,0\.06\)\)\]{background-color:var(--surface-2,rgba(255,255,255,.06))}.bg-\[var\(--surface-2\,var\(--surface\)\)\]{background-color:var(--surface-2,var(--surface))}.bg-\[var\(--text-dim\)\]{background-color:var(--text-dim)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/80{background-color:#000c}.bg-emerald-400{--tw-bg-opacity: 1;background-color:rgb(52 211 153 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/5{background-color:#10b9810d}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-zinc-600{--tw-bg-opacity: 1;background-color:rgb(82 82 91 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-\[\#0a0e1a\]{--tw-gradient-from: #0a0e1a var(--tw-gradient-from-position);--tw-gradient-to: rgb(10 14 26 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-\[\#131a2e\]{--tw-gradient-to: rgb(19 26 46 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #131a2e var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-\[\#1a2548\]{--tw-gradient-to: #1a2548 var(--tw-gradient-to-position)}.object-contain{object-fit:contain}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-8{padding-bottom:2rem}.pl-1\.5{padding-left:.375rem}.pl-14{padding-left:3.5rem}.pl-7{padding-left:1.75rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-14{padding-right:3.5rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pt-14{padding-top:3.5rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:JetBrains Mono,ui-monospace,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.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)}.leading-10{line-height:2.5rem}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[var\(--amber\)\]{color:var(--amber)}.text-\[var\(--blue\)\]{color:var(--blue)}.text-\[var\(--green\)\]{color:var(--green)}.text-\[var\(--red\)\]{color:var(--red)}.text-\[var\(--red\,\#dc2626\)\]{color:var(--red,#dc2626)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--text-dim\)\]{color:var(--text-dim)}.text-\[var\(--text-muted\)\]{color:var(--text-muted)}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-neutral-200{--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity, 1))}.text-neutral-400{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity, 1))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity, 1))}.text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/60{color:#fff9}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow-\[0_0_20px_rgba\(220\,38\,38\,0\.3\)\]{--tw-shadow: 0 0 20px rgba(220,38,38,.3);--tw-shadow-colored: 0 0 20px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_4px_rgba\(52\,211\,153\,0\.7\)\]{--tw-shadow: 0 0 4px rgba(52,211,153,.7);--tw-shadow-colored: 0 0 4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-emerald-400\/60{--tw-ring-color: rgb(52 211 153 / .6)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}*{box-sizing:border-box}html,body,#root{height:100%;margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,sans-serif;font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:1.5}body{overflow:hidden}h1,h2,h3,h4,h5,h6,.brand-font{font-family:Inter,sans-serif;font-weight:700;letter-spacing:-.02em;color:var(--text)}.font-mono,code,.code-font{font-family:JetBrains Mono,ui-monospace,Menlo,Monaco,Consolas,monospace}code,.code-font{font-size:.9em;background:var(--surface-2);padding:2px 6px;border-radius:var(--radius-sm);color:var(--green)}button{font-family:inherit;cursor:pointer;transition:background var(--motion-fast),border-color var(--motion-fast),color var(--motion-fast)}a{color:var(--blue);text-decoration:none;transition:color var(--motion-fast)}a:hover{color:#79b8ff}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-md)}::-webkit-scrollbar-thumb:hover{background:var(--border-strong)}input[type=checkbox]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:16px;height:16px;background:var(--bg);border:1px solid var(--border-strong);border-radius:var(--radius-sm);cursor:pointer;position:relative;transition:background var(--motion-fast),border-color var(--motion-fast);display:inline-flex;align-items:center;justify-content:center}input[type=checkbox]:hover{border-color:var(--green)}input[type=checkbox]:checked{background:var(--green);border-color:var(--green)}input[type=checkbox]:checked:after{content:"✓";color:var(--bg);font-size:11px;font-weight:700}input[type=checkbox]:focus{outline:none;box-shadow:0 0 0 2px #22c55e40}.bg-grid{background-image:linear-gradient(to right,rgba(255,255,255,.02) 1px,transparent 1px),linear-gradient(to bottom,rgba(255,255,255,.02) 1px,transparent 1px);background-size:32px 32px}@keyframes pulse-dot{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.pulse-dot{animation:pulse-dot 2s ease-in-out infinite}.fade-in{animation:fadeIn .2s ease-out forwards}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.placeholder\:text-\[var\(--text-dim\)\]::placeholder{color:var(--text-dim)}.last\:border-b-0:last-child{border-bottom-width:0px}.last\:border-r-0:last-child{border-right-width:0px}.hover\:border-\[var\(--border\)\]:hover{border-color:var(--border)}.hover\:border-\[var\(--border-strong\)\]:hover{border-color:var(--border-strong)}.hover\:bg-\[var\(--bg\)\]:hover{background-color:var(--bg)}.hover\:bg-\[var\(--green-dim\)\]:hover{background-color:var(--green-dim)}.hover\:bg-\[var\(--surface\)\]:hover{background-color:var(--surface)}.hover\:bg-\[var\(--surface-2\)\]:hover{background-color:var(--surface-2)}.hover\:bg-\[var\(--surface-2\,\#1a1a1a\)\]:hover{background-color:var(--surface-2,#1a1a1a)}.hover\:bg-\[var\(--surface-2\,rgba\(255\,255\,255\,0\.04\)\)\]:hover{background-color:var(--surface-2,rgba(255,255,255,.04))}.hover\:bg-\[var\(--surface-raised\)\]:hover{background-color:var(--surface-raised)}.hover\:bg-emerald-500\/10:hover{background-color:#10b9811a}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-600\/70:hover{background-color:#dc2626b3}.hover\:bg-white\/15:hover{background-color:#ffffff26}.hover\:text-\[var\(--green\)\]:hover{color:var(--green)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.focus\:border-\[var\(--accent\,\#3b82f6\)\]:focus{border-color:var(--accent,#3b82f6)}.focus\:border-\[var\(--border-strong\)\]:focus{border-color:var(--border-strong)}.focus\:border-\[var\(--green\)\]:focus{border-color:var(--green)}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.active\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:bg-\[var\(--green\)\]{background-color:var(--green)}.group:hover .group-hover\:text-\[var\(--text\)\]{color:var(--text)}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 640px){.sm\:inline-block{display:inline-block}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}}@media (min-width: 768px){.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.md\:divide-y-0>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(0px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(0px * var(--tw-divide-y-reverse))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.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-\[1fr_340px\]{grid-template-columns:1fr 340px}}.surface-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg)}.toast-container{position:fixed;bottom:32px;right:32px;display:flex;flex-direction:column;gap:16px;z-index:10000;pointer-events:none}.toast-item{pointer-events:auto;min-width:320px;max-width:480px;padding:16px 20px;border-radius:6px;display:flex;align-items:center;gap:16px;background:var(--surface);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border:1px solid var(--border);box-shadow:0 20px 40px #0006;color:var(--text);font-size:13px;font-weight:600;font-family:JetBrains Mono,monospace;transition:all .3s cubic-bezier(.16,1,.3,1);position:relative;overflow:hidden}.toast-item:after{content:"";position:absolute;top:0;left:0;width:100%;height:2px;background:currentColor;opacity:.3}.toast-message{flex:1;text-transform:uppercase;letter-spacing:.02em}.toast-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0}.toast-close{background:transparent;border:none;color:var(--text-dim);cursor:pointer;padding:4px;border-radius:6px;display:flex;align-items:center;justify-content:center;transition:all .2s}.toast-close:hover{background:#ffffff0d;color:var(--text)}.toast-success{border-color:#00ff884d;color:var(--green)}.toast-success .toast-icon{color:var(--green)}.toast-error{border-color:#ff4d4d4d;color:#ff4d4d}.toast-error .toast-icon{color:#ff4d4d}.toast-info{border-color:#00bfff4d;color:#00bfff}.toast-info .toast-icon{color:#00bfff}.toast-loading{border-color:var(--text-muted);color:var(--text-dim)}.toast-loading .toast-icon{color:var(--text-dim)}@keyframes slide-in{0%{transform:translate(100%) scale(.95);opacity:0}to{transform:translate(0) scale(1);opacity:1}}.animate-slide-in{animation:slide-in .4s cubic-bezier(.16,1,.3,1) forwards}.cp-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;z-index:9000;display:flex;justify-content:center;align-items:flex-start;padding-top:12vh;font-family:Inter,sans-serif}.cp{width:560px;max-width:90vw;background:var(--surface);border:1px solid var(--border-strong);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden;display:flex;flex-direction:column}.cp-input-row{display:flex;align-items:center;gap:10px;padding:12px 14px;border-bottom:1px solid var(--border);color:var(--text-muted)}.cp-input{flex:1;background:transparent;border:none;outline:none;color:var(--text);font-family:Inter,sans-serif;font-size:14px}.cp-input::placeholder{color:var(--text-dim)}.cp-esc{font-family:JetBrains Mono,monospace;font-size:10px;color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);padding:2px 6px;border-radius:var(--radius-sm)}.cp-results{max-height:56vh;overflow-y:auto;padding:8px}.cp-empty{padding:20px;text-align:center;color:var(--text-muted);font-size:12px}.cp-group{padding:4px 0}.cp-group-head{font-family:JetBrains Mono,monospace;font-size:9px;letter-spacing:.12em;color:var(--text-dim);padding:6px 8px;text-transform:uppercase}.cp-item{display:flex;width:100%;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--radius-sm);background:transparent;border:none;cursor:pointer;text-align:left;font-family:Inter,sans-serif}.cp-item-active,.cp-item:hover{background:var(--surface-2)}.cp-item-label{color:var(--text);font-size:13px;font-weight:500}.cp-item-sub{margin-left:auto;color:var(--text-dim);font-family:JetBrains Mono,monospace;font-size:10px}
@@ -1,4 +1,4 @@
1
- import{g as a}from"./index--TKsSVZp.js";/**
1
+ import{g as a}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{u as v,a as p,b as f,r as s,j as e,L as j,l as w}from"./index--TKsSVZp.js";import{A as N}from"./auth-shell-D0eF5eyS.js";function k(){const u=v(),c=p(),{refresh:m}=f(),d=new URLSearchParams(c.search).get("next")||"/overview",[a,x]=s.useState(""),[r,b]=s.useState(""),[o,n]=s.useState(!1),[l,i]=s.useState(null);async function g(t){t.preventDefault(),n(!0),i(null);try{await w(a,r),await m(),u(d,{replace:!0})}catch(h){i(h.message||"Login failed")}finally{n(!1)}}return e.jsx(N,{children:e.jsxs("form",{onSubmit:g,children:[e.jsx("h1",{className:"text-2xl font-semibold mb-1",children:"Welcome back!"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Sign in to your account"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Email"}),e.jsx("input",{type:"email",value:a,onChange:t=>x(t.target.value),autoFocus:!0,required:!0,className:"w-full mb-4 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Password"}),e.jsx("input",{type:"password",value:r,onChange:t=>b(t.target.value),required:!0,className:"w-full mb-2 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("div",{className:"text-right mb-4",children:e.jsx(j,{to:"/forgot-password",className:"text-[11px] text-[var(--text-dim)] hover:text-[var(--text)]",children:"Forgot password?"})}),l&&e.jsx("div",{className:"mt-3 text-xs text-[var(--red)]",children:l}),e.jsx("button",{type:"submit",disabled:o,className:"mt-5 w-full h-10 rounded-md bg-[var(--green)] text-black font-medium text-sm disabled:opacity-50",children:o?"Signing in…":"Sign in"})]})})}export{k as default};
1
+ import{u as v,a as p,b as f,r as s,j as e,L as j,l as w}from"./index-Doq8HO3X.js";import{A as N}from"./auth-shell-0GDuDM6t.js";function k(){const u=v(),c=p(),{refresh:m}=f(),d=new URLSearchParams(c.search).get("next")||"/overview",[a,x]=s.useState(""),[r,b]=s.useState(""),[o,n]=s.useState(!1),[l,i]=s.useState(null);async function g(t){t.preventDefault(),n(!0),i(null);try{await w(a,r),await m(),u(d,{replace:!0})}catch(h){i(h.message||"Login failed")}finally{n(!1)}}return e.jsx(N,{children:e.jsxs("form",{onSubmit:g,children:[e.jsx("h1",{className:"text-2xl font-semibold mb-1",children:"Welcome back!"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Sign in to your account"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Email"}),e.jsx("input",{type:"email",value:a,onChange:t=>x(t.target.value),autoFocus:!0,required:!0,className:"w-full mb-4 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Password"}),e.jsx("input",{type:"password",value:r,onChange:t=>b(t.target.value),required:!0,className:"w-full mb-2 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("div",{className:"text-right mb-4",children:e.jsx(j,{to:"/forgot-password",className:"text-[11px] text-[var(--text-dim)] hover:text-[var(--text)]",children:"Forgot password?"})}),l&&e.jsx("div",{className:"mt-3 text-xs text-[var(--red)]",children:l}),e.jsx("button",{type:"submit",disabled:o,className:"mt-5 w-full h-10 rounded-md bg-[var(--green)] text-black font-medium text-sm disabled:opacity-50",children:o?"Signing in…":"Sign in"})]})})}export{k as default};
@@ -1,4 +1,4 @@
1
- import{g as S,m as N,r as d,X as C,j as e,v as D,s as M,I as A}from"./index--TKsSVZp.js";/* empty css */import{S as o,A as B}from"./SettingCard-BzjYlAYS.js";import{P as w}from"./page-header-D5tpZwkI.js";import{S as k,C as z}from"./shield-DINNxWHp.js";import{T as E}from"./trash-2-Dvr08Dpq.js";import{C as L}from"./check-D6DDcFwM.js";/**
1
+ import{g as S,m as N,r as d,X as C,j as e,v as D,s as M,I as A}from"./index-Doq8HO3X.js";/* empty css */import{S as o,A as B}from"./SettingCard-BCRyZfOg.js";import{P as w}from"./page-header-Qk9pGEaH.js";import{S as k,C as z}from"./shield-DKOl26Qj.js";import{T as E}from"./trash-2-D-ONhY9W.js";import{C as L}from"./check-CVbtgHOC.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1,11 @@
1
+ import{g as R,r as b,X as S,j as e,u as U,T as X,S as Y}from"./index-Doq8HO3X.js";import{u as z}from"./useSocket-D9iZtppJ.js";import{F as V}from"./funnel-C8pl8r9F.js";import{T as W,M as K}from"./tablet-1xXXhpqC.js";import{A as Q}from"./activity-C9XYmP_g.js";import{P as G}from"./plus-DkzZBN8d.js";/**
2
+ * @license lucide-react v0.555.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const J=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z=R("arrow-right",J);/**
7
+ * @license lucide-react v0.555.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],se=R("play",ee),M=20;function te(s,n){if(!s)return!1;const t=Date.parse(s);return Number.isFinite(t)&&Date.now()-t<n}function ne(s){const t=new Date().getHours(),l=[];for(let a=0;a<24;a++){const x=(t-(23-a)+24)%24;l.push({hour:`${String(x).padStart(2,"0")}:00`,sessions:0,heals:0})}const u=Date.now()-24*60*60*1e3;let o=0;for(const a of s){const x=a.startTime?Date.parse(a.startTime):NaN;if(!Number.isFinite(x)||x<u)continue;const v=23-Math.floor((Date.now()-x)/(60*60*1e3));v>=0&&v<24&&(l[v].sessions+=1,o+=1)}return{trend:l,total:o}}function re(s){const n=new Map;for(const o of s){const a=o.platform||o.device_platform||"unknown",x=o.platformVersion||o.version||o.device_version||"",h=a==="ios"?"iOS":a==="tvos"?"tvOS":a.charAt(0).toUpperCase()+a.slice(1),v=x?`${h} ${x}`:h;n.set(v,(n.get(v)??0)+1)}const t=Array.from(n.entries()).sort((o,a)=>a[1]-o[1]);if(t.length<=6)return t.map(([o,a])=>({label:o,count:a}));const l=t.slice(0,5),u=t.slice(5).reduce((o,[,a])=>o+a,0);return[...l.map(([o,a])=>({label:o,count:a})),{label:"Other",count:u}]}function ae(s){return s.deviceName||(s.deviceUdid?s.deviceUdid.slice(0,8):"device")}function _(s){const n=s.commandName||"selector",t=ae(s);return s.tier?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s.tier})," healed ",e.jsx("strong",{children:n})," on ",e.jsx("strong",{children:t})]}):e.jsxs(e.Fragment,{children:["Healed ",e.jsx("strong",{children:n})," on ",e.jsx("strong",{children:t})]})}function ie(){const[s,n]=b.useState([]),[t,l]=b.useState([]),[u,o]=b.useState(0),[a,x]=b.useState([]),[h,v]=b.useState(null),{on:c}=z(),w=b.useRef(0);b.useEffect(()=>{let m=!1;const j=()=>{S.getDevices().then(d=>{!m&&Array.isArray(d)&&n(d)}).catch(()=>{})};j();const T=setInterval(j,3e4);return S.getSessions().then(d=>{!m&&Array.isArray(d)&&l(d)}).catch(()=>{}),S.getPendingSessionsCount().then(d=>{if(m)return;const N=typeof d=="number"?d:typeof(d==null?void 0:d.count)=="number"?d.count:0;o(N)}).catch(()=>{}),S.getRecentHealingEvents().then(d=>{if(m||!d)return;v(typeof d.todayCount=="number"?d.todayCount:0);const N=Array.isArray(d.events)?d.events:[];N.length!==0&&x(y=>{const A=new Set(y.map(i=>i.id));return[...N.filter(i=>!A.has(i.id)).map(i=>({id:i.id,ts:Date.parse(i.createdAt)||Date.now(),kind:"heal",message:_(i)})),...y].sort((i,g)=>g.ts-i.ts).slice(0,M)})}).catch(()=>{}),()=>{m=!0,clearInterval(T)}},[]),b.useEffect(()=>{const m=[],j=(r,i)=>{w.current+=1;const g={id:`${Date.now()}-${w.current}`,ts:Date.now(),kind:r,message:i};x(f=>[g,...f].slice(0,M))},T=r=>{var f;r&&r.session&&l(p=>p.find(E=>E.id===r.session.id)?p:[r.session,...p]);const i=((f=r==null?void 0:r.session)==null?void 0:f.id)||(r==null?void 0:r.sessionId)||"",g=i?i.slice(0,6):"";j("session",e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:g||"—"})," started"]}))},d=r=>{var p,C;const i=((p=r==null?void 0:r.session)==null?void 0:p.id)||(r==null?void 0:r.sessionId)||"",g=!!((C=r==null?void 0:r.session)!=null&&C.failure_reason||r!=null&&r.failure_reason);i&&l(E=>E.map(F=>F.id===i?{...F,status:g?"failed":"finished"}:F));const f=i?i.slice(0,6):"";j(g?"session-failed":"session-end",g?e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:f||"—"})," failed"]}):e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:f||"—"})," ended"]}))},N=r=>{const i=(r==null?void 0:r.nodeId)||(r==null?void 0:r.id)||"node";j("node",e.jsxs(e.Fragment,{children:["Node ",e.jsx("strong",{children:String(i)})," connected"]}))},y=r=>{const i=(r==null?void 0:r.nodeId)||(r==null?void 0:r.id)||"node";j("node",e.jsxs(e.Fragment,{children:["Node ",e.jsx("strong",{children:String(i)})," disconnected"]}))},A=r=>{const i=r;if(!i||!i.id)return;v(f=>f===null?1:f+1),w.current+=1;const g={id:i.id,ts:Date.parse(i.createdAt)||Date.now(),kind:"heal",message:_(i)};x(f=>f.some(p=>p.id===g.id)?f:[g,...f].slice(0,M))};return m.push(c("session_started",T)),m.push(c("session_stopped",d)),m.push(c("node_connected",N)),m.push(c("node_disconnected",y)),m.push(c("healing_event",A)),()=>{m.forEach(r=>r&&r())}},[c]);const $=t.filter(m=>m.status==="running"),D=t.filter(m=>m.failure_reason&&te(m.endTime||m.startTime,24*60*60*1e3)).length,{trend:L,total:q}=b.useMemo(()=>ne(t),[t]),P=b.useMemo(()=>re(s),[s]);return{devices:s,activeSessions:$,queuedSessions:u,healsToday:h,failures24h:D,failuresDelta:null,activity:a,sessionTrend:L,totalSessions24h:q,osBreakdown:P}}const oe={healthy:"bg-[var(--green)]",neutral:"bg-[var(--border-strong)]",warn:"bg-[var(--amber)]",critical:"bg-[var(--red)]"},le={healthy:"bg-[var(--green)]",neutral:"bg-[var(--text-dim)]",warn:"bg-[var(--amber)]",critical:"bg-[var(--red)]"},ce={healthy:"text-[var(--green)]",neutral:"text-[var(--text-muted)]",warn:"text-[var(--amber)]",critical:"text-[var(--red)]"},k=({label:s,value:n,secondaryValue:t,subtitle:l,state:u="neutral"})=>e.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--surface)] p-4 hover:border-[var(--border-strong)] transition-colors",children:[e.jsx("span",{className:`absolute left-0 top-0 bottom-0 w-[2px] ${oe[u]}`}),e.jsx("div",{className:"text-[10px] font-mono font-semibold uppercase tracking-widest text-[var(--text-muted)]",children:s}),e.jsxs("div",{className:"mt-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-3xl font-semibold text-[var(--text)] tabular-nums",children:n}),t!=null&&e.jsxs("span",{className:"text-sm font-mono text-[var(--text-dim)]",children:["/ ",t]})]}),e.jsxs("div",{className:`mt-3 flex items-center gap-1.5 text-xs ${ce[u]}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${le[u]}`}),e.jsx("span",{children:l})]})]});function H(s){return s.offline?"offline":s.reservedBy?"reserved":s.busy?"busy":"ready"}function de(s){const n=(s.platform||"").toLowerCase();return n==="tvos"?X:/pad|tablet/i.test(s.name||"")?W:n==="ios"||n==="android"?Y:K}const xe={ready:{dot:"bg-[var(--green)]",text:"text-[var(--green)]",label:"READY"},busy:{dot:"bg-[var(--amber)]",text:"text-[var(--amber)]",label:"BUSY"},reserved:{dot:"bg-[var(--blue)]",text:"text-[var(--blue)]",label:"RESERVED"},offline:{dot:"bg-[var(--text-dim)]",text:"text-[var(--text-dim)]",label:"OFFLINE"}};function me(s){return s?s.length<=16?s:`${s.slice(0,8)}…${s.slice(-4)}`:""}const ue=({devices:s,maxRows:n=6})=>{const[t,l]=b.useState("all"),u=U(),o=(t==="all"?s:s.filter(a=>H(a)!=="ready")).slice(0,n);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)] flex flex-col",children:[e.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Fleet status"}),e.jsxs("span",{className:"text-xs font-mono text-[var(--text-dim)]",children:[s.length," devices"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-0.5 bg-[var(--surface-2)] border border-[var(--border)] rounded-md p-0.5",children:[e.jsx("button",{type:"button",onClick:()=>l("all"),className:`px-2 py-1 text-[11px] rounded transition-colors ${t==="all"?"bg-[var(--border-strong)] text-[var(--text)]":"text-[var(--text-dim)] hover:text-[var(--text)]"}`,children:"All"}),e.jsxs("button",{type:"button",onClick:()=>l("issues"),className:`px-2 py-1 text-[11px] rounded transition-colors flex items-center gap-1 ${t==="issues"?"bg-[var(--border-strong)] text-[var(--text)]":"text-[var(--text-dim)] hover:text-[var(--text)]"}`,children:[e.jsx(V,{className:"h-3 w-3"}),"Non-ready"]})]}),e.jsxs("button",{type:"button",onClick:()=>u("/devices"),className:"ml-1 inline-flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text)] transition-colors",children:["View all ",e.jsx(Z,{className:"h-3 w-3"})]})]})]}),e.jsx("div",{className:"divide-y divide-[var(--border)]",children:o.length===0?e.jsx("div",{className:"px-4 py-8 text-center text-xs text-[var(--text-dim)]",children:t==="issues"?"All devices are ready.":"No devices registered."}):o.map(a=>{const x=de(a),h=xe[H(a)];return e.jsxs("button",{type:"button",onClick:()=>a.udid&&u(`/devices/${a.udid}/control/screen`),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-[var(--surface-2)] transition-colors text-left",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${h.dot}`}),e.jsx(x,{className:"h-4 w-4 text-[var(--text-dim)] shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("div",{className:"text-xs text-[var(--text)] truncate",children:a.name||a.udid})}),e.jsxs("div",{className:"hidden md:block text-[11px] font-mono text-[var(--text-dim)] w-24 text-right",children:[(a.platform||"").toUpperCase()," ",a.sdk||""]}),e.jsx("div",{className:"hidden lg:block text-[11px] font-mono text-[var(--text-dim)] w-32 text-right",children:me(a.udid)})]}),e.jsx("span",{className:`font-mono text-[10px] font-semibold tracking-wider w-20 text-right ${h.text}`,children:h.label})]},a.udid||a.name)})})]})},he={session:"bg-[var(--green)]","session-end":"bg-[var(--text-dim)]","session-failed":"bg-[var(--red)]",node:"bg-[var(--blue)]",heal:"bg-[var(--amber)]"};function ve(s){const n=new Date(s);return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}const fe=[{tag:"session.start",desc:"when a new session begins"},{tag:"device.heal",desc:"when a device self-recovers"},{tag:"fleet.offline",desc:"when a device drops offline"}],ge=({events:s,live:n=!0})=>e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)] flex flex-col",children:[e.jsx("header",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Recent activity"}),e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-mono text-[var(--text-dim)] uppercase tracking-widest",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${n?"bg-[var(--green)] pulse-dot":"bg-[var(--text-dim)]"}`}),n?"Live":"Offline"]})]})}),s.length===0?e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 py-10 text-center gap-2",children:[e.jsx("div",{className:"h-10 w-10 rounded-full bg-[var(--surface-2)] border border-[var(--border)] flex items-center justify-center",children:e.jsx(Q,{className:"h-5 w-5 text-[var(--text-dim)]"})}),e.jsx("div",{className:"text-sm font-medium text-[var(--text)]",children:"No activity yet"}),e.jsx("div",{className:"text-xs text-[var(--text-dim)] max-w-xs",children:"Start a session to see events stream here in real-time."}),e.jsxs("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("xenon.open-command-palette")),className:"mt-2 inline-flex items-center gap-1.5 text-xs text-[var(--text)] border border-[var(--border-strong)] hover:border-[var(--green)]/50 hover:text-[var(--green)] rounded-md px-3 py-1.5 transition-colors",children:[e.jsx(se,{className:"h-3 w-3"})," Start a session"]}),e.jsxs("div",{className:"mt-4 w-full max-w-xs text-left",children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)] mb-2",children:"Event types you'll see"}),e.jsx("div",{className:"space-y-1",children:fe.map(t=>e.jsxs("div",{className:"flex items-baseline gap-2 text-[11px]",children:[e.jsx("span",{className:"font-mono text-[var(--green)]",children:t.tag}),e.jsxs("span",{className:"text-[var(--text-dim)] truncate",children:["— ",t.desc]})]},t.tag))})]})]}):e.jsx("div",{className:"flex-1 overflow-y-auto divide-y divide-[var(--border)]",children:s.map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[e.jsx("span",{className:"font-mono text-[10px] text-[var(--text-dim)] w-10 shrink-0",children:ve(t.ts)}),e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${he[t.kind]}`}),e.jsx("span",{className:"text-xs text-[var(--text-muted)] truncate",children:t.message})]},t.id))})]}),be=({data:s,totalSessions:n,totalHeals:t})=>{var x,h,v;const l=Math.max(1,...s.map(c=>c.sessions)),u=s.length-1,o=Math.floor(s.length/2),a=s.every(c=>c.sessions===0&&c.heals===0);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)]",children:[e.jsxs("header",{className:"flex items-start justify-between px-4 py-3 border-b border-[var(--border)]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Session activity"}),e.jsx("div",{className:"text-xs text-[var(--text-dim)] mt-0.5",children:"Last 24 hours"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-right",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)]",children:"Sessions"}),e.jsx("div",{className:"text-base font-semibold text-[var(--text)] tabular-nums",children:n})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)]",children:"Heals"}),e.jsx("div",{className:"text-base font-semibold text-[var(--green)] tabular-nums",children:t})]})]})]}),e.jsxs("div",{className:"p-4",children:[a?e.jsx("div",{className:"h-32 flex items-center justify-center text-xs text-[var(--text-dim)]",children:"No sessions in the last 24 hours — activity will chart here."}):e.jsx("div",{className:"flex items-end gap-1 h-32",children:s.map((c,w)=>{const $=c.sessions/l*100,D=c.heals/l*100;return e.jsxs("div",{className:"group relative flex-1 h-full flex flex-col justify-end",children:[c.heals>0&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-sm bg-[var(--green)]/40",style:{height:`${D}%`},"aria-hidden":!0}),e.jsx("div",{className:"relative w-full rounded-sm bg-[var(--border-strong)] group-hover:bg-[var(--green)] transition-colors",style:{height:`${Math.max($,2)}%`},"aria-label":`${c.hour} — ${c.sessions} sessions, ${c.heals} heals`}),e.jsxs("div",{className:"pointer-events-none absolute -top-12 left-1/2 -translate-x-1/2 whitespace-nowrap rounded-md bg-[var(--surface-2)] border border-[var(--border-strong)] px-2 py-1 text-[10px] opacity-0 group-hover:opacity-100 transition-opacity z-10 shadow-lg",children:[e.jsx("div",{className:"font-mono text-[var(--text-dim)]",children:c.hour}),e.jsxs("div",{className:"text-[var(--text)]",children:[c.sessions," sessions · ",c.heals," heals"]})]})]},w)})}),e.jsxs("div",{className:"flex justify-between mt-2 text-[10px] font-mono text-[var(--text-dim)]",children:[e.jsx("span",{children:(x=s[0])==null?void 0:x.hour}),e.jsx("span",{children:(h=s[o])==null?void 0:h.hour}),e.jsx("span",{children:(v=s[u])==null?void 0:v.hour})]})]})]})};function O(s){const n=s.toLowerCase();return n.startsWith("tvos")?"bg-[var(--green)]":n.startsWith("ios")?"bg-[var(--blue)]":n.startsWith("android")?"bg-[var(--amber)]":n==="other"?"bg-[var(--border-strong)]":"bg-[var(--green-dim)]"}const pe=({rows:s})=>{const n=s.reduce((t,l)=>t+l.count,0);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)]",children:[e.jsxs("header",{className:"px-4 py-3 border-b border-[var(--border)]",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Fleet composition"}),e.jsxs("div",{className:"text-xs text-[var(--text-dim)] mt-0.5",children:["By operating system · ",n," ",n===1?"device":"devices"]})]}),n===0?e.jsx("div",{className:"px-4 py-8 text-center text-xs text-[var(--text-dim)]",children:"No devices to break down."}):e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("div",{className:"h-2 w-full rounded-full overflow-hidden flex bg-[var(--surface-2)]",children:s.map(t=>e.jsx("div",{className:`${O(t.label)} h-full`,style:{width:`${t.count/n*100}%`},title:`${t.label}: ${t.count}`},t.label))}),e.jsx("div",{className:"space-y-1.5",children:s.map(t=>e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${O(t.label)}`}),e.jsx("span",{className:"font-mono text-[var(--text)]",children:t.label})]}),e.jsxs("div",{className:"flex items-center gap-3 font-mono text-[var(--text-dim)]",children:[e.jsx("span",{className:"tabular-nums",children:t.count}),e.jsxs("span",{className:"tabular-nums w-10 text-right",children:[Math.round(t.count/n*100),"%"]})]})]},t.label))})]})]})},B="—",I="Xenon",$e=()=>{const s=ie(),n=s.devices.length,t=s.devices.filter(v=>!v.offline).length,l=n?Math.round(t/n*100):null,u=n===0?"neutral":t===n?"healthy":"warn",o=s.activeSessions.length>0?"healthy":s.queuedSessions>0?"warn":"neutral",a=s.failures24h>0?"critical":"healthy",x=()=>window.dispatchEvent(new CustomEvent("xenon.open-command-palette")),h=new Date().getFullYear();return e.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)] mb-1.5",children:[e.jsx("span",{children:I}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-[var(--text-muted)]",children:"Overview"})]}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-[var(--text)]",children:"Overview"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-1",children:"Real-time fleet health and session activity."})]}),e.jsxs("button",{type:"button",onClick:x,className:"inline-flex items-center gap-1.5 h-9 px-3.5 rounded-md bg-[var(--green)] hover:bg-[var(--green-dim)] text-black text-sm font-medium transition-colors shadow-sm",children:[e.jsx(G,{className:"h-4 w-4"}),"New session"]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[e.jsx(k,{label:"Devices online",value:n===0?B:t,secondaryValue:n===0?void 0:n,subtitle:n===0?"No devices registered":l===100?"100% fleet uptime":`${l}% fleet uptime`,state:u}),e.jsx(k,{label:"Active sessions",value:s.activeSessions.length,subtitle:s.queuedSessions>0?`${s.queuedSessions} queued`:"No queue",state:o}),e.jsx(k,{label:"Heals today",value:s.healsToday===null?B:s.healsToday,subtitle:s.healsToday===null?"Loading…":s.healsToday===0?"No heals needed":`${s.healsToday} selector${s.healsToday===1?"":"s"} recovered`,state:s.healsToday&&s.healsToday>0?"warn":"neutral"}),e.jsx(k,{label:"Failures (24h)",value:s.failures24h,subtitle:s.failures24h===0?"No failures":`${s.failures24h} session${s.failures24h===1?"":"s"} failed`,state:a})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 mb-3",children:[e.jsx(ue,{devices:s.devices}),e.jsx(ge,{events:s.activity,live:!0})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsx(be,{data:s.sessionTrend,totalSessions:s.totalSessions24h,totalHeals:s.healsToday??0})}),e.jsx(pe,{rows:s.osBreakdown})]}),e.jsxs("footer",{className:"mt-12 pt-6 pb-8 border-t border-[var(--border)] flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-[var(--text-dim)]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-medium text-[var(--text)]",children:[I," Device Ops"]}),e.jsx("span",{className:"hidden sm:inline-block h-3 w-px bg-[var(--border)]"}),e.jsx("span",{className:"hidden sm:inline-block",children:"Intelligent Fleet Management"})]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--green)] opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[var(--green)]"})]}),e.jsx("span",{children:"Systems operational"})]}),e.jsxs("span",{className:"font-mono",children:["© ",h," ",I]})]})]})]})})};export{$e as default};
@@ -1 +1 @@
1
- import{j as e}from"./index--TKsSVZp.js";const m=({icon:s,eyebrow:t,title:x,subtitle:a,action:r})=>e.jsx("header",{className:"px-6 pt-6 pb-4 border-b border-[var(--border)]",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[t&&e.jsx("div",{className:"text-[10px] font-mono font-semibold uppercase tracking-widest text-[var(--text-dim)] mb-1.5",children:t}),e.jsxs("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight text-[var(--text)]",children:[s&&e.jsx(s,{className:"h-5 w-5 text-[var(--green)] shrink-0"}),e.jsx("span",{className:"truncate",children:x})]}),a&&e.jsx("p",{className:"mt-1.5 text-sm text-[var(--text-muted)] max-w-3xl",children:a})]}),r&&e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})});export{m as P};
1
+ import{j as e}from"./index-Doq8HO3X.js";const m=({icon:s,eyebrow:t,title:x,subtitle:a,action:r})=>e.jsx("header",{className:"px-6 pt-6 pb-4 border-b border-[var(--border)]",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"min-w-0",children:[t&&e.jsx("div",{className:"text-[10px] font-mono font-semibold uppercase tracking-widest text-[var(--text-dim)] mb-1.5",children:t}),e.jsxs("h1",{className:"flex items-center gap-2 text-xl font-semibold tracking-tight text-[var(--text)]",children:[s&&e.jsx(s,{className:"h-5 w-5 text-[var(--green)] shrink-0"}),e.jsx("span",{className:"truncate",children:x})]}),a&&e.jsx("p",{className:"mt-1.5 text-sm text-[var(--text-muted)] max-w-3xl",children:a})]}),r&&e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r})]})});export{m as P};
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as T,b as k,r as o,j as e,D as S,v as E}from"./index--TKsSVZp.js";import{P as C}from"./page-header-D5tpZwkI.js";import{a as y,f as w}from"./time-B8FIgwPE.js";import{C as A}from"./copy-x-UuUQkc.js";import{T as $}from"./trash-2-Dvr08Dpq.js";/**
1
+ import{g as T,b as k,r as o,j as e,D as S,v as E}from"./index-Doq8HO3X.js";import{P as C}from"./page-header-Qk9pGEaH.js";import{a as y,f as w}from"./time-B8FIgwPE.js";import{C as A}from"./copy-E317aAW3.js";import{T as $}from"./trash-2-D-ONhY9W.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{c as f,u as g,r as n,d as p,j as e,L as v,e as w}from"./index--TKsSVZp.js";import{A as o}from"./auth-shell-D0eF5eyS.js";function k(){const{token:i}=f(),m=g(),[s,r]=n.useState("checking"),[a,u]=n.useState(""),[l,x]=n.useState(""),[c,d]=n.useState(null);n.useEffect(()=>{if(!i){r("invalid");return}p(i).then(t=>r(t?"ready":"invalid"))},[i]);async function h(t){if(t.preventDefault(),d(null),a!==l){d("Passwords do not match.");return}if(a.length<8){d("Password must be at least 8 characters.");return}r("submitting");try{await w(i,a),r("done"),setTimeout(()=>m("/login",{replace:!0}),1500)}catch(b){d(b.message||"Reset failed"),r("ready")}}return s==="checking"?e.jsx(o,{children:e.jsx("div",{className:"text-sm text-[var(--text-dim)] text-center",children:"Checking link…"})}):s==="invalid"?e.jsx(o,{children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-xl font-semibold mb-3",children:"This link is invalid or expired"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Reset links are good for 1 hour and single-use. Request a new one."}),e.jsx(v,{to:"/forgot-password",className:"inline-block h-10 px-4 rounded-md bg-[var(--green)] text-black text-sm font-medium leading-10",children:"Request a new link"})]})}):s==="done"?e.jsx(o,{children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-xl font-semibold mb-3",children:"Password updated"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)]",children:"Redirecting to sign in…"})]})}):e.jsx(o,{children:e.jsxs("form",{onSubmit:h,children:[e.jsx("h1",{className:"text-2xl font-semibold mb-1",children:"Reset your password"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Choose a new password to sign in with."}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"New password"}),e.jsx("input",{type:"password",value:a,onChange:t=>u(t.target.value),autoFocus:!0,required:!0,className:"w-full mb-3 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Confirm new password"}),e.jsx("input",{type:"password",value:l,onChange:t=>x(t.target.value),required:!0,className:"w-full mb-3 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),c&&e.jsx("div",{className:"text-xs text-[var(--red)] mb-3",children:c}),e.jsx("button",{type:"submit",disabled:s==="submitting"||a.length<8,className:"mt-5 w-full h-10 rounded-md bg-[var(--green)] text-black font-medium text-sm disabled:opacity-50",children:s==="submitting"?"Updating…":"Update password"})]})})}export{k as default};
1
+ import{c as f,u as g,r as n,d as p,j as e,L as v,e as w}from"./index-Doq8HO3X.js";import{A as o}from"./auth-shell-0GDuDM6t.js";function k(){const{token:i}=f(),m=g(),[s,r]=n.useState("checking"),[a,u]=n.useState(""),[l,x]=n.useState(""),[c,d]=n.useState(null);n.useEffect(()=>{if(!i){r("invalid");return}p(i).then(t=>r(t?"ready":"invalid"))},[i]);async function h(t){if(t.preventDefault(),d(null),a!==l){d("Passwords do not match.");return}if(a.length<8){d("Password must be at least 8 characters.");return}r("submitting");try{await w(i,a),r("done"),setTimeout(()=>m("/login",{replace:!0}),1500)}catch(b){d(b.message||"Reset failed"),r("ready")}}return s==="checking"?e.jsx(o,{children:e.jsx("div",{className:"text-sm text-[var(--text-dim)] text-center",children:"Checking link…"})}):s==="invalid"?e.jsx(o,{children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-xl font-semibold mb-3",children:"This link is invalid or expired"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Reset links are good for 1 hour and single-use. Request a new one."}),e.jsx(v,{to:"/forgot-password",className:"inline-block h-10 px-4 rounded-md bg-[var(--green)] text-black text-sm font-medium leading-10",children:"Request a new link"})]})}):s==="done"?e.jsx(o,{children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"text-xl font-semibold mb-3",children:"Password updated"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)]",children:"Redirecting to sign in…"})]})}):e.jsx(o,{children:e.jsxs("form",{onSubmit:h,children:[e.jsx("h1",{className:"text-2xl font-semibold mb-1",children:"Reset your password"}),e.jsx("p",{className:"text-sm text-[var(--text-dim)] mb-6",children:"Choose a new password to sign in with."}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"New password"}),e.jsx("input",{type:"password",value:a,onChange:t=>u(t.target.value),autoFocus:!0,required:!0,className:"w-full mb-3 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),e.jsx("label",{className:"block text-xs text-[var(--text-dim)] mb-1",children:"Confirm new password"}),e.jsx("input",{type:"password",value:l,onChange:t=>x(t.target.value),required:!0,className:"w-full mb-3 h-10 px-3 rounded-md bg-[var(--surface)] border border-[var(--border)] text-sm focus:border-[var(--green)] outline-none"}),c&&e.jsx("div",{className:"text-xs text-[var(--red)] mb-3",children:c}),e.jsx("button",{type:"submit",disabled:s==="submitting"||a.length<8,className:"mt-5 w-full h-10 rounded-md bg-[var(--green)] text-black font-medium text-sm disabled:opacity-50",children:s==="submitting"?"Updating…":"Update password"})]})})}export{k as default};
@@ -1,4 +1,4 @@
1
- import{w as Me,k as Ie,c as Ir,u as Tr,j as J,B as Or}from"./index--TKsSVZp.js";import{A as vr}from"./arrow-left-DGZzN6Sl.js";const qn=["http","https","mailto","tel"];function Lr(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let i=-1;for(;++i<qn.length;){const l=qn[i];if(r===l.length&&n.slice(0,l.length).toLowerCase()===l)return n}return i=n.indexOf("?"),i!==-1&&r>i||(i=n.indexOf("#"),i!==-1&&r>i)?n:"javascript:void(0)"}/*!
1
+ import{w as Me,k as Ie,c as Ir,u as Tr,j as J,B as Or}from"./index-Doq8HO3X.js";import{A as vr}from"./arrow-left-USNjWr3g.js";const qn=["http","https","mailto","tel"];function Lr(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let i=-1;for(;++i<qn.length;){const l=qn[i];if(r===l.length&&n.slice(0,l.length).toLowerCase()===l)return n}return i=n.indexOf("?"),i!==-1&&r>i||(i=n.indexOf("#"),i!==-1&&r>i)?n:"javascript:void(0)"}/*!
2
2
  * Determine if an object is a Buffer
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -1 +1 @@
1
- import{u as I,m as A,A as F,r,X as v,j as e,H as f,v as w,C as R,p as D}from"./index--TKsSVZp.js";import{f as g}from"./time-B8FIgwPE.js";import{P as S}from"./page-header-D5tpZwkI.js";import{f as H,H as P,V as B,E as L}from"./selector-health-B-V7vomq.js";import{C as M,L as E}from"./layers-CdE4q4fN.js";import{C as U}from"./circle-check-Bjgvpq5F.js";import{Z as O}from"./zap-CM2cWetx.js";import{C as K}from"./check-D6DDcFwM.js";import{C as V}from"./copy-x-UuUQkc.js";function X(d){const h=Date.parse(d);if(!Number.isFinite(h))return"";const x=Math.max(0,Date.now()-h),l=Math.floor(x/1e3);if(l<60)return`${l}s ago`;const i=Math.floor(l/60);if(i<60)return`${i}m ago`;const o=Math.floor(i/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Q(d){return d===0?"$0":d<.01?"<$0.01":`$${d.toFixed(2)}`}const te=()=>{const d=I(),{toast:h}=A(),[x]=F(),l=x.get("value")??"",i=x.get("strategy")??"",o=parseInt(x.get("windowDays")??"30",10)||30,[t,y]=r.useState(null),[a,p]=r.useState(null),[_,C]=r.useState(!1),[$,T]=r.useState(!1),[N,k]=r.useState(null),b=r.useCallback(async()=>{if(l){C(!0);try{const s=await v.getHealingSelectorDetail(l,o);y(s??null)}catch{y(null)}finally{C(!1),T(!0)}}},[l,o]),j=r.useCallback(async()=>{if(!i||!l){p(null);return}try{const s=await v.getSelectorState(i,l);p((s==null?void 0:s.state)??null)}catch{p(null)}},[i,l]);r.useEffect(()=>{b()},[b]),r.useEffect(()=>{j()},[j]);const m=r.useCallback(async s=>{if(!i||!l)return;const n=(()=>{switch(s){case"mark_fixed":return"Mark this selector as fixed? Move to Pending Verification.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(n))try{await v.postSelectorStateAction({original_strategy:i,original_selector:l,action:s}),h("Done.","success"),j()}catch(c){const u=c!=null&&c.currentStatus?` (currently ${c.currentStatus})`:"";h(`${(c==null?void 0:c.message)??"Action failed"}${u}`,"error")}},[i,l,h,j]),z=(s,n)=>{navigator.clipboard.writeText(s).catch(()=>{}),k(n),setTimeout(()=>k(c=>c===n?null:c),1500)};return l?e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality / Selector",title:e.jsx("span",{className:"sh-detail-title",children:e.jsx("code",{title:l,children:l})}),subtitle:`All heals for this selector over the last ${o} days.`,action:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back"]}),e.jsxs("button",{className:"sh-refresh-btn",onClick:b,disabled:_,title:"Refresh",children:[e.jsx(w,{size:12,className:_?"animate-spin":""}),"Refresh"]})]})}),e.jsxs("div",{className:"sh-content",children:[i&&e.jsxs("div",{className:"sh-detail-strategy-line",title:"Tuple identity for this drill-down",children:[e.jsx("span",{className:"sh-strategy-badge",children:H(i)}),e.jsx("code",{children:l})]}),!i&&e.jsxs("div",{className:"sh-detail-banner",children:["Showing every strategy that ever healed this selector value. To scope to a single tuple, append ",e.jsx("code",{children:"?strategy=<name>"})," ","to the URL or open this row from the Active tab on Selector Health."]}),a&&e.jsxs("div",{className:`sh-detail-state sh-detail-state--${a.status}`,children:[e.jsxs("div",{className:"sh-detail-state__head",children:[e.jsxs("span",{className:"sh-detail-state__badge",children:[a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx(P,{size:16,style:{color:"var(--accent, #60a5fa)"}}),e.jsx("span",{children:"Pending verification"})]}),a.status==="resolved"&&e.jsxs(e.Fragment,{children:[e.jsx(U,{size:16,style:{color:"var(--green, #4ade80)"}}),e.jsx("span",{children:"Resolved"})]}),a.status==="muted"&&e.jsxs(e.Fragment,{children:[e.jsx(B,{size:16,style:{color:"var(--text-muted)"}}),e.jsx("span",{children:"Muted"})]}),a.status==="active"&&(a.regression_count>0?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,style:{color:"var(--amber, #f59e0b)"}}),e.jsxs("span",{children:["Active — regressed ",a.regression_count,"×"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{size:16}),e.jsx("span",{children:"Active"})]}))]}),e.jsxs("div",{className:"sh-detail-state__actions",children:[a.status==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:()=>m("mark_fixed"),children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("cancel_verification"),children:"Cancel verification"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="resolved"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"}),a.status==="muted"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("unmute"),children:"Unmute"})]})]}),e.jsxs("div",{className:"sh-detail-state__meta",children:[a.fixed_at&&e.jsxs("span",{children:["Marked fixed: ",g(a.fixed_at)]}),a.resolved_at&&e.jsxs("span",{children:["Resolved: ",g(a.resolved_at)]}),a.muted_at&&e.jsxs("span",{children:["Muted: ",g(a.muted_at)]}),a.status==="pending"&&e.jsxs("span",{children:["Clean builds: ",a.clean_builds_count,"/3"]}),a.regression_count>0&&e.jsxs("span",{children:["Regressions on record: ",a.regression_count]})]})]}),_&&!$?e.jsxs("div",{className:"sh-empty",children:[e.jsx(w,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading detail…"})]}):!t||t.healCount===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(f,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"No heals recorded"}),e.jsxs("div",{className:"sh-empty__subtitle",children:["This selector has no healing events in the last ",o," days."]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-detail-stats",children:[e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Heals"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.healCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Sessions"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.sessionCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Est. cost"}),e.jsx("span",{className:"sh-detail-stat__value",children:Q(t.estCostUsd)})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Tiers used"}),e.jsx("span",{className:"sh-detail-stat__value",children:Object.keys(t.byTier).length||"—"})]})]}),e.jsxs("div",{className:"sh-detail-grid",children:[e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(E,{size:12}),e.jsx("span",{children:"Suggested rewrites"}),e.jsx("span",{className:"sh-card__hint",children:"every alternate the healer landed on, ranked by frequency"})]}),e.jsxs("ul",{className:"sh-alternates",children:[t.alternates.length===0&&e.jsx("li",{className:"sh-alternates__empty",children:"No healed selectors recorded — only the failure was captured."}),t.alternates.map((s,n)=>{const c=Math.round(s.share*100),u=`alt-${n}`;return e.jsxs("li",{className:"sh-alternate",children:[e.jsxs("div",{className:"sh-alternate__top",children:[e.jsxs("span",{className:"sh-alternate__share",children:[c,"%"]}),e.jsx("code",{className:"sh-alternate__value",title:s.healedSelector,children:s.healedSelector}),e.jsx("button",{type:"button",className:`sh-icon-btn ${N===u?"copied":""}`,onClick:()=>z(s.healedSelector,u),"aria-label":"Copy alternate",title:N===u?"Copied":"Copy",children:N===u?e.jsx(K,{size:11}):e.jsx(V,{size:11})})]}),e.jsxs("div",{className:"sh-alternate__meta",children:[e.jsxs("span",{children:[s.count," heal",s.count===1?"":"s"]}),s.averageConfidence!==null&&e.jsxs("span",{children:["· avg ",Math.round(s.averageConfidence*100),"% confidence"]}),s.tiers.length>0&&e.jsxs("span",{children:["· via ",s.tiers.join(", ")]})]})]},s.healedSelector)})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(D,{size:12}),e.jsx("span",{children:"Breakdown"})]}),e.jsxs("div",{className:"sh-breakdown",children:[e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By tier"}),Object.entries(t.byTier).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-tier-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s)),Object.keys(t.byTier).length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By platform"}),Object.entries(t.byPlatform).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-platform-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s))]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By build"}),t.byBuild.slice(0,8).map(s=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-build-pill",title:s.buildId,children:s.buildId==="unattached"?"unattached":s.buildId.length>12?s.buildId.slice(0,8)+"…":s.buildId}),e.jsx("span",{className:"sh-breakdown__count",children:s.count})]},s.buildId)),t.byBuild.length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]})]})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx("span",{children:"Timeline"}),e.jsxs("span",{className:"sh-card__hint",children:["most recent ",t.timeline.length," of ",t.healCount," heal",t.healCount===1?"":"s"]})]}),e.jsx("div",{className:"sh-timeline",children:t.timeline.map(s=>e.jsxs("div",{className:"sh-timeline__row",children:[e.jsx("span",{className:"sh-timeline__when",children:X(s.createdAt)}),s.tier&&e.jsx("span",{className:"sh-tier-pill",children:s.tier}),e.jsx("span",{className:"sh-timeline__cmd",children:s.commandName??"—"}),e.jsx("span",{className:"sh-timeline__device",children:s.deviceName??s.deviceUdid??"—"}),e.jsx("code",{className:"sh-timeline__healed",title:s.healedSelector??"",children:s.healedSelector??"—"}),s.confidence!==null&&e.jsxs("span",{className:"sh-timeline__conf",children:[Math.round(s.confidence*100),"%"]}),s.buildId&&s.sessionId&&e.jsx("a",{className:"sh-timeline__link",href:`/xenon/builds/${encodeURIComponent(s.buildId)}/sessions/${encodeURIComponent(s.sessionId)}`,title:"Open session detail",children:e.jsx(L,{size:11})})]},s.id))})]})]})]})]}):e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality",title:"Selector Detail",subtitle:"No selector specified."}),e.jsx("div",{className:"sh-content",children:e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back to Selector Health"]})})]})};export{te as default};
1
+ import{u as I,m as A,A as F,r,X as v,j as e,H as f,v as w,C as R,p as D}from"./index-Doq8HO3X.js";import{f as g}from"./time-B8FIgwPE.js";import{P as S}from"./page-header-Qk9pGEaH.js";import{f as H,H as P,V as B,E as L}from"./selector-health-CS_wYWYA.js";import{C as M,L as E}from"./layers-C2U3k-wh.js";import{C as U}from"./circle-check-BR3SeBx6.js";import{Z as O}from"./zap-C8F21kM1.js";import{C as K}from"./check-CVbtgHOC.js";import{C as V}from"./copy-E317aAW3.js";function X(d){const h=Date.parse(d);if(!Number.isFinite(h))return"";const x=Math.max(0,Date.now()-h),l=Math.floor(x/1e3);if(l<60)return`${l}s ago`;const i=Math.floor(l/60);if(i<60)return`${i}m ago`;const o=Math.floor(i/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Q(d){return d===0?"$0":d<.01?"<$0.01":`$${d.toFixed(2)}`}const te=()=>{const d=I(),{toast:h}=A(),[x]=F(),l=x.get("value")??"",i=x.get("strategy")??"",o=parseInt(x.get("windowDays")??"30",10)||30,[t,y]=r.useState(null),[a,p]=r.useState(null),[_,C]=r.useState(!1),[$,T]=r.useState(!1),[N,k]=r.useState(null),b=r.useCallback(async()=>{if(l){C(!0);try{const s=await v.getHealingSelectorDetail(l,o);y(s??null)}catch{y(null)}finally{C(!1),T(!0)}}},[l,o]),j=r.useCallback(async()=>{if(!i||!l){p(null);return}try{const s=await v.getSelectorState(i,l);p((s==null?void 0:s.state)??null)}catch{p(null)}},[i,l]);r.useEffect(()=>{b()},[b]),r.useEffect(()=>{j()},[j]);const m=r.useCallback(async s=>{if(!i||!l)return;const n=(()=>{switch(s){case"mark_fixed":return"Mark this selector as fixed? Move to Pending Verification.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(n))try{await v.postSelectorStateAction({original_strategy:i,original_selector:l,action:s}),h("Done.","success"),j()}catch(c){const u=c!=null&&c.currentStatus?` (currently ${c.currentStatus})`:"";h(`${(c==null?void 0:c.message)??"Action failed"}${u}`,"error")}},[i,l,h,j]),z=(s,n)=>{navigator.clipboard.writeText(s).catch(()=>{}),k(n),setTimeout(()=>k(c=>c===n?null:c),1500)};return l?e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality / Selector",title:e.jsx("span",{className:"sh-detail-title",children:e.jsx("code",{title:l,children:l})}),subtitle:`All heals for this selector over the last ${o} days.`,action:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back"]}),e.jsxs("button",{className:"sh-refresh-btn",onClick:b,disabled:_,title:"Refresh",children:[e.jsx(w,{size:12,className:_?"animate-spin":""}),"Refresh"]})]})}),e.jsxs("div",{className:"sh-content",children:[i&&e.jsxs("div",{className:"sh-detail-strategy-line",title:"Tuple identity for this drill-down",children:[e.jsx("span",{className:"sh-strategy-badge",children:H(i)}),e.jsx("code",{children:l})]}),!i&&e.jsxs("div",{className:"sh-detail-banner",children:["Showing every strategy that ever healed this selector value. To scope to a single tuple, append ",e.jsx("code",{children:"?strategy=<name>"})," ","to the URL or open this row from the Active tab on Selector Health."]}),a&&e.jsxs("div",{className:`sh-detail-state sh-detail-state--${a.status}`,children:[e.jsxs("div",{className:"sh-detail-state__head",children:[e.jsxs("span",{className:"sh-detail-state__badge",children:[a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx(P,{size:16,style:{color:"var(--accent, #60a5fa)"}}),e.jsx("span",{children:"Pending verification"})]}),a.status==="resolved"&&e.jsxs(e.Fragment,{children:[e.jsx(U,{size:16,style:{color:"var(--green, #4ade80)"}}),e.jsx("span",{children:"Resolved"})]}),a.status==="muted"&&e.jsxs(e.Fragment,{children:[e.jsx(B,{size:16,style:{color:"var(--text-muted)"}}),e.jsx("span",{children:"Muted"})]}),a.status==="active"&&(a.regression_count>0?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,style:{color:"var(--amber, #f59e0b)"}}),e.jsxs("span",{children:["Active — regressed ",a.regression_count,"×"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{size:16}),e.jsx("span",{children:"Active"})]}))]}),e.jsxs("div",{className:"sh-detail-state__actions",children:[a.status==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:()=>m("mark_fixed"),children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("cancel_verification"),children:"Cancel verification"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="resolved"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"}),a.status==="muted"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("unmute"),children:"Unmute"})]})]}),e.jsxs("div",{className:"sh-detail-state__meta",children:[a.fixed_at&&e.jsxs("span",{children:["Marked fixed: ",g(a.fixed_at)]}),a.resolved_at&&e.jsxs("span",{children:["Resolved: ",g(a.resolved_at)]}),a.muted_at&&e.jsxs("span",{children:["Muted: ",g(a.muted_at)]}),a.status==="pending"&&e.jsxs("span",{children:["Clean builds: ",a.clean_builds_count,"/3"]}),a.regression_count>0&&e.jsxs("span",{children:["Regressions on record: ",a.regression_count]})]})]}),_&&!$?e.jsxs("div",{className:"sh-empty",children:[e.jsx(w,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading detail…"})]}):!t||t.healCount===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(f,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"No heals recorded"}),e.jsxs("div",{className:"sh-empty__subtitle",children:["This selector has no healing events in the last ",o," days."]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-detail-stats",children:[e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Heals"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.healCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Sessions"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.sessionCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Est. cost"}),e.jsx("span",{className:"sh-detail-stat__value",children:Q(t.estCostUsd)})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Tiers used"}),e.jsx("span",{className:"sh-detail-stat__value",children:Object.keys(t.byTier).length||"—"})]})]}),e.jsxs("div",{className:"sh-detail-grid",children:[e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(E,{size:12}),e.jsx("span",{children:"Suggested rewrites"}),e.jsx("span",{className:"sh-card__hint",children:"every alternate the healer landed on, ranked by frequency"})]}),e.jsxs("ul",{className:"sh-alternates",children:[t.alternates.length===0&&e.jsx("li",{className:"sh-alternates__empty",children:"No healed selectors recorded — only the failure was captured."}),t.alternates.map((s,n)=>{const c=Math.round(s.share*100),u=`alt-${n}`;return e.jsxs("li",{className:"sh-alternate",children:[e.jsxs("div",{className:"sh-alternate__top",children:[e.jsxs("span",{className:"sh-alternate__share",children:[c,"%"]}),e.jsx("code",{className:"sh-alternate__value",title:s.healedSelector,children:s.healedSelector}),e.jsx("button",{type:"button",className:`sh-icon-btn ${N===u?"copied":""}`,onClick:()=>z(s.healedSelector,u),"aria-label":"Copy alternate",title:N===u?"Copied":"Copy",children:N===u?e.jsx(K,{size:11}):e.jsx(V,{size:11})})]}),e.jsxs("div",{className:"sh-alternate__meta",children:[e.jsxs("span",{children:[s.count," heal",s.count===1?"":"s"]}),s.averageConfidence!==null&&e.jsxs("span",{children:["· avg ",Math.round(s.averageConfidence*100),"% confidence"]}),s.tiers.length>0&&e.jsxs("span",{children:["· via ",s.tiers.join(", ")]})]})]},s.healedSelector)})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(D,{size:12}),e.jsx("span",{children:"Breakdown"})]}),e.jsxs("div",{className:"sh-breakdown",children:[e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By tier"}),Object.entries(t.byTier).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-tier-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s)),Object.keys(t.byTier).length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By platform"}),Object.entries(t.byPlatform).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-platform-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s))]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By build"}),t.byBuild.slice(0,8).map(s=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-build-pill",title:s.buildId,children:s.buildId==="unattached"?"unattached":s.buildId.length>12?s.buildId.slice(0,8)+"…":s.buildId}),e.jsx("span",{className:"sh-breakdown__count",children:s.count})]},s.buildId)),t.byBuild.length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]})]})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx("span",{children:"Timeline"}),e.jsxs("span",{className:"sh-card__hint",children:["most recent ",t.timeline.length," of ",t.healCount," heal",t.healCount===1?"":"s"]})]}),e.jsx("div",{className:"sh-timeline",children:t.timeline.map(s=>e.jsxs("div",{className:"sh-timeline__row",children:[e.jsx("span",{className:"sh-timeline__when",children:X(s.createdAt)}),s.tier&&e.jsx("span",{className:"sh-tier-pill",children:s.tier}),e.jsx("span",{className:"sh-timeline__cmd",children:s.commandName??"—"}),e.jsx("span",{className:"sh-timeline__device",children:s.deviceName??s.deviceUdid??"—"}),e.jsx("code",{className:"sh-timeline__healed",title:s.healedSelector??"",children:s.healedSelector??"—"}),s.confidence!==null&&e.jsxs("span",{className:"sh-timeline__conf",children:[Math.round(s.confidence*100),"%"]}),s.buildId&&s.sessionId&&e.jsx("a",{className:"sh-timeline__link",href:`/xenon/builds/${encodeURIComponent(s.buildId)}/sessions/${encodeURIComponent(s.sessionId)}`,title:"Open session detail",children:e.jsx(L,{size:11})})]},s.id))})]})]})]})]}):e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality",title:"Selector Detail",subtitle:"No selector specified."}),e.jsx("div",{className:"sh-content",children:e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back to Selector Health"]})})]})};export{te as default};
@@ -0,0 +1 @@
1
+ .selector-health-page{display:flex;flex-direction:column;width:100%;min-height:100%;color:var(--text);background:var(--bg)}.sh-content{display:flex;flex-direction:column;gap:var(--space-5);padding:var(--space-5) var(--space-6);max-width:1440px;margin:0 auto;width:100%}.sh-kpi-strip{display:grid;grid-template-columns:1fr;gap:12px}@media (min-width: 768px){.sh-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.sh-kpi--hero{grid-column:1 / -1}}@media (min-width: 1280px){.sh-kpi-strip{grid-template-columns:2fr repeat(5,minmax(0,1fr))}.sh-kpi--hero{grid-column:auto}}.sh-kpi{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border-strong);transition:border-color .15s ease,background .15s ease}.sh-kpi:hover{border-color:var(--text-dim)}.sh-kpi--hero{background:var(--surface-2);border-color:var(--border-strong);padding:20px 22px;gap:6px}.sh-kpi--hero .sh-kpi__label{font-size:11px;color:var(--text)}.sh-kpi--hero .sh-kpi__value{font-size:2.75rem;line-height:1.05}.sh-kpi--hero .sh-kpi__foot{font-size:12px;margin-top:4px}.sh-kpi__info{display:inline-flex;align-items:center;margin-left:6px;color:var(--text-dim);cursor:help;vertical-align:middle}.sh-kpi__info:hover{color:var(--text)}.sh-kpi--warn{border-color:#f59e0b4d}.sh-kpi--critical{border-color:#ef444459}.sh-kpi__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-kpi__value{font-size:1.75rem;font-weight:700;line-height:1.1;color:var(--text);font-family:Outfit,sans-serif}.sh-kpi__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:var(--text-muted);margin-top:2px}.sh-kpi__sub{color:var(--text-dim)}.sh-kpi__delta--with-icon{display:inline-flex;align-items:center;gap:4px}.sh-delta{display:inline-flex;align-items:center;gap:3px;padding:1px 6px;border-radius:4px;font-size:10px;font-weight:600;border:1px solid transparent}.sh-delta.good{background:#10b9811a;border-color:#10b9814d;color:var(--green)}.sh-delta.bad{background:#ef44441a;border-color:#ef44444d;color:var(--red, #ef4444)}.sh-delta.neutral{background:#ffffff0a;border-color:var(--border);color:var(--text-dim)}.sh-filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;padding:10px 14px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border-strong);position:sticky;top:0;z-index:5;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background-color:color-mix(in srgb,var(--surface) 92%,transparent)}.sh-filter-bar__lead{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted);margin-right:6px}.sh-filter-bar__group{display:flex;align-items:center;gap:8px}.sh-filter-bar__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-select{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 26px 4px 10px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;cursor:pointer;transition:border-color .15s ease}.sh-select:hover{border-color:var(--border-strong)}.sh-select:focus{outline:none;border-color:var(--green)}.sh-filter-bar__clear{display:inline-flex;align-items:center;gap:4px;background:transparent;border:1px dashed var(--border-strong);color:var(--text-dim);font-size:11px;padding:4px 10px;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s ease}.sh-filter-bar__clear:hover{color:var(--text);border-color:var(--text-dim)}.sh-refresh-btn,.sh-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:var(--radius-sm);font-size:12px;font-weight:500;background:var(--surface);border:1px solid var(--border-strong);color:var(--text);cursor:pointer;transition:all .15s ease}.sh-refresh-btn:hover,.sh-back-btn:hover{background:var(--surface-2);border-color:var(--green);color:var(--green)}.sh-refresh-btn:disabled{opacity:.6;cursor:not-allowed}.sh-ghost-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid var(--border-strong);color:var(--text-muted);border-radius:var(--radius-sm);cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.sh-ghost-btn:hover:not(:disabled){color:var(--text);border-color:var(--text-dim);background:var(--surface-2)}.sh-ghost-btn:disabled{opacity:.5;cursor:not-allowed}.sh-empty{display:flex;align-items:center;justify-content:center;gap:10px;padding:32px 24px;color:var(--text-dim);font-size:12px;border-radius:var(--radius-md);background:var(--surface);border:1px dashed var(--border)}.sh-empty-actions{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center}.sh-ghost-btn--inline{width:auto;height:auto;padding:6px 10px;gap:6px;font-size:12px;text-decoration:none}.sh-empty--clean{flex-direction:row;gap:14px;text-align:left;color:var(--text)}.sh-empty__title{font-size:13px;font-weight:600;color:var(--text)}.sh-empty__subtitle{font-size:11.5px;color:var(--text-muted);margin-top:2px}.sh-table{display:flex;flex-direction:column;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);overflow:hidden}.sh-table__head,.sh-table__row{display:grid;grid-template-columns:36px minmax(0,2fr) 70px 80px 100px 80px 90px minmax(0,2fr) max-content;gap:12px;align-items:center;padding:10px 14px}.sh-table__head{background:var(--surface-2);border-bottom:1px solid var(--border)}.sh-th{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-th--rank,.sh-th--count{text-align:center}.sh-th--meta{text-align:left}.sh-table__row{border-bottom:1px solid var(--border);cursor:pointer;transition:background .15s ease}.sh-table__row:last-child{border-bottom:none}.sh-table__row:hover{background:var(--surface-2)}.sh-table__row:focus-visible{outline:2px solid var(--green);outline-offset:-2px}.sh-td{font-size:12px;color:var(--text);min-width:0}.sh-td--rank{text-align:center;font-family:JetBrains Mono,monospace;color:var(--text-dim);font-weight:700}.sh-td--selector code,.sh-td--rewrite code{font-family:JetBrains Mono,monospace;font-size:11.5px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.sh-td--count{text-align:center}.sh-td--meta{font-size:11.5px;color:var(--text-muted);font-family:JetBrains Mono,monospace}.sh-td--rewrite{display:flex;align-items:center;gap:6px;min-width:0}.sh-td--actions{display:flex;gap:4px;justify-content:flex-end}.sh-rewrite-share{font-size:9.5px;font-weight:700;color:var(--green);background:#10b9811f;padding:1px 5px;border-radius:3px;white-space:nowrap;flex-shrink:0}.sh-rewrite-value{flex:1;min-width:0}.sh-rewrite-empty{color:var(--text-dim);font-family:JetBrains Mono,monospace;font-size:11px}.sh-count-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:700;border:1px solid transparent}.sh-count-badge.severe{background:#ef44441f;border-color:#ef444466;color:var(--red, #ef4444)}.sh-count-badge.warn{background:#f59e0b1f;border-color:#f59e0b66;color:var(--amber, #f59e0b)}.sh-count-badge.mild{background:#ffffff0a;border-color:var(--border);color:var(--text-muted)}.sh-tier-pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:600;letter-spacing:.04em;background:#10b9810f;border:1px solid rgba(16,185,129,.25);color:var(--green);white-space:nowrap}.sh-platform-pill,.sh-build-pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:600;background:var(--surface-2);border:1px solid var(--border);color:var(--text-muted);font-family:JetBrains Mono,monospace}.sh-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;background:transparent;border:1px solid var(--border);color:var(--text-dim);cursor:pointer;transition:all .15s ease}.sh-icon-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}.sh-icon-btn.copied{background:var(--green);border-color:var(--green);color:#000}.sh-detail-title code{font-family:JetBrains Mono,monospace;font-size:.95rem;color:var(--text);display:inline-block;max-width:60ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.sh-detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}@media (min-width: 768px){.sh-detail-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}.sh-detail-stat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border)}.sh-detail-stat__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-detail-stat__value{font-size:1.4rem;font-weight:700;color:var(--text);font-family:Outfit,sans-serif}.sh-detail-grid{display:grid;grid-template-columns:1fr;gap:14px}@media (min-width: 1024px){.sh-detail-grid{grid-template-columns:1.4fr 1fr}}.sh-card{border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);overflow:hidden}.sh-card__head{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--surface-2);font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text)}.sh-card__hint{margin-left:auto;font-weight:500;letter-spacing:.04em;text-transform:none;color:var(--text-dim);font-size:10.5px}.sh-alternates{list-style:none;margin:0;padding:8px;display:flex;flex-direction:column;gap:6px}.sh-alternates__empty{padding:12px;font-size:11.5px;color:var(--text-dim)}.sh-alternate{display:flex;flex-direction:column;gap:4px;padding:10px;border-radius:var(--radius-sm);background:#00000040;border:1px solid var(--border)}.sh-alternate__top{display:flex;align-items:center;gap:8px;min-width:0}.sh-alternate__share{font-family:JetBrains Mono,monospace;font-size:11px;font-weight:700;color:var(--green);background:#10b9811a;padding:1px 6px;border-radius:4px;flex-shrink:0}.sh-alternate__value{flex:1;min-width:0;font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-alternate__meta{display:flex;flex-wrap:wrap;gap:4px 6px;font-size:10.5px;color:var(--text-dim);font-family:JetBrains Mono,monospace}.sh-breakdown{display:flex;flex-direction:column;gap:12px;padding:14px}.sh-breakdown__group{display:flex;flex-direction:column;gap:4px}.sh-breakdown__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim);margin-bottom:4px}.sh-breakdown__row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0}.sh-breakdown__count{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--text-muted)}.sh-breakdown__empty{font-size:11px;color:var(--text-dim)}.sh-timeline{display:flex;flex-direction:column;padding:4px 8px}.sh-timeline__row{display:grid;grid-template-columns:70px auto 110px 130px minmax(180px,1fr) 50px 22px;gap:10px;align-items:center;padding:8px 6px;border-bottom:1px solid var(--border);font-size:11.5px}.sh-timeline__row:last-child{border-bottom:none}.sh-timeline__when{font-family:JetBrains Mono,monospace;font-size:10.5px;color:var(--text-dim)}.sh-timeline__cmd,.sh-timeline__device{font-family:JetBrains Mono,monospace;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-timeline__healed{font-family:JetBrains Mono,monospace;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-timeline__conf{font-family:JetBrains Mono,monospace;color:var(--green);font-size:11px;text-align:right}.sh-timeline__link{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;background:transparent;border:1px solid var(--border);color:var(--text-dim);text-decoration:none;transition:all .15s ease}.sh-timeline__link:hover{color:var(--green);border-color:var(--green)}@media (max-width: 1024px){.sh-table__head,.sh-table__row{grid-template-columns:28px minmax(180px,1fr) 60px 60px 90px;grid-template-areas:"rank selector selector selector selector" "rank count sessions tier last" "rank rewrite rewrite rewrite actions"}.sh-th--meta:nth-of-type(4),.sh-th--actions{display:none}}.sh-tab-nav{display:flex;gap:var(--space-2);border-bottom:1px solid var(--border);margin:var(--space-4) 0 var(--space-5)}.sh-tab{background:transparent;border:0;padding:var(--space-3) var(--space-4);cursor:pointer;color:var(--text-muted);display:inline-flex;gap:var(--space-2);align-items:center;border-bottom:2px solid transparent;margin-bottom:-1px;font-size:.9rem;transition:color .15s ease,border-color .15s ease}.sh-tab:hover{color:var(--text)}.sh-tab--active{color:var(--text);border-bottom-color:var(--accent, #60a5fa);border-bottom-width:3px}.sh-tab__icon{font-size:.95rem;line-height:1}.sh-tab__count{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:0 .5rem;font-size:.75rem;min-width:1.5rem;text-align:center}.sh-strategy-badge{display:inline-flex;align-items:center;background:var(--surface);border:1px solid var(--border);color:var(--text-dim);border-radius:4px;padding:.05rem .4rem;font-size:.7rem;font-weight:500;text-transform:none;margin-right:.4rem;white-space:nowrap}.sh-strategy-badge--rewrite{color:var(--text)}.sh-action-btn{background:transparent;border:1px solid var(--border);color:var(--text-dim);border-radius:4px;padding:.25rem .55rem;font-size:.72rem;cursor:pointer;white-space:nowrap;transition:color .12s ease,border-color .12s ease,background .12s ease;margin-right:.3rem}.sh-action-btn:hover{color:var(--text);border-color:var(--text-dim)}.sh-action-btn--primary{color:var(--accent, #60a5fa);border-color:var(--accent, #60a5fa)}.sh-action-btn--primary:hover{background:var(--accent, #60a5fa);color:#fff}.sh-copy-group{display:inline-flex;align-items:stretch;margin-right:.3rem}.sh-copy-btn{display:inline-flex;align-items:center;gap:.25rem;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0;border-right-width:0}.sh-copy-btn__lang{font-size:.68rem;font-weight:500;letter-spacing:.02em}.sh-copy-btn--copied{color:var(--green, #4ade80);border-color:var(--green, #4ade80)}.sh-copy-chevron{border-top-left-radius:0;border-bottom-left-radius:0;padding:.25rem .35rem;margin-right:0}.sh-copy-modal__hint{color:var(--text-muted);margin:0 0 1rem;font-size:.85rem}.sh-copy-modal__lang-list{list-style:none;padding:0;margin:0 0 1rem}.sh-copy-modal__lang-row{display:flex;align-items:center;gap:.55rem;padding:.4rem 0;cursor:pointer;font-size:.9rem}.sh-copy-modal__preview-label{font-size:.72rem;color:var(--text-muted);margin-bottom:.3rem;text-transform:uppercase;letter-spacing:.05em}.sh-copy-modal__preview{background:var(--bg, #0a0a0a);border:1px solid var(--border);padding:.6rem .8rem;border-radius:4px;font-size:.78rem;overflow-x:auto;margin:0 0 1rem;white-space:pre-wrap;word-break:break-all}.sh-copy-modal__remember{display:flex;gap:.45rem;align-items:center;font-size:.85rem;color:var(--text-dim);cursor:pointer}.sh-pending-list{display:flex;flex-direction:column;gap:var(--space-3)}.sh-table__row--pending{display:block;padding:var(--space-4);cursor:pointer}.sh-pending-row__head{display:flex;align-items:center;gap:var(--space-2)}.sh-pending-row__icon{color:var(--accent, #60a5fa)}.sh-pending-row__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-pending-row__meta{font-size:.8rem;color:var(--text-muted);margin:.4rem 0 .6rem}.sh-pending-progress{background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:var(--space-3);margin-bottom:var(--space-3)}.sh-pending-progress__dots{display:flex;gap:.6rem;margin-bottom:.4rem}.sh-pending-progress__dot{width:14px;height:14px;border-radius:999px;border:2px solid var(--accent, #60a5fa);background:transparent}.sh-pending-progress__dot--filled{background:var(--accent, #60a5fa)}.sh-pending-progress__legend{font-size:.85rem;color:var(--text)}.sh-pending-progress__hint{font-size:.75rem;color:var(--text-muted);margin-top:.3rem}.sh-pending-row__actions{display:flex;gap:var(--space-2)}.sh-table__row--resolved{display:block;padding:var(--space-4);cursor:pointer}.sh-resolved-row__head{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}.sh-resolved-row__icon{color:var(--green, #4ade80)}.sh-resolved-row__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-resolved-row__regression{display:inline-flex;align-items:center;gap:.25rem;background:#f1c40f1f;color:#f1c40f;padding:.1rem .5rem;border-radius:999px;font-size:.72rem}.sh-resolved-row__meta{font-size:.85rem;color:var(--text);margin:.4rem 0 .2rem}.sh-resolved-row__history{font-size:.78rem;color:var(--text-muted);margin-bottom:var(--space-3)}.sh-resolved-row__actions{display:flex;gap:var(--space-2)}.sh-muted-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--space-2)}.sh-muted-list__item{background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:var(--space-3) var(--space-4)}.sh-muted-list__head{display:flex;align-items:center;gap:var(--space-2)}.sh-muted-list__icon{color:var(--text-muted)}.sh-muted-list__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-muted-list__meta{font-size:.78rem;color:var(--text-muted);margin:.4rem 0 .6rem}.sh-muted-list__actions{display:flex;gap:var(--space-2)}.sh-regression-banner{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:#e74c3c14;border-left:4px solid #e74c3c;border-radius:4px;margin-bottom:var(--space-4);font-size:.88rem;color:var(--text)}.sh-regression-banner__icon{color:#e74c3c;flex-shrink:0}.sh-regression-banner__action{margin-left:auto;background:transparent;border:1px solid #e74c3c;color:#e74c3c;padding:.2rem .55rem;border-radius:4px;font-size:.76rem;cursor:pointer;white-space:nowrap}.sh-regression-banner__action:hover{background:#e74c3c26}.sh-regression-banner__close{background:transparent;border:0;color:var(--text-muted);cursor:pointer;padding:.15rem;display:inline-flex;align-items:center}.sh-regression-banner__close:hover{color:var(--text)}.sh-detail-strategy-line{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-size:.9rem}.sh-detail-banner{background:#60a5fa0f;border-left:3px solid var(--accent, #60a5fa);padding:var(--space-3) var(--space-4);border-radius:4px;margin-bottom:var(--space-3);font-size:.85rem;color:var(--text-dim)}.sh-detail-state{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:var(--space-4);margin-bottom:var(--space-4)}.sh-detail-state--pending{border-left:4px solid var(--accent, #60a5fa)}.sh-detail-state--resolved{border-left:4px solid var(--green, #4ade80)}.sh-detail-state--muted{border-left:4px solid var(--text-muted);opacity:.85}.sh-detail-state--active{border-left:4px solid #e74c3c}.sh-detail-state__head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap}.sh-detail-state__badge{font-size:1rem;font-weight:500;display:inline-flex;align-items:center;gap:.5rem}.sh-detail-state__actions{display:flex;gap:var(--space-2)}.sh-detail-state__meta{margin-top:var(--space-3);display:flex;gap:var(--space-4);flex-wrap:wrap;font-size:.8rem;color:var(--text-muted)}
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as D,u as z,A as Q,j as e,r as h,q as le,n as P,C as re,X as k,v as A,m as oe,H as W,p as ce,I as de}from"./index--TKsSVZp.js";import{Z as he}from"./zap-CM2cWetx.js";import{H as B,V as R,f as w,E as ue}from"./selector-health-B-V7vomq.js";import{C as Y}from"./circle-check-Bjgvpq5F.js";import{M as me}from"./Modal-CjmzIR4Y.js";import{C as pe}from"./check-D6DDcFwM.js";import{C as ge}from"./copy-x-UuUQkc.js";import{b as N}from"./time-B8FIgwPE.js";import{u as Z}from"./useSocket-COssbQIj.js";import{E as ve}from"./EmptyState-UcJej2vi.js";import{P as xe}from"./page-header-D5tpZwkI.js";import{S as be}from"./SegmentedControl-wRDvkYAQ.js";import{F as G}from"./funnel-DQuWVevA.js";import{C as fe}from"./chevron-right-BtA7DR8A.js";import{A as J}from"./arrow-up-right-DtZUe0YH.js";/**
1
+ import{g as D,u as z,A as Q,j as e,r as h,q as le,n as P,C as re,X as k,v as A,m as oe,H as W,p as ce,I as de}from"./index-Doq8HO3X.js";import{Z as he}from"./zap-C8F21kM1.js";import{H as B,V as R,f as w,E as ue}from"./selector-health-CS_wYWYA.js";import{C as Y}from"./circle-check-BR3SeBx6.js";import{M as me}from"./Modal-QVER5CZo.js";import{C as pe}from"./check-CVbtgHOC.js";import{C as ge}from"./copy-E317aAW3.js";import{b as N}from"./time-B8FIgwPE.js";import{u as Z}from"./useSocket-D9iZtppJ.js";import{E as ve}from"./EmptyState-BLKITXvX.js";import{P as xe}from"./page-header-Qk9pGEaH.js";import{S as be}from"./SegmentedControl-C2vcRRnn.js";import{F as G}from"./funnel-C8pl8r9F.js";import{C as fe}from"./chevron-right-BpHMOuL1.js";import{A as J}from"./arrow-up-right-CA-0ObXb.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as W,r as d,X as _,m as D,j as e,L as B,p as Y,c as Q,u as q}from"./index--TKsSVZp.js";import{u as Z,h as ee,a as te,d as re,p as se,o as ae,f as ne,S as ie}from"./status-pill-outline-CFz5xaoF.js";import{B as oe,P as j}from"./BugReportButton-CioDV7QP.js";import{A as le}from"./arrow-left-DGZzN6Sl.js";import{C as $}from"./chevron-right-BtA7DR8A.js";import{C as L}from"./copy-x-UuUQkc.js";import{A as ce}from"./arrow-up-right-DtZUe0YH.js";import{E as O}from"./EmptyState-UcJej2vi.js";import{T as de,a as xe,b as M,c as S,d as me,e as R}from"./Table-ta1UYEeC.js";import{u as ue}from"./useSocket-COssbQIj.js";import{M as fe}from"./Modal-CjmzIR4Y.js";import{D as pe}from"./download-CuDjBGgs.js";import"./time-B8FIgwPE.js";/**
1
+ import{g as W,r as d,X as _,m as D,j as e,L as B,p as Y,c as Q,u as q}from"./index-Doq8HO3X.js";import{u as Z,h as ee,c as te,d as re,p as se,o as ae,f as ne,S as ie}from"./status-pill-outline-Df9QaRNJ.js";import{B as oe,P as j}from"./BugReportButton-CCFNeE8T.js";import{A as le}from"./arrow-left-USNjWr3g.js";import{C as $}from"./chevron-right-BpHMOuL1.js";import{C as L}from"./copy-E317aAW3.js";import{A as ce}from"./arrow-up-right-CA-0ObXb.js";import{E as O}from"./EmptyState-BLKITXvX.js";import{T as de,a as xe,b as M,c as S,d as me,e as R}from"./Table-CEvMaA5P.js";import{u as ue}from"./useSocket-D9iZtppJ.js";import{M as fe}from"./Modal-QVER5CZo.js";import{D as pe}from"./download-Blklg-SX.js";import"./time-B8FIgwPE.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{m as R,r as c,X as m,j as e,v as F,C as T,L as B,y as P}from"./index--TKsSVZp.js";/* empty css */import{S as x,A as q}from"./SettingCard-BzjYlAYS.js";import{P as X}from"./page-header-D5tpZwkI.js";import{u as G}from"./useSocket-COssbQIj.js";import{S as V,C as O}from"./shield-DINNxWHp.js";import{C as _}from"./circle-check-Bjgvpq5F.js";import{C as U}from"./clock-pm4LDp97.js";import{M as K,F as W}from"./mouse-pointer-2-JuM7rDhC.js";import{C as J}from"./check-D6DDcFwM.js";import{A as Q}from"./activity-jltyhcrF.js";import{A as Y}from"./arrow-up-right-DtZUe0YH.js";const f={healthCheckIntervalMs:3e4,healthCheckSchedule:"",enableSelfHealing:!0},j=5e3,Z=[{label:"Battery Saver (2 AM)",value:"0 2 * * *"},{label:"Standard (Hourly)",value:"0 * * * *"},{label:"Operational Coverage (30m)",value:"*/30 * * * *"},{label:"High Performance (10m)",value:"*/10 * * * *"}],S=5;function ee(t){const s=Date.parse(t);if(!Number.isFinite(s))return"";const n=Math.max(0,Date.now()-s),l=Math.floor(n/1e3);if(l<60)return`${l}s ago`;const o=Math.floor(l/60);if(o<60)return`${o}m ago`;const h=Math.floor(o/60);return h<24?`${h}h ago`:`${Math.floor(h/24)}d ago`}function E(t){var h,u;const s=(h=t.originalSelector)==null?void 0:h.trim(),n=(u=t.healedSelector)==null?void 0:u.trim(),l=t.tier&&t.commandName?`${t.commandName}: `:"";if(s&&n&&s!==n)return`${l}${s} → ${n}`;if(n)return`${l}Recovered locator ${n}`;if(s)return`${l}Recovered locator ${s}`;const o=typeof t.confidence=="number"?` (${Math.round(t.confidence*100)}%)`:"";return`${l||""}Self-healed${o}`}function ae(t){return t.tier?t.tier:t.commandName?t.commandName:t.deviceName?t.deviceName:"Self-heal"}const se=(t,s)=>t.healthCheckIntervalMs===s.healthCheckIntervalMs&&t.healthCheckSchedule===s.healthCheckSchedule&&t.enableSelfHealing===s.enableSelfHealing,ge=()=>{const{toast:t}=R(),[s,n]=c.useState(f),[l,o]=c.useState(f),[h,u]=c.useState(!0),[N,C]=c.useState(!1),[y,b]=c.useState([]),[A,H]=c.useState(!1),{on:k}=G();c.useEffect(()=>{I()},[]),c.useEffect(()=>{let a=!1;return m.getRecentHealingEvents(S).then(i=>{if(a||!i)return;const d=Array.isArray(i.events)?i.events.slice(0,S):[];b(d)}).catch(()=>{}).finally(()=>{a||H(!0)}),()=>{a=!0}},[]),c.useEffect(()=>{const a=k("healing_event",i=>{const d=i;!d||!d.id||b(p=>p.some(D=>D.id===d.id)?p:[d,...p].slice(0,S))});return()=>{a&&a()}},[k]);const I=async()=>{u(!0);try{const a=await m.getGlobalConfig(),i={healthCheckIntervalMs:a.healthCheckIntervalMs||3e4,healthCheckSchedule:a.healthCheckSchedule||"",enableSelfHealing:a.enableSelfHealing!==void 0?a.enableSelfHealing:!0};n(i),o(i)}catch(a){console.error("Failed to load settings",a),t("Failed to access infrastructure parameters.","error")}finally{u(!1)}},g=!se(s,l),r=Number.isNaN(s.healthCheckIntervalMs)||s.healthCheckIntervalMs<j?`Below minimum safe value of ${j}ms.`:null,w=g&&!r,v={interval:s.healthCheckIntervalMs!==l.healthCheckIntervalMs,schedule:s.healthCheckSchedule!==l.healthCheckSchedule,healing:s.enableSelfHealing!==l.enableSelfHealing},M=async a=>{const i=a??s;if(!a&&r){t(r,"error");return}C(!0);try{await m.updateGlobalConfig(i),o(i),n(i),t("Infrastructure parameters synchronized across fleet.","success")}catch(d){console.error("Failed to save settings",d),t("Synchronization failed. Check network integrity.","error")}finally{C(!1)}},$=async()=>{n(f),await M(f);try{await m.resetMetrics()}catch(a){console.error("Failed to reset metrics",a)}},z=()=>{n(l)},L=s.healthCheckSchedule!=="";return h?e.jsxs("div",{className:"settings-loading",children:[e.jsx(F,{className:"animate-spin",size:32}),e.jsx("span",{children:"Synchronizing Global Infrastructure..."})]}):e.jsxs("div",{className:"settings-container",children:[e.jsx(X,{icon:V,title:"Settings",subtitle:"Manage core farm parameters, heartbeat frequency, and maintenance orchestrations across the global registry."}),e.jsx("div",{className:"settings-content",children:e.jsxs("div",{className:"settings-grid settings-grid--three",children:[e.jsxs(x,{icon:e.jsx(U,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["Idle Health Frequency",v.interval&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),description:"Frequency of passive health pings when the system is in idle state.",hint:"Minimum safe value: 5000ms. Note: This frequency is overridden when a schedule is active.",children:[e.jsx("div",{className:"card-spacer"}),e.jsxs("div",{className:`input-group ${r?"has-error":""}`,children:[e.jsx("input",{type:"number",value:s.healthCheckIntervalMs,onChange:a=>n({...s,healthCheckIntervalMs:parseInt(a.target.value,10)}),min:j,step:5e3,"aria-invalid":!!r,"aria-describedby":r?"interval-error":"interval-status"}),e.jsx("span",{className:"code-font",children:"MS"})]}),r?e.jsxs("div",{id:"interval-error",className:"input-status input-status--error",role:"alert",children:[e.jsx(T,{size:12}),e.jsx("span",{children:r})]}):e.jsxs("div",{id:"interval-status",className:"input-status input-status--ok",children:[e.jsx(_,{size:12}),e.jsx("span",{children:"Valid frequency"})]})]}),e.jsxs(x,{icon:e.jsx(O,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["Deep Diagnostic Schedule",v.schedule&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),titleExtra:L?e.jsxs("span",{className:"active-pill",children:[e.jsx(Q,{size:11}),e.jsx("span",{children:"Active"})]}):null,description:"Execute intensive reliability bursts (WDA restarts, Cache purges) using standardized Cron syntax.",children:[e.jsx("div",{className:"setting-input-wrapper",children:e.jsx("input",{type:"text",placeholder:"e.g. 0 * * * * (hourly, at minute 0)",value:s.healthCheckSchedule,onChange:a=>n({...s,healthCheckSchedule:a.target.value})})}),e.jsxs("div",{className:"cron-presets",children:[e.jsxs("div",{className:"presets-label",children:[e.jsx(K,{size:12}),e.jsx("span",{children:"Intent-Based Presets"})]}),e.jsx("div",{className:"presets-grid presets-grid--stacked",children:Z.map(a=>{const i=s.healthCheckSchedule===a.value;return e.jsxs("button",{type:"button",className:`preset-chip ${i?"active":""}`,onClick:()=>n({...s,healthCheckSchedule:a.value}),"aria-pressed":i,children:[i&&e.jsx(J,{size:11,className:"preset-chip__check"}),e.jsx("span",{children:a.label})]},a.label)})})]})]}),e.jsxs(x,{icon:e.jsx(P,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["AI Self-Healing",v.healing&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),titleExtra:e.jsxs("label",{className:"switch switch--header",children:[e.jsx("input",{type:"checkbox",checked:s.enableSelfHealing,onChange:a=>n({...s,enableSelfHealing:a.target.checked}),"aria-label":"Toggle AI Self-Healing"}),e.jsx("span",{className:"slider round"})]}),children:[e.jsx("div",{className:`healing-state ${s.enableSelfHealing?"is-on":"is-off"}`,children:s.enableSelfHealing?"ENABLED":"DISABLED"}),e.jsx("p",{className:"setting-card-description",children:"Automatically intercept and recover from failing locators using Xenon's 6-tier strategy: etalon recovery, native retry, fuzzy XML, OCR, visual AI, and LLM — before failing a test."}),s.enableSelfHealing&&e.jsxs("div",{className:"healing-events",children:[e.jsxs("div",{className:"healing-events__header",children:[e.jsx(W,{size:11}),e.jsx("span",{children:"Recent Healing Events"}),e.jsxs(B,{to:"/selector-health",className:"healing-events__link",children:["Selector Health ",e.jsx(Y,{size:10})]})]}),y.length>0?e.jsx("ul",{className:"healing-events__list",children:y.map(a=>e.jsxs("li",{className:"healing-event",children:[e.jsx(_,{size:14,className:"healing-event__icon"}),e.jsxs("div",{className:"healing-event__body",children:[e.jsxs("div",{className:"healing-event__row",children:[e.jsx("span",{className:"healing-event__kind",children:ae(a)}),e.jsx("span",{className:"healing-event__when",children:ee(a.createdAt)})]}),e.jsx("div",{className:"healing-event__message",title:E(a),children:E(a)})]})]},a.id))}):e.jsx("div",{className:"healing-events__empty",children:A?"No healing events recorded yet — the dashboard will populate as locators are recovered.":"Loading recent events…"})]})]})]})}),(g||N)&&e.jsx(q,{onSave:()=>M(),onDiscard:z,onRestoreDefaults:$,isSaving:N,isValidating:!!r,isDirty:g,saveLabel:w?"Save Configuration":"Resolve errors to save"})]})};export{ge as Settings};
1
+ import{m as R,r as c,X as m,j as e,v as F,C as T,L as B,y as P}from"./index-Doq8HO3X.js";/* empty css */import{S as x,A as q}from"./SettingCard-BCRyZfOg.js";import{P as X}from"./page-header-Qk9pGEaH.js";import{u as G}from"./useSocket-D9iZtppJ.js";import{S as V,C as O}from"./shield-DKOl26Qj.js";import{C as _}from"./circle-check-BR3SeBx6.js";import{C as U}from"./clock-BiZmZWEe.js";import{M as K,F as W}from"./mouse-pointer-2-cmVLOY6H.js";import{C as J}from"./check-CVbtgHOC.js";import{A as Q}from"./activity-C9XYmP_g.js";import{A as Y}from"./arrow-up-right-CA-0ObXb.js";const f={healthCheckIntervalMs:3e4,healthCheckSchedule:"",enableSelfHealing:!0},j=5e3,Z=[{label:"Battery Saver (2 AM)",value:"0 2 * * *"},{label:"Standard (Hourly)",value:"0 * * * *"},{label:"Operational Coverage (30m)",value:"*/30 * * * *"},{label:"High Performance (10m)",value:"*/10 * * * *"}],S=5;function ee(t){const s=Date.parse(t);if(!Number.isFinite(s))return"";const n=Math.max(0,Date.now()-s),l=Math.floor(n/1e3);if(l<60)return`${l}s ago`;const o=Math.floor(l/60);if(o<60)return`${o}m ago`;const h=Math.floor(o/60);return h<24?`${h}h ago`:`${Math.floor(h/24)}d ago`}function E(t){var h,u;const s=(h=t.originalSelector)==null?void 0:h.trim(),n=(u=t.healedSelector)==null?void 0:u.trim(),l=t.tier&&t.commandName?`${t.commandName}: `:"";if(s&&n&&s!==n)return`${l}${s} → ${n}`;if(n)return`${l}Recovered locator ${n}`;if(s)return`${l}Recovered locator ${s}`;const o=typeof t.confidence=="number"?` (${Math.round(t.confidence*100)}%)`:"";return`${l||""}Self-healed${o}`}function ae(t){return t.tier?t.tier:t.commandName?t.commandName:t.deviceName?t.deviceName:"Self-heal"}const se=(t,s)=>t.healthCheckIntervalMs===s.healthCheckIntervalMs&&t.healthCheckSchedule===s.healthCheckSchedule&&t.enableSelfHealing===s.enableSelfHealing,ge=()=>{const{toast:t}=R(),[s,n]=c.useState(f),[l,o]=c.useState(f),[h,u]=c.useState(!0),[N,C]=c.useState(!1),[y,b]=c.useState([]),[A,H]=c.useState(!1),{on:k}=G();c.useEffect(()=>{I()},[]),c.useEffect(()=>{let a=!1;return m.getRecentHealingEvents(S).then(i=>{if(a||!i)return;const d=Array.isArray(i.events)?i.events.slice(0,S):[];b(d)}).catch(()=>{}).finally(()=>{a||H(!0)}),()=>{a=!0}},[]),c.useEffect(()=>{const a=k("healing_event",i=>{const d=i;!d||!d.id||b(p=>p.some(D=>D.id===d.id)?p:[d,...p].slice(0,S))});return()=>{a&&a()}},[k]);const I=async()=>{u(!0);try{const a=await m.getGlobalConfig(),i={healthCheckIntervalMs:a.healthCheckIntervalMs||3e4,healthCheckSchedule:a.healthCheckSchedule||"",enableSelfHealing:a.enableSelfHealing!==void 0?a.enableSelfHealing:!0};n(i),o(i)}catch(a){console.error("Failed to load settings",a),t("Failed to access infrastructure parameters.","error")}finally{u(!1)}},g=!se(s,l),r=Number.isNaN(s.healthCheckIntervalMs)||s.healthCheckIntervalMs<j?`Below minimum safe value of ${j}ms.`:null,w=g&&!r,v={interval:s.healthCheckIntervalMs!==l.healthCheckIntervalMs,schedule:s.healthCheckSchedule!==l.healthCheckSchedule,healing:s.enableSelfHealing!==l.enableSelfHealing},M=async a=>{const i=a??s;if(!a&&r){t(r,"error");return}C(!0);try{await m.updateGlobalConfig(i),o(i),n(i),t("Infrastructure parameters synchronized across fleet.","success")}catch(d){console.error("Failed to save settings",d),t("Synchronization failed. Check network integrity.","error")}finally{C(!1)}},$=async()=>{n(f),await M(f);try{await m.resetMetrics()}catch(a){console.error("Failed to reset metrics",a)}},z=()=>{n(l)},L=s.healthCheckSchedule!=="";return h?e.jsxs("div",{className:"settings-loading",children:[e.jsx(F,{className:"animate-spin",size:32}),e.jsx("span",{children:"Synchronizing Global Infrastructure..."})]}):e.jsxs("div",{className:"settings-container",children:[e.jsx(X,{icon:V,title:"Settings",subtitle:"Manage core farm parameters, heartbeat frequency, and maintenance orchestrations across the global registry."}),e.jsx("div",{className:"settings-content",children:e.jsxs("div",{className:"settings-grid settings-grid--three",children:[e.jsxs(x,{icon:e.jsx(U,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["Idle Health Frequency",v.interval&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),description:"Frequency of passive health pings when the system is in idle state.",hint:"Minimum safe value: 5000ms. Note: This frequency is overridden when a schedule is active.",children:[e.jsx("div",{className:"card-spacer"}),e.jsxs("div",{className:`input-group ${r?"has-error":""}`,children:[e.jsx("input",{type:"number",value:s.healthCheckIntervalMs,onChange:a=>n({...s,healthCheckIntervalMs:parseInt(a.target.value,10)}),min:j,step:5e3,"aria-invalid":!!r,"aria-describedby":r?"interval-error":"interval-status"}),e.jsx("span",{className:"code-font",children:"MS"})]}),r?e.jsxs("div",{id:"interval-error",className:"input-status input-status--error",role:"alert",children:[e.jsx(T,{size:12}),e.jsx("span",{children:r})]}):e.jsxs("div",{id:"interval-status",className:"input-status input-status--ok",children:[e.jsx(_,{size:12}),e.jsx("span",{children:"Valid frequency"})]})]}),e.jsxs(x,{icon:e.jsx(O,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["Deep Diagnostic Schedule",v.schedule&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),titleExtra:L?e.jsxs("span",{className:"active-pill",children:[e.jsx(Q,{size:11}),e.jsx("span",{children:"Active"})]}):null,description:"Execute intensive reliability bursts (WDA restarts, Cache purges) using standardized Cron syntax.",children:[e.jsx("div",{className:"setting-input-wrapper",children:e.jsx("input",{type:"text",placeholder:"e.g. 0 * * * * (hourly, at minute 0)",value:s.healthCheckSchedule,onChange:a=>n({...s,healthCheckSchedule:a.target.value})})}),e.jsxs("div",{className:"cron-presets",children:[e.jsxs("div",{className:"presets-label",children:[e.jsx(K,{size:12}),e.jsx("span",{children:"Intent-Based Presets"})]}),e.jsx("div",{className:"presets-grid presets-grid--stacked",children:Z.map(a=>{const i=s.healthCheckSchedule===a.value;return e.jsxs("button",{type:"button",className:`preset-chip ${i?"active":""}`,onClick:()=>n({...s,healthCheckSchedule:a.value}),"aria-pressed":i,children:[i&&e.jsx(J,{size:11,className:"preset-chip__check"}),e.jsx("span",{children:a.label})]},a.label)})})]})]}),e.jsxs(x,{icon:e.jsx(P,{size:16}),title:e.jsxs("span",{className:"card-title-row",children:["AI Self-Healing",v.healing&&e.jsx("span",{className:"modified-dot","aria-label":"Modified"})]}),titleExtra:e.jsxs("label",{className:"switch switch--header",children:[e.jsx("input",{type:"checkbox",checked:s.enableSelfHealing,onChange:a=>n({...s,enableSelfHealing:a.target.checked}),"aria-label":"Toggle AI Self-Healing"}),e.jsx("span",{className:"slider round"})]}),children:[e.jsx("div",{className:`healing-state ${s.enableSelfHealing?"is-on":"is-off"}`,children:s.enableSelfHealing?"ENABLED":"DISABLED"}),e.jsx("p",{className:"setting-card-description",children:"Automatically intercept and recover from failing locators using Xenon's 6-tier strategy: etalon recovery, native retry, fuzzy XML, OCR, visual AI, and LLM — before failing a test."}),s.enableSelfHealing&&e.jsxs("div",{className:"healing-events",children:[e.jsxs("div",{className:"healing-events__header",children:[e.jsx(W,{size:11}),e.jsx("span",{children:"Recent Healing Events"}),e.jsxs(B,{to:"/selector-health",className:"healing-events__link",children:["Selector Health ",e.jsx(Y,{size:10})]})]}),y.length>0?e.jsx("ul",{className:"healing-events__list",children:y.map(a=>e.jsxs("li",{className:"healing-event",children:[e.jsx(_,{size:14,className:"healing-event__icon"}),e.jsxs("div",{className:"healing-event__body",children:[e.jsxs("div",{className:"healing-event__row",children:[e.jsx("span",{className:"healing-event__kind",children:ae(a)}),e.jsx("span",{className:"healing-event__when",children:ee(a.createdAt)})]}),e.jsx("div",{className:"healing-event__message",title:E(a),children:E(a)})]})]},a.id))}):e.jsx("div",{className:"healing-events__empty",children:A?"No healing events recorded yet — the dashboard will populate as locators are recovered.":"Loading recent events…"})]})]})]})}),(g||N)&&e.jsx(q,{onSave:()=>M(),onDiscard:z,onRestoreDefaults:$,isSaving:N,isValidating:!!r,isDirty:g,saveLabel:w?"Save Configuration":"Resolve errors to save"})]})};export{ge as Settings};
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{r as a,X as v,j as _}from"./index-Doq8HO3X.js";import{u as y}from"./useSocket-D9iZtppJ.js";import{f as E}from"./time-B8FIgwPE.js";const $=3e3;function B(){const[e,t]=a.useState([]),[r,o]=a.useState([]),[n,i]=a.useState(null),[d,p]=a.useState(""),[S,b]=a.useState(!0),[g,m]=a.useState(null),c=a.useRef(!0),{on:l}=y(),u=a.useCallback(async()=>{try{const[s,f]=await Promise.all([v.getBuilds(),n?v.getSessions({buildId:n,query:d}):Promise.resolve([])]);if(!c.current)return;t(Array.isArray(s)?s:[]),o(Array.isArray(f)?f:[]),m(null)}catch(s){if(!c.current)return;m(s instanceof Error?s.message:String(s))}finally{c.current&&b(!1)}},[n,d]);return a.useEffect(()=>{c.current=!0,u();const s=setInterval(u,$);return()=>{c.current=!1,clearInterval(s)}},[u]),a.useEffect(()=>{const s=()=>u(),f=[l("session_started",s),l("session_stopped",s),l("device_added",s),l("device_removed",s)];return()=>{for(const x of f)x()}},[l,u]),{builds:e,selectedBuildId:n,sessions:r,loading:S,error:g,selectBuild:i,searchQuery:d,setSearchQuery:p,refresh:u}}function h(e){switch(e){case"success":case"passed":case"ended":return"passed";case"failed":case"error":case"timeout":return"failed";case"running":return"running";default:return"other"}}function C(e){const t={all:e.length,passed:0,failed:0,running:0};for(const r of e){const o=h(r.status);o!=="other"&&(t[o]+=1)}return t}function w(e,t){return t==="all"?!0:h(e.status)===t}function I(e,t,r){const o=r.trim().toLowerCase();return e.filter(n=>!(!w(n,t)||o&&!(n.id+" "+(n.name??"")+" "+(n.device_name??"")+" "+(n.device_platform??"")+" "+(n.device_version??"")+" "+(n.node_id??"")).toLowerCase().includes(o)))}function T(e){var r;const t=(r=e.device_name)==null?void 0:r.trim();return t&&t.length>0?t:"Unknown Device"}function F(e){const t=e.device_platform??"";if(!t)return"—";const r=t.toLowerCase();return r==="ios"?"iOS":r==="tvos"?"tvOS":r.charAt(0).toUpperCase()+r.slice(1)}function M(e){return e.device_version?`v${e.device_version}`:""}function N(e){return E(e)}function R(e){if(!e.startTime)return null;const t=Date.parse(e.startTime);if(!Number.isFinite(t))return null;const r=e.endTime?Date.parse(e.endTime):Date.now();return Number.isFinite(r)?Math.max(0,r-t):null}function j(e){if(e==null||!Number.isFinite(e)||e<0)return"—";const t=e/1e3,r=Math.floor(t/3600),o=Math.floor(t%3600/60),i=(t-r*3600-o*60).toFixed(1);return r>0?`${r}h ${o}m ${i}s`:o>0?`${o}m ${i}s`:`${i}s`}function O(e,t=10,r=4){return e?e.length<=t+r+1?e:`${e.slice(0,t)}…${e.slice(-r)}`:""}const D={ready:"border-[var(--green)]/40 text-[var(--green)]",passed:"border-[var(--green)]/40 text-[var(--green)]",running:"border-[var(--amber)]/40 text-[var(--amber)]",failed:"border-[var(--red)]/40 text-[var(--red)]",offline:"border-[var(--text-dim)]/40 text-[var(--text-dim)]"},P=({label:e,tone:t})=>_.jsx("span",{className:`inline-flex items-center justify-center h-6 px-2.5 rounded border text-[10px] font-mono font-semibold tracking-wider ${D[t]}`,children:e});export{P as S,h as a,C as b,R as c,T as d,I as e,N as f,j as h,M as o,F as p,O as s,B as u};
@@ -1,4 +1,4 @@
1
- import{g as e}from"./index--TKsSVZp.js";/**
1
+ import{g as e}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{m as D,r as n,j as e,v as z,z as f,S as B}from"./index--TKsSVZp.js";/* empty css */import{a as $}from"./time-B8FIgwPE.js";import{T as E,a as M,b as T,c as u,d as R,e as j}from"./Table-ta1UYEeC.js";import{F as Y}from"./FieldGroup-CYlyr34Q.js";import{P as U}from"./page-header-D5tpZwkI.js";import{M as K}from"./Modal-CjmzIR4Y.js";import{l as Q}from"./users-cwrwUhwo.js";import{S as V}from"./shield-alert-DDDbE5ER.js";import{P as N}from"./plus-tcA3_CAo.js";import{A as W}from"./arrow-left-DGZzN6Sl.js";import{T as F}from"./trash-2-Dvr08Dpq.js";const P={SUPER_ADMIN:"Super Admin",ADMIN:"Admin",MEMBER:"Member"};async function p(i,r){const t=await fetch(i,{credentials:"include",...r});if(!t.ok){const l=await t.json().catch(()=>({}));throw Object.assign(new Error(l.error||`HTTP ${t.status}`),{status:t.status})}return t.json()}const xe=()=>{const{toast:i}=D(),[r,t]=n.useState([]),[l,m]=n.useState(!0),[c,h]=n.useState(!1),[x,d]=n.useState(!1),[_,S]=n.useState(null),v=async()=>{m(!0);try{const a=await p("/xenon/api/teams");t(a),h(!1)}catch(a){a.status===403?h(!0):i(`Failed to load teams: ${a.message}`,"error")}finally{m(!1)}};if(n.useEffect(()=>{v()},[]),l)return e.jsxs("div",{className:"settings-loading",children:[e.jsx(z,{className:"animate-spin",size:32}),e.jsx("span",{children:"Loading teams…"})]});if(c)return e.jsx("div",{className:"settings-container",children:e.jsx(U,{icon:V,title:"Teams",subtitle:e.jsxs(e.Fragment,{children:["Your key lacks the ",e.jsx("code",{children:"admin"})," scope. Ask an administrator to promote your key before you can manage teams."]})})});if(_)return e.jsx(ee,{team:_,onBack:()=>{S(null),v()}});const C=r.reduce((a,o)=>a+o.deviceCount,0),y=r.reduce((a,o)=>a+o.memberCount,0);return e.jsxs("div",{className:"settings-container",children:[e.jsx(U,{icon:f,title:"Teams",subtitle:"Group devices and members by team. Devices with no team assignment stay in the shared pool — visible to every authenticated user.",action:r.length>0?e.jsxs("button",{type:"button",className:"page-header-action",onClick:()=>d(!0),children:[e.jsx(N,{size:16}),e.jsx("span",{children:"New team"})]}):void 0}),e.jsxs("div",{className:"settings-content",children:[r.length>0&&e.jsxs("div",{className:"stat-strip",children:[e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value stat-strip__value--accent",children:r.length}),e.jsx("div",{className:"stat-strip__label",children:"Teams"})]}),e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value",children:y}),e.jsx("div",{className:"stat-strip__label",children:"Members"})]}),e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value",children:C}),e.jsx("div",{className:"stat-strip__label",children:"Devices assigned"})]})]}),r.length===0?e.jsxs("div",{className:"empty-state",children:[e.jsx("div",{className:"empty-state__icon",children:e.jsx(f,{size:28})}),e.jsx("h3",{className:"empty-state__title",children:"No teams yet"}),e.jsx("p",{className:"empty-state__copy",children:"Every device is in the shared pool until you create a team and assign it. Teams let you scope an API key to a subset of devices — useful for separating CI runners, staging fleets, or per-team device pools."}),e.jsxs("button",{type:"button",className:"page-header-action empty-state__action",onClick:()=>d(!0),children:[e.jsx(N,{size:16}),e.jsx("span",{children:"Create your first team"})]})]}):e.jsx("div",{className:"team-grid",children:r.map(a=>e.jsxs("button",{type:"button",className:"team-card",onClick:()=>S(a),children:[e.jsxs("div",{className:"team-card__header",children:[e.jsx("div",{className:"team-card__icon",children:e.jsx(f,{size:16})}),e.jsxs("div",{className:"team-card__title",children:[e.jsx("div",{className:"team-card__name",children:a.name}),e.jsx("div",{className:"team-card__id",children:a.id.slice(0,8)})]}),e.jsx("span",{className:"team-card__delete",role:"button",tabIndex:0,onClick:o=>o.stopPropagation(),children:e.jsx(Z,{team:a,onDeleted:v})})]}),e.jsxs("div",{className:"team-card__metrics",children:[e.jsxs("div",{className:"team-card__metric",children:[e.jsx(B,{size:13}),e.jsx("span",{className:"team-card__metric-value",children:a.deviceCount}),e.jsx("span",{className:"team-card__metric-label",children:"devices"})]}),e.jsxs("div",{className:"team-card__metric",children:[e.jsx(f,{size:13}),e.jsx("span",{className:"team-card__metric-value",children:a.memberCount}),e.jsx("span",{className:"team-card__metric-label",children:"members"})]})]}),e.jsxs("div",{className:"team-card__footer",children:["Created ",$(a.createdAt)]})]},a.id))})]}),x&&e.jsx(X,{onClose:()=>d(!1),onCreated:()=>{d(!1),v()}})]})},X=({onClose:i,onCreated:r})=>{const{toast:t}=D(),[l,m]=n.useState(""),[c,h]=n.useState(!1),x=async()=>{if(!l.trim())return t("Name required","error");h(!0);try{await p("/xenon/api/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.trim()})}),t("Team created","success"),r()}catch(d){t(d.message,"error")}finally{h(!1)}};return e.jsx(K,{open:!0,onClose:i,title:"New team",footer:e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"reset-btn",onClick:i,disabled:c,children:"Cancel"}),e.jsxs("button",{className:"save-btn",onClick:x,disabled:c,children:[c?e.jsx(z,{className:"animate-spin",size:18}):e.jsx(N,{size:18}),c?"Creating…":"Create"]})]}),children:e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:e.jsx(Y,{label:"Name",htmlFor:"team-name",children:e.jsx("input",{id:"team-name",type:"text",value:l,onChange:d=>m(d.target.value),placeholder:"android-team, qa-ios, …",style:w,autoFocus:!0})})})})},Z=({team:i,onDeleted:r})=>{const{toast:t}=D(),[l,m]=n.useState(!1),c=async h=>{if(h.stopPropagation(),!!window.confirm(`Delete team "${i.name}"? It must have no devices and no members.`)){m(!0);try{await p(`/xenon/api/teams/${i.id}`,{method:"DELETE"}),t("Team deleted","success"),r()}catch(x){t(x.message,"error")}finally{m(!1)}}};return e.jsxs("button",{className:"reset-btn",disabled:l,onClick:c,style:{color:"var(--status-error-fg)"},children:[e.jsx(F,{size:14}),l?"Deleting…":"Delete"]})},ee=({team:i,onBack:r})=>{const{toast:t}=D(),[l,m]=n.useState([]),[c,h]=n.useState([]),[x,d]=n.useState([]),[_,S]=n.useState([]),[v,C]=n.useState(!0),[y,a]=n.useState(""),[o,k]=n.useState(""),b=async()=>{C(!0);try{const[s,g,G]=await Promise.all([p(`/xenon/api/teams/${i.id}/members`),Q(),p("/xenon/api/device")]);m(s),h(g);const I=G;d(I.filter(A=>A.teamId===i.id)),S(I.filter(A=>!A.teamId))}catch(s){t(`Failed to load team detail: ${s.message}`,"error")}finally{C(!1)}};n.useEffect(()=>{b()},[i.id]);const L=async()=>{if(y)try{await p(`/xenon/api/teams/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:y})}),t("Member added","success"),a(""),b()}catch(s){t(s.message,"error")}},O=async s=>{if(window.confirm("Remove this member from the team?"))try{await p(`/xenon/api/teams/${i.id}/members/${encodeURIComponent(s)}`,{method:"DELETE"}),t("Member removed","success"),b()}catch(g){t(g.message,"error")}},H=async()=>{if(o)try{await p(`/xenon/api/device/${encodeURIComponent(o)}/team`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:i.id})}),t("Device assigned","success"),k(""),b()}catch(s){t(s.message,"error")}},J=async s=>{if(window.confirm("Return this device to the shared pool?"))try{await p(`/xenon/api/device/${encodeURIComponent(s)}/team`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:null})}),t("Device unassigned","success"),b()}catch(g){t(g.message,"error")}},q=c.filter(s=>!l.some(g=>g.userId===s.id));return e.jsxs("div",{className:"settings-container mesh-gradient-infra",children:[e.jsxs("div",{className:"settings-header",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("button",{onClick:r,className:"reset-btn",style:{padding:"4px 8px"},"aria-label":"Back",children:e.jsx(W,{size:18})}),e.jsxs("div",{className:"settings-title-group",children:[e.jsx(f,{className:"settings-icon infra-icon",size:28}),e.jsx("h2",{children:i.name})]})]}),e.jsx("p",{className:"settings-subtitle",children:'Manage members and devices assigned to this team. To add a device, go to Devices and use "Assign to team."'})]}),v?e.jsx("div",{className:"settings-loading",children:e.jsx(z,{className:"animate-spin",size:32})}):e.jsxs("div",{className:"settings-content",style:{display:"flex",flexDirection:"column",gap:24},children:[e.jsxs("section",{children:[e.jsxs("h3",{style:{marginBottom:12},children:["Members (",l.length,")"]}),e.jsxs("div",{className:"surface-card",style:{padding:12},children:[e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[e.jsxs("select",{value:y,onChange:s=>a(s.target.value),style:{...w,flex:1},children:[e.jsx("option",{value:"",children:"Select a user to add…"}),q.map(s=>e.jsxs("option",{value:s.id,children:[s.name," (",s.email,") — ",P[s.role]]},s.id))]}),e.jsxs("button",{className:"save-btn",onClick:L,disabled:!y,children:[e.jsx(N,{size:16})," Add"]})]}),l.length===0?e.jsx("p",{style:{opacity:.6,textAlign:"center",padding:24},children:"No members yet. Add a user above."}):e.jsxs(E,{children:[e.jsx(M,{children:e.jsxs(T,{children:[e.jsx(u,{children:"Name"}),e.jsx(u,{children:"Email"}),e.jsx(u,{children:"Role"}),e.jsx(u,{children:"Added"}),e.jsx(u,{style:{textAlign:"right"},children:"Action"})]})}),e.jsx(R,{children:l.map(s=>e.jsxs(T,{children:[e.jsx(j,{children:s.name}),e.jsx(j,{children:e.jsx("code",{style:{fontSize:"11px",color:"var(--text-muted)"},children:s.email})}),e.jsx(j,{children:P[s.role]}),e.jsx(j,{children:$(s.addedAt)}),e.jsx(j,{style:{textAlign:"right"},children:e.jsx("button",{className:"reset-btn",onClick:()=>O(s.userId),style:{color:"var(--status-error-fg)"},"aria-label":"Remove member",title:"Remove member",children:e.jsx(F,{size:14})})})]},s.userId))})]})]})]}),e.jsxs("section",{children:[e.jsxs("h3",{style:{marginBottom:12},children:["Devices (",x.length,")"]}),e.jsxs("div",{className:"surface-card",style:{padding:12},children:[e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[e.jsxs("select",{value:o,onChange:s=>k(s.target.value),style:{...w,flex:1},children:[e.jsx("option",{value:"",children:"Select a shared-pool device to assign…"}),_.map(s=>e.jsxs("option",{value:s.udid,children:[s.name," (",s.platform,") — ",s.udid.slice(0,12),"…"]},s.udid))]}),e.jsxs("button",{className:"save-btn",onClick:H,disabled:!o,children:[e.jsx(N,{size:16})," Assign"]})]}),x.length===0?e.jsx("p",{style:{opacity:.6,textAlign:"center",padding:24},children:"No devices assigned. Use the Devices page to move devices into this team."}):e.jsxs(E,{children:[e.jsx(M,{children:e.jsxs(T,{children:[e.jsx(u,{children:"Name"}),e.jsx(u,{children:"Platform"}),e.jsx(u,{children:"UDID"}),e.jsx(u,{style:{textAlign:"right"},children:"Actions"})]})}),e.jsx(R,{children:x.map(s=>e.jsxs(T,{children:[e.jsxs(j,{children:[e.jsx(B,{size:14,style:{marginRight:6,verticalAlign:"middle"}}),s.name]}),e.jsx(j,{children:s.platform}),e.jsx(j,{children:e.jsxs("code",{style:{fontSize:"11px"},children:[s.udid.slice(0,14),"…"]})}),e.jsx(j,{style:{textAlign:"right"},children:e.jsx("button",{className:"reset-btn",onClick:()=>J(s.udid),children:"Return to shared pool"})})]},s.udid))})]})]})]})]})]})},w={width:"100%",padding:"8px 12px",background:"rgba(0,0,0,0.3)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"inherit",fontSize:"0.95em",boxSizing:"border-box"};export{xe as Teams};
1
+ import{m as D,r as n,j as e,v as z,z as f,S as B}from"./index-Doq8HO3X.js";/* empty css */import{a as $}from"./time-B8FIgwPE.js";import{T as E,a as M,b as T,c as u,d as R,e as j}from"./Table-CEvMaA5P.js";import{F as Y}from"./FieldGroup-DnJ8AU1V.js";import{P as U}from"./page-header-Qk9pGEaH.js";import{M as K}from"./Modal-QVER5CZo.js";import{l as Q}from"./users-cwrwUhwo.js";import{S as V}from"./shield-alert-B6RlIJqv.js";import{P as N}from"./plus-DkzZBN8d.js";import{A as W}from"./arrow-left-USNjWr3g.js";import{T as F}from"./trash-2-D-ONhY9W.js";const P={SUPER_ADMIN:"Super Admin",ADMIN:"Admin",MEMBER:"Member"};async function p(i,r){const t=await fetch(i,{credentials:"include",...r});if(!t.ok){const l=await t.json().catch(()=>({}));throw Object.assign(new Error(l.error||`HTTP ${t.status}`),{status:t.status})}return t.json()}const xe=()=>{const{toast:i}=D(),[r,t]=n.useState([]),[l,m]=n.useState(!0),[c,h]=n.useState(!1),[x,d]=n.useState(!1),[_,S]=n.useState(null),v=async()=>{m(!0);try{const a=await p("/xenon/api/teams");t(a),h(!1)}catch(a){a.status===403?h(!0):i(`Failed to load teams: ${a.message}`,"error")}finally{m(!1)}};if(n.useEffect(()=>{v()},[]),l)return e.jsxs("div",{className:"settings-loading",children:[e.jsx(z,{className:"animate-spin",size:32}),e.jsx("span",{children:"Loading teams…"})]});if(c)return e.jsx("div",{className:"settings-container",children:e.jsx(U,{icon:V,title:"Teams",subtitle:e.jsxs(e.Fragment,{children:["Your key lacks the ",e.jsx("code",{children:"admin"})," scope. Ask an administrator to promote your key before you can manage teams."]})})});if(_)return e.jsx(ee,{team:_,onBack:()=>{S(null),v()}});const C=r.reduce((a,o)=>a+o.deviceCount,0),y=r.reduce((a,o)=>a+o.memberCount,0);return e.jsxs("div",{className:"settings-container",children:[e.jsx(U,{icon:f,title:"Teams",subtitle:"Group devices and members by team. Devices with no team assignment stay in the shared pool — visible to every authenticated user.",action:r.length>0?e.jsxs("button",{type:"button",className:"page-header-action",onClick:()=>d(!0),children:[e.jsx(N,{size:16}),e.jsx("span",{children:"New team"})]}):void 0}),e.jsxs("div",{className:"settings-content",children:[r.length>0&&e.jsxs("div",{className:"stat-strip",children:[e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value stat-strip__value--accent",children:r.length}),e.jsx("div",{className:"stat-strip__label",children:"Teams"})]}),e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value",children:y}),e.jsx("div",{className:"stat-strip__label",children:"Members"})]}),e.jsxs("div",{className:"stat-strip__cell",children:[e.jsx("div",{className:"stat-strip__value",children:C}),e.jsx("div",{className:"stat-strip__label",children:"Devices assigned"})]})]}),r.length===0?e.jsxs("div",{className:"empty-state",children:[e.jsx("div",{className:"empty-state__icon",children:e.jsx(f,{size:28})}),e.jsx("h3",{className:"empty-state__title",children:"No teams yet"}),e.jsx("p",{className:"empty-state__copy",children:"Every device is in the shared pool until you create a team and assign it. Teams let you scope an API key to a subset of devices — useful for separating CI runners, staging fleets, or per-team device pools."}),e.jsxs("button",{type:"button",className:"page-header-action empty-state__action",onClick:()=>d(!0),children:[e.jsx(N,{size:16}),e.jsx("span",{children:"Create your first team"})]})]}):e.jsx("div",{className:"team-grid",children:r.map(a=>e.jsxs("button",{type:"button",className:"team-card",onClick:()=>S(a),children:[e.jsxs("div",{className:"team-card__header",children:[e.jsx("div",{className:"team-card__icon",children:e.jsx(f,{size:16})}),e.jsxs("div",{className:"team-card__title",children:[e.jsx("div",{className:"team-card__name",children:a.name}),e.jsx("div",{className:"team-card__id",children:a.id.slice(0,8)})]}),e.jsx("span",{className:"team-card__delete",role:"button",tabIndex:0,onClick:o=>o.stopPropagation(),children:e.jsx(Z,{team:a,onDeleted:v})})]}),e.jsxs("div",{className:"team-card__metrics",children:[e.jsxs("div",{className:"team-card__metric",children:[e.jsx(B,{size:13}),e.jsx("span",{className:"team-card__metric-value",children:a.deviceCount}),e.jsx("span",{className:"team-card__metric-label",children:"devices"})]}),e.jsxs("div",{className:"team-card__metric",children:[e.jsx(f,{size:13}),e.jsx("span",{className:"team-card__metric-value",children:a.memberCount}),e.jsx("span",{className:"team-card__metric-label",children:"members"})]})]}),e.jsxs("div",{className:"team-card__footer",children:["Created ",$(a.createdAt)]})]},a.id))})]}),x&&e.jsx(X,{onClose:()=>d(!1),onCreated:()=>{d(!1),v()}})]})},X=({onClose:i,onCreated:r})=>{const{toast:t}=D(),[l,m]=n.useState(""),[c,h]=n.useState(!1),x=async()=>{if(!l.trim())return t("Name required","error");h(!0);try{await p("/xenon/api/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.trim()})}),t("Team created","success"),r()}catch(d){t(d.message,"error")}finally{h(!1)}};return e.jsx(K,{open:!0,onClose:i,title:"New team",footer:e.jsxs(e.Fragment,{children:[e.jsx("button",{className:"reset-btn",onClick:i,disabled:c,children:"Cancel"}),e.jsxs("button",{className:"save-btn",onClick:x,disabled:c,children:[c?e.jsx(z,{className:"animate-spin",size:18}):e.jsx(N,{size:18}),c?"Creating…":"Create"]})]}),children:e.jsx("div",{style:{display:"flex",flexDirection:"column"},children:e.jsx(Y,{label:"Name",htmlFor:"team-name",children:e.jsx("input",{id:"team-name",type:"text",value:l,onChange:d=>m(d.target.value),placeholder:"android-team, qa-ios, …",style:w,autoFocus:!0})})})})},Z=({team:i,onDeleted:r})=>{const{toast:t}=D(),[l,m]=n.useState(!1),c=async h=>{if(h.stopPropagation(),!!window.confirm(`Delete team "${i.name}"? It must have no devices and no members.`)){m(!0);try{await p(`/xenon/api/teams/${i.id}`,{method:"DELETE"}),t("Team deleted","success"),r()}catch(x){t(x.message,"error")}finally{m(!1)}}};return e.jsxs("button",{className:"reset-btn",disabled:l,onClick:c,style:{color:"var(--status-error-fg)"},children:[e.jsx(F,{size:14}),l?"Deleting…":"Delete"]})},ee=({team:i,onBack:r})=>{const{toast:t}=D(),[l,m]=n.useState([]),[c,h]=n.useState([]),[x,d]=n.useState([]),[_,S]=n.useState([]),[v,C]=n.useState(!0),[y,a]=n.useState(""),[o,k]=n.useState(""),b=async()=>{C(!0);try{const[s,g,G]=await Promise.all([p(`/xenon/api/teams/${i.id}/members`),Q(),p("/xenon/api/device")]);m(s),h(g);const I=G;d(I.filter(A=>A.teamId===i.id)),S(I.filter(A=>!A.teamId))}catch(s){t(`Failed to load team detail: ${s.message}`,"error")}finally{C(!1)}};n.useEffect(()=>{b()},[i.id]);const L=async()=>{if(y)try{await p(`/xenon/api/teams/${i.id}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:y})}),t("Member added","success"),a(""),b()}catch(s){t(s.message,"error")}},O=async s=>{if(window.confirm("Remove this member from the team?"))try{await p(`/xenon/api/teams/${i.id}/members/${encodeURIComponent(s)}`,{method:"DELETE"}),t("Member removed","success"),b()}catch(g){t(g.message,"error")}},H=async()=>{if(o)try{await p(`/xenon/api/device/${encodeURIComponent(o)}/team`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:i.id})}),t("Device assigned","success"),k(""),b()}catch(s){t(s.message,"error")}},J=async s=>{if(window.confirm("Return this device to the shared pool?"))try{await p(`/xenon/api/device/${encodeURIComponent(s)}/team`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({teamId:null})}),t("Device unassigned","success"),b()}catch(g){t(g.message,"error")}},q=c.filter(s=>!l.some(g=>g.userId===s.id));return e.jsxs("div",{className:"settings-container mesh-gradient-infra",children:[e.jsxs("div",{className:"settings-header",children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[e.jsx("button",{onClick:r,className:"reset-btn",style:{padding:"4px 8px"},"aria-label":"Back",children:e.jsx(W,{size:18})}),e.jsxs("div",{className:"settings-title-group",children:[e.jsx(f,{className:"settings-icon infra-icon",size:28}),e.jsx("h2",{children:i.name})]})]}),e.jsx("p",{className:"settings-subtitle",children:'Manage members and devices assigned to this team. To add a device, go to Devices and use "Assign to team."'})]}),v?e.jsx("div",{className:"settings-loading",children:e.jsx(z,{className:"animate-spin",size:32})}):e.jsxs("div",{className:"settings-content",style:{display:"flex",flexDirection:"column",gap:24},children:[e.jsxs("section",{children:[e.jsxs("h3",{style:{marginBottom:12},children:["Members (",l.length,")"]}),e.jsxs("div",{className:"surface-card",style:{padding:12},children:[e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[e.jsxs("select",{value:y,onChange:s=>a(s.target.value),style:{...w,flex:1},children:[e.jsx("option",{value:"",children:"Select a user to add…"}),q.map(s=>e.jsxs("option",{value:s.id,children:[s.name," (",s.email,") — ",P[s.role]]},s.id))]}),e.jsxs("button",{className:"save-btn",onClick:L,disabled:!y,children:[e.jsx(N,{size:16})," Add"]})]}),l.length===0?e.jsx("p",{style:{opacity:.6,textAlign:"center",padding:24},children:"No members yet. Add a user above."}):e.jsxs(E,{children:[e.jsx(M,{children:e.jsxs(T,{children:[e.jsx(u,{children:"Name"}),e.jsx(u,{children:"Email"}),e.jsx(u,{children:"Role"}),e.jsx(u,{children:"Added"}),e.jsx(u,{style:{textAlign:"right"},children:"Action"})]})}),e.jsx(R,{children:l.map(s=>e.jsxs(T,{children:[e.jsx(j,{children:s.name}),e.jsx(j,{children:e.jsx("code",{style:{fontSize:"11px",color:"var(--text-muted)"},children:s.email})}),e.jsx(j,{children:P[s.role]}),e.jsx(j,{children:$(s.addedAt)}),e.jsx(j,{style:{textAlign:"right"},children:e.jsx("button",{className:"reset-btn",onClick:()=>O(s.userId),style:{color:"var(--status-error-fg)"},"aria-label":"Remove member",title:"Remove member",children:e.jsx(F,{size:14})})})]},s.userId))})]})]})]}),e.jsxs("section",{children:[e.jsxs("h3",{style:{marginBottom:12},children:["Devices (",x.length,")"]}),e.jsxs("div",{className:"surface-card",style:{padding:12},children:[e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12},children:[e.jsxs("select",{value:o,onChange:s=>k(s.target.value),style:{...w,flex:1},children:[e.jsx("option",{value:"",children:"Select a shared-pool device to assign…"}),_.map(s=>e.jsxs("option",{value:s.udid,children:[s.name," (",s.platform,") — ",s.udid.slice(0,12),"…"]},s.udid))]}),e.jsxs("button",{className:"save-btn",onClick:H,disabled:!o,children:[e.jsx(N,{size:16})," Assign"]})]}),x.length===0?e.jsx("p",{style:{opacity:.6,textAlign:"center",padding:24},children:"No devices assigned. Use the Devices page to move devices into this team."}):e.jsxs(E,{children:[e.jsx(M,{children:e.jsxs(T,{children:[e.jsx(u,{children:"Name"}),e.jsx(u,{children:"Platform"}),e.jsx(u,{children:"UDID"}),e.jsx(u,{style:{textAlign:"right"},children:"Actions"})]})}),e.jsx(R,{children:x.map(s=>e.jsxs(T,{children:[e.jsxs(j,{children:[e.jsx(B,{size:14,style:{marginRight:6,verticalAlign:"middle"}}),s.name]}),e.jsx(j,{children:s.platform}),e.jsx(j,{children:e.jsxs("code",{style:{fontSize:"11px"},children:[s.udid.slice(0,14),"…"]})}),e.jsx(j,{style:{textAlign:"right"},children:e.jsx("button",{className:"reset-btn",onClick:()=>J(s.udid),children:"Return to shared pool"})})]},s.udid))})]})]})]})]})]})},w={width:"100%",padding:"8px 12px",background:"rgba(0,0,0,0.3)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,color:"inherit",fontSize:"0.95em",boxSizing:"border-box"};export{xe as Teams};
@@ -1,4 +1,4 @@
1
- import{g as a}from"./index--TKsSVZp.js";/**
1
+ import{g as a}from"./index-Doq8HO3X.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.