/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{--bg: #0a0e0a;--surface: #131a13;--surface-2: #1b241b;--border: #273227;--text: #e6efe6;--muted: #8aa68f;--accent: #7be24f;--accent-hover: #96ec6f;--danger: #ff6b6b;--red: #e23b5a;--radius: 12px}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:15px;line-height:1.5}a{color:var(--accent);text-decoration:none}.muted{color:var(--muted)}.small{font-size:13px}.centered{min-height:100vh;display:grid;place-items:center;padding:24px}.app{min-height:100vh}.topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--border);background:var(--surface);position:sticky;top:0;z-index:10}.brand{display:flex;align-items:center;gap:10px;color:var(--text);font-weight:600;font-size:18px}.topbar-right{display:flex;align-items:center;gap:14px}.proj-icon{width:22px;height:22px;border-radius:6px;object-fit:cover;vertical-align:-5px;margin-right:8px}.proj-icon.lg{width:30px;height:30px;border-radius:8px;vertical-align:-7px}.proj-title{display:flex;align-items:center}.content{max-width:1000px;margin:0 auto;padding:24px 20px 80px}.btn{border:1px solid var(--border);background:var(--surface-2);color:var(--text);padding:8px 14px;border-radius:8px;cursor:pointer;font-size:14px;transition:.15s}.btn:hover{border-color:var(--accent)}.btn.primary{background:var(--accent);border-color:var(--accent);color:#06101f;font-weight:600}.btn.primary:hover{background:var(--accent-hover)}.btn.ghost{background:transparent}.btn:disabled{opacity:.5;cursor:not-allowed}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px}.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.page-head h2{margin:0;padding-left:10px;border-left:3px solid var(--red)}.page-head-actions{display:flex;gap:10px;align-items:center}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.project{display:block;color:var(--text);transition:.15s}.project:hover{border-color:var(--accent);transform:translateY(-2px)}.project-name{font-weight:600;font-size:16px;margin-bottom:4px}.commit{margin-top:10px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.meta{display:flex;justify-content:space-between;margin-top:12px;color:var(--muted);font-size:12px}.empty{text-align:center;padding:48px}.login{width:340px;display:flex;flex-direction:column;gap:12px}.login-brand{display:flex;align-items:center;gap:12px}.login-brand h1{margin:0;font-size:24px}label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}input,textarea{background:var(--bg);border:1px solid var(--border);border-radius:8px;color:var(--text);padding:10px 12px;font-size:14px;font-family:inherit}input:focus,textarea:focus{outline:none;border-color:var(--accent)}textarea{min-height:70px;resize:vertical}.error{color:var(--danger);font-size:13px}.breadcrumb{margin-bottom:10px;color:var(--muted)}.clone{margin-bottom:24px;display:flex;flex-direction:column;gap:8px}.clone-row{display:flex;align-items:center;gap:10px}.clone-row code{flex:1;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:8px 12px;overflow-x:auto;white-space:nowrap;font-size:13px}.columns{display:grid;grid-template-columns:1fr 1fr;gap:28px}@media (max-width: 760px){.columns{grid-template-columns:1fr}}.list{list-style:none;padding:0;margin:0}.list-row{display:flex;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.grow{flex:1;min-width:0}.sha{color:var(--accent);font-family:ui-monospace,monospace;font-size:13px}.tag{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:1px 8px;font-size:13px;color:var(--accent)}.release-head{display:flex;align-items:center;gap:10px}.assets{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}.asset{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;padding:4px 10px;font-size:13px}.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:24px}.tab-btn{background:none;border:none;border-bottom:2px solid transparent;color:var(--muted);cursor:pointer;font-size:14px;font-family:inherit;padding:8px 14px;margin-bottom:-1px;transition:.15s}.tab-btn:hover:not(:disabled){color:var(--text)}.tab-btn:disabled{cursor:not-allowed;opacity:.4}.tab-btn.active{color:var(--accent);border-bottom-color:var(--accent)}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.section-head h3{margin:0}.pagination-controls{display:flex;align-items:center;gap:8px}.page-size-select{background:var(--surface-2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-size:13px;font-family:inherit;padding:4px 8px;cursor:pointer}.page-size-select:focus{outline:none;border-color:var(--accent)}.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:16px;padding-top:12px;border-top:1px solid var(--border)}.btn.small{padding:5px 9px;font-size:12px}.btn.danger{border-color:var(--danger);color:var(--danger)}.btn.danger:hover:not(:disabled){background:#ff6b6b26}.pad{padding:8px 6px}.nav-tabs{display:flex;align-items:stretch;margin-left:12px;background:var(--bg);border:1px solid var(--border);border-radius:8px;padding:3px;gap:3px}.nav-tabs .seg-btn{border:1px solid transparent;background:transparent;color:var(--muted);padding:5px 18px;border-radius:6px;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;font-family:inherit}.nav-tabs .seg-btn:hover:not(.active){color:var(--text);background:var(--surface-2)}.nav-tabs .seg-btn.active{background:var(--surface-2);border-color:var(--accent-hover);color:var(--accent);box-shadow:0 0 6px #7be24f26}.search{flex:1;max-width:420px;margin:0 16px}.content-wide{max-width:1400px}.leds{display:flex;gap:6px;align-items:center}.led{width:11px;height:11px;border-radius:50%;background:#2a2f2a;box-shadow:inset 0 0 2px #000c;border:1px solid rgba(255,255,255,.06);transition:background .2s,box-shadow .2s;flex:none}.led.on{background:var(--led);box-shadow:0 0 6px var(--led),0 0 2px var(--led),inset 0 0 2px #ffffff80;border-color:transparent}.led.on.pulse{animation:led-pulse 1.3s ease-in-out infinite}@keyframes led-pulse{0%,to{opacity:1}50%{opacity:.45}}.project-led{margin-left:auto;display:inline-flex}.project-name{display:flex;align-items:center}.devview-host{position:fixed;top:0;right:0;bottom:0;left:0;background:var(--bg);z-index:20}.devview{display:flex;flex-direction:column;height:100%}.devview-bar{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--surface)}.back-btn{font-weight:600}.devview-title{font-weight:600;font-size:15px}.devview-bar-spacer{flex:1}.devview-body{flex:1;display:grid;grid-template-columns:320px 1fr;grid-template-rows:minmax(0,1fr);min-height:0}@media (max-width: 900px){.devview-body{grid-template-columns:1fr}.devview-body .commits{display:none}}.commits{border-right:1px solid var(--border);overflow:auto;padding:10px;background:var(--surface)}.commits-head{padding:4px 6px 8px;position:sticky;top:-10px;background:var(--surface)}.commit-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}.commit-row{display:flex;gap:8px;padding:7px 6px;border-radius:8px;cursor:pointer}.commit-row:hover{background:var(--surface-2)}.commit-row .sha{flex:none;padding-top:1px}.commit-meta{min-width:0}.commit-msg{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.load-more{width:100%;margin-top:8px}.upload-msg{color:var(--muted);white-space:nowrap}.console-col{min-width:0;min-height:0;overflow:hidden;background:#0b0e14;padding:8px}.console-wrap{position:relative;width:100%;height:100%;display:flex;flex-direction:column}.console-pane{width:100%;height:100%;overflow:hidden}.console-wrap .console-pane{flex:1;min-height:0}.console-banner{display:flex;align-items:center;gap:10px;padding:6px 10px;font-size:13px;border-radius:8px;margin-bottom:6px}.console-banner.reconnecting{background:#ffd23d1f;color:#ffd23d;border:1px solid rgba(255,210,61,.35)}.console-banner.resume{background:#3fe08a1a;color:var(--text);border:1px solid rgba(63,224,138,.35)}.console-banner.resume span{flex:1}.console-debug{position:absolute;top:8px;right:8px;z-index:5;width:min(460px,60%);max-height:55%;display:flex;flex-direction:column;background:#0a0e0af0;border:1px solid var(--border);border-radius:8px;font-size:11px}.console-debug-head{display:flex;align-items:center;gap:6px;padding:4px 4px 4px 10px;border-bottom:1px solid var(--border);color:var(--muted)}.console-debug-head span{flex:1}.console-debug pre{margin:0;padding:6px 10px;overflow:auto;min-height:40px;white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,monospace;font-size:11px;line-height:1.5}.toggle{display:inline-flex;flex-direction:row;align-items:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none}.toggle-label{font-size:12.5px;color:var(--muted)}.toggle-input{position:absolute;opacity:0;width:0;height:0}.toggle-switch{position:relative;width:40px;height:20px;flex:none;border-radius:20px;background:transparent;border:1.5px solid var(--muted);transition:background .18s ease,border-color .18s ease}.toggle-switch:before{content:"";position:absolute;top:50%;left:4px;width:10px;height:10px;border-radius:50%;background:var(--muted);transform:translateY(-50%);transition:transform .18s ease,background .18s ease,width .12s ease,height .12s ease}.toggle:hover .toggle-switch:before{width:12px;height:12px}.toggle-input:checked+.toggle-switch{background:var(--accent);border-color:var(--accent)}.toggle-input:checked+.toggle-switch:before{background:#fff;transform:translate(20px,-50%)}.toggle-input:focus-visible+.toggle-switch{outline:2px solid var(--accent);outline-offset:2px}.devtab{display:flex;gap:16px;align-items:flex-start;min-height:0}.devtab-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px}.devtab-toolbar{display:flex;justify-content:flex-end;align-items:center;gap:10px}.devtab-columns{display:grid;grid-template-columns:1fr 1fr;gap:16px;flex:1;min-width:0}@media (max-width: 760px){.devtab-columns{grid-template-columns:1fr}}.devtab-col{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;display:flex;flex-direction:column;gap:6px;min-width:0}.section-title{font-size:13px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);margin:0 0 6px;padding-left:8px;border-left:3px solid var(--red);font-weight:600}.devtab-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:8px 10px;cursor:pointer}.devtab-row:hover{border-color:var(--accent-hover)}.devtab-row:focus-visible{outline:2px solid var(--accent)}.devtab-icon{width:28px;height:28px;border-radius:6px;object-fit:cover;flex:none}.devtab-row-main{flex:1;min-width:0}.devtab-row-name{font-weight:600}.devtab-row-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.devtab-session-count{flex:none;font-size:12px;font-weight:600;color:var(--accent);background:#7be24f1f;border:1px solid rgba(123,226,79,.35);border-radius:999px;padding:2px 8px}.devtab-session-count.clickable{cursor:pointer}.devtab-session-count.clickable:hover{background:#7be24f40}.build-chip{flex:none;font-size:12px;font-weight:600;color:#ffd23d;background:#ffd23d1a;border:1px solid rgba(255,210,61,.35);border-radius:999px;padding:2px 8px;white-space:nowrap}.modal-head{display:flex;align-items:center;justify-content:space-between}.modal-head h3{margin:0}.sessions-modal{width:520px;display:flex;flex-direction:column;gap:8px}.session-row{display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;padding:8px 10px}.session-row-main{flex:1;min-width:0;cursor:pointer}.session-row-head{display:flex;align-items:baseline;gap:8px}.session-sid{font-weight:600;font-family:ui-monospace,monospace;font-size:13px}.session-row-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.session-new{align-self:flex-start}.settings{width:560px}.settings-panel{display:flex;flex-direction:column;gap:6px}.select{font:inherit;width:100%;background:var(--bg);border:1px solid var(--border);color:var(--text);padding:9px 11px;border-radius:8px}.select:focus{outline:none;border-color:var(--accent)}.theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px;margin-top:8px}.theme-swatch{display:flex;align-items:center;gap:8px;padding:8px;text-align:left;border:1px solid var(--border);border-radius:8px;cursor:pointer;font-family:inherit}.theme-swatch.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.theme-swatch .sw{width:22px;height:22px;border-radius:6px;flex:none}.theme-swatch .sw-name{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobiledev{display:flex;flex-direction:column;gap:14px}.mobiledev-status{font-size:15px}.mobiledev-status.active strong{color:var(--accent)}.mobiledev-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.mobiledev-card{display:flex;align-items:center;gap:12px;text-align:left;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:14px;cursor:pointer;font-family:inherit;color:var(--text);font-size:14px}.mobiledev-card:hover:not(:disabled){border-color:var(--accent-hover)}.mobiledev-card.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.mobiledev-card:disabled{opacity:.7;cursor:wait}.mobiledev-icon{width:34px;height:34px;border-radius:8px;object-fit:cover;flex:none}.mobiledev-card-main{flex:1;min-width:0}.mobiledev-card-name{font-weight:600;font-size:15px}.mobiledev-card-sub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobiledev-check{flex:none;font-size:12px;font-weight:600;color:var(--accent);background:#7be24f1f;border:1px solid rgba(123,226,79,.35);border-radius:999px;padding:2px 8px}.mobiledev-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.callpage{display:flex;flex-direction:column;min-height:calc(100vh - 130px)}.call-idle{display:flex;flex-direction:column;align-items:center;gap:18px;text-align:center;margin-top:8vh}.call-project{font-size:17px}.call-project strong{color:var(--accent)}.call-big{font-size:22px;padding:20px 34px;border-radius:999px}.call-live{display:flex;flex-direction:column;gap:12px;flex:1;min-height:0}.call-head{display:flex;align-items:center;gap:10px}.call-head-main{flex:1;min-width:0}.call-title{font-weight:600;font-size:17px}.call-feed{flex:1;min-height:200px;max-height:calc(100vh - 300px);overflow-y:auto;display:flex;flex-direction:column;gap:8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px}.call-bubble{align-self:flex-start;max-width:88%;background:var(--surface-2);border:1px solid var(--border);border-radius:14px 14px 14px 4px;padding:9px 13px;font-size:15px;line-height:1.45}.call-bubble.user{align-self:flex-end;background:#7be24f1a;border-color:#7be24f59;border-radius:14px 14px 4px}.call-bubble.user.interim{opacity:.6}.call-bubble.question{border-color:var(--red);background:#e23b5a14}.call-hint{text-align:center}@media (max-width: 640px){.search,.topbar-right .muted{display:none}.content{padding:14px 12px 40px}}.mictest{display:flex;flex-direction:column;gap:14px}.mictest-caps{display:flex;flex-direction:column;gap:6px;font-size:14px}.mictest-cap{display:flex;justify-content:space-between;gap:14px}.mictest-cap code{text-align:right;word-break:break-all}.mictest-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.mictest-big{font-size:20px;padding:18px 26px;border-radius:12px}.mictest-audio{height:54px}.mictest-meter{height:26px;border:1px solid var(--border);border-radius:999px;overflow:hidden;background:var(--bg);margin-top:8px}.mictest-meter-fill{height:100%;background:linear-gradient(90deg,var(--accent),var(--danger));transition:width .05s linear}.mictest-log{margin:0;white-space:pre-wrap;word-break:break-all;font-family:ui-monospace,monospace;font-size:13px;min-height:80px}.clearall-modal{width:480px;display:flex;flex-direction:column;gap:12px;border-color:var(--danger)}.clearall-warning{line-height:1.5;margin:0}.clearall-warning strong{color:var(--danger)}.clearall-actions{display:flex;justify-content:flex-end;gap:8px}.console-pane .xterm-viewport::-webkit-scrollbar{width:10px}.console-pane .xterm-viewport::-webkit-scrollbar-track{background:transparent}.console-pane .xterm-viewport::-webkit-scrollbar-thumb{background:#3a4a3a;border-radius:999px;border:2px solid transparent;background-clip:padding-box}.console-pane .xterm-viewport::-webkit-scrollbar-thumb:hover{background:var(--accent-hover);border:2px solid transparent;background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:grid;place-items:center;padding:20px;z-index:50}.modal{width:420px;max-width:100%;display:flex;flex-direction:column;gap:12px}.modal h3{margin:0 0 4px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}
