/**
 * 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}.cb-container{display:flex;flex-direction:column;height:100%;background-color:#fff;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,system-ui,sans-serif;font-size:14px;color:#1a1a1a}.cb-header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px;border-bottom:1px solid #e5e7eb;background:#fff;flex-shrink:0;min-height:40px}.cb-header-left{display:flex;align-items:center;gap:8px}.cb-header-tab{font-size:13px;font-weight:600;color:#374151}.cb-header-right{display:flex;align-items:center;gap:8px}.cb-header-btn{background:none;border:none;color:#9ca3af;font-size:12px;cursor:pointer;padding:4px 8px;border-radius:4px;transition:color .15s}.cb-header-btn:hover{color:#6b7280;background:#f3f4f6}.cb-toggle-btn{background:#0000000f;border:1px solid rgba(0,0,0,.08);color:#6b7280;font-size:13px;cursor:pointer;padding:4px 10px;border-radius:6px;transition:all .15s;-webkit-user-select:none;user-select:none}.cb-toggle-btn:hover{background:#0000001a;color:#374151}.cb-messages{flex:1;overflow-y:auto;padding:16px 0;scroll-behavior:smooth;-webkit-overflow-scrolling:touch}.cb-welcome{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 24px 24px;text-align:center}.cb-welcome-icon{width:56px;height:56px;border-radius:16px;background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;font-size:28px;font-weight:700;display:flex;align-items:center;justify-content:center;margin-bottom:16px;box-shadow:0 4px 16px #7c3aed40}.cb-welcome-title{margin:0 0 4px;font-size:20px;font-weight:700;color:#111827}.cb-welcome-subtitle{margin:0 0 24px;font-size:13px;color:#9ca3af}.cb-suggestions{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;max-width:360px}.cb-suggestion-btn{background:#f3f4f6;border:1px solid #e5e7eb;border-radius:16px;padding:8px 16px;font-size:13px;color:#374151;cursor:pointer;transition:all .15s;white-space:nowrap}.cb-suggestion-btn:hover{background:#e5e7eb;border-color:#d1d5db}.cb-message-row{display:flex;padding:4px 16px;animation:cbFadeIn .2s ease-out}.cb-row-user{justify-content:flex-end}.cb-row-assistant{justify-content:flex-start}@keyframes cbFadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cb-bubble{max-width:75%;padding:10px 14px;border-radius:18px;font-size:14px;line-height:1.6;word-wrap:break-word;overflow-wrap:break-word}.cb-bubble-user{background:linear-gradient(135deg,#7c3aed,#6366f1);color:#fff;border-bottom-right-radius:6px}.cb-bubble-assistant{background:#f3f4f6;color:#1f2937;border-bottom-left-radius:6px;border:1px solid #e5e7eb}.cb-bubble-user .cb-bubble-text{white-space:pre-wrap}.cb-bubble-time{font-size:10px;opacity:.5;margin-top:4px;text-align:right}.cb-bubble-loading{padding:8px 18px;min-width:40px;display:flex;align-items:center;justify-content:center}.cb-dot-pulse{font-size:20px;letter-spacing:4px;color:#9ca3af;animation:cbDotPulse 1.4s infinite}@keyframes cbDotPulse{0%,20%{opacity:.2}50%{opacity:1}80%,to{opacity:.2}}.cb-input-area{flex-shrink:0;border-top:1px solid #e5e7eb;background:#f7f7f8;padding:10px 16px 8px}.cb-input-row{display:flex;align-items:flex-end;gap:8px;background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:6px 8px;transition:border-color .15s}.cb-input-row:focus-within{border-color:#7c3aed;box-shadow:0 0 0 3px #7c3aed14}.cb-input{flex:1;border:none;outline:none;resize:none;font-size:14px;line-height:1.5;font-family:inherit;color:#1f2937;padding:4px 6px;max-height:120px;background:transparent}.cb-input::placeholder{color:#9ca3af}.cb-input:disabled{opacity:.6}.cb-send-btn{width:32px;height:32px;border-radius:8px;border:none;background:#e5e7eb;color:#9ca3af;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .15s}.cb-send-btn.cb-send-active{background:#7c3aed;color:#fff}.cb-send-btn.cb-send-active:hover{background:#6d28d9}.cb-send-btn:disabled{cursor:default}.cb-input-hint{margin-top:6px;font-size:11px;color:#9ca3af;text-align:center}@media (max-width: 1024px){.cb-bubble{max-width:85%;font-size:15px;padding:10px 14px}.cb-header{padding:6px 12px;min-height:38px}.cb-messages{padding:12px 0}.cb-message-row{padding:4px 10px}.cb-input-area{padding:8px 10px 6px}.cb-input{font-size:16px}.cb-send-btn{width:36px;height:36px;border-radius:10px}.cb-toggle-btn{padding:4px 8px;font-size:12px}.cb-suggestions{max-width:100%;padding:0 8px}.cb-suggestion-btn{font-size:14px;padding:10px 18px}}.cb-bubble-assistant .cb-bubble-text>*:first-child{margin-top:0}.cb-bubble-assistant .cb-bubble-text>*:last-child{margin-bottom:0}.cb-bubble-assistant .cb-bubble-text p{margin:0 0 .5em;line-height:1.6}.cb-bubble-assistant .cb-bubble-text h1,.cb-bubble-assistant .cb-bubble-text h2,.cb-bubble-assistant .cb-bubble-text h3{font-size:1em;font-weight:600;margin:.8em 0 .3em}.cb-bubble-assistant .cb-bubble-text ul,.cb-bubble-assistant .cb-bubble-text ol{margin:.3em 0 .5em;padding-left:1.4em}.cb-bubble-assistant .cb-bubble-text li{margin:.15em 0;line-height:1.55}.cb-bubble-assistant .cb-bubble-text strong{font-weight:600}.cb-bubble-assistant .cb-bubble-text em{font-style:italic}.cb-bubble-assistant .cb-bubble-text code{font-family:JetBrains Mono,Fira Code,Menlo,monospace;font-size:.85em;background:#00000012;border-radius:3px;padding:.1em .35em}.cb-bubble-assistant .cb-bubble-text pre{background:#0000000f;border-radius:6px;padding:.7em .9em;overflow-x:auto;margin:.5em 0}.cb-bubble-assistant .cb-bubble-text pre code{background:none;padding:0;font-size:.82em}.cb-bubble-assistant .cb-bubble-text blockquote{border-left:3px solid rgba(0,0,0,.15);margin:.4em 0;padding-left:.8em;color:#0009}.cb-bubble-assistant .cb-bubble-text hr{border:none;border-top:1px solid rgba(0,0,0,.12);margin:.6em 0}.cb-bubble-assistant .cb-bubble-text a{color:#5b5ef4;text-decoration:underline}.cb-bubble-assistant .cb-bubble-text table{border-collapse:collapse;width:100%;margin:.5em 0;font-size:.88em;overflow-x:auto;display:block}.cb-bubble-assistant .cb-bubble-text th,.cb-bubble-assistant .cb-bubble-text td{border:1px solid rgba(0,0,0,.15);padding:5px 10px;text-align:left;white-space:nowrap}.cb-bubble-assistant .cb-bubble-text th{background:#0000000d;font-weight:600}.cb-bubble-assistant .cb-bubble-text tr:nth-child(2n) td{background:#00000005}.cb-upload-badges{display:flex;flex-wrap:wrap;gap:4px;padding:6px 12px 2px}.cb-upload-badge{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:3px 10px;border-radius:12px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transition:background .2s,color .2s}.cb-upload-badge.cb-upload-uploading{background:#eab3081f;color:#92400e;border:1px solid rgba(234,179,8,.3)}.cb-upload-badge.cb-upload-done{background:#22c55e1f;color:#15803d;border:1px solid rgba(34,197,94,.3)}.cb-upload-badge.cb-upload-error{background:#ef44441a;color:#b91c1c;border:1px solid rgba(239,68,68,.25)}.cb-drag-over{outline:2px dashed #7c3aed;outline-offset:-4px;border-radius:12px;background:#7c3aed0a}.cb-attach-btn{flex-shrink:0;width:30px;height:30px;border:none;background:none;cursor:pointer;font-size:16px;display:flex;align-items:center;justify-content:center;border-radius:6px;opacity:.55;transition:opacity .15s,background .15s;padding:0}.cb-attach-btn:hover{opacity:1;background:#0000000f}
