/**
 * 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-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{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.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}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{color-scheme:dark;--ctp-base: #1e1e2e;--ctp-mantle: #181825;--ctp-crust: #11111b;--ctp-surface0: #313244;--ctp-surface1: #45475a;--ctp-overlay0: #6c7086;--ctp-subtext0: #a6adc8;--ctp-text: #cdd6f4;--ctp-lavender: #b4befe;--ctp-blue: #89b4fa;--ctp-mauve: #cba6f7;--ctp-green: #a6e3a1;--ctp-red: #f38ba8;--ctp-peach: #fab387;--ctp-yellow: #f9e2af;--bg: var(--ctp-base);--panel: var(--ctp-mantle);--border: var(--ctp-surface0);--text: var(--ctp-text);--muted: var(--ctp-subtext0);--accent: var(--ctp-blue);--danger: var(--ctp-red);--ok: var(--ctp-green);font-family:Inter,system-ui,-apple-system,sans-serif;line-height:1.45}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:var(--ctp-crust);color:var(--text)}.app-shell{min-height:100vh;display:flex;flex-direction:column}.app-header{display:flex;align-items:baseline;gap:.75rem;padding:.75rem 1.25rem;border-bottom:1px solid var(--border);background:var(--panel)}.logo{font-weight:700;letter-spacing:.02em}.tag{font-size:.8rem;color:var(--muted)}.app-main{flex:1;min-height:0}.panel{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:1rem 1.25rem}label{display:block;font-size:.8rem;color:var(--muted);margin-bottom:.35rem}input,textarea{width:100%;border-radius:6px;border:1px solid var(--border);background:var(--ctp-crust);color:var(--text);padding:.55rem .65rem;font:inherit}textarea{min-height:88px;resize:vertical}.field{margin-bottom:1rem}.row{display:flex;gap:.75rem;flex-wrap:wrap}.row>*{flex:1;min-width:140px}button{font:inherit;cursor:pointer;border-radius:6px;border:1px solid var(--border);background:var(--ctp-surface1);color:var(--text);padding:.55rem 1rem}button.primary{background:#454c8a;border-color:var(--ctp-blue);color:var(--ctp-base)}button.primary:not(:disabled){background:var(--ctp-blue);color:var(--ctp-base)}button.primary:disabled{opacity:.55;cursor:not-allowed}button.ghost{background:transparent}.hint{font-size:.8rem;color:var(--muted);margin-top:.35rem}.error{color:var(--danger);font-size:.9rem;margin-top:.5rem}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#00000073;z-index:100;display:flex;align-items:center;justify-content:center}.modal-panel{max-width:480px;width:90vw;max-height:80vh;overflow:auto}.tabbar{display:flex;gap:.25rem;margin:-.25rem 0 .85rem;padding-bottom:.5rem;border-bottom:1px solid var(--border)}.tab{background:transparent;border:1px solid transparent;color:var(--muted);padding:.35rem .7rem;border-radius:6px 6px 0 0;font-size:.85rem;cursor:pointer}.tab:hover{color:var(--text)}.tab.active{color:var(--text);border-color:var(--border);border-bottom-color:var(--panel);background:var(--panel);position:relative;bottom:-1px}.ok{color:var(--ok);font-size:.85rem}.workspace{display:grid;grid-template-columns:minmax(220px,280px) 1fr;height:calc(100vh - 52px);min-height:0}.workspace-main{display:flex;flex-direction:column;min-height:0;min-width:0}.terminal-panel{display:flex;flex-direction:column;flex:0 0 280px;min-height:180px;max-height:45vh;border-top:1px solid var(--border);background:#181825}.terminal-panel-header{display:flex;align-items:center;justify-content:space-between;padding:.35rem .75rem;font-size:.8rem;color:var(--muted);border-bottom:1px solid var(--border);flex-shrink:0}.terminal-panel-title{font-weight:600;color:var(--text)}.terminal-panel-status{font-size:.75rem}.terminal-host{flex:1;min-height:0;position:relative;overflow:hidden;padding:0 .5rem .5rem}.terminal-host .xterm{position:absolute;top:0;right:0;bottom:0;left:0;height:auto!important}.terminal-host .xterm-viewport{overflow-y:auto!important}.sidebar{border-right:1px solid var(--border);background:var(--panel);display:flex;flex-direction:column;min-height:0}.sidebar-header{padding:.65rem .85rem;border-bottom:1px solid var(--border);font-size:.85rem;color:var(--muted)}.tree{flex:1;overflow:auto;padding:.35rem 0;font-size:.88rem}.tree-row{display:flex;align-items:center;gap:.25rem;padding:.2rem .5rem .2rem calc(.5rem + var(--depth, 0) * 12px);cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap}.tree-row:hover{background:var(--ctp-surface0)}.tree-row.selected{background:#45475a;box-shadow:inset 2px 0 0 0 var(--ctp-mauve)}.tree-row.open-in-tab{opacity:.92;box-shadow:inset 2px 0 0 0 var(--ctp-overlay0)}.tree-row .chevron{width:1rem;text-align:center;color:var(--muted);flex-shrink:0}.tree-row .name{overflow:hidden;text-overflow:ellipsis}.editor-pane{display:flex;flex-direction:column;flex:1;min-height:0;background:var(--ctp-base)}.editor-toolbar{display:flex;align-items:center;gap:.75rem;padding:.45rem .75rem;border-bottom:1px solid var(--border);font-size:.82rem;color:var(--muted);flex-shrink:0;background:var(--ctp-base)}.editor-toolbar .path{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);font-family:JetBrains Mono,ui-monospace,monospace}.editor-tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;flex-shrink:0;background:var(--ctp-mantle);border-bottom:1px solid var(--border);min-height:38px;align-items:flex-end}.editor-tab{display:flex;align-items:center;gap:.25rem;max-width:200px;padding:.45rem .35rem .45rem .65rem;cursor:pointer;font-size:.8rem;color:var(--muted);border-right:1px solid var(--border);border-bottom:2px solid transparent;margin-bottom:-1px;-webkit-user-select:none;user-select:none}.editor-tab:hover{color:var(--text);background:var(--ctp-surface0)}.editor-tab.active{color:var(--text);background:var(--ctp-base);border-bottom-color:var(--ctp-mauve)}.editor-tab-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-flex;align-items:center;gap:.35rem}.editor-tab-dirty{width:7px;height:7px;border-radius:50%;background:var(--ctp-peach);flex-shrink:0}.editor-tab-close{padding:0 .35rem;margin:0;border:none;background:transparent;color:var(--muted);font-size:1.1rem;line-height:1;border-radius:4px}.editor-tab-close:hover{color:var(--ctp-red);background:var(--ctp-surface0)}.editor-banner{padding:.4rem .75rem;flex-shrink:0}.editor-cm-host{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}.editor-tab-pane{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;min-height:0;visibility:hidden;pointer-events:none}.editor-tab-pane.active{visibility:visible;pointer-events:auto}.editor-cm-host>.editor-empty,.editor-cm-host>.cm-theme-dark{flex:1;min-height:0}.editor-cm-host .cm-theme-dark{display:flex;flex-direction:column}.editor-cm-host .cm-editor{flex:1;min-height:0}.editor-cm-host .cm-scroller{min-height:0!important}.editor-cm-wrap{flex:1;min-height:0;display:flex;flex-direction:column;position:relative}.editor-cm-wrap .editor-codemirror{flex:1;min-height:0}.editor-connecting-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;display:flex;align-items:center;justify-content:center;background:#1e1e2ed9;color:var(--muted);font-size:.9rem;pointer-events:none}.context-menu{position:fixed;z-index:1000;list-style:none;margin:0;padding:.25rem 0;min-width:12rem;background:#1e1e2e;border:1px solid rgba(180,190,254,.25);border-radius:6px;box-shadow:0 8px 24px #00000073}.context-menu li{margin:0}.context-menu-item{display:block;width:100%;background:none;border:none;color:var(--fg, #cdd6f4);text-align:left;padding:.4rem .8rem;font:inherit;cursor:pointer}.context-menu-item:hover{background:#b4befe1f}.context-menu-item.danger{color:#f38ba8}.recent-connections{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}.recent-connections li{display:flex;align-items:stretch;gap:.35rem}.recent-reuse{flex:1;display:flex;flex-direction:column;align-items:flex-start;text-align:left;background:#6c70861f;color:var(--fg, #cdd6f4);border:1px solid rgba(108,112,134,.3);border-radius:6px;padding:.45rem .6rem;cursor:pointer;font:inherit}.recent-reuse:hover{background:#6c708638;border-color:#b4befe66}.recent-label{font-weight:600;font-size:.9rem}.recent-target{font-size:.78rem;color:var(--muted);font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace)}.recent-forget{align-self:stretch;padding:.25rem .6rem;font-size:.8rem}.cm-ySelectionInfo{opacity:1!important;font-family:var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace)!important;font-size:.7rem!important;font-weight:600!important;padding:1px 4px!important;border-radius:3px;color:#1e1e2e!important;pointer-events:none}.editor-empty{display:flex;align-items:center;justify-content:center;padding:2rem;color:var(--muted);font-size:.9rem}.editor-empty-error{color:var(--danger);text-align:center;padding:1.5rem}.connection-page{max-width:560px;margin:2rem auto;padding:0 1rem}
