import{as as e}from"./c4b350ac1-KLFM4jkb.js";function t(e){return e>=90?"critical":e>=75?"warning":"normal"}const r={normal:"bg-fill-accent",warning:"bg-fill-warning",critical:"bg-fill-danger"},n={normal:e.fill.accent.cssVar,warning:e.fill.warning.cssVar,critical:e.fill.danger.cssVar};function i(e){return r[e]}e.text.accent.cssVar,e.text.warning.cssVar,e.text.danger.cssVar;const a={normal:"accent",warning:"warning",critical:"danger"};function l(e,r){return a[n=r,"normal"===n||"warning"===n||"critical"===n?r:t(e)];var n}function s(e){return n[e]}
/**
 * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
 * @license MIT
 *
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * @license MIT
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 */const o=Object.freeze(Object.defineProperty({__proto__:null,FitAddon:class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let t=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,r=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(r.getPropertyValue("height")),i=Math.max(0,parseInt(r.getPropertyValue("width"))),a=window.getComputedStyle(this._terminal.element),l=n-(parseInt(a.getPropertyValue("padding-top"))+parseInt(a.getPropertyValue("padding-bottom"))),s=i-(parseInt(a.getPropertyValue("padding-right"))+parseInt(a.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(s/e.css.cell.width)),rows:Math.max(1,Math.floor(l/e.css.cell.height))}}}},Symbol.toStringTag,{value:"Module"}));export{s as a,i as b,t as c,o as d,l as u};
