(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory(require("@angular/core"), require("@angular/platform-browser"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-settings"), require("rxjs"), require("fs"), require("readline"), require("@angular/animations"), require("path"), require("os"), require("stream"), require("@angular/common"));
	else if(typeof define === 'function' && define.amd)
		define(["@angular/core", "@angular/platform-browser", "@angular/forms", "@ng-bootstrap/ng-bootstrap", "ngx-toastr", "tabby-core", "tabby-settings", "rxjs", "fs", "readline", "@angular/animations", "path", "os", "stream", "@angular/common"], factory);
	else {
		var a = typeof exports === 'object' ? factory(require("@angular/core"), require("@angular/platform-browser"), require("@angular/forms"), require("@ng-bootstrap/ng-bootstrap"), require("ngx-toastr"), require("tabby-core"), require("tabby-settings"), require("rxjs"), require("fs"), require("readline"), require("@angular/animations"), require("path"), require("os"), require("stream"), require("@angular/common")) : factory(root["@angular/core"], root["@angular/platform-browser"], root["@angular/forms"], root["@ng-bootstrap/ng-bootstrap"], root["ngx-toastr"], root["tabby-core"], root["tabby-settings"], root["rxjs"], root["fs"], root["readline"], root["@angular/animations"], root["path"], root["os"], root["stream"], root["@angular/common"]);
		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
	}
})(global, (__WEBPACK_EXTERNAL_MODULE__8900__, __WEBPACK_EXTERNAL_MODULE__3046__, __WEBPACK_EXTERNAL_MODULE__7161__, __WEBPACK_EXTERNAL_MODULE__7571__, __WEBPACK_EXTERNAL_MODULE__7170__, __WEBPACK_EXTERNAL_MODULE__315__, __WEBPACK_EXTERNAL_MODULE__6663__, __WEBPACK_EXTERNAL_MODULE__3832__, __WEBPACK_EXTERNAL_MODULE__2089__, __WEBPACK_EXTERNAL_MODULE__2908__, __WEBPACK_EXTERNAL_MODULE__8781__, __WEBPACK_EXTERNAL_MODULE__3056__, __WEBPACK_EXTERNAL_MODULE__9044__, __WEBPACK_EXTERNAL_MODULE__3978__, __WEBPACK_EXTERNAL_MODULE__5848__) => {
return /******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ 2045:
/*!*************************************************************!*\
  !*** ./src/components/appearanceSettingsTab.component.scss ***!
  \*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./appearanceSettingsTab.component.scss */ 408);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 3191:
/*!*******************************************************!*\
  !*** ./src/components/baseTerminalTab.component.scss ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./baseTerminalTab.component.scss */ 6116);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 1276:
/*!***************************************************!*\
  !*** ./src/components/colorPicker.component.scss ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorPicker.component.scss */ 4643);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 6975:
/*!**********************************************************!*\
  !*** ./src/components/colorSchemePreview.component.scss ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorSchemePreview.component.scss */ 4952);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 6468:
/*!**************************************************************!*\
  !*** ./src/components/colorSchemeSettingsTab.component.scss ***!
  \**************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./colorSchemeSettingsTab.component.scss */ 5);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 6653:
/*!***************************************************!*\
  !*** ./src/components/searchPanel.component.scss ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./searchPanel.component.scss */ 6781);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 4820:
/*!*******************************************************!*\
  !*** ./src/components/terminalToolbar.component.scss ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {


        var result = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./terminalToolbar.component.scss */ 4070);

        if (result && result.__esModule) {
            result = result.default;
        }

        if (typeof result === "string") {
            module.exports = result;
        } else {
            module.exports = result.toString();
        }
    

/***/ }),

/***/ 1066:
/*!************************************************************!*\
  !*** ./src/components/appearanceSettingsTab.component.pug ***!
  \************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/appearanceSettingsTab.component.pug */ 2229);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 8872:
/*!******************************************************!*\
  !*** ./src/components/baseTerminalTab.component.pug ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/baseTerminalTab.component.pug */ 9290);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1967:
/*!**************************************************!*\
  !*** ./src/components/colorPicker.component.pug ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/colorPicker.component.pug */ 8821);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 5421:
/*!*********************************************************!*\
  !*** ./src/components/colorSchemePreview.component.pug ***!
  \*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/colorSchemePreview.component.pug */ 2064);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 4855:
/*!*************************************************************!*\
  !*** ./src/components/colorSchemeSettingsTab.component.pug ***!
  \*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/colorSchemeSettingsTab.component.pug */ 3267);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 9848:
/*!***********************************************************!*\
  !*** ./src/components/loginScriptsSettings.component.pug ***!
  \***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/loginScriptsSettings.component.pug */ 7851);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 5107:
/*!**************************************************!*\
  !*** ./src/components/searchPanel.component.pug ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/searchPanel.component.pug */ 2445);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 650:
/*!***************************************************************!*\
  !*** ./src/components/streamProcessingSettings.component.pug ***!
  \***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/streamProcessingSettings.component.pug */ 56);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 8739:
/*!**********************************************************!*\
  !*** ./src/components/terminalSettingsTab.component.pug ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/terminalSettingsTab.component.pug */ 1105);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 1959:
/*!******************************************************!*\
  !*** ./src/components/terminalToolbar.component.pug ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var req = __webpack_require__(/*! !!../node_modules/pug-loader/index.js!./src/components/terminalToolbar.component.pug */ 2456);
module.exports = (req['default'] || req).apply(req, [])

/***/ }),

/***/ 408:
/*!********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/appearanceSettingsTab.component.scss ***!
  \********************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "color-scheme-preview{flex-shrink:0;margin-bottom:20px}textarea{font-family:'Source Code Pro', monospace;min-height:120px}\n", "",{"version":3,"sources":["webpack://./src/components/appearanceSettingsTab.component.scss"],"names":[],"mappings":"AAAA,qBACI,aAAc,CACd,kBAAmB,CACtB,SAGG,wCAAyC,CACzC,gBAAiB","sourcesContent":["color-scheme-preview {\r\n    flex-shrink: 0;\r\n    margin-bottom: 20px;\r\n}\r\n\r\ntextarea {\r\n    font-family: 'Source Code Pro', monospace;\r\n    min-height: 120px;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 6116:
/*!**************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/baseTerminalTab.component.scss ***!
  \**************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{flex:auto;display:flex;flex-direction:column;position:relative}:host>.content{flex:auto;position:relative;display:block;overflow:hidden;margin:15px;transition:opacity ease-out 0.25s;opacity:0}:host>.content div[style]:last-child{background:black !important;color:white !important}:host>terminal-toolbar{position:absolute;top:0;left:0;right:0;z-index:4;opacity:0;transition:0.25s opacity;will-change:transform;transform:translate(0, -100px);transition:0.25s transform ease-out;height:40px}:host.toolbar-revealed>terminal-toolbar,:host.toolbar-pinned>terminal-toolbar{opacity:1;transform:translate(0, 0)}:host>.toolbar-pin-button{position:absolute;right:34px;top:5px;z-index:4;background:#00000047}:host.toolbar-pinned>.terminal-toolbar-spacer{width:100%;height:40px}:host-context(.with-title-inset){padding-top:20px}:host-context(.with-title-inset) terminal-toolbar{padding-left:90px}\n", "",{"version":3,"sources":["webpack://./src/components/baseTerminalTab.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAU,CACV,YAAa,CACb,qBAAsB,CAEtB,iBAAkB,CALtB,eAQQ,SAAU,CACV,iBAAkB,CAClB,aAAc,CACd,eAAgB,CAChB,WAAY,CACZ,iCAAkC,CAClC,SAAU,CAdlB,qCAiBY,2BAA4B,CAC5B,sBAAuB,CAlBnC,uBAyBQ,iBAAkB,CAClB,KAAM,CACN,MAAO,CACP,OAAQ,CACR,SAAU,CAEV,SAAU,CACV,wBAAyB,CACzB,qBAAsB,CACtB,8BAA+B,CAC/B,mCAAoC,CACpC,WAdgB,CAtBxB,8EAyCY,SAAU,CACV,yBAA0B,CA1CtC,0BA+CQ,iBAAkB,CAClB,UAAW,CACX,OAAQ,CACR,SAAU,CACV,oBAAqB,CAnD7B,8CAuDQ,UAAW,CACX,WAlCgB,CAmCnB,iCAID,gBAAiB,CADrB,kDAIQ,iBAAkB","sourcesContent":[":host {\r\n    flex: auto;\r\n    display: flex;\r\n    flex-direction: column;\r\n    // overflow: hidden;\r\n    position: relative;\r\n\r\n    &> .content {\r\n        flex: auto;\r\n        position: relative;\r\n        display: block;\r\n        overflow: hidden;\r\n        margin: 15px;\r\n        transition: opacity ease-out 0.25s;\r\n        opacity: 0;\r\n\r\n        div[style]:last-child {\r\n            background: black !important;\r\n            color: white !important;\r\n        }\r\n    }\r\n\r\n    $toolbarHeight: 40px;\r\n\r\n    > terminal-toolbar {\r\n        position: absolute;\r\n        top: 0;\r\n        left: 0;\r\n        right: 0;\r\n        z-index: 4;\r\n\r\n        opacity: 0;\r\n        transition: 0.25s opacity;\r\n        will-change: transform;\r\n        transform: translate(0, -100px);\r\n        transition: 0.25s transform ease-out;\r\n        height: $toolbarHeight;\r\n    }\r\n\r\n    &.toolbar-revealed, &.toolbar-pinned {\r\n        > terminal-toolbar {\r\n            opacity: 1;\r\n            transform: translate(0, 0);\r\n        }\r\n    }\r\n\r\n    > .toolbar-pin-button {\r\n        position: absolute;\r\n        right: 34px;\r\n        top: 5px;\r\n        z-index: 4;\r\n        background: #00000047;\r\n    }\r\n\r\n    &.toolbar-pinned > .terminal-toolbar-spacer {\r\n        width: 100%;\r\n        height: $toolbarHeight;\r\n    }\r\n}\r\n\r\n:host-context(.with-title-inset) {\r\n    padding-top: 20px;\r\n\r\n    terminal-toolbar {\r\n        padding-left: 90px;\r\n    }\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 4643:
/*!**********************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorPicker.component.scss ***!
  \**********************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "div{width:32px;height:32px;box-shadow:0 1px 1px rgba(0,0,0,0.5);border:none;margin:5px 10px 5px 0;border-radius:2px;text-align:center;font-weight:bold;font-size:17px;display:inline-block;color:#fff;line-height:31px;text-shadow:0 1px 1px rgba(0,0,0,0.5)}\n", "",{"version":3,"sources":["webpack://./src/components/colorPicker.component.scss"],"names":[],"mappings":"AAAA,IACI,UAAW,CACX,WAAY,CACZ,oCAAoC,CACpC,WAAY,CACZ,qBAAsB,CACtB,iBAAkB,CAClB,iBAAkB,CAClB,gBAAiB,CACjB,cAAe,CACf,oBAAqB,CACrB,UAAW,CACX,gBAAiB,CACjB,qCAAqC","sourcesContent":["div {\r\n    width: 32px;\r\n    height: 32px;\r\n    box-shadow: 0 1px 1px rgba(0,0,0,.5);\r\n    border: none;\r\n    margin: 5px 10px 5px 0;\r\n    border-radius: 2px;\r\n    text-align: center;\r\n    font-weight: bold;\r\n    font-size: 17px;\r\n    display: inline-block;\r\n    color: #fff;\r\n    line-height: 31px;\r\n    text-shadow: 0 1px 1px rgba(0,0,0,.5);\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 4952:
/*!*****************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemePreview.component.scss ***!
  \*****************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{display:block}.preview{margin-top:10px;margin-left:10px;padding:5px 10px;border-radius:4px;overflow:hidden}.preview span{white-space:pre}\n", "",{"version":3,"sources":["webpack://./src/components/colorSchemePreview.component.scss"],"names":[],"mappings":"AAAA,MACI,aAAc,CACjB,SAGG,eAAgB,CAChB,gBAAiB,CACjB,gBAAiB,CACjB,iBAAkB,CAClB,eAAgB,CALpB,cAQQ,eAAgB","sourcesContent":[":host {\r\n    display: block;\r\n}\r\n\r\n.preview {\r\n    margin-top: 10px;\r\n    margin-left: 10px;\r\n    padding: 5px 10px;\r\n    border-radius: 4px;\r\n    overflow: hidden;\r\n\r\n    span {\r\n        white-space: pre;\r\n    }\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 5:
/*!*********************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/colorSchemeSettingsTab.component.scss ***!
  \*********************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ".head{flex:none}.body{overflow:auto;flex:auto;min-height:0}.swatch{width:10px;height:10px;border-radius:50%;margin-right:3px;margin-bottom:3px;box-shadow:0 1px 1px rgba(0,0,0,0.5)}.list-group-item color-scheme-preview{margin-left:14px}\n", "",{"version":3,"sources":["webpack://./src/components/colorSchemeSettingsTab.component.scss"],"names":[],"mappings":"AAAA,MACI,SAAU,CACb,MAGG,aAAc,CACd,SAAU,CACV,YAAa,CAChB,QAGG,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,gBAAiB,CACjB,iBAAkB,CAClB,oCAAuC,CAC1C,sCAGG,gBAAiB","sourcesContent":[".head {\r\n    flex: none;\r\n}\r\n\r\n.body {\r\n    overflow: auto;\r\n    flex: auto;\r\n    min-height: 0;\r\n}\r\n\r\n.swatch {\r\n    width: 10px;\r\n    height: 10px;\r\n    border-radius: 50%;\r\n    margin-right: 3px;\r\n    margin-bottom: 3px;\r\n    box-shadow: 0 1px 1px rgba(0, 0, 0, .5);\r\n}\r\n\r\n.list-group-item color-scheme-preview {\r\n    margin-left: 14px;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 6781:
/*!**********************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/searchPanel.component.scss ***!
  \**********************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{position:fixed;width:600px;max-width:80vw;right:40px;z-index:5;border-radius:0 0 5px 5px;background:rgba(0,0,0,0.95);border:1px solid rgba(0,0,0,0.5);border-top:0;display:flex}:host button{padding:0 6px;margin:4px 2px;flex-shrink:0}.result-counter{font-size:0.7rem;opacity:.5}\n", "",{"version":3,"sources":["webpack://./src/components/searchPanel.component.scss"],"names":[],"mappings":"AAAA,MACI,cAAe,CACf,WAAY,CACZ,cAAe,CACf,UAAW,CACX,SAAU,CACV,yBAA0B,CAC1B,2BAA8B,CAC9B,gCAAmC,CACnC,YAAa,CACb,YAAa,CAVjB,aAaQ,aAAc,CACd,cAAe,CACf,aAAc,CACjB,gBAID,gBAAiB,CACjB,UAAW","sourcesContent":[":host {\r\n    position: fixed;\r\n    width: 600px;\r\n    max-width: 80vw;\r\n    right: 40px;\r\n    z-index: 5;\r\n    border-radius: 0 0 5px 5px;\r\n    background: rgba(0, 0, 0, .95);\r\n    border: 1px solid rgba(0, 0, 0, .5);\r\n    border-top: 0;\r\n    display: flex;\r\n\r\n    button {\r\n        padding: 0 6px;\r\n        margin: 4px 2px;\r\n        flex-shrink: 0;\r\n    }\r\n}\r\n\r\n.result-counter {\r\n    font-size: 0.7rem;\r\n    opacity: .5;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 4070:
/*!**************************************************************************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!../node_modules/sass-loader/dist/cjs.js!./src/components/terminalToolbar.component.scss ***!
  \**************************************************************************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, ":host{background:#000000bf;padding:5px 15px 5px 15px;display:flex;z-index:3}.content{flex-grow:1;display:flex;align-items:center}.drag-handle{margin:0 10px 0 0;cursor:move;opacity:.3}::ng-deep .btn{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}\n", "",{"version":3,"sources":["webpack://./src/components/terminalToolbar.component.scss"],"names":[],"mappings":"AAAA,MACI,oBAAqB,CACrB,yBAA0B,CAC1B,YAAa,CACb,SAAU,CACb,SAGG,WAAY,CACZ,YAAa,CACb,kBAAmB,CACtB,aAGG,iBAAkB,CAClB,WAAY,CACZ,UAAW,CACd,eAGG,kBAAmB,CACnB,sBAAuB,CACvB,eAAgB","sourcesContent":[":host {\r\n    background: #000000bf;\r\n    padding: 5px 15px 5px 15px;\r\n    display: flex;\r\n    z-index: 3;\r\n}\r\n\r\n.content {\r\n    flex-grow: 1;\r\n    display: flex;\r\n    align-items: center;\r\n}\r\n\r\n.drag-handle {\r\n    margin: 0 10px 0 0;\r\n    cursor: move;\r\n    opacity: .3;\r\n}\r\n\r\n::ng-deep .btn {\r\n    white-space: nowrap;\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 8551:
/*!*********************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./node_modules/xterm/css/xterm.css ***!
  \*********************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
// Imports


var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
// Module
___CSS_LOADER_EXPORT___.push([module.id, "/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility,\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    z-index: 10;\n    color: transparent;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    opacity: 0.5;\n}\n\n.xterm-underline {\n    text-decoration: underline;\n}\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 7;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n", "",{"version":3,"sources":["webpack://./node_modules/xterm/css/xterm.css"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BE;;AAEF;;EAEE;;AAEF;IACI,YAAY;IACZ,kBAAkB;IAClB,iBAAiB;IACjB,qBAAqB;IACrB,yBAAyB;AAC7B;;AAEA;;IAEI,aAAa;AACjB;;AAEA;IACI,kBAAkB;IAClB,MAAM;IACN;;;MAGE;IACF,UAAU;AACd;;AAEA;IACI,UAAU;IACV,SAAS;IACT,SAAS;IACT,uFAAuF;IACvF,kBAAkB;IAClB,UAAU;IACV,aAAa;IACb,MAAM;IACN,QAAQ;IACR,SAAS;IACT,WAAW;IACX,sFAAsF;IACtF,mBAAmB;IACnB,gBAAgB;IAChB,YAAY;AAChB;;AAEA;IACI,uDAAuD;IACvD,gBAAgB;IAChB,WAAW;IACX,aAAa;IACb,kBAAkB;IAClB,mBAAmB;IACnB,UAAU;AACd;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,gFAAgF;IAChF,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,SAAS;AACb;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,OAAO;IACP,MAAM;AACV;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,qBAAqB;IACrB,kBAAkB;IAClB,kBAAkB;IAClB,MAAM;IACN,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI,oFAAoF;IACpF,eAAe;AACnB;;AAEA;;IAEI,eAAe;AACnB;;AAEA;IACI,0BAA0B;IAC1B,iBAAiB;AACrB;;AAEA;;IAEI,kBAAkB;IAClB,OAAO;IACP,MAAM;IACN,SAAS;IACT,QAAQ;IACR,WAAW;IACX,kBAAkB;AACtB;;AAEA;IACI,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,WAAW;IACX,gBAAgB;AACpB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,0BAA0B;AAC9B;;AAEA;IACI,6BAA6B;AACjC;;AAEA;CACC,UAAU;CACV,kBAAkB;AACnB;;AAEA;IACI,UAAU;IACV,kBAAkB;IAClB,MAAM;IACN,QAAQ;IACR,oBAAoB;AACxB;;AAEA;IACI,UAAU;IACV,kBAAkB;AACtB","sourcesContent":["/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * https://github.com/chjj/term.js\n * @license MIT\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n * Originally forked from (with the author's permission):\n *   Fabrice Bellard's javascript vt100 for jslinux:\n *   http://bellard.org/jslinux/\n *   Copyright (c) 2011 Fabrice Bellard\n *   The original design remains. The terminal itself\n *   has been extended to include xterm CSI codes, among\n *   other features.\n */\n\n/**\n *  Default styles for xterm.js\n */\n\n.xterm {\n    cursor: text;\n    position: relative;\n    user-select: none;\n    -ms-user-select: none;\n    -webkit-user-select: none;\n}\n\n.xterm.focus,\n.xterm:focus {\n    outline: none;\n}\n\n.xterm .xterm-helpers {\n    position: absolute;\n    top: 0;\n    /**\n     * The z-index of the helpers must be higher than the canvases in order for\n     * IMEs to appear on top.\n     */\n    z-index: 5;\n}\n\n.xterm .xterm-helper-textarea {\n    padding: 0;\n    border: 0;\n    margin: 0;\n    /* Move textarea out of the screen to the far left, so that the cursor is not visible */\n    position: absolute;\n    opacity: 0;\n    left: -9999em;\n    top: 0;\n    width: 0;\n    height: 0;\n    z-index: -5;\n    /** Prevent wrapping so the IME appears against the textarea at the correct position */\n    white-space: nowrap;\n    overflow: hidden;\n    resize: none;\n}\n\n.xterm .composition-view {\n    /* TODO: Composition position got messed up somewhere */\n    background: #000;\n    color: #FFF;\n    display: none;\n    position: absolute;\n    white-space: nowrap;\n    z-index: 1;\n}\n\n.xterm .composition-view.active {\n    display: block;\n}\n\n.xterm .xterm-viewport {\n    /* On OS X this is required in order for the scroll bar to appear fully opaque */\n    background-color: #000;\n    overflow-y: scroll;\n    cursor: default;\n    position: absolute;\n    right: 0;\n    left: 0;\n    top: 0;\n    bottom: 0;\n}\n\n.xterm .xterm-screen {\n    position: relative;\n}\n\n.xterm .xterm-screen canvas {\n    position: absolute;\n    left: 0;\n    top: 0;\n}\n\n.xterm .xterm-scroll-area {\n    visibility: hidden;\n}\n\n.xterm-char-measure-element {\n    display: inline-block;\n    visibility: hidden;\n    position: absolute;\n    top: 0;\n    left: -9999em;\n    line-height: normal;\n}\n\n.xterm.enable-mouse-events {\n    /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */\n    cursor: default;\n}\n\n.xterm.xterm-cursor-pointer,\n.xterm .xterm-cursor-pointer {\n    cursor: pointer;\n}\n\n.xterm.column-select.focus {\n    /* Column selection mode */\n    cursor: crosshair;\n}\n\n.xterm .xterm-accessibility,\n.xterm .xterm-message {\n    position: absolute;\n    left: 0;\n    top: 0;\n    bottom: 0;\n    right: 0;\n    z-index: 10;\n    color: transparent;\n}\n\n.xterm .live-region {\n    position: absolute;\n    left: -9999px;\n    width: 1px;\n    height: 1px;\n    overflow: hidden;\n}\n\n.xterm-dim {\n    opacity: 0.5;\n}\n\n.xterm-underline {\n    text-decoration: underline;\n}\n\n.xterm-strikethrough {\n    text-decoration: line-through;\n}\n\n.xterm-screen .xterm-decoration-container .xterm-decoration {\n\tz-index: 6;\n\tposition: absolute;\n}\n\n.xterm-decoration-overview-ruler {\n    z-index: 7;\n    position: absolute;\n    top: 0;\n    right: 0;\n    pointer-events: none;\n}\n\n.xterm-decoration-top {\n    z-index: 2;\n    position: relative;\n}\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 1637:
/*!************************************************************************!*\
  !*** ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css ***!
  \************************************************************************/
/***/ ((module, __webpack_exports__, __webpack_require__) => {

"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ 6991);
/* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ 9753);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! -!../../../node_modules/css-loader/dist/cjs.js!../../node_modules/xterm/css/xterm.css */ 8551);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ 3921);
/* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3__);
// Imports




var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! ../fonts/SourceCodePro.ttf */ 5351), __webpack_require__.b);
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
___CSS_LOADER_EXPORT___.i(_node_modules_css_loader_dist_cjs_js_node_modules_xterm_css_xterm_css__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z);
var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_3___default()(___CSS_LOADER_URL_IMPORT_0___);
// Module
___CSS_LOADER_EXPORT___.push([module.id, "@font-face {\r\n    font-family: \"monospace-fallback\";\r\n    src: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ") format(\"truetype\");\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar {\r\n    background: rgba(0, 0, 0, .125);\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar-thumb {\r\n    background: rgba(255, 255, 255, .25);\r\n}\r\n\r\n.xterm-decoration-overview-ruler {\r\n    right: 1px;\r\n    pointer-events: none;\r\n}\r\n\r\n.xterm-find-result-decoration {\r\n    box-sizing: content-box;\r\n\r\n    border-radius: 3px;\r\n    padding: 2px;\r\n    margin: -2px;\r\n    outline: 2px solid yellow;\r\n    backdrop-filter: contrast(2);\r\n}\r\n\r\n.xterm-find-active-result-decoration {\r\n    backdrop-filter: contrast(4);\r\n    outline-width: 2px !important;\r\n}\r\n", "",{"version":3,"sources":["webpack://./src/frontends/xterm.css"],"names":[],"mappings":"AAEA;IACI,iCAAiC;IACjC,+DAAuD;AAC3D;;AAEA;IACI,+BAA+B;AACnC;;AAEA;IACI,oCAAoC;AACxC;;AAEA;IACI,UAAU;IACV,oBAAoB;AACxB;;AAEA;IACI,uBAAuB;;IAEvB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,yBAAyB;IACzB,4BAA4B;AAChC;;AAEA;IACI,4BAA4B;IAC5B,6BAA6B;AACjC","sourcesContent":["@import url(\"../../node_modules/xterm/css/xterm.css\");\r\n\r\n@font-face {\r\n    font-family: \"monospace-fallback\";\r\n    src: url(../fonts/SourceCodePro.ttf) format(\"truetype\");\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar {\r\n    background: rgba(0, 0, 0, .125);\r\n}\r\n\r\n.xterm-viewport::-webkit-scrollbar-thumb {\r\n    background: rgba(255, 255, 255, .25);\r\n}\r\n\r\n.xterm-decoration-overview-ruler {\r\n    right: 1px;\r\n    pointer-events: none;\r\n}\r\n\r\n.xterm-find-result-decoration {\r\n    box-sizing: content-box;\r\n\r\n    border-radius: 3px;\r\n    padding: 2px;\r\n    margin: -2px;\r\n    outline: 2px solid yellow;\r\n    backdrop-filter: contrast(2);\r\n}\r\n\r\n.xterm-find-active-result-decoration {\r\n    backdrop-filter: contrast(4);\r\n    outline-width: 2px !important;\r\n}\r\n"],"sourceRoot":""}]);
// Exports
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);


/***/ }),

/***/ 2229:
/*!************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/appearanceSettingsTab.component.pug ***!
  \************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Ch3 class=\"mb-3\" translate\u003EAppearance\u003C\u002Fh3\u003E\u003Cdiv class=\"row\"\u003E\u003Cdiv class=\"col-12 col-md-6\"\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EFont\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"input-group w-75\"\u003E\u003Cinput class=\"form-control w-75\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.font\" (ngModelChange)=\"config.save()\"\u003E\u003Cinput class=\"form-control w-25\" type=\"number\" max=\"48\" [(ngModel)]=\"config.store.terminal.fontSize\" (ngModelChange)=\"fixFontSize(); config.save()\"\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EEnable font ligatures\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.ligatures\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ENormal font weight\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeight\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EBold font weight\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"number\" min=\"100\" max=\"900\" step=\"100\" [(ngModel)]=\"config.store.terminal.fontWeightBold\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"col-12 col-md-6\"\u003E\u003Ccolor-scheme-preview [scheme]=\"config.store.terminal.colorScheme\" [fontPreview]=\"true\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"content-box\"\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ETerminal background\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"btn-group\" [(ngModel)]=\"config.store.terminal.background\" (ngModelChange)=\"config.save()\" ngbRadioGroup\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;theme&quot;\"\u003E\u003Cspan translate\u003EFrom theme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;colorScheme&quot;\"\u003E\u003Cspan translate\u003EFrom color scheme\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ECursor shape\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"btn-group\" [(ngModel)]=\"config.store.terminal.cursor\" (ngModelChange)=\"config.save()\" ngbRadioGroup\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;block&quot;\"\u003E█\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;beam&quot;\"\u003E|\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;underline&quot;\"\u003E▁\u003C\u002Flabel\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EBlink cursor\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.cursorBlink\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EFallback font\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EA second font family used to display characters missing in the main font\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"text\" [ngbTypeahead]=\"fontAutocomplete\" [(ngModel)]=\"config.store.terminal.fallbackFont\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ELine padding\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EAdditional space between lines\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.linePadding\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ECustom CSS\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctextarea class=\"form-control mb-5\" [(ngModel)]=\"config.store.appearance.css\" (ngModelChange)=\"saveConfiguration()\"\u003E\u003C\u002Ftextarea\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 9290:
/*!******************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/baseTerminalTab.component.pug ***!
  \******************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"terminal-toolbar-spacer\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"content\" #content [style.opacity]=\"frontendIsReady ? 1 : 0\"\u003E\u003C\u002Fdiv\u003E\u003Csearch-panel *ngIf=\"showSearchPanel &amp;&amp; hasFocus\" @toolbarSlide [@.disabled]=\"!config.store.accessibility.animations\" [frontend]=\"frontend\" (close)=\"showSearchPanel = false; frontend?.cancelSearch()\"\u003E\u003C\u002Fsearch-panel\u003E\u003Cbutton class=\"btn btn-sm btn-link toolbar-pin-button\" *ngIf=\"enableToolbar &amp;&amp; !pinToolbar\" (click)=\"togglePinToolbar()\" (mouseenter)=\"showToolbar()\" (mouseleave)=\"hideToolbar()\"\u003E\u003Ci class=\"fas fa-wrench\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 8821:
/*!**************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/colorPicker.component.pug ***!
  \**************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv [style.background]=\"model\" ngx-colors-trigger [(ngModel)]=\"model\" (ngModelChange)=\"modelChange.emit($event)\" [ngbTooltip]=\"hint\"\u003E{{ title }}\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 2064:
/*!*********************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/colorSchemePreview.component.pug ***!
  \*********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"preview\" [style.font-family]=\"getPreviewFontFamily()\" [style.font-size]=\"(fontPreview ? config.store.terminal.fontSize : 11) + &quot;px&quot;\" [style.font-weight]=\"config.store.terminal.fontWeight\" [style.background-color]=\"scheme.background\" [style.color]=\"scheme.foreground\" [style.font-feature-settings]=\"'&quot;liga&quot; ' + config.store.terminal.ligatures ? 1 : 0\" [style.font-variant-ligatures]=\"config.store.terminal.ligatures ? &quot;initial&quot; : &quot;none&quot;\"\u003E\u003Cdiv\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003Ejohn\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E@\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[4]\"\u003Edoe-pc\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[1]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E$\u003C\u002Fstrong\u003E\u003Cspan\u003E ls\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.cursor\"\u003E&nbsp;\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[3]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Documents\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[2]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EDownloads\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root&nbsp;\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[0]\" [style.background]=\"scheme.colors[8]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EPictures\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\u003Cdiv\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cstrong [style.color]=\"scheme.colors[12]\" [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003E Music\u003C\u002Fstrong\u003E\u003C\u002Fdiv\u003E\u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[2]\"\u003E 実行可能ファイル\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E-rwxr-xr-x  1 root\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[6]\"\u003E sym\u003C\u002Fspan\u003E\u003Cspan\u003E -\u003E\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E link\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\u003Cdiv *ngIf=\"fontPreview\"\u003E\u003Cspan\u003E\u003Cstrong [style.font-weight]=\"config.store.terminal.fontWeightBold\"\u003EIcons:\u003C\u002Fstrong\u003E\u003Cspan\u003E   \u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003Cspan\u003E\u003Cspan\u003E &nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.background-color]=\"scheme.colors[1]\" [style.color]=\"scheme.colors[0]\"\u003E Powerline&nbsp;\u003C\u002Fspan\u003E\u003Cspan [style.color]=\"scheme.colors[1]\"\u003E\u003C\u002Fspan\u003E\u003C\u002Fspan\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 3267:
/*!*************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/colorSchemeSettingsTab.component.pug ***!
  \*************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"head\"\u003E\u003Ch3 class=\"mb-3\" translate\u003ECurrent color scheme\u003C\u002Fh3\u003E\u003Cdiv class=\"d-flex align-items-center\" *ngIf=\"!editing\"\u003E\u003Cspan\u003E{{getCurrentSchemeName()}}\u003C\u002Fspan\u003E\u003Cdiv class=\"mr-auto\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"btn-toolbar\"\u003E\u003Cbutton class=\"btn btn-secondary\" (click)=\"editScheme()\"\u003E\u003Ci class=\"fas fa-pen\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EEdit\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\u003Cdiv class=\"mr-1\"\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-danger\" (click)=\"deleteScheme(config.store.terminal.colorScheme)\" *ngIf=\"currentCustomScheme\"\u003E\u003Ci class=\"fas fa-trash\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EDelete\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv *ngIf=\"editing\"\u003E\u003Cdiv class=\"form-group\"\u003E\u003Clabel translate\u003EName\u003C\u002Flabel\u003E\u003Cinput class=\"form-control\" type=\"text\" [(ngModel)]=\"config.store.terminal.colorScheme.name\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-group\"\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.foreground\" (modelChange)=\"config.save()\" title=\"FG\" hint=\"Foreground\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.background\" (modelChange)=\"config.save()\" title=\"BG\" hint=\"Background\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.cursor\" (modelChange)=\"config.save()\" title=\"CU\" hint=\"Cursor color\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.cursorAccent\" (modelChange)=\"config.save()\" title=\"CA\" hint=\"Block cursor foreground\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.selection\" (modelChange)=\"config.save()\" title=\"SB\" hint=\"Selection background\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker [(model)]=\"config.store.terminal.colorScheme.selectionForeground\" (modelChange)=\"config.save()\" title=\"SF\" hint=\"Selection foreground\"\u003E\u003C\u002Fcolor-picker\u003E\u003Ccolor-picker *ngFor=\"let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy\" [(model)]=\"config.store.terminal.colorScheme.colors[idx]\" (modelChange)=\"config.save()\" [title]=\"idx\" hint=\"ANSI color {{idx}}\"\u003E\u003C\u002Fcolor-picker\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ccolor-scheme-preview [scheme]=\"config.store.terminal.colorScheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\u003Cdiv class=\"btn-toolbar d-flex mt-2\" *ngIf=\"editing\"\u003E\u003Cdiv class=\"mr-auto\"\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-primary\" (click)=\"saveScheme()\"\u003E\u003Ci class=\"fas fa-check\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ESave\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\u003Cdiv class=\"mr-1\"\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-secondary\" (click)=\"cancelEditing()\"\u003E\u003Ci class=\"fas fa-times\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ECancel\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\u003C\u002Fdiv\u003E\u003Chr class=\"mt-3 mb-4\"\u003E\u003Cdiv class=\"input-group mb-3\"\u003E\u003Cdiv class=\"input-group-prepend\"\u003E\u003Cdiv class=\"input-group-text\"\u003E\u003Ci class=\"fas fa-fw fa-search\"\u003E\u003C\u002Fi\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"search\" [placeholder]=\"&quot;Search color schemes&quot;|translate\" [(ngModel)]=\"filter\"\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"body\"\u003E\u003Cdiv class=\"list-group-light mb-3\"\u003E\u003Cng-container *ngFor=\"let scheme of allColorSchemes\"\u003E\u003Cdiv class=\"list-group-item list-group-item-action\" [hidden]=\"filter &amp;&amp; !scheme.name.toLowerCase().includes(filter.toLowerCase())\" (click)=\"selectScheme(scheme)\" [class.active]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\u003Cdiv class=\"d-flex w-100 align-items-center\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"(currentCustomScheme || currentStockScheme) === scheme\"\u003E\u003C\u002Fi\u003E\u003Cdiv class=\"ml-2\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mr-auto\"\u003E\u003Cspan\u003E{{scheme.name}}\u003C\u002Fspan\u003E\u003Cdiv class=\"badge badge-info ml-2\" *ngIf=\"customColorSchemes.includes(scheme)\" translate\u003ECustom\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv\u003E\u003Cdiv class=\"d-flex\"\u003E\u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(0, 8)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"d-flex\"\u003E\u003Cdiv class=\"swatch\" *ngFor=\"let index of colorIndexes.slice(8, 16)\" [style.background-color]=\"scheme.colors[index]\"\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ccolor-scheme-preview [scheme]=\"scheme\"\u003E\u003C\u002Fcolor-scheme-preview\u003E\u003C\u002Fdiv\u003E\u003C\u002Fng-container\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 7851:
/*!***********************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/loginScriptsSettings.component.pug ***!
  \***********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv [sortablejs]=\"scripts\"\u003E\u003Cdiv class=\"input-group flex-grow-1\" *ngFor=\"let script of scripts\"\u003E\u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Expect\" [(ngModel)]=\"script.expect\"\u003E\u003Cinput class=\"form-control\" type=\"text\" placeholder=\"Send\" [(ngModel)]=\"script.send\"\u003E\u003Cdiv class=\"input-group-append input-group-text p-0 border-0\"\u003E\u003Cdiv class=\"hover-reveal\" ngbDropdown\u003E\u003Cbutton class=\"btn btn-link btn-sm\" ngbDropdownToggle\u003E\u003Ci class=\"fas fa-fw fa-cog\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\u003Cdiv class=\"dropdown-menu-right\" ngbDropdownMenu\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = false\" [class.active]=\"!script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"!script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EExact match\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.isRegex = true\" [class.active]=\"script.isRegex\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.isRegex\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ERegex\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003Ca class=\"dropdown-item\" href=\"#\" (click)=\"script.optional = !script.optional\" [class.active]=\"script.optional\"\u003E\u003Ci class=\"fas fa-fw\" [class.fa-check]=\"script.optional\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003EOptional\u003C\u002Fspan\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-link btn-sm hover-reveal\" (click)=\"deleteScript(script)\"\u003E\u003Ci class=\"fas fa-fw fa-trash-alt\"\u003E\u003C\u002Fi\u003E\u003C\u002Fbutton\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-secondary mt-2\" (click)=\"addScript()\"\u003E\u003Ci class=\"fas fa-plus\"\u003E\u003C\u002Fi\u003E\u003Cspan translate\u003ENew item\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 2445:
/*!**************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/searchPanel.component.pug ***!
  \**************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"input-group\"\u003E\u003Cinput class=\"search-input form-control\" type=\"text\" [(ngModel)]=\"query\" (ngModelChange)=\"onQueryChange()\" [class.text-danger]=\"state.resultCount == 0\" (click)=\"$event.stopPropagation()\" (keyup.enter)=\"findPrevious()\" (keyup.esc)=\"close.emit()\" [placeholder]=\"&quot;Search&quot;|translate\"\u003E\u003Cdiv class=\"input-group-append\" *ngIf=\"state.resultCount &gt; 0\"\u003E\u003Cdiv class=\"input-group-text result-counter\"\u003E{{state.resultIndex + 1}} \u002F {{state.resultCount}}\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cng-container *ngIf=\"state.resultCount &gt; 0\"\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"findPrevious()\" ngbTooltip=\"Search up\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowUp\"\u003E\u003C\u002Fbutton\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"findNext()\" ngbTooltip=\"Search down\" placement=\"bottom\" [fastHtmlBind]=\"icons.arrowDown\"\u003E\u003C\u002Fbutton\u003E\u003C\u002Fng-container\u003E\u003Cdiv class=\"mr-2\"\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"options.caseSensitive = !options.caseSensitive; saveSearchOptions()\" [class.btn-info]=\"options.caseSensitive\" ngbTooltip=\"Case sensitivity\" placement=\"bottom\" [fastHtmlBind]=\"icons.case\"\u003E\u003C\u002Fbutton\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"options.regex = !options.regex; saveSearchOptions()\" [class.btn-info]=\"options.regex\" ngbTooltip=\"Regular expression\" placement=\"bottom\" [fastHtmlBind]=\"icons.regexp\"\u003E\u003C\u002Fbutton\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"options.wholeWord = !options.wholeWord; saveSearchOptions()\" [class.btn-info]=\"options.wholeWord\" ngbTooltip=\"Whole word\" placement=\"bottom\" [fastHtmlBind]=\"icons.wholeWord\"\u003E\u003C\u002Fbutton\u003E\u003Cdiv class=\"mr-2\"\u003E\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-link\" (click)=\"close.emit()\" [fastHtmlBind]=\"icons.close\"\u003E\u003C\u002Fbutton\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 56:
/*!***************************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/streamProcessingSettings.component.pug ***!
  \***************************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EInput mode\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"d-flex\" ngbDropdown\u003E\u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getInputModeName(options.inputMode)}}\u003C\u002Fbutton\u003E\u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of inputModes\" (click)=\"options.inputMode = mode.key\" ngbDropdownItem\u003E\u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EInput newlines\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cselect class=\"form-control\" [(ngModel)]=\"options.inputNewlines\"\u003E\u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\u003C\u002Fselect\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EOutput mode\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"d-flex\" ngbDropdown\u003E\u003Cbutton class=\"btn btn-secondary btn-tab-bar\" ngbDropdownToggle\u003E{{getOutputModeName(options.outputMode)}}\u003C\u002Fbutton\u003E\u003Cdiv ngbDropdownMenu\u003E\u003Ca class=\"d-flex flex-column\" *ngFor=\"let mode of outputModes\" (click)=\"options.outputMode = mode.key\" ngbDropdownItem\u003E\u003Cdiv\u003E{{mode.name|translate}}\u003C\u002Fdiv\u003E\u003Cdiv class=\"text-muted\"\u003E{{mode.description|translate}}\u003C\u002Fdiv\u003E\u003C\u002Fa\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EOutput newlines\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cselect class=\"form-control\" [(ngModel)]=\"options.outputNewlines\"\u003E\u003Coption [ngValue]=\"mode.key\" *ngFor=\"let mode of newlineModes\"\u003E{{mode.name|translate}}\u003C\u002Foption\u003E\u003C\u002Fselect\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 1105:
/*!**********************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/terminalSettingsTab.component.pug ***!
  \**********************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv\u003E\u003Ch3 class=\"mb-3\" translate\u003ERendering\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EFrontend\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003ESwitches terminal frontend implementation (experimental)\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.terminal.frontend\" (ngModelChange)=\"config.save()\"\u003E\u003Coption value=\"xterm\"\u003Exterm\u003C\u002Foption\u003E\u003Coption value=\"xterm-webgl\"\u003Exterm (WebGL)\u003C\u002Foption\u003E\u003C\u002Fselect\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EScrollback\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003ENumber of lines kept in the buffer\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"number\" [(ngModel)]=\"config.store.terminal.scrollbackLines\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EDraw bold text in bright colors\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.drawBoldTextInBrightColors\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ESixel graphics support (experimental)\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EDisplay images via Sixel escape sequences\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.sixel\" (ngModelChange)=\"config.save(); config.requestRestart()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\"\u003E\u003Ch3 translate\u003EKeyboard\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate=\"Use {altKeyName} as the Meta key\" [translateParams]=\"{altKeyName: altKeyName}\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003ELets the shell handle Meta key instead of OS\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.altIsMeta\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EScroll on input\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EScrolls the terminal to the bottom on user input\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.scrollOnInput\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\"\u003E\u003Ch3 translate\u003EMouse\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ERight click\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" *ngIf=\"config.store.terminal.rightClick == &quot;paste&quot;\" translate\u003ELong-click for context menu\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"btn-group\" [(ngModel)]=\"config.store.terminal.rightClick\" (ngModelChange)=\"config.save()\" ngbRadioGroup\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton value=\"off\"\u003E\u003Cspan translate\u003EOff\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton value=\"menu\"\u003E\u003Cspan translate\u003EContext menu\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton value=\"paste\"\u003E\u003Cspan translate\u003EPaste\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EPaste on middle-click\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.pasteOnMiddleClick\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EWord separators\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EDouble-click selection will stop at these characters\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cinput class=\"form-control\" type=\"text\" placeholder=\" ()[]{}'&quot;\" [(ngModel)]=\"config.store.terminal.wordSeparator\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\" *ngIf=\"config.store.clickableLinks\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ERequire a key to click links\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EWhen enabled, links are only clickable while holding this key\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cselect class=\"form-control\" [(ngModel)]=\"config.store.clickableLinks.modifier\" (ngModelChange)=\"config.save()\"\u003E\u003Coption [ngValue]=\"null\" translate\u003ENo modifier\u003C\u002Foption\u003E\u003Coption value=\"ctrlKey\" *ngIf=\"hostApp.platform !== Platform.macOS\"\u003ECtrl\u003C\u002Foption\u003E\u003Coption value=\"altKey\"\u003E{{altKeyName}}\u003C\u002Foption\u003E\u003Coption value=\"shiftKey\"\u003EShift\u003C\u002Foption\u003E\u003Coption value=\"metaKey\"\u003E{{metaKeyName}}\u003C\u002Foption\u003E\u003C\u002Fselect\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\"\u003E\u003Ch3 translate\u003EClipboard\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ECopy on select\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.copyOnSelect\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ECopy with formatting\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.copyAsHTML\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EBracketed paste (requires shell support)\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EPrevents accidental execution of pasted commands\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.bracketedPaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EWarn on multi-line paste\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EShow a confirmation box when pasting multiple lines\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.warnOnMultilinePaste\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\"\u003E\u003Ch3 translate\u003ESound\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ETerminal bell\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"btn-group\" [(ngModel)]=\"config.store.terminal.bell\" (ngModelChange)=\"config.save()\" ngbRadioGroup\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;off&quot;\"\u003E\u003Cspan translate\u003EOff\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;visual&quot;\"\u003E\u003Cspan translate\u003EVisual\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003Clabel class=\"btn btn-secondary\" ngbButtonLabel\u003E\u003Cinput type=\"radio\" ngbButton [value]=\"&quot;audible&quot;\"\u003E\u003Cspan translate\u003EAudible\u003C\u002Fspan\u003E\u003C\u002Flabel\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"alert alert-info d-flex align-items-center\" *ngIf=\"config.store.terminal.bell != &quot;audible&quot; &amp;&amp; (config.store.terminal.profile || &quot;&quot;).startsWith(&quot;wsl&quot;)\"\u003E\u003Cdiv class=\"mr-auto\" translate\u003EWSL terminal bell can only be muted via Volume Mixer\u003C\u002Fdiv\u003E\u003Cbutton class=\"btn btn-secondary\" (click)=\"openWSLVolumeMixer()\" translate\u003EShow Mixer\u003C\u002Fbutton\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\"\u003E\u003Ch3 translate\u003EStartup\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\" *ngIf=\"hostApp.platform !== Platform.Web\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003EAuto-open a terminal on app start\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.autoOpen\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ERestore terminal tabs on app start\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.recoverTabs\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Cdiv class=\"mt-4\" *ngIf=\"hostApp.platform === Platform.Windows\"\u003E\u003Ch3 translate\u003EWindows\u003C\u002Fh3\u003E\u003Cdiv class=\"form-line\"\u003E\u003Cdiv class=\"header\"\u003E\u003Cdiv class=\"title\" translate\u003ESet Tabby as %COMSPEC%\u003C\u002Fdiv\u003E\u003Cdiv class=\"description\" translate\u003EAllows opening .bat files in tabs, but breaks some shells\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E\u003Ctoggle [(ngModel)]=\"config.store.terminal.setComSpec\" (ngModelChange)=\"config.save()\"\u003E\u003C\u002Ftoggle\u003E\u003C\u002Fdiv\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 2456:
/*!******************************************************************************************!*\
  !*** ../node_modules/pug-loader/index.js!./src/components/terminalToolbar.component.pug ***!
  \******************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var pug = __webpack_require__(/*! !../../../node_modules/pug-runtime/index.js */ 9941);

function template(locals) {var pug_html = "", pug_mixins = {}, pug_interp;pug_html = pug_html + "\u003Cdiv class=\"content\" cdkDropList cdkAutoDropGroup=\"app-tabs\"\u003E\u003Ci class=\"fas fa-grip-vertical drag-handle\" *ngIf=\"shouldShowDragHandle\" cdkDrag [cdkDragData]=\"tab\" (cdkDragStarted)=\"onTabDragStart()\" (cdkDragEnded)=\"onTabDragEnd()\"\u003E\u003C\u002Fi\u003E\u003Cng-content\u003E\u003C\u002Fng-content\u003E\u003Cbutton class=\"btn btn-sm btn-link\" *ngIf=\"tab.enableToolbar\" (click)=\"tab.togglePinToolbar()\" (mouseenter)=\"tab.showToolbar()\" (mouseleave)=\"tab.hideToolbar()\"\u003E\u003Ci class=\"fas fa-thumbtack\"\u003E\u003C\u002Fi\u003E\u003Cspan *ngIf=\"tab.pinToolbar\" translate\u003EUnpin\u003C\u002Fspan\u003E\u003Cspan *ngIf=\"!tab.pinToolbar\" translate\u003EPin\u003C\u002Fspan\u003E\u003C\u002Fbutton\u003E\u003C\u002Fdiv\u003E";;return pug_html;};
module.exports = template;

/***/ }),

/***/ 3040:
/*!**************************************************!*\
  !*** ../app/node_modules/call-bind/callBound.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 7422);

var callBind = __webpack_require__(/*! ./ */ 2103);

var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));

module.exports = function callBoundIntrinsic(name, allowMissing) {
	var intrinsic = GetIntrinsic(name, !!allowMissing);
	if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
		return callBind(intrinsic);
	}
	return intrinsic;
};


/***/ }),

/***/ 2103:
/*!**********************************************!*\
  !*** ../app/node_modules/call-bind/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 7885);
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 7422);

var $apply = GetIntrinsic('%Function.prototype.apply%');
var $call = GetIntrinsic('%Function.prototype.call%');
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);

var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);

if ($defineProperty) {
	try {
		$defineProperty({}, 'a', { value: 1 });
	} catch (e) {
		// IE 8 has a broken defineProperty
		$defineProperty = null;
	}
}

module.exports = function callBind() {
	return $reflectApply(bind, $call, arguments);
};

var applyBind = function applyBind() {
	return $reflectApply(bind, $apply, arguments);
};

if ($defineProperty) {
	$defineProperty(module.exports, 'apply', { value: applyBind });
} else {
	module.exports.apply = applyBind;
}


/***/ }),

/***/ 4004:
/*!******************************************************!*\
  !*** ../app/node_modules/define-properties/index.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var keys = __webpack_require__(/*! object-keys */ 2439);
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';

var toStr = Object.prototype.toString;
var concat = Array.prototype.concat;
var origDefineProperty = Object.defineProperty;

var isFunction = function (fn) {
	return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
};

var arePropertyDescriptorsSupported = function () {
	var obj = {};
	try {
		origDefineProperty(obj, 'x', { enumerable: false, value: obj });
		// eslint-disable-next-line no-unused-vars, no-restricted-syntax
		for (var _ in obj) { // jscs:ignore disallowUnusedVariables
			return false;
		}
		return obj.x === obj;
	} catch (e) { /* this is IE 8. */
		return false;
	}
};
var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();

var defineProperty = function (object, name, value, predicate) {
	if (name in object && (!isFunction(predicate) || !predicate())) {
		return;
	}
	if (supportsDescriptors) {
		origDefineProperty(object, name, {
			configurable: true,
			enumerable: false,
			value: value,
			writable: true
		});
	} else {
		object[name] = value;
	}
};

var defineProperties = function (object, map) {
	var predicates = arguments.length > 2 ? arguments[2] : {};
	var props = keys(map);
	if (hasSymbols) {
		props = concat.call(props, Object.getOwnPropertySymbols(map));
	}
	for (var i = 0; i < props.length; i += 1) {
		defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
	}
};

defineProperties.supportsDescriptors = !!supportsDescriptors;

module.exports = defineProperties;


/***/ }),

/***/ 3936:
/*!*******************************************************!*\
  !*** ../app/node_modules/es-abstract/GetIntrinsic.js ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* globals
	AggregateError,
	Atomics,
	FinalizationRegistry,
	SharedArrayBuffer,
	WeakRef,
*/

var undefined;

var $SyntaxError = SyntaxError;
var $Function = Function;
var $TypeError = TypeError;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
	try {
		// eslint-disable-next-line no-new-func
		return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
	} catch (e) {}
};

var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
	try {
		$gOPD({}, '');
	} catch (e) {
		$gOPD = null; // this is IE 8, which has a broken gOPD
	}
}

var throwTypeError = function () { throw new $TypeError(); };
var ThrowTypeError = $gOPD
	? (function () {
		try {
			// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
			arguments.callee; // IE 8 does not throw here
			return throwTypeError;
		} catch (calleeThrows) {
			try {
				// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
				return $gOPD(arguments, 'callee').get;
			} catch (gOPDthrows) {
				return throwTypeError;
			}
		}
	}())
	: throwTypeError;

var hasSymbols = __webpack_require__(/*! has-symbols */ 6192)();

var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto

var asyncGenFunction = getEvalledConstructor('async function* () {}');
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;

var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);

var INTRINSICS = {
	'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
	'%Array%': Array,
	'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
	'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
	'%AsyncFromSyncIteratorPrototype%': undefined,
	'%AsyncFunction%': getEvalledConstructor('async function () {}'),
	'%AsyncGenerator%': asyncGenFunctionPrototype,
	'%AsyncGeneratorFunction%': asyncGenFunction,
	'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
	'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
	'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
	'%Boolean%': Boolean,
	'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
	'%Date%': Date,
	'%decodeURI%': decodeURI,
	'%decodeURIComponent%': decodeURIComponent,
	'%encodeURI%': encodeURI,
	'%encodeURIComponent%': encodeURIComponent,
	'%Error%': Error,
	'%eval%': eval, // eslint-disable-line no-eval
	'%EvalError%': EvalError,
	'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
	'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
	'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
	'%Function%': $Function,
	'%GeneratorFunction%': getEvalledConstructor('function* () {}'),
	'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
	'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
	'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
	'%isFinite%': isFinite,
	'%isNaN%': isNaN,
	'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
	'%JSON%': typeof JSON === 'object' ? JSON : undefined,
	'%Map%': typeof Map === 'undefined' ? undefined : Map,
	'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
	'%Math%': Math,
	'%Number%': Number,
	'%Object%': Object,
	'%parseFloat%': parseFloat,
	'%parseInt%': parseInt,
	'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
	'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
	'%RangeError%': RangeError,
	'%ReferenceError%': ReferenceError,
	'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
	'%RegExp%': RegExp,
	'%Set%': typeof Set === 'undefined' ? undefined : Set,
	'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
	'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
	'%String%': String,
	'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
	'%Symbol%': hasSymbols ? Symbol : undefined,
	'%SyntaxError%': $SyntaxError,
	'%ThrowTypeError%': ThrowTypeError,
	'%TypedArray%': TypedArray,
	'%TypeError%': $TypeError,
	'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
	'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
	'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
	'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
	'%URIError%': URIError,
	'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
	'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
	'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};

var LEGACY_ALIASES = {
	'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
	'%ArrayPrototype%': ['Array', 'prototype'],
	'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
	'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
	'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
	'%ArrayProto_values%': ['Array', 'prototype', 'values'],
	'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
	'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
	'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
	'%BooleanPrototype%': ['Boolean', 'prototype'],
	'%DataViewPrototype%': ['DataView', 'prototype'],
	'%DatePrototype%': ['Date', 'prototype'],
	'%ErrorPrototype%': ['Error', 'prototype'],
	'%EvalErrorPrototype%': ['EvalError', 'prototype'],
	'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
	'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
	'%FunctionPrototype%': ['Function', 'prototype'],
	'%Generator%': ['GeneratorFunction', 'prototype'],
	'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
	'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
	'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
	'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
	'%JSONParse%': ['JSON', 'parse'],
	'%JSONStringify%': ['JSON', 'stringify'],
	'%MapPrototype%': ['Map', 'prototype'],
	'%NumberPrototype%': ['Number', 'prototype'],
	'%ObjectPrototype%': ['Object', 'prototype'],
	'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
	'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
	'%PromisePrototype%': ['Promise', 'prototype'],
	'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
	'%Promise_all%': ['Promise', 'all'],
	'%Promise_reject%': ['Promise', 'reject'],
	'%Promise_resolve%': ['Promise', 'resolve'],
	'%RangeErrorPrototype%': ['RangeError', 'prototype'],
	'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
	'%RegExpPrototype%': ['RegExp', 'prototype'],
	'%SetPrototype%': ['Set', 'prototype'],
	'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
	'%StringPrototype%': ['String', 'prototype'],
	'%SymbolPrototype%': ['Symbol', 'prototype'],
	'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
	'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
	'%TypeErrorPrototype%': ['TypeError', 'prototype'],
	'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
	'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
	'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
	'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
	'%URIErrorPrototype%': ['URIError', 'prototype'],
	'%WeakMapPrototype%': ['WeakMap', 'prototype'],
	'%WeakSetPrototype%': ['WeakSet', 'prototype']
};

var bind = __webpack_require__(/*! function-bind */ 7885);
var hasOwn = __webpack_require__(/*! has */ 3062);
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);

/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
	var result = [];
	$replace(string, rePropName, function (match, number, quote, subString) {
		result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
	});
	return result;
};
/* end adaptation */

var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
	var intrinsicName = name;
	var alias;
	if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
		alias = LEGACY_ALIASES[intrinsicName];
		intrinsicName = '%' + alias[0] + '%';
	}

	if (hasOwn(INTRINSICS, intrinsicName)) {
		var value = INTRINSICS[intrinsicName];
		if (typeof value === 'undefined' && !allowMissing) {
			throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
		}

		return {
			alias: alias,
			name: intrinsicName,
			value: value
		};
	}

	throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};

module.exports = function GetIntrinsic(name, allowMissing) {
	if (typeof name !== 'string' || name.length === 0) {
		throw new $TypeError('intrinsic name must be a non-empty string');
	}
	if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
		throw new $TypeError('"allowMissing" argument must be a boolean');
	}

	var parts = stringToPath(name);
	var intrinsicBaseName = parts.length > 0 ? parts[0] : '';

	var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
	var intrinsicRealName = intrinsic.name;
	var value = intrinsic.value;
	var skipFurtherCaching = false;

	var alias = intrinsic.alias;
	if (alias) {
		intrinsicBaseName = alias[0];
		$spliceApply(parts, $concat([0, 1], alias));
	}

	for (var i = 1, isOwn = true; i < parts.length; i += 1) {
		var part = parts[i];
		if (part === 'constructor' || !isOwn) {
			skipFurtherCaching = true;
		}

		intrinsicBaseName += '.' + part;
		intrinsicRealName = '%' + intrinsicBaseName + '%';

		if (hasOwn(INTRINSICS, intrinsicRealName)) {
			value = INTRINSICS[intrinsicRealName];
		} else if (value != null) {
			if ($gOPD && (i + 1) >= parts.length) {
				var desc = $gOPD(value, part);
				isOwn = !!desc;

				if (!allowMissing && !(part in value)) {
					throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
				}
				// By convention, when a data property is converted to an accessor
				// property to emulate a data property that does not suffer from
				// the override mistake, that accessor's getter is marked with
				// an `originalValue` property. Here, when we detect this, we
				// uphold the illusion by pretending to see that original data
				// property, i.e., returning the value rather than the getter
				// itself.
				if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
					value = desc.get;
				} else {
					value = value[part];
				}
			} else {
				isOwn = hasOwn(value, part);
				value = value[part];
			}

			if (isOwn && !skipFurtherCaching) {
				INTRINSICS[intrinsicRealName] = value;
			}
		}
	}
	return value;
};


/***/ }),

/***/ 2087:
/*!***************************************************************************!*\
  !*** ../app/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js ***!
  \***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! ../GetIntrinsic */ 3936);

var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%');
if ($gOPD) {
	try {
		$gOPD([], 'length');
	} catch (e) {
		// IE 8 has a broken gOPD
		$gOPD = null;
	}
}

module.exports = $gOPD;


/***/ }),

/***/ 3170:
/*!***********************************************************!*\
  !*** ../app/node_modules/function-bind/implementation.js ***!
  \***********************************************************/
/***/ ((module) => {

"use strict";


/* eslint no-invalid-this: 1 */

var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var slice = Array.prototype.slice;
var toStr = Object.prototype.toString;
var funcType = '[object Function]';

module.exports = function bind(that) {
    var target = this;
    if (typeof target !== 'function' || toStr.call(target) !== funcType) {
        throw new TypeError(ERROR_MESSAGE + target);
    }
    var args = slice.call(arguments, 1);

    var bound;
    var binder = function () {
        if (this instanceof bound) {
            var result = target.apply(
                this,
                args.concat(slice.call(arguments))
            );
            if (Object(result) === result) {
                return result;
            }
            return this;
        } else {
            return target.apply(
                that,
                args.concat(slice.call(arguments))
            );
        }
    };

    var boundLength = Math.max(0, target.length - args.length);
    var boundArgs = [];
    for (var i = 0; i < boundLength; i++) {
        boundArgs.push('$' + i);
    }

    bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);

    if (target.prototype) {
        var Empty = function Empty() {};
        Empty.prototype = target.prototype;
        bound.prototype = new Empty();
        Empty.prototype = null;
    }

    return bound;
};


/***/ }),

/***/ 7885:
/*!**************************************************!*\
  !*** ../app/node_modules/function-bind/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 3170);

module.exports = Function.prototype.bind || implementation;


/***/ }),

/***/ 7422:
/*!**************************************************!*\
  !*** ../app/node_modules/get-intrinsic/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* globals
	AggregateError,
	Atomics,
	FinalizationRegistry,
	SharedArrayBuffer,
	WeakRef,
*/

var undefined;

var $SyntaxError = SyntaxError;
var $Function = Function;
var $TypeError = TypeError;

// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
	try {
		// eslint-disable-next-line no-new-func
		return Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
	} catch (e) {}
};

var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
	try {
		$gOPD({}, '');
	} catch (e) {
		$gOPD = null; // this is IE 8, which has a broken gOPD
	}
}

var throwTypeError = function () {
	throw new $TypeError();
};
var ThrowTypeError = $gOPD
	? (function () {
		try {
			// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
			arguments.callee; // IE 8 does not throw here
			return throwTypeError;
		} catch (calleeThrows) {
			try {
				// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
				return $gOPD(arguments, 'callee').get;
			} catch (gOPDthrows) {
				return throwTypeError;
			}
		}
	}())
	: throwTypeError;

var hasSymbols = __webpack_require__(/*! has-symbols */ 6192)();

var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto

var asyncGenFunction = getEvalledConstructor('async function* () {}');
var asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined;
var asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined;

var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);

var INTRINSICS = {
	'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
	'%Array%': Array,
	'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
	'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
	'%AsyncFromSyncIteratorPrototype%': undefined,
	'%AsyncFunction%': getEvalledConstructor('async function () {}'),
	'%AsyncGenerator%': asyncGenFunctionPrototype,
	'%AsyncGeneratorFunction%': asyncGenFunction,
	'%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined,
	'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
	'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
	'%Boolean%': Boolean,
	'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
	'%Date%': Date,
	'%decodeURI%': decodeURI,
	'%decodeURIComponent%': decodeURIComponent,
	'%encodeURI%': encodeURI,
	'%encodeURIComponent%': encodeURIComponent,
	'%Error%': Error,
	'%eval%': eval, // eslint-disable-line no-eval
	'%EvalError%': EvalError,
	'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
	'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
	'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
	'%Function%': $Function,
	'%GeneratorFunction%': getEvalledConstructor('function* () {}'),
	'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
	'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
	'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
	'%isFinite%': isFinite,
	'%isNaN%': isNaN,
	'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
	'%JSON%': typeof JSON === 'object' ? JSON : undefined,
	'%Map%': typeof Map === 'undefined' ? undefined : Map,
	'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
	'%Math%': Math,
	'%Number%': Number,
	'%Object%': Object,
	'%parseFloat%': parseFloat,
	'%parseInt%': parseInt,
	'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
	'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
	'%RangeError%': RangeError,
	'%ReferenceError%': ReferenceError,
	'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
	'%RegExp%': RegExp,
	'%Set%': typeof Set === 'undefined' ? undefined : Set,
	'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
	'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
	'%String%': String,
	'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
	'%Symbol%': hasSymbols ? Symbol : undefined,
	'%SyntaxError%': $SyntaxError,
	'%ThrowTypeError%': ThrowTypeError,
	'%TypedArray%': TypedArray,
	'%TypeError%': $TypeError,
	'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
	'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
	'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
	'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
	'%URIError%': URIError,
	'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
	'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
	'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};

var LEGACY_ALIASES = {
	'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
	'%ArrayPrototype%': ['Array', 'prototype'],
	'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
	'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
	'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
	'%ArrayProto_values%': ['Array', 'prototype', 'values'],
	'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
	'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
	'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
	'%BooleanPrototype%': ['Boolean', 'prototype'],
	'%DataViewPrototype%': ['DataView', 'prototype'],
	'%DatePrototype%': ['Date', 'prototype'],
	'%ErrorPrototype%': ['Error', 'prototype'],
	'%EvalErrorPrototype%': ['EvalError', 'prototype'],
	'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
	'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
	'%FunctionPrototype%': ['Function', 'prototype'],
	'%Generator%': ['GeneratorFunction', 'prototype'],
	'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
	'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
	'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
	'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
	'%JSONParse%': ['JSON', 'parse'],
	'%JSONStringify%': ['JSON', 'stringify'],
	'%MapPrototype%': ['Map', 'prototype'],
	'%NumberPrototype%': ['Number', 'prototype'],
	'%ObjectPrototype%': ['Object', 'prototype'],
	'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
	'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
	'%PromisePrototype%': ['Promise', 'prototype'],
	'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
	'%Promise_all%': ['Promise', 'all'],
	'%Promise_reject%': ['Promise', 'reject'],
	'%Promise_resolve%': ['Promise', 'resolve'],
	'%RangeErrorPrototype%': ['RangeError', 'prototype'],
	'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
	'%RegExpPrototype%': ['RegExp', 'prototype'],
	'%SetPrototype%': ['Set', 'prototype'],
	'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
	'%StringPrototype%': ['String', 'prototype'],
	'%SymbolPrototype%': ['Symbol', 'prototype'],
	'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
	'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
	'%TypeErrorPrototype%': ['TypeError', 'prototype'],
	'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
	'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
	'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
	'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
	'%URIErrorPrototype%': ['URIError', 'prototype'],
	'%WeakMapPrototype%': ['WeakMap', 'prototype'],
	'%WeakSetPrototype%': ['WeakSet', 'prototype']
};

var bind = __webpack_require__(/*! function-bind */ 7885);
var hasOwn = __webpack_require__(/*! has */ 3062);
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);
var $strSlice = bind.call(Function.call, String.prototype.slice);

/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
	var first = $strSlice(string, 0, 1);
	var last = $strSlice(string, -1);
	if (first === '%' && last !== '%') {
		throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
	} else if (last === '%' && first !== '%') {
		throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
	}
	var result = [];
	$replace(string, rePropName, function (match, number, quote, subString) {
		result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
	});
	return result;
};
/* end adaptation */

var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
	var intrinsicName = name;
	var alias;
	if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
		alias = LEGACY_ALIASES[intrinsicName];
		intrinsicName = '%' + alias[0] + '%';
	}

	if (hasOwn(INTRINSICS, intrinsicName)) {
		var value = INTRINSICS[intrinsicName];
		if (typeof value === 'undefined' && !allowMissing) {
			throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
		}

		return {
			alias: alias,
			name: intrinsicName,
			value: value
		};
	}

	throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};

module.exports = function GetIntrinsic(name, allowMissing) {
	if (typeof name !== 'string' || name.length === 0) {
		throw new $TypeError('intrinsic name must be a non-empty string');
	}
	if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
		throw new $TypeError('"allowMissing" argument must be a boolean');
	}

	var parts = stringToPath(name);
	var intrinsicBaseName = parts.length > 0 ? parts[0] : '';

	var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
	var intrinsicRealName = intrinsic.name;
	var value = intrinsic.value;
	var skipFurtherCaching = false;

	var alias = intrinsic.alias;
	if (alias) {
		intrinsicBaseName = alias[0];
		$spliceApply(parts, $concat([0, 1], alias));
	}

	for (var i = 1, isOwn = true; i < parts.length; i += 1) {
		var part = parts[i];
		var first = $strSlice(part, 0, 1);
		var last = $strSlice(part, -1);
		if (
			(
				(first === '"' || first === "'" || first === '`')
				|| (last === '"' || last === "'" || last === '`')
			)
			&& first !== last
		) {
			throw new $SyntaxError('property names with quotes must have matching quotes');
		}
		if (part === 'constructor' || !isOwn) {
			skipFurtherCaching = true;
		}

		intrinsicBaseName += '.' + part;
		intrinsicRealName = '%' + intrinsicBaseName + '%';

		if (hasOwn(INTRINSICS, intrinsicRealName)) {
			value = INTRINSICS[intrinsicRealName];
		} else if (value != null) {
			if (!(part in value)) {
				if (!allowMissing) {
					throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
				}
				return void undefined;
			}
			if ($gOPD && (i + 1) >= parts.length) {
				var desc = $gOPD(value, part);
				isOwn = !!desc;

				// By convention, when a data property is converted to an accessor
				// property to emulate a data property that does not suffer from
				// the override mistake, that accessor's getter is marked with
				// an `originalValue` property. Here, when we detect this, we
				// uphold the illusion by pretending to see that original data
				// property, i.e., returning the value rather than the getter
				// itself.
				if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
					value = desc.get;
				} else {
					value = value[part];
				}
			} else {
				isOwn = hasOwn(value, part);
				value = value[part];
			}

			if (isOwn && !skipFurtherCaching) {
				INTRINSICS[intrinsicRealName] = value;
			}
		}
	}
	return value;
};


/***/ }),

/***/ 6192:
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var origSymbol = global.Symbol;
var hasSymbolSham = __webpack_require__(/*! ./shams */ 7397);

module.exports = function hasNativeSymbols() {
	if (typeof origSymbol !== 'function') { return false; }
	if (typeof Symbol !== 'function') { return false; }
	if (typeof origSymbol('foo') !== 'symbol') { return false; }
	if (typeof Symbol('bar') !== 'symbol') { return false; }

	return hasSymbolSham();
};


/***/ }),

/***/ 7397:
/*!************************************************!*\
  !*** ../app/node_modules/has-symbols/shams.js ***!
  \************************************************/
/***/ ((module) => {

"use strict";


/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
	if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
	if (typeof Symbol.iterator === 'symbol') { return true; }

	var obj = {};
	var sym = Symbol('test');
	var symObj = Object(sym);
	if (typeof sym === 'string') { return false; }

	if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
	if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }

	// temp disabled per https://github.com/ljharb/object.assign/issues/17
	// if (sym instanceof Symbol) { return false; }
	// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
	// if (!(symObj instanceof Symbol)) { return false; }

	// if (typeof Symbol.prototype.toString !== 'function') { return false; }
	// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }

	var symVal = 42;
	obj[sym] = symVal;
	for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
	if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }

	if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }

	var syms = Object.getOwnPropertySymbols(obj);
	if (syms.length !== 1 || syms[0] !== sym) { return false; }

	if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }

	if (typeof Object.getOwnPropertyDescriptor === 'function') {
		var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
		if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
	}

	return true;
};


/***/ }),

/***/ 3062:
/*!********************************************!*\
  !*** ../app/node_modules/has/src/index.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var bind = __webpack_require__(/*! function-bind */ 7885);

module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);


/***/ }),

/***/ 8303:
/*!***************************************************!*\
  !*** ../app/node_modules/is-date-object/index.js ***!
  \***************************************************/
/***/ ((module) => {

"use strict";


var getDay = Date.prototype.getDay;
var tryDateObject = function tryDateGetDayCall(value) {
	try {
		getDay.call(value);
		return true;
	} catch (e) {
		return false;
	}
};

var toStr = Object.prototype.toString;
var dateClass = '[object Date]';
var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';

module.exports = function isDateObject(value) {
	if (typeof value !== 'object' || value === null) {
		return false;
	}
	return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
};


/***/ }),

/***/ 6889:
/*!*********************************************!*\
  !*** ../app/node_modules/is-regex/index.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasSymbols = __webpack_require__(/*! has-symbols */ 6192)();
var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
var hasOwnProperty;
var regexExec;
var isRegexMarker;
var badStringifier;

if (hasToStringTag) {
	hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
	regexExec = Function.call.bind(RegExp.prototype.exec);
	isRegexMarker = {};

	var throwRegexMarker = function () {
		throw isRegexMarker;
	};
	badStringifier = {
		toString: throwRegexMarker,
		valueOf: throwRegexMarker
	};

	if (typeof Symbol.toPrimitive === 'symbol') {
		badStringifier[Symbol.toPrimitive] = throwRegexMarker;
	}
}

var toStr = Object.prototype.toString;
var gOPD = Object.getOwnPropertyDescriptor;
var regexClass = '[object RegExp]';

module.exports = hasToStringTag
	// eslint-disable-next-line consistent-return
	? function isRegex(value) {
		if (!value || typeof value !== 'object') {
			return false;
		}

		var descriptor = gOPD(value, 'lastIndex');
		var hasLastIndexDataProperty = descriptor && hasOwnProperty(descriptor, 'value');
		if (!hasLastIndexDataProperty) {
			return false;
		}

		try {
			regexExec(value, badStringifier);
		} catch (e) {
			return e === isRegexMarker;
		}
	}
	: function isRegex(value) {
		// In older browsers, typeof regex incorrectly returns 'function'
		if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
			return false;
		}

		return toStr.call(value) === regexClass;
	};


/***/ }),

/***/ 3540:
/*!**********************************************!*\
  !*** ../app/node_modules/is-symbol/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var toStr = Object.prototype.toString;
var hasSymbols = __webpack_require__(/*! has-symbols */ 6192)();

if (hasSymbols) {
	var symToStr = Symbol.prototype.toString;
	var symStringRegex = /^Symbol\(.*\)$/;
	var isSymbolObject = function isRealSymbolObject(value) {
		if (typeof value.valueOf() !== 'symbol') {
			return false;
		}
		return symStringRegex.test(symToStr.call(value));
	};

	module.exports = function isSymbol(value) {
		if (typeof value === 'symbol') {
			return true;
		}
		if (toStr.call(value) !== '[object Symbol]') {
			return false;
		}
		try {
			return isSymbolObject(value);
		} catch (e) {
			return false;
		}
	};
} else {

	module.exports = function isSymbol(value) {
		// this environment does not support Symbols.
		return  false && 0;
	};
}


/***/ }),

/***/ 749:
/*!********************************************!*\
  !*** ../app/node_modules/isarray/index.js ***!
  \********************************************/
/***/ ((module) => {

var toString = {}.toString;

module.exports = Array.isArray || function (arr) {
  return toString.call(arr) == '[object Array]';
};


/***/ }),

/***/ 5234:
/*!***************************************************!*\
  !*** ../app/node_modules/object-inspect/index.js ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var functionToString = Function.prototype.toString;
var match = String.prototype.match;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var gOPS = Object.getOwnPropertySymbols;
var symToString = typeof Symbol === 'function' ? Symbol.prototype.toString : null;
var isEnumerable = Object.prototype.propertyIsEnumerable;

var inspectCustom = (__webpack_require__(/*! ./util.inspect */ 6478).custom);
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;

module.exports = function inspect_(obj, options, depth, seen) {
    var opts = options || {};

    if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
        throw new TypeError('option "quoteStyle" must be "single" or "double"');
    }
    if (
        has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
            ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
            : opts.maxStringLength !== null
        )
    ) {
        throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
    }
    var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
    if (typeof customInspect !== 'boolean') {
        throw new TypeError('option "customInspect", if provided, must be `true` or `false`');
    }

    if (
        has(opts, 'indent')
        && opts.indent !== null
        && opts.indent !== '\t'
        && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
    ) {
        throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');
    }

    if (typeof obj === 'undefined') {
        return 'undefined';
    }
    if (obj === null) {
        return 'null';
    }
    if (typeof obj === 'boolean') {
        return obj ? 'true' : 'false';
    }

    if (typeof obj === 'string') {
        return inspectString(obj, opts);
    }
    if (typeof obj === 'number') {
        if (obj === 0) {
            return Infinity / obj > 0 ? '0' : '-0';
        }
        return String(obj);
    }
    if (typeof obj === 'bigint') {
        return String(obj) + 'n';
    }

    var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
    if (typeof depth === 'undefined') { depth = 0; }
    if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
        return isArray(obj) ? '[Array]' : '[Object]';
    }

    var indent = getIndent(opts, depth);

    if (typeof seen === 'undefined') {
        seen = [];
    } else if (indexOf(seen, obj) >= 0) {
        return '[Circular]';
    }

    function inspect(value, from, noIndent) {
        if (from) {
            seen = seen.slice();
            seen.push(from);
        }
        if (noIndent) {
            var newOpts = {
                depth: opts.depth
            };
            if (has(opts, 'quoteStyle')) {
                newOpts.quoteStyle = opts.quoteStyle;
            }
            return inspect_(value, newOpts, depth + 1, seen);
        }
        return inspect_(value, opts, depth + 1, seen);
    }

    if (typeof obj === 'function') {
        var name = nameOf(obj);
        var keys = arrObjKeys(obj, inspect);
        return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : '');
    }
    if (isSymbol(obj)) {
        var symString = symToString.call(obj);
        return typeof obj === 'object' ? markBoxed(symString) : symString;
    }
    if (isElement(obj)) {
        var s = '<' + String(obj.nodeName).toLowerCase();
        var attrs = obj.attributes || [];
        for (var i = 0; i < attrs.length; i++) {
            s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
        }
        s += '>';
        if (obj.childNodes && obj.childNodes.length) { s += '...'; }
        s += '</' + String(obj.nodeName).toLowerCase() + '>';
        return s;
    }
    if (isArray(obj)) {
        if (obj.length === 0) { return '[]'; }
        var xs = arrObjKeys(obj, inspect);
        if (indent && !singleLineValues(xs)) {
            return '[' + indentedJoin(xs, indent) + ']';
        }
        return '[ ' + xs.join(', ') + ' ]';
    }
    if (isError(obj)) {
        var parts = arrObjKeys(obj, inspect);
        if (parts.length === 0) { return '[' + String(obj) + ']'; }
        return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }';
    }
    if (typeof obj === 'object' && customInspect) {
        if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
            return obj[inspectSymbol]();
        } else if (typeof obj.inspect === 'function') {
            return obj.inspect();
        }
    }
    if (isMap(obj)) {
        var mapParts = [];
        mapForEach.call(obj, function (value, key) {
            mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
        });
        return collectionOf('Map', mapSize.call(obj), mapParts, indent);
    }
    if (isSet(obj)) {
        var setParts = [];
        setForEach.call(obj, function (value) {
            setParts.push(inspect(value, obj));
        });
        return collectionOf('Set', setSize.call(obj), setParts, indent);
    }
    if (isWeakMap(obj)) {
        return weakCollectionOf('WeakMap');
    }
    if (isWeakSet(obj)) {
        return weakCollectionOf('WeakSet');
    }
    if (isNumber(obj)) {
        return markBoxed(inspect(Number(obj)));
    }
    if (isBigInt(obj)) {
        return markBoxed(inspect(bigIntValueOf.call(obj)));
    }
    if (isBoolean(obj)) {
        return markBoxed(booleanValueOf.call(obj));
    }
    if (isString(obj)) {
        return markBoxed(inspect(String(obj)));
    }
    if (!isDate(obj) && !isRegExp(obj)) {
        var ys = arrObjKeys(obj, inspect);
        if (ys.length === 0) { return '{}'; }
        if (indent) {
            return '{' + indentedJoin(ys, indent) + '}';
        }
        return '{ ' + ys.join(', ') + ' }';
    }
    return String(obj);
};

function wrapQuotes(s, defaultStyle, opts) {
    var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
    return quoteChar + s + quoteChar;
}

function quote(s) {
    return String(s).replace(/"/g, '&quot;');
}

function isArray(obj) { return toStr(obj) === '[object Array]'; }
function isDate(obj) { return toStr(obj) === '[object Date]'; }
function isRegExp(obj) { return toStr(obj) === '[object RegExp]'; }
function isError(obj) { return toStr(obj) === '[object Error]'; }
function isSymbol(obj) { return toStr(obj) === '[object Symbol]'; }
function isString(obj) { return toStr(obj) === '[object String]'; }
function isNumber(obj) { return toStr(obj) === '[object Number]'; }
function isBigInt(obj) { return toStr(obj) === '[object BigInt]'; }
function isBoolean(obj) { return toStr(obj) === '[object Boolean]'; }

var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
function has(obj, key) {
    return hasOwn.call(obj, key);
}

function toStr(obj) {
    return objectToString.call(obj);
}

function nameOf(f) {
    if (f.name) { return f.name; }
    var m = match.call(functionToString.call(f), /^function\s*([\w$]+)/);
    if (m) { return m[1]; }
    return null;
}

function indexOf(xs, x) {
    if (xs.indexOf) { return xs.indexOf(x); }
    for (var i = 0, l = xs.length; i < l; i++) {
        if (xs[i] === x) { return i; }
    }
    return -1;
}

function isMap(x) {
    if (!mapSize || !x || typeof x !== 'object') {
        return false;
    }
    try {
        mapSize.call(x);
        try {
            setSize.call(x);
        } catch (s) {
            return true;
        }
        return x instanceof Map; // core-js workaround, pre-v2.5.0
    } catch (e) {}
    return false;
}

function isWeakMap(x) {
    if (!weakMapHas || !x || typeof x !== 'object') {
        return false;
    }
    try {
        weakMapHas.call(x, weakMapHas);
        try {
            weakSetHas.call(x, weakSetHas);
        } catch (s) {
            return true;
        }
        return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
    } catch (e) {}
    return false;
}

function isSet(x) {
    if (!setSize || !x || typeof x !== 'object') {
        return false;
    }
    try {
        setSize.call(x);
        try {
            mapSize.call(x);
        } catch (m) {
            return true;
        }
        return x instanceof Set; // core-js workaround, pre-v2.5.0
    } catch (e) {}
    return false;
}

function isWeakSet(x) {
    if (!weakSetHas || !x || typeof x !== 'object') {
        return false;
    }
    try {
        weakSetHas.call(x, weakSetHas);
        try {
            weakMapHas.call(x, weakMapHas);
        } catch (s) {
            return true;
        }
        return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
    } catch (e) {}
    return false;
}

function isElement(x) {
    if (!x || typeof x !== 'object') { return false; }
    if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
        return true;
    }
    return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
}

function inspectString(str, opts) {
    if (str.length > opts.maxStringLength) {
        var remaining = str.length - opts.maxStringLength;
        var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
        return inspectString(str.slice(0, opts.maxStringLength), opts) + trailer;
    }
    // eslint-disable-next-line no-control-regex
    var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
    return wrapQuotes(s, 'single', opts);
}

function lowbyte(c) {
    var n = c.charCodeAt(0);
    var x = {
        8: 'b',
        9: 't',
        10: 'n',
        12: 'f',
        13: 'r'
    }[n];
    if (x) { return '\\' + x; }
    return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16).toUpperCase();
}

function markBoxed(str) {
    return 'Object(' + str + ')';
}

function weakCollectionOf(type) {
    return type + ' { ? }';
}

function collectionOf(type, size, entries, indent) {
    var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', ');
    return type + ' (' + size + ') {' + joinedEntries + '}';
}

function singleLineValues(xs) {
    for (var i = 0; i < xs.length; i++) {
        if (indexOf(xs[i], '\n') >= 0) {
            return false;
        }
    }
    return true;
}

function getIndent(opts, depth) {
    var baseIndent;
    if (opts.indent === '\t') {
        baseIndent = '\t';
    } else if (typeof opts.indent === 'number' && opts.indent > 0) {
        baseIndent = Array(opts.indent + 1).join(' ');
    } else {
        return null;
    }
    return {
        base: baseIndent,
        prev: Array(depth + 1).join(baseIndent)
    };
}

function indentedJoin(xs, indent) {
    if (xs.length === 0) { return ''; }
    var lineJoiner = '\n' + indent.prev + indent.base;
    return lineJoiner + xs.join(',' + lineJoiner) + '\n' + indent.prev;
}

function arrObjKeys(obj, inspect) {
    var isArr = isArray(obj);
    var xs = [];
    if (isArr) {
        xs.length = obj.length;
        for (var i = 0; i < obj.length; i++) {
            xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
        }
    }
    for (var key in obj) { // eslint-disable-line no-restricted-syntax
        if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
        if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
        if ((/[^\w$]/).test(key)) {
            xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
        } else {
            xs.push(key + ': ' + inspect(obj[key], obj));
        }
    }
    if (typeof gOPS === 'function') {
        var syms = gOPS(obj);
        for (var j = 0; j < syms.length; j++) {
            if (isEnumerable.call(obj, syms[j])) {
                xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
            }
        }
    }
    return xs;
}


/***/ }),

/***/ 6478:
/*!**********************************************************!*\
  !*** ../app/node_modules/object-inspect/util.inspect.js ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

module.exports = __webpack_require__(/*! util */ 3837).inspect;


/***/ }),

/***/ 8007:
/*!*********************************************************!*\
  !*** ../app/node_modules/object-keys/implementation.js ***!
  \*********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var keysShim;
if (!Object.keys) {
	// modified from https://github.com/es-shims/es5-shim
	var has = Object.prototype.hasOwnProperty;
	var toStr = Object.prototype.toString;
	var isArgs = __webpack_require__(/*! ./isArguments */ 8820); // eslint-disable-line global-require
	var isEnumerable = Object.prototype.propertyIsEnumerable;
	var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
	var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
	var dontEnums = [
		'toString',
		'toLocaleString',
		'valueOf',
		'hasOwnProperty',
		'isPrototypeOf',
		'propertyIsEnumerable',
		'constructor'
	];
	var equalsConstructorPrototype = function (o) {
		var ctor = o.constructor;
		return ctor && ctor.prototype === o;
	};
	var excludedKeys = {
		$applicationCache: true,
		$console: true,
		$external: true,
		$frame: true,
		$frameElement: true,
		$frames: true,
		$innerHeight: true,
		$innerWidth: true,
		$onmozfullscreenchange: true,
		$onmozfullscreenerror: true,
		$outerHeight: true,
		$outerWidth: true,
		$pageXOffset: true,
		$pageYOffset: true,
		$parent: true,
		$scrollLeft: true,
		$scrollTop: true,
		$scrollX: true,
		$scrollY: true,
		$self: true,
		$webkitIndexedDB: true,
		$webkitStorageInfo: true,
		$window: true
	};
	var hasAutomationEqualityBug = (function () {
		/* global window */
		if (typeof window === 'undefined') { return false; }
		for (var k in window) {
			try {
				if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
					try {
						equalsConstructorPrototype(window[k]);
					} catch (e) {
						return true;
					}
				}
			} catch (e) {
				return true;
			}
		}
		return false;
	}());
	var equalsConstructorPrototypeIfNotBuggy = function (o) {
		/* global window */
		if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
			return equalsConstructorPrototype(o);
		}
		try {
			return equalsConstructorPrototype(o);
		} catch (e) {
			return false;
		}
	};

	keysShim = function keys(object) {
		var isObject = object !== null && typeof object === 'object';
		var isFunction = toStr.call(object) === '[object Function]';
		var isArguments = isArgs(object);
		var isString = isObject && toStr.call(object) === '[object String]';
		var theKeys = [];

		if (!isObject && !isFunction && !isArguments) {
			throw new TypeError('Object.keys called on a non-object');
		}

		var skipProto = hasProtoEnumBug && isFunction;
		if (isString && object.length > 0 && !has.call(object, 0)) {
			for (var i = 0; i < object.length; ++i) {
				theKeys.push(String(i));
			}
		}

		if (isArguments && object.length > 0) {
			for (var j = 0; j < object.length; ++j) {
				theKeys.push(String(j));
			}
		} else {
			for (var name in object) {
				if (!(skipProto && name === 'prototype') && has.call(object, name)) {
					theKeys.push(String(name));
				}
			}
		}

		if (hasDontEnumBug) {
			var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);

			for (var k = 0; k < dontEnums.length; ++k) {
				if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
					theKeys.push(dontEnums[k]);
				}
			}
		}
		return theKeys;
	};
}
module.exports = keysShim;


/***/ }),

/***/ 2439:
/*!************************************************!*\
  !*** ../app/node_modules/object-keys/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var slice = Array.prototype.slice;
var isArgs = __webpack_require__(/*! ./isArguments */ 8820);

var origKeys = Object.keys;
var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(/*! ./implementation */ 8007);

var originalKeys = Object.keys;

keysShim.shim = function shimObjectKeys() {
	if (Object.keys) {
		var keysWorksWithArguments = (function () {
			// Safari 5.0 bug
			var args = Object.keys(arguments);
			return args && args.length === arguments.length;
		}(1, 2));
		if (!keysWorksWithArguments) {
			Object.keys = function keys(object) { // eslint-disable-line func-name-matching
				if (isArgs(object)) {
					return originalKeys(slice.call(object));
				}
				return originalKeys(object);
			};
		}
	} else {
		Object.keys = keysShim;
	}
	return Object.keys || keysShim;
};

module.exports = keysShim;


/***/ }),

/***/ 8820:
/*!******************************************************!*\
  !*** ../app/node_modules/object-keys/isArguments.js ***!
  \******************************************************/
/***/ ((module) => {

"use strict";


var toStr = Object.prototype.toString;

module.exports = function isArguments(value) {
	var str = toStr.call(value);
	var isArgs = str === '[object Arguments]';
	if (!isArgs) {
		isArgs = str !== '[object Array]' &&
			value !== null &&
			typeof value === 'object' &&
			typeof value.length === 'number' &&
			value.length >= 0 &&
			toStr.call(value.callee) === '[object Function]';
	}
	return isArgs;
};


/***/ }),

/***/ 7987:
/*!***********************************************************!*\
  !*** ../app/node_modules/object.assign/implementation.js ***!
  \***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


// modified from https://github.com/es-shims/es6-shim
var keys = __webpack_require__(/*! object-keys */ 2439);
var canBeObject = function (obj) {
	return typeof obj !== 'undefined' && obj !== null;
};
var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 7397)();
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);
var toObject = Object;
var $push = callBound('Array.prototype.push');
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;

// eslint-disable-next-line no-unused-vars
module.exports = function assign(target, source1) {
	if (!canBeObject(target)) { throw new TypeError('target must be an object'); }
	var objTarget = toObject(target);
	var s, source, i, props, syms, value, key;
	for (s = 1; s < arguments.length; ++s) {
		source = toObject(arguments[s]);
		props = keys(source);
		var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
		if (getSymbols) {
			syms = getSymbols(source);
			for (i = 0; i < syms.length; ++i) {
				key = syms[i];
				if ($propIsEnumerable(source, key)) {
					$push(props, key);
				}
			}
		}
		for (i = 0; i < props.length; ++i) {
			key = props[i];
			value = source[key];
			if ($propIsEnumerable(source, key)) {
				objTarget[key] = value;
			}
		}
	}
	return objTarget;
};


/***/ }),

/***/ 5871:
/*!**************************************************!*\
  !*** ../app/node_modules/object.assign/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var defineProperties = __webpack_require__(/*! define-properties */ 4004);
var callBind = __webpack_require__(/*! call-bind */ 2103);

var implementation = __webpack_require__(/*! ./implementation */ 7987);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 3829);
var shim = __webpack_require__(/*! ./shim */ 3276);

var polyfill = callBind.apply(getPolyfill());
// eslint-disable-next-line no-unused-vars
var bound = function assign(target, source1) {
	return polyfill(Object, arguments);
};

defineProperties(bound, {
	getPolyfill: getPolyfill,
	implementation: implementation,
	shim: shim
});

module.exports = bound;


/***/ }),

/***/ 3829:
/*!*****************************************************!*\
  !*** ../app/node_modules/object.assign/polyfill.js ***!
  \*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 7987);

var lacksProperEnumerationOrder = function () {
	if (!Object.assign) {
		return false;
	}
	/*
	 * v8, specifically in node 4.x, has a bug with incorrect property enumeration order
	 * note: this does not detect the bug unless there's 20 characters
	 */
	var str = 'abcdefghijklmnopqrst';
	var letters = str.split('');
	var map = {};
	for (var i = 0; i < letters.length; ++i) {
		map[letters[i]] = letters[i];
	}
	var obj = Object.assign({}, map);
	var actual = '';
	for (var k in obj) {
		actual += k;
	}
	return str !== actual;
};

var assignHasPendingExceptions = function () {
	if (!Object.assign || !Object.preventExtensions) {
		return false;
	}
	/*
	 * Firefox 37 still has "pending exception" logic in its Object.assign implementation,
	 * which is 72% slower than our shim, and Firefox 40's native implementation.
	 */
	var thrower = Object.preventExtensions({ 1: 2 });
	try {
		Object.assign(thrower, 'xy');
	} catch (e) {
		return thrower[1] === 'y';
	}
	return false;
};

module.exports = function getPolyfill() {
	if (!Object.assign) {
		return implementation;
	}
	if (lacksProperEnumerationOrder()) {
		return implementation;
	}
	if (assignHasPendingExceptions()) {
		return implementation;
	}
	return Object.assign;
};


/***/ }),

/***/ 3276:
/*!*************************************************!*\
  !*** ../app/node_modules/object.assign/shim.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var define = __webpack_require__(/*! define-properties */ 4004);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 3829);

module.exports = function shimAssign() {
	var polyfill = getPolyfill();
	define(
		Object,
		{ assign: polyfill },
		{ assign: function () { return Object.assign !== polyfill; } }
	);
	return polyfill;
};


/***/ }),

/***/ 1644:
/*!*******************************************!*\
  !*** ../node_modules/clone-deep/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/**
 * Module dependenices
 */

const clone = __webpack_require__(/*! shallow-clone */ 8525);
const typeOf = __webpack_require__(/*! kind-of */ 5626);
const isPlainObject = __webpack_require__(/*! is-plain-object */ 1970);

function cloneDeep(val, instanceClone) {
  switch (typeOf(val)) {
    case 'object':
      return cloneObjectDeep(val, instanceClone);
    case 'array':
      return cloneArrayDeep(val, instanceClone);
    default: {
      return clone(val);
    }
  }
}

function cloneObjectDeep(val, instanceClone) {
  if (typeof instanceClone === 'function') {
    return instanceClone(val);
  }
  if (instanceClone || isPlainObject(val)) {
    const res = new val.constructor();
    for (let key in val) {
      res[key] = cloneDeep(val[key], instanceClone);
    }
    return res;
  }
  return val;
}

function cloneArrayDeep(val, instanceClone) {
  const res = new val.constructor(val.length);
  for (let i = 0; i < val.length; i++) {
    res[i] = cloneDeep(val[i], instanceClone);
  }
  return res;
}

/**
 * Expose `cloneDeep`
 */

module.exports = cloneDeep;


/***/ }),

/***/ 9753:
/*!******************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/api.js ***!
  \******************************************************/
/***/ ((module) => {

"use strict";


/*
  MIT License http://www.opensource.org/licenses/mit-license.php
  Author Tobias Koppers @sokra
*/
module.exports = function (cssWithMappingToString) {
  var list = []; // return the list of modules as css string

  list.toString = function toString() {
    return this.map(function (item) {
      var content = "";
      var needLayer = typeof item[5] !== "undefined";

      if (item[4]) {
        content += "@supports (".concat(item[4], ") {");
      }

      if (item[2]) {
        content += "@media ".concat(item[2], " {");
      }

      if (needLayer) {
        content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
      }

      content += cssWithMappingToString(item);

      if (needLayer) {
        content += "}";
      }

      if (item[2]) {
        content += "}";
      }

      if (item[4]) {
        content += "}";
      }

      return content;
    }).join("");
  }; // import a list of modules into the list


  list.i = function i(modules, media, dedupe, supports, layer) {
    if (typeof modules === "string") {
      modules = [[null, modules, undefined]];
    }

    var alreadyImportedModules = {};

    if (dedupe) {
      for (var k = 0; k < this.length; k++) {
        var id = this[k][0];

        if (id != null) {
          alreadyImportedModules[id] = true;
        }
      }
    }

    for (var _k = 0; _k < modules.length; _k++) {
      var item = [].concat(modules[_k]);

      if (dedupe && alreadyImportedModules[item[0]]) {
        continue;
      }

      if (typeof layer !== "undefined") {
        if (typeof item[5] === "undefined") {
          item[5] = layer;
        } else {
          item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
          item[5] = layer;
        }
      }

      if (media) {
        if (!item[2]) {
          item[2] = media;
        } else {
          item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
          item[2] = media;
        }
      }

      if (supports) {
        if (!item[4]) {
          item[4] = "".concat(supports);
        } else {
          item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
          item[4] = supports;
        }
      }

      list.push(item);
    }
  };

  return list;
};

/***/ }),

/***/ 3921:
/*!*********************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/getUrl.js ***!
  \*********************************************************/
/***/ ((module) => {

"use strict";


module.exports = function (url, options) {
  if (!options) {
    options = {};
  }

  if (!url) {
    return url;
  }

  url = String(url.__esModule ? url.default : url); // If url is already wrapped in quotes, remove them

  if (/^['"].*['"]$/.test(url)) {
    url = url.slice(1, -1);
  }

  if (options.hash) {
    url += options.hash;
  } // Should url be wrapped?
  // See https://drafts.csswg.org/css-values-3/#urls


  if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
    return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
  }

  return url;
};

/***/ }),

/***/ 6991:
/*!*************************************************************!*\
  !*** ../node_modules/css-loader/dist/runtime/sourceMaps.js ***!
  \*************************************************************/
/***/ ((module) => {

"use strict";


module.exports = function (item) {
  var content = item[1];
  var cssMapping = item[3];

  if (!cssMapping) {
    return content;
  }

  if (typeof btoa === "function") {
    var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
    var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
    var sourceMapping = "/*# ".concat(data, " */");
    var sourceURLs = cssMapping.sources.map(function (source) {
      return "/*# sourceURL=".concat(cssMapping.sourceRoot || "").concat(source, " */");
    });
    return [content].concat(sourceURLs).concat([sourceMapping]).join("\n");
  }

  return [content].join("\n");
};

/***/ }),

/***/ 2039:
/*!*******************************************!*\
  !*** ../node_modules/deep-equal/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var objectKeys = __webpack_require__(/*! object-keys */ 2439);
var isArguments = __webpack_require__(/*! is-arguments */ 1492);
var is = __webpack_require__(/*! object-is */ 8034);
var isRegex = __webpack_require__(/*! is-regex */ 6889);
var flags = __webpack_require__(/*! regexp.prototype.flags */ 6377);
var isArray = __webpack_require__(/*! isarray */ 749);
var isDate = __webpack_require__(/*! is-date-object */ 8303);
var whichBoxedPrimitive = __webpack_require__(/*! which-boxed-primitive */ 3976);
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 7422);
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);
var whichCollection = __webpack_require__(/*! which-collection */ 9159);
var getIterator = __webpack_require__(/*! es-get-iterator */ 3228);
var getSideChannel = __webpack_require__(/*! side-channel */ 5651);
var whichTypedArray = __webpack_require__(/*! which-typed-array */ 8047);
var assign = __webpack_require__(/*! object.assign */ 5871);

var $getTime = callBound('Date.prototype.getTime');
var gPO = Object.getPrototypeOf;
var $objToString = callBound('Object.prototype.toString');

var $Set = GetIntrinsic('%Set%', true);
var $mapHas = callBound('Map.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSize = callBound('Map.prototype.size', true);
var $setAdd = callBound('Set.prototype.add', true);
var $setDelete = callBound('Set.prototype.delete', true);
var $setHas = callBound('Set.prototype.has', true);
var $setSize = callBound('Set.prototype.size', true);

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L401-L414
function setHasEqualElement(set, val1, opts, channel) {
  var i = getIterator(set);
  var result;
  while ((result = i.next()) && !result.done) {
    if (internalDeepEqual(val1, result.value, opts, channel)) { // eslint-disable-line no-use-before-define
      // Remove the matching element to make sure we do not check that again.
      $setDelete(set, result.value);
      return true;
    }
  }

  return false;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L416-L439
function findLooseMatchingPrimitives(prim) {
  if (typeof prim === 'undefined') {
    return null;
  }
  if (typeof prim === 'object') { // Only pass in null as object!
    return void 0;
  }
  if (typeof prim === 'symbol') {
    return false;
  }
  if (typeof prim === 'string' || typeof prim === 'number') {
    // Loose equal entries exist only if the string is possible to convert to a regular number and not NaN.
    return +prim === +prim; // eslint-disable-line no-implicit-coercion
  }
  return true;
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L449-L460
function mapMightHaveLoosePrim(a, b, prim, item, opts, channel) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }
  var curB = $mapGet(b, altValue);
  var looseOpts = assign({}, opts, { strict: false });
  if (
    (typeof curB === 'undefined' && !$mapHas(b, altValue))
    // eslint-disable-next-line no-use-before-define
    || !internalDeepEqual(item, curB, looseOpts, channel)
  ) {
    return false;
  }
  // eslint-disable-next-line no-use-before-define
  return !$mapHas(a, altValue) && internalDeepEqual(item, curB, looseOpts, channel);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L441-L447
function setMightHaveLoosePrim(a, b, prim) {
  var altValue = findLooseMatchingPrimitives(prim);
  if (altValue != null) {
    return altValue;
  }

  return $setHas(b, altValue) && !$setHas(a, altValue);
}

// taken from https://github.com/browserify/commonjs-assert/blob/bba838e9ba9e28edf3127ce6974624208502f6bc/internal/util/comparisons.js#L518-L533
function mapHasEqualEntry(set, map, key1, item1, opts, channel) {
  var i = getIterator(set);
  var result;
  var key2;
  while ((result = i.next()) && !result.done) {
    key2 = result.value;
    if (
      // eslint-disable-next-line no-use-before-define
      internalDeepEqual(key1, key2, opts, channel)
      // eslint-disable-next-line no-use-before-define
      && internalDeepEqual(item1, $mapGet(map, key2), opts, channel)
    ) {
      $setDelete(set, key2);
      return true;
    }
  }

  return false;
}

function internalDeepEqual(actual, expected, options, channel) {
  var opts = options || {};

  // 7.1. All identical values are equivalent, as determined by ===.
  if (opts.strict ? is(actual, expected) : actual === expected) {
    return true;
  }

  var actualBoxed = whichBoxedPrimitive(actual);
  var expectedBoxed = whichBoxedPrimitive(expected);
  if (actualBoxed !== expectedBoxed) {
    return false;
  }

  // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
  if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
    return opts.strict ? is(actual, expected) : actual == expected; // eslint-disable-line eqeqeq
  }

  /*
   * 7.4. For all other Object pairs, including Array objects, equivalence is
   * determined by having the same number of owned properties (as verified
   * with Object.prototype.hasOwnProperty.call), the same set of keys
   * (although not necessarily the same order), equivalent values for every
   * corresponding key, and an identical 'prototype' property. Note: this
   * accounts for both named and indexed properties on Arrays.
   */
  // see https://github.com/nodejs/node/commit/d3aafd02efd3a403d646a3044adcf14e63a88d32 for memos/channel inspiration

  var hasActual = channel.has(actual);
  var hasExpected = channel.has(expected);
  var sentinel;
  if (hasActual && hasExpected) {
    if (channel.get(actual) === channel.get(expected)) {
      return true;
    }
  } else {
    sentinel = {};
  }
  if (!hasActual) { channel.set(actual, sentinel); }
  if (!hasExpected) { channel.set(expected, sentinel); }

  // eslint-disable-next-line no-use-before-define
  return objEquiv(actual, expected, opts, channel);
}

function isBuffer(x) {
  if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
    return false;
  }
  if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
    return false;
  }
  if (x.length > 0 && typeof x[0] !== 'number') {
    return false;
  }

  return !!(x.constructor && x.constructor.isBuffer && x.constructor.isBuffer(x));
}

function setEquiv(a, b, opts, channel) {
  if ($setSize(a) !== $setSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  while ((resultA = iA.next()) && !resultA.done) {
    if (resultA.value && typeof resultA.value === 'object') {
      if (!set) { set = new $Set(); }
      $setAdd(set, resultA.value);
    } else if (!$setHas(b, resultA.value)) {
      if (opts.strict) { return false; }
      if (!setMightHaveLoosePrim(a, b, resultA.value)) {
        return false;
      }
      if (!set) { set = new $Set(); }
      $setAdd(set, resultA.value);
    }
  }
  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      // We have to check if a primitive value is already matching and only if it's not, go hunting for it.
      if (resultB.value && typeof resultB.value === 'object') {
        if (!setHasEqualElement(set, resultB.value, opts.strict, channel)) {
          return false;
        }
      } else if (
        !opts.strict
        && !$setHas(a, resultB.value)
        && !setHasEqualElement(set, resultB.value, opts.strict, channel)
      ) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}

function mapEquiv(a, b, opts, channel) {
  if ($mapSize(a) !== $mapSize(b)) {
    return false;
  }
  var iA = getIterator(a);
  var iB = getIterator(b);
  var resultA;
  var resultB;
  var set;
  var key;
  var item1;
  var item2;
  while ((resultA = iA.next()) && !resultA.done) {
    key = resultA.value[0];
    item1 = resultA.value[1];
    if (key && typeof key === 'object') {
      if (!set) { set = new $Set(); }
      $setAdd(set, key);
    } else {
      item2 = $mapGet(b, key);
      if ((typeof item2 === 'undefined' && !$mapHas(b, key)) || !internalDeepEqual(item1, item2, opts, channel)) {
        if (opts.strict) {
          return false;
        }
        if (!mapMightHaveLoosePrim(a, b, key, item1, opts, channel)) {
          return false;
        }
        if (!set) { set = new $Set(); }
        $setAdd(set, key);
      }
    }
  }

  if (set) {
    while ((resultB = iB.next()) && !resultB.done) {
      key = resultB.value[0];
      item2 = resultB.value[1];
      if (key && typeof key === 'object') {
        if (!mapHasEqualEntry(set, a, key, item2, opts, channel)) {
          return false;
        }
      } else if (
        !opts.strict
        && (!a.has(key) || !internalDeepEqual($mapGet(a, key), item2, opts, channel))
        && !mapHasEqualEntry(set, a, key, item2, assign({}, opts, { strict: false }), channel)
      ) {
        return false;
      }
    }
    return $setSize(set) === 0;
  }
  return true;
}

function objEquiv(a, b, opts, channel) {
  /* eslint max-statements: [2, 100], max-lines-per-function: [2, 120], max-depth: [2, 5] */
  var i, key;

  if (typeof a !== typeof b) { return false; }
  if (a == null || b == null) { return false; }

  if ($objToString(a) !== $objToString(b)) { return false; }

  if (isArguments(a) !== isArguments(b)) { return false; }

  var aIsArray = isArray(a);
  var bIsArray = isArray(b);
  if (aIsArray !== bIsArray) { return false; }

  // TODO: replace when a cross-realm brand check is available
  var aIsError = a instanceof Error;
  var bIsError = b instanceof Error;
  if (aIsError !== bIsError) { return false; }
  if (aIsError || bIsError) {
    if (a.name !== b.name || a.message !== b.message) { return false; }
  }

  var aIsRegex = isRegex(a);
  var bIsRegex = isRegex(b);
  if (aIsRegex !== bIsRegex) { return false; }
  if ((aIsRegex || bIsRegex) && (a.source !== b.source || flags(a) !== flags(b))) {
    return false;
  }

  var aIsDate = isDate(a);
  var bIsDate = isDate(b);
  if (aIsDate !== bIsDate) { return false; }
  if (aIsDate || bIsDate) { // && would work too, because both are true or both false here
    if ($getTime(a) !== $getTime(b)) { return false; }
  }
  if (opts.strict && gPO && gPO(a) !== gPO(b)) { return false; }

  if (whichTypedArray(a) !== whichTypedArray(b)) {
    return false;
  }

  var aIsBuffer = isBuffer(a);
  var bIsBuffer = isBuffer(b);
  if (aIsBuffer !== bIsBuffer) { return false; }
  if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
    if (a.length !== b.length) { return false; }
    for (i = 0; i < a.length; i++) {
      if (a[i] !== b[i]) { return false; }
    }
    return true;
  }

  if (typeof a !== typeof b) { return false; }

  var ka = objectKeys(a);
  var kb = objectKeys(b);
  // having the same number of owned properties (keys incorporates hasOwnProperty)
  if (ka.length !== kb.length) { return false; }

  // the same set of keys (although not necessarily the same order),
  ka.sort();
  kb.sort();
  // ~~~cheap key test
  for (i = ka.length - 1; i >= 0; i--) {
    if (ka[i] != kb[i]) { return false; } // eslint-disable-line eqeqeq
  }

  // equivalent values for every corresponding key, and ~~~possibly expensive deep test
  for (i = ka.length - 1; i >= 0; i--) {
    key = ka[i];
    if (!internalDeepEqual(a[key], b[key], opts, channel)) { return false; }
  }

  var aCollection = whichCollection(a);
  var bCollection = whichCollection(b);
  if (aCollection !== bCollection) {
    return false;
  }
  if (aCollection === 'Set' || bCollection === 'Set') { // aCollection === bCollection
    return setEquiv(a, b, opts, channel);
  }
  if (aCollection === 'Map') { // aCollection === bCollection
    return mapEquiv(a, b, opts, channel);
  }

  return true;
}

module.exports = function deepEqual(a, b, opts) {
  return internalDeepEqual(a, b, opts, getSideChannel());
};


/***/ }),

/***/ 2854:
/*!****************************************!*\
  !*** ../node_modules/foreach/index.js ***!
  \****************************************/
/***/ ((module) => {


var hasOwn = Object.prototype.hasOwnProperty;
var toString = Object.prototype.toString;

module.exports = function forEach (obj, fn, ctx) {
    if (toString.call(fn) !== '[object Function]') {
        throw new TypeError('iterator must be a function');
    }
    var l = obj.length;
    if (l === +l) {
        for (var i = 0; i < l; i++) {
            fn.call(ctx, obj[i], i, obj);
        }
    } else {
        for (var k in obj) {
            if (hasOwn.call(obj, k)) {
                fn.call(ctx, obj[k], k, obj);
            }
        }
    }
};



/***/ }),

/***/ 5960:
/*!********************************************!*\
  !*** ../node_modules/has-bigints/index.js ***!
  \********************************************/
/***/ ((module) => {

"use strict";


var $BigInt = global.BigInt;

module.exports = function hasNativeBigInts() {
	return typeof $BigInt === 'function'
		&& typeof BigInt === 'function'
		&& typeof $BigInt(42) === 'bigint' // eslint-disable-line no-magic-numbers
		&& typeof BigInt(42) === 'bigint'; // eslint-disable-line no-magic-numbers
};


/***/ }),

/***/ 4088:
/*!************************************************!*\
  !*** ../node_modules/has-tostringtag/shams.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasSymbols = __webpack_require__(/*! has-symbols/shams */ 7397);

module.exports = function hasToStringTagShams() {
	return hasSymbols() && !!Symbol.toStringTag;
};


/***/ }),

/***/ 1492:
/*!*********************************************!*\
  !*** ../node_modules/is-arguments/index.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);

var $toString = callBound('Object.prototype.toString');

var isStandardArguments = function isArguments(value) {
	if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
		return false;
	}
	return $toString(value) === '[object Arguments]';
};

var isLegacyArguments = function isArguments(value) {
	if (isStandardArguments(value)) {
		return true;
	}
	return value !== null &&
		typeof value === 'object' &&
		typeof value.length === 'number' &&
		value.length >= 0 &&
		$toString(value) !== '[object Array]' &&
		$toString(value.callee) === '[object Function]';
};

var supportsStandardArguments = (function () {
	return isStandardArguments(arguments);
}());

isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests

module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;


/***/ }),

/***/ 6987:
/*!******************************************!*\
  !*** ../node_modules/is-bigint/index.js ***!
  \******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var hasBigInts = __webpack_require__(/*! has-bigints */ 5960)();

if (hasBigInts) {
	var bigIntValueOf = BigInt.prototype.valueOf;
	var tryBigInt = function tryBigIntObject(value) {
		try {
			bigIntValueOf.call(value);
			return true;
		} catch (e) {
		}
		return false;
	};

	module.exports = function isBigInt(value) {
		if (
			value === null
			|| typeof value === 'undefined'
			|| typeof value === 'boolean'
			|| typeof value === 'string'
			|| typeof value === 'number'
			|| typeof value === 'symbol'
			|| typeof value === 'function'
		) {
			return false;
		}
		if (typeof value === 'bigint') {
			return true;
		}

		return tryBigInt(value);
	};
} else {
	module.exports = function isBigInt(value) {
		return  false && 0;
	};
}


/***/ }),

/***/ 4942:
/*!**************************************************!*\
  !*** ../node_modules/is-boolean-object/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);
var $boolToStr = callBound('Boolean.prototype.toString');
var $toString = callBound('Object.prototype.toString');

var tryBooleanObject = function booleanBrandCheck(value) {
	try {
		$boolToStr(value);
		return true;
	} catch (e) {
		return false;
	}
};
var boolClass = '[object Boolean]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();

module.exports = function isBoolean(value) {
	if (typeof value === 'boolean') {
		return true;
	}
	if (value === null || typeof value !== 'object') {
		return false;
	}
	return hasToStringTag && Symbol.toStringTag in value ? tryBooleanObject(value) : $toString(value) === boolClass;
};


/***/ }),

/***/ 5339:
/*!***************************************!*\
  !*** ../node_modules/is-map/index.js ***!
  \***************************************/
/***/ ((module) => {

"use strict";


var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;

var exported;

if (!$Map) {
	// eslint-disable-next-line no-unused-vars
	exported = function isMap(x) {
		// `Map` is not present in this environment.
		return false;
	};
}

var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$mapHas) {
	// eslint-disable-next-line no-unused-vars
	exported = function isMap(x) {
		// `Map` does not have a `has` method
		return false;
	};
}

module.exports = exported || function isMap(x) {
	if (!x || typeof x !== 'object') {
		return false;
	}
	try {
		$mapHas.call(x);
		if ($setHas) {
			try {
				$setHas.call(x);
			} catch (e) {
				return true;
			}
		}
		return x instanceof $Map; // core-js workaround, pre-v2.5.0
	} catch (e) {}
	return false;
};


/***/ }),

/***/ 9531:
/*!*************************************************!*\
  !*** ../node_modules/is-number-object/index.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var numToStr = Number.prototype.toString;
var tryNumberObject = function tryNumberObject(value) {
	try {
		numToStr.call(value);
		return true;
	} catch (e) {
		return false;
	}
};
var toStr = Object.prototype.toString;
var numClass = '[object Number]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();

module.exports = function isNumberObject(value) {
	if (typeof value === 'number') {
		return true;
	}
	if (typeof value !== 'object') {
		return false;
	}
	return hasToStringTag ? tryNumberObject(value) : toStr.call(value) === numClass;
};


/***/ }),

/***/ 1970:
/*!************************************************!*\
  !*** ../node_modules/is-plain-object/index.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



var isObject = __webpack_require__(/*! isobject */ 5428);

function isObjectObject(o) {
  return isObject(o) === true
    && Object.prototype.toString.call(o) === '[object Object]';
}

module.exports = function isPlainObject(o) {
  var ctor,prot;

  if (isObjectObject(o) === false) return false;

  // If has modified constructor
  ctor = o.constructor;
  if (typeof ctor !== 'function') return false;

  // If has modified prototype
  prot = ctor.prototype;
  if (isObjectObject(prot) === false) return false;

  // If constructor does not have an Object-specific method
  if (prot.hasOwnProperty('isPrototypeOf') === false) {
    return false;
  }

  // Most likely a plain Object
  return true;
};


/***/ }),

/***/ 2923:
/*!***************************************!*\
  !*** ../node_modules/is-set/index.js ***!
  \***************************************/
/***/ ((module) => {

"use strict";


var $Map = typeof Map === 'function' && Map.prototype ? Map : null;
var $Set = typeof Set === 'function' && Set.prototype ? Set : null;

var exported;

if (!$Set) {
	// eslint-disable-next-line no-unused-vars
	exported = function isSet(x) {
		// `Set` is not present in this environment.
		return false;
	};
}

var $mapHas = $Map ? Map.prototype.has : null;
var $setHas = $Set ? Set.prototype.has : null;
if (!exported && !$setHas) {
	// eslint-disable-next-line no-unused-vars
	exported = function isSet(x) {
		// `Set` does not have a `has` method
		return false;
	};
}

module.exports = exported || function isSet(x) {
	if (!x || typeof x !== 'object') {
		return false;
	}
	try {
		$setHas.call(x);
		if ($mapHas) {
			try {
				$mapHas.call(x);
			} catch (e) {
				return true;
			}
		}
		return x instanceof $Set; // core-js workaround, pre-v2.5.0
	} catch (e) {}
	return false;
};


/***/ }),

/***/ 8550:
/*!******************************************!*\
  !*** ../node_modules/is-string/index.js ***!
  \******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var strValue = String.prototype.valueOf;
var tryStringObject = function tryStringObject(value) {
	try {
		strValue.call(value);
		return true;
	} catch (e) {
		return false;
	}
};
var toStr = Object.prototype.toString;
var strClass = '[object String]';
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();

module.exports = function isString(value) {
	if (typeof value === 'string') {
		return true;
	}
	if (typeof value !== 'object') {
		return false;
	}
	return hasToStringTag ? tryStringObject(value) : toStr.call(value) === strClass;
};


/***/ }),

/***/ 3163:
/*!***********************************************!*\
  !*** ../node_modules/is-typed-array/index.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var forEach = __webpack_require__(/*! foreach */ 2854);
var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 8642);
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);

var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();

var typedArrays = availableTypedArrays();

var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
	for (var i = 0; i < array.length; i += 1) {
		if (array[i] === value) {
			return i;
		}
	}
	return -1;
};
var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__(/*! es-abstract/helpers/getOwnPropertyDescriptor */ 2087);
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
	forEach(typedArrays, function (typedArray) {
		var arr = new global[typedArray]();
		if (Symbol.toStringTag in arr) {
			var proto = getPrototypeOf(arr);
			var descriptor = gOPD(proto, Symbol.toStringTag);
			if (!descriptor) {
				var superProto = getPrototypeOf(proto);
				descriptor = gOPD(superProto, Symbol.toStringTag);
			}
			toStrTags[typedArray] = descriptor.get;
		}
	});
}

var tryTypedArrays = function tryAllTypedArrays(value) {
	var anyTrue = false;
	forEach(toStrTags, function (getter, typedArray) {
		if (!anyTrue) {
			try {
				anyTrue = getter.call(value) === typedArray;
			} catch (e) { /**/ }
		}
	});
	return anyTrue;
};

module.exports = function isTypedArray(value) {
	if (!value || typeof value !== 'object') { return false; }
	if (!hasToStringTag || !(Symbol.toStringTag in value)) {
		var tag = $slice($toString(value), 8, -1);
		return $indexOf(typedArrays, tag) > -1;
	}
	if (!gOPD) { return false; }
	return tryTypedArrays(value);
};


/***/ }),

/***/ 3342:
/*!*******************************************!*\
  !*** ../node_modules/is-weakmap/index.js ***!
  \*******************************************/
/***/ ((module) => {

"use strict";


var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;

var exported;

if (!$WeakMap) {
	// eslint-disable-next-line no-unused-vars
	exported = function isWeakMap(x) {
		// `WeakMap` is not present in this environment.
		return false;
	};
}

var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$mapHas) {
	// eslint-disable-next-line no-unused-vars
	exported = function isWeakMap(x) {
		// `WeakMap` does not have a `has` method
		return false;
	};
}

module.exports = exported || function isWeakMap(x) {
	if (!x || typeof x !== 'object') {
		return false;
	}
	try {
		$mapHas.call(x, $mapHas);
		if ($setHas) {
			try {
				$setHas.call(x, $setHas);
			} catch (e) {
				return true;
			}
		}
		return x instanceof $WeakMap; // core-js workaround, pre-v3
	} catch (e) {}
	return false;
};


/***/ }),

/***/ 4175:
/*!*******************************************!*\
  !*** ../node_modules/is-weakset/index.js ***!
  \*******************************************/
/***/ ((module) => {

"use strict";


var $WeakMap = typeof WeakMap === 'function' && WeakMap.prototype ? WeakMap : null;
var $WeakSet = typeof WeakSet === 'function' && WeakSet.prototype ? WeakSet : null;

var exported;

if (!$WeakMap) {
	// eslint-disable-next-line no-unused-vars
	exported = function isWeakSet(x) {
		// `WeakSet` is not present in this environment.
		return false;
	};
}

var $mapHas = $WeakMap ? $WeakMap.prototype.has : null;
var $setHas = $WeakSet ? $WeakSet.prototype.has : null;
if (!exported && !$setHas) {
	// eslint-disable-next-line no-unused-vars
	module.exports = function isWeakSet(x) {
		// `WeakSet` does not have a `has` method
		return false;
	};
}

module.exports = exported || function isWeakSet(x) {
	if (!x || typeof x !== 'object') {
		return false;
	}
	try {
		$setHas.call(x, $setHas);
		if ($mapHas) {
			try {
				$mapHas.call(x, $mapHas);
			} catch (e) {
				return true;
			}
		}
		return x instanceof $WeakSet; // core-js workaround, pre-v3
	} catch (e) {}
	return false;
};


/***/ }),

/***/ 5428:
/*!*****************************************!*\
  !*** ../node_modules/isobject/index.js ***!
  \*****************************************/
/***/ ((module) => {

"use strict";
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */



module.exports = function isObject(val) {
  return val != null && typeof val === 'object' && Array.isArray(val) === false;
};


/***/ }),

/***/ 5626:
/*!****************************************!*\
  !*** ../node_modules/kind-of/index.js ***!
  \****************************************/
/***/ ((module) => {

var toString = Object.prototype.toString;

module.exports = function kindOf(val) {
  if (val === void 0) return 'undefined';
  if (val === null) return 'null';

  var type = typeof val;
  if (type === 'boolean') return 'boolean';
  if (type === 'string') return 'string';
  if (type === 'number') return 'number';
  if (type === 'symbol') return 'symbol';
  if (type === 'function') {
    return isGeneratorFn(val) ? 'generatorfunction' : 'function';
  }

  if (isArray(val)) return 'array';
  if (isBuffer(val)) return 'buffer';
  if (isArguments(val)) return 'arguments';
  if (isDate(val)) return 'date';
  if (isError(val)) return 'error';
  if (isRegexp(val)) return 'regexp';

  switch (ctorName(val)) {
    case 'Symbol': return 'symbol';
    case 'Promise': return 'promise';

    // Set, Map, WeakSet, WeakMap
    case 'WeakMap': return 'weakmap';
    case 'WeakSet': return 'weakset';
    case 'Map': return 'map';
    case 'Set': return 'set';

    // 8-bit typed arrays
    case 'Int8Array': return 'int8array';
    case 'Uint8Array': return 'uint8array';
    case 'Uint8ClampedArray': return 'uint8clampedarray';

    // 16-bit typed arrays
    case 'Int16Array': return 'int16array';
    case 'Uint16Array': return 'uint16array';

    // 32-bit typed arrays
    case 'Int32Array': return 'int32array';
    case 'Uint32Array': return 'uint32array';
    case 'Float32Array': return 'float32array';
    case 'Float64Array': return 'float64array';
  }

  if (isGeneratorObj(val)) {
    return 'generator';
  }

  // Non-plain objects
  type = toString.call(val);
  switch (type) {
    case '[object Object]': return 'object';
    // iterators
    case '[object Map Iterator]': return 'mapiterator';
    case '[object Set Iterator]': return 'setiterator';
    case '[object String Iterator]': return 'stringiterator';
    case '[object Array Iterator]': return 'arrayiterator';
  }

  // other
  return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
};

function ctorName(val) {
  return typeof val.constructor === 'function' ? val.constructor.name : null;
}

function isArray(val) {
  if (Array.isArray) return Array.isArray(val);
  return val instanceof Array;
}

function isError(val) {
  return val instanceof Error || (typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number');
}

function isDate(val) {
  if (val instanceof Date) return true;
  return typeof val.toDateString === 'function'
    && typeof val.getDate === 'function'
    && typeof val.setDate === 'function';
}

function isRegexp(val) {
  if (val instanceof RegExp) return true;
  return typeof val.flags === 'string'
    && typeof val.ignoreCase === 'boolean'
    && typeof val.multiline === 'boolean'
    && typeof val.global === 'boolean';
}

function isGeneratorFn(name, val) {
  return ctorName(name) === 'GeneratorFunction';
}

function isGeneratorObj(val) {
  return typeof val.throw === 'function'
    && typeof val.return === 'function'
    && typeof val.next === 'function';
}

function isArguments(val) {
  try {
    if (typeof val.length === 'number' && typeof val.callee === 'function') {
      return true;
    }
  } catch (err) {
    if (err.message.indexOf('callee') !== -1) {
      return true;
    }
  }
  return false;
}

/**
 * If you need to support Safari 5-7 (8-10 yr-old browser),
 * take a look at https://github.com/feross/is-buffer
 */

function isBuffer(val) {
  if (val.constructor && typeof val.constructor.isBuffer === 'function') {
    return val.constructor.isBuffer(val);
  }
  return false;
}


/***/ }),

/***/ 7741:
/*!***************************************************!*\
  !*** ../node_modules/object-is/implementation.js ***!
  \***************************************************/
/***/ ((module) => {

"use strict";


var numberIsNaN = function (value) {
	return value !== value;
};

module.exports = function is(a, b) {
	if (a === 0 && b === 0) {
		return 1 / a === 1 / b;
	}
	if (a === b) {
		return true;
	}
	if (numberIsNaN(a) && numberIsNaN(b)) {
		return true;
	}
	return false;
};



/***/ }),

/***/ 8034:
/*!******************************************!*\
  !*** ../node_modules/object-is/index.js ***!
  \******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var define = __webpack_require__(/*! define-properties */ 4004);
var callBind = __webpack_require__(/*! call-bind */ 2103);

var implementation = __webpack_require__(/*! ./implementation */ 7741);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 5721);
var shim = __webpack_require__(/*! ./shim */ 79);

var polyfill = callBind(getPolyfill(), Object);

define(polyfill, {
	getPolyfill: getPolyfill,
	implementation: implementation,
	shim: shim
});

module.exports = polyfill;


/***/ }),

/***/ 5721:
/*!*********************************************!*\
  !*** ../node_modules/object-is/polyfill.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 7741);

module.exports = function getPolyfill() {
	return typeof Object.is === 'function' ? Object.is : implementation;
};


/***/ }),

/***/ 79:
/*!*****************************************!*\
  !*** ../node_modules/object-is/shim.js ***!
  \*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var getPolyfill = __webpack_require__(/*! ./polyfill */ 5721);
var define = __webpack_require__(/*! define-properties */ 4004);

module.exports = function shimObjectIs() {
	var polyfill = getPolyfill();
	define(Object, { is: polyfill }, {
		is: function testObjectIs() {
			return Object.is !== polyfill;
		}
	});
	return polyfill;
};


/***/ }),

/***/ 9941:
/*!********************************************!*\
  !*** ../node_modules/pug-runtime/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var pug_has_own_property = Object.prototype.hasOwnProperty;

/**
 * Merge two attribute objects giving precedence
 * to values in object `b`. Classes are special-cased
 * allowing for arrays and merging/joining appropriately
 * resulting in a string.
 *
 * @param {Object} a
 * @param {Object} b
 * @return {Object} a
 * @api private
 */

exports.merge = pug_merge;
function pug_merge(a, b) {
  if (arguments.length === 1) {
    var attrs = a[0];
    for (var i = 1; i < a.length; i++) {
      attrs = pug_merge(attrs, a[i]);
    }
    return attrs;
  }

  for (var key in b) {
    if (key === 'class') {
      var valA = a[key] || [];
      a[key] = (Array.isArray(valA) ? valA : [valA]).concat(b[key] || []);
    } else if (key === 'style') {
      var valA = pug_style(a[key]);
      valA = valA && valA[valA.length - 1] !== ';' ? valA + ';' : valA;
      var valB = pug_style(b[key]);
      valB = valB && valB[valB.length - 1] !== ';' ? valB + ';' : valB;
      a[key] = valA + valB;
    } else {
      a[key] = b[key];
    }
  }

  return a;
}

/**
 * Process array, object, or string as a string of classes delimited by a space.
 *
 * If `val` is an array, all members of it and its subarrays are counted as
 * classes. If `escaping` is an array, then whether or not the item in `val` is
 * escaped depends on the corresponding item in `escaping`. If `escaping` is
 * not an array, no escaping is done.
 *
 * If `val` is an object, all the keys whose value is truthy are counted as
 * classes. No escaping is done.
 *
 * If `val` is a string, it is counted as a class. No escaping is done.
 *
 * @param {(Array.<string>|Object.<string, boolean>|string)} val
 * @param {?Array.<string>} escaping
 * @return {String}
 */
exports.classes = pug_classes;
function pug_classes_array(val, escaping) {
  var classString = '',
    className,
    padding = '',
    escapeEnabled = Array.isArray(escaping);
  for (var i = 0; i < val.length; i++) {
    className = pug_classes(val[i]);
    if (!className) continue;
    escapeEnabled && escaping[i] && (className = pug_escape(className));
    classString = classString + padding + className;
    padding = ' ';
  }
  return classString;
}
function pug_classes_object(val) {
  var classString = '',
    padding = '';
  for (var key in val) {
    if (key && val[key] && pug_has_own_property.call(val, key)) {
      classString = classString + padding + key;
      padding = ' ';
    }
  }
  return classString;
}
function pug_classes(val, escaping) {
  if (Array.isArray(val)) {
    return pug_classes_array(val, escaping);
  } else if (val && typeof val === 'object') {
    return pug_classes_object(val);
  } else {
    return val || '';
  }
}

/**
 * Convert object or string to a string of CSS styles delimited by a semicolon.
 *
 * @param {(Object.<string, string>|string)} val
 * @return {String}
 */

exports.style = pug_style;
function pug_style(val) {
  if (!val) return '';
  if (typeof val === 'object') {
    var out = '';
    for (var style in val) {
      /* istanbul ignore else */
      if (pug_has_own_property.call(val, style)) {
        out = out + style + ':' + val[style] + ';';
      }
    }
    return out;
  } else {
    return val + '';
  }
}

/**
 * Render the given attribute.
 *
 * @param {String} key
 * @param {String} val
 * @param {Boolean} escaped
 * @param {Boolean} terse
 * @return {String}
 */
exports.attr = pug_attr;
function pug_attr(key, val, escaped, terse) {
  if (
    val === false ||
    val == null ||
    (!val && (key === 'class' || key === 'style'))
  ) {
    return '';
  }
  if (val === true) {
    return ' ' + (terse ? key : key + '="' + key + '"');
  }
  var type = typeof val;
  if (
    (type === 'object' || type === 'function') &&
    typeof val.toJSON === 'function'
  ) {
    val = val.toJSON();
  }
  if (typeof val !== 'string') {
    val = JSON.stringify(val);
    if (!escaped && val.indexOf('"') !== -1) {
      return ' ' + key + "='" + val.replace(/'/g, '&#39;') + "'";
    }
  }
  if (escaped) val = pug_escape(val);
  return ' ' + key + '="' + val + '"';
}

/**
 * Render the given attributes object.
 *
 * @param {Object} obj
 * @param {Object} terse whether to use HTML5 terse boolean attributes
 * @return {String}
 */
exports.attrs = pug_attrs;
function pug_attrs(obj, terse) {
  var attrs = '';

  for (var key in obj) {
    if (pug_has_own_property.call(obj, key)) {
      var val = obj[key];

      if ('class' === key) {
        val = pug_classes(val);
        attrs = pug_attr(key, val, false, terse) + attrs;
        continue;
      }
      if ('style' === key) {
        val = pug_style(val);
      }
      attrs += pug_attr(key, val, false, terse);
    }
  }

  return attrs;
}

/**
 * Escape the given string of `html`.
 *
 * @param {String} html
 * @return {String}
 * @api private
 */

var pug_match_html = /["&<>]/;
exports.escape = pug_escape;
function pug_escape(_html) {
  var html = '' + _html;
  var regexResult = pug_match_html.exec(html);
  if (!regexResult) return _html;

  var result = '';
  var i, lastIndex, escape;
  for (i = regexResult.index, lastIndex = 0; i < html.length; i++) {
    switch (html.charCodeAt(i)) {
      case 34:
        escape = '&quot;';
        break;
      case 38:
        escape = '&amp;';
        break;
      case 60:
        escape = '&lt;';
        break;
      case 62:
        escape = '&gt;';
        break;
      default:
        continue;
    }
    if (lastIndex !== i) result += html.substring(lastIndex, i);
    lastIndex = i + 1;
    result += escape;
  }
  if (lastIndex !== i) return result + html.substring(lastIndex, i);
  else return result;
}

/**
 * Re-throw the given `err` in context to the
 * the pug in `filename` at the given `lineno`.
 *
 * @param {Error} err
 * @param {String} filename
 * @param {String} lineno
 * @param {String} str original source
 * @api private
 */

exports.rethrow = pug_rethrow;
function pug_rethrow(err, filename, lineno, str) {
  if (!(err instanceof Error)) throw err;
  if ((typeof window != 'undefined' || !filename) && !str) {
    err.message += ' on line ' + lineno;
    throw err;
  }
  var context, lines, start, end;
  try {
    str = str || (__webpack_require__(/*! fs */ 2089).readFileSync)(filename, {encoding: 'utf8'});
    context = 3;
    lines = str.split('\n');
    start = Math.max(lineno - context, 0);
    end = Math.min(lines.length, lineno + context);
  } catch (ex) {
    err.message +=
      ' - could not read from ' + filename + ' (' + ex.message + ')';
    pug_rethrow(err, null, lineno);
    return;
  }

  // Error context
  context = lines
    .slice(start, end)
    .map(function(line, i) {
      var curr = i + start + 1;
      return (curr == lineno ? '  > ' : '    ') + curr + '| ' + line;
    })
    .join('\n');

  // Alter exception message
  err.path = filename;
  try {
    err.message =
      (filename || 'Pug') +
      ':' +
      lineno +
      '\n' +
      context +
      '\n\n' +
      err.message;
  } catch (e) {}
  throw err;
}


/***/ }),

/***/ 4290:
/*!****************************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/implementation.js ***!
  \****************************************************************/
/***/ ((module) => {

"use strict";


var $Object = Object;
var $TypeError = TypeError;

module.exports = function flags() {
	if (this != null && this !== $Object(this)) {
		throw new $TypeError('RegExp.prototype.flags getter called on non-object');
	}
	var result = '';
	if (this.global) {
		result += 'g';
	}
	if (this.ignoreCase) {
		result += 'i';
	}
	if (this.multiline) {
		result += 'm';
	}
	if (this.dotAll) {
		result += 's';
	}
	if (this.unicode) {
		result += 'u';
	}
	if (this.sticky) {
		result += 'y';
	}
	return result;
};


/***/ }),

/***/ 6377:
/*!*******************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/index.js ***!
  \*******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var define = __webpack_require__(/*! define-properties */ 4004);
var callBind = __webpack_require__(/*! call-bind */ 2103);

var implementation = __webpack_require__(/*! ./implementation */ 4290);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 8138);
var shim = __webpack_require__(/*! ./shim */ 2577);

var flagsBound = callBind(implementation);

define(flagsBound, {
	getPolyfill: getPolyfill,
	implementation: implementation,
	shim: shim
});

module.exports = flagsBound;


/***/ }),

/***/ 8138:
/*!**********************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/polyfill.js ***!
  \**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var implementation = __webpack_require__(/*! ./implementation */ 4290);

var supportsDescriptors = (__webpack_require__(/*! define-properties */ 4004).supportsDescriptors);
var $gOPD = Object.getOwnPropertyDescriptor;
var $TypeError = TypeError;

module.exports = function getPolyfill() {
	if (!supportsDescriptors) {
		throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
	}
	if ((/a/mig).flags === 'gim') {
		var descriptor = $gOPD(RegExp.prototype, 'flags');
		if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {
			return descriptor.get;
		}
	}
	return implementation;
};


/***/ }),

/***/ 2577:
/*!******************************************************!*\
  !*** ../node_modules/regexp.prototype.flags/shim.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var supportsDescriptors = (__webpack_require__(/*! define-properties */ 4004).supportsDescriptors);
var getPolyfill = __webpack_require__(/*! ./polyfill */ 8138);
var gOPD = Object.getOwnPropertyDescriptor;
var defineProperty = Object.defineProperty;
var TypeErr = TypeError;
var getProto = Object.getPrototypeOf;
var regex = /a/;

module.exports = function shimFlags() {
	if (!supportsDescriptors || !getProto) {
		throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
	}
	var polyfill = getPolyfill();
	var proto = getProto(regex);
	var descriptor = gOPD(proto, 'flags');
	if (!descriptor || descriptor.get !== polyfill) {
		defineProperty(proto, 'flags', {
			configurable: true,
			enumerable: false,
			get: polyfill
		});
	}
	return polyfill;
};


/***/ }),

/***/ 8525:
/*!**********************************************!*\
  !*** ../node_modules/shallow-clone/index.js ***!
  \**********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";
/*!
 * shallow-clone <https://github.com/jonschlinkert/shallow-clone>
 *
 * Copyright (c) 2015-present, Jon Schlinkert.
 * Released under the MIT License.
 */



const valueOf = Symbol.prototype.valueOf;
const typeOf = __webpack_require__(/*! kind-of */ 5626);

function clone(val, deep) {
  switch (typeOf(val)) {
    case 'array':
      return val.slice();
    case 'object':
      return Object.assign({}, val);
    case 'date':
      return new val.constructor(Number(val));
    case 'map':
      return new Map(val);
    case 'set':
      return new Set(val);
    case 'buffer':
      return cloneBuffer(val);
    case 'symbol':
      return cloneSymbol(val);
    case 'arraybuffer':
      return cloneArrayBuffer(val);
    case 'float32array':
    case 'float64array':
    case 'int16array':
    case 'int32array':
    case 'int8array':
    case 'uint16array':
    case 'uint32array':
    case 'uint8clampedarray':
    case 'uint8array':
      return cloneTypedArray(val);
    case 'regexp':
      return cloneRegExp(val);
    case 'error':
      return Object.create(val);
    default: {
      return val;
    }
  }
}

function cloneRegExp(val) {
  const flags = val.flags !== void 0 ? val.flags : (/\w+$/.exec(val) || void 0);
  const re = new val.constructor(val.source, flags);
  re.lastIndex = val.lastIndex;
  return re;
}

function cloneArrayBuffer(val) {
  const res = new val.constructor(val.byteLength);
  new Uint8Array(res).set(new Uint8Array(val));
  return res;
}

function cloneTypedArray(val, deep) {
  return new val.constructor(val.buffer, val.byteOffset, val.length);
}

function cloneBuffer(val) {
  const len = val.length;
  const buf = Buffer.allocUnsafe ? Buffer.allocUnsafe(len) : Buffer.from(len);
  val.copy(buf);
  return buf;
}

function cloneSymbol(val) {
  return valueOf ? Object(valueOf.call(val)) : {};
}

/**
 * Expose `clone`
 */

module.exports = clone;


/***/ }),

/***/ 2650:
/*!********************************************!*\
  !*** ../node_modules/shell-quote/index.js ***!
  \********************************************/
/***/ ((__unused_webpack_module, exports) => {

exports.quote = function (xs) {
    return xs.map(function (s) {
        if (s && typeof s === 'object') {
            return s.op.replace(/(.)/g, '\\$1');
        }
        else if (/["\s]/.test(s) && !/'/.test(s)) {
            return "'" + s.replace(/(['\\])/g, '\\$1') + "'";
        }
        else if (/["'\s]/.test(s)) {
            return '"' + s.replace(/(["\\$`!])/g, '\\$1') + '"';
        }
        else {
            return String(s).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '$1\\$2');
        }
    }).join(' ');
};

// '<(' is process substitution operator and
// can be parsed the same as control operator
var CONTROL = '(?:' + [
    '\\|\\|', '\\&\\&', ';;', '\\|\\&', '\\<\\(', '>>', '>\\&', '[&;()|<>]'
].join('|') + ')';
var META = '|&;()<> \\t';
var BAREWORD = '(\\\\[\'"' + META + ']|[^\\s\'"' + META + '])+';
var SINGLE_QUOTE = '"((\\\\"|[^"])*?)"';
var DOUBLE_QUOTE = '\'((\\\\\'|[^\'])*?)\'';

var TOKEN = '';
for (var i = 0; i < 4; i++) {
    TOKEN += (Math.pow(16,8)*Math.random()).toString(16);
}

exports.parse = function (s, env, opts) {
    var mapped = parse(s, env, opts);
    if (typeof env !== 'function') return mapped;
    return mapped.reduce(function (acc, s) {
        if (typeof s === 'object') return acc.concat(s);
        var xs = s.split(RegExp('(' + TOKEN + '.*?' + TOKEN + ')', 'g'));
        if (xs.length === 1) return acc.concat(xs[0]);
        return acc.concat(xs.filter(Boolean).map(function (x) {
            if (RegExp('^' + TOKEN).test(x)) {
                return JSON.parse(x.split(TOKEN)[1]);
            }
            else return x;
        }));
    }, []);
};

function parse (s, env, opts) {
    var chunker = new RegExp([
        '(' + CONTROL + ')', // control chars
        '(' + BAREWORD + '|' + SINGLE_QUOTE + '|' + DOUBLE_QUOTE + ')*'
    ].join('|'), 'g');
    var match = s.match(chunker).filter(Boolean);
    var commented = false;

    if (!match) return [];
    if (!env) env = {};
    if (!opts) opts = {};
    return match.map(function (s, j) {
        if (commented) {
            return;
        }
        if (RegExp('^' + CONTROL + '$').test(s)) {
            return { op: s };
        }

        // Hand-written scanner/parser for Bash quoting rules:
        //
        //  1. inside single quotes, all characters are printed literally.
        //  2. inside double quotes, all characters are printed literally
        //     except variables prefixed by '$' and backslashes followed by
        //     either a double quote or another backslash.
        //  3. outside of any quotes, backslashes are treated as escape
        //     characters and not printed (unless they are themselves escaped)
        //  4. quote context can switch mid-token if there is no whitespace
        //     between the two quote contexts (e.g. all'one'"token" parses as
        //     "allonetoken")
        var SQ = "'";
        var DQ = '"';
        var DS = '$';
        var BS = opts.escape || '\\';
        var quote = false;
        var esc = false;
        var out = '';
        var isGlob = false;

        for (var i = 0, len = s.length; i < len; i++) {
            var c = s.charAt(i);
            isGlob = isGlob || (!quote && (c === '*' || c === '?'));
            if (esc) {
                out += c;
                esc = false;
            }
            else if (quote) {
                if (c === quote) {
                    quote = false;
                }
                else if (quote == SQ) {
                    out += c;
                }
                else { // Double quote
                    if (c === BS) {
                        i += 1;
                        c = s.charAt(i);
                        if (c === DQ || c === BS || c === DS) {
                            out += c;
                        } else {
                            out += BS + c;
                        }
                    }
                    else if (c === DS) {
                        out += parseEnvVar();
                    }
                    else {
                        out += c;
                    }
                }
            }
            else if (c === DQ || c === SQ) {
                quote = c;
            }
            else if (RegExp('^' + CONTROL + '$').test(c)) {
                return { op: s };
            }
            else if (RegExp('^#$').test(c)) {
                commented = true;
                if (out.length){
                    return [out, { comment: s.slice(i+1) + match.slice(j+1).join(' ') }];
                }
                return [{ comment: s.slice(i+1) + match.slice(j+1).join(' ') }];
            }
            else if (c === BS) {
                esc = true;
            }
            else if (c === DS) {
                out += parseEnvVar();
            }
            else out += c;
        }

        if (isGlob) return {op: 'glob', pattern: out};

        return out;

        function parseEnvVar() {
            i += 1;
            var varend, varname;
            //debugger
            if (s.charAt(i) === '{') {
                i += 1;
                if (s.charAt(i) === '}') {
                    throw new Error("Bad substitution: " + s.substr(i - 2, 3));
                }
                varend = s.indexOf('}', i);
                if (varend < 0) {
                    throw new Error("Bad substitution: " + s.substr(i));
                }
                varname = s.substr(i, varend - i);
                i = varend;
            }
            else if (/[*@#?$!_\-]/.test(s.charAt(i))) {
                varname = s.charAt(i);
                i += 1;
            }
            else {
                varend = s.substr(i).match(/[^\w\d_]/);
                if (!varend) {
                    varname = s.substr(i);
                    i = s.length;
                } else {
                    varname = s.substr(i, varend.index);
                    i += varend.index - 1;
                }
            }
            return getVar(null, '', varname);
        }
    })
    // finalize parsed aruments
    .reduce(function(prev, arg){
        if (arg === undefined){
            return prev;
        }
        return prev.concat(arg);
    },[]);

    function getVar (_, pre, key) {
        var r = typeof env === 'function' ? env(key) : env[key];
        if (r === undefined && key != '')
            r = '';
        else if (r === undefined)
            r = '$';

        if (typeof r === 'object') {
            return pre + TOKEN + JSON.stringify(r) + TOKEN;
        }
        else return pre + r;
    }
}


/***/ }),

/***/ 5651:
/*!*********************************************!*\
  !*** ../node_modules/side-channel/index.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 7422);
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);
var inspect = __webpack_require__(/*! object-inspect */ 5234);

var $TypeError = GetIntrinsic('%TypeError%');
var $WeakMap = GetIntrinsic('%WeakMap%', true);
var $Map = GetIntrinsic('%Map%', true);

var $weakMapGet = callBound('WeakMap.prototype.get', true);
var $weakMapSet = callBound('WeakMap.prototype.set', true);
var $weakMapHas = callBound('WeakMap.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSet = callBound('Map.prototype.set', true);
var $mapHas = callBound('Map.prototype.has', true);

/*
 * This function traverses the list returning the node corresponding to the
 * given key.
 *
 * That node is also moved to the head of the list, so that if it's accessed
 * again we don't need to traverse the whole list. By doing so, all the recently
 * used nodes can be accessed relatively quickly.
 */
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
	for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
		if (curr.key === key) {
			prev.next = curr.next;
			curr.next = list.next;
			list.next = curr; // eslint-disable-line no-param-reassign
			return curr;
		}
	}
};

var listGet = function (objects, key) {
	var node = listGetNode(objects, key);
	return node && node.value;
};
var listSet = function (objects, key, value) {
	var node = listGetNode(objects, key);
	if (node) {
		node.value = value;
	} else {
		// Prepend the new node to the beginning of the list
		objects.next = { // eslint-disable-line no-param-reassign
			key: key,
			next: objects.next,
			value: value
		};
	}
};
var listHas = function (objects, key) {
	return !!listGetNode(objects, key);
};

module.exports = function getSideChannel() {
	var $wm;
	var $m;
	var $o;
	var channel = {
		assert: function (key) {
			if (!channel.has(key)) {
				throw new $TypeError('Side channel does not contain ' + inspect(key));
			}
		},
		get: function (key) { // eslint-disable-line consistent-return
			if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
				if ($wm) {
					return $weakMapGet($wm, key);
				}
			} else if ($Map) {
				if ($m) {
					return $mapGet($m, key);
				}
			} else {
				if ($o) { // eslint-disable-line no-lonely-if
					return listGet($o, key);
				}
			}
		},
		has: function (key) {
			if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
				if ($wm) {
					return $weakMapHas($wm, key);
				}
			} else if ($Map) {
				if ($m) {
					return $mapHas($m, key);
				}
			} else {
				if ($o) { // eslint-disable-line no-lonely-if
					return listHas($o, key);
				}
			}
			return false;
		},
		set: function (key, value) {
			if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
				if (!$wm) {
					$wm = new $WeakMap();
				}
				$weakMapSet($wm, key, value);
			} else if ($Map) {
				if (!$m) {
					$m = new $Map();
				}
				$mapSet($m, key, value);
			} else {
				if (!$o) {
					/*
					 * Initialize the linked list as an empty node, so that we don't have
					 * to special-case handling of the first node: we can always refer to
					 * it as (previous node).next, instead of something like (list).head
					 */
					$o = { key: {}, next: null };
				}
				listSet($o, key, value);
			}
		}
	};
	return channel;
};


/***/ }),

/***/ 9806:
/*!*****************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
  \*****************************************************************************/
/***/ ((module) => {

"use strict";


var stylesInDOM = [];

function getIndexByIdentifier(identifier) {
  var result = -1;

  for (var i = 0; i < stylesInDOM.length; i++) {
    if (stylesInDOM[i].identifier === identifier) {
      result = i;
      break;
    }
  }

  return result;
}

function modulesToDom(list, options) {
  var idCountMap = {};
  var identifiers = [];

  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var id = options.base ? item[0] + options.base : item[0];
    var count = idCountMap[id] || 0;
    var identifier = "".concat(id, " ").concat(count);
    idCountMap[id] = count + 1;
    var indexByIdentifier = getIndexByIdentifier(identifier);
    var obj = {
      css: item[1],
      media: item[2],
      sourceMap: item[3],
      supports: item[4],
      layer: item[5]
    };

    if (indexByIdentifier !== -1) {
      stylesInDOM[indexByIdentifier].references++;
      stylesInDOM[indexByIdentifier].updater(obj);
    } else {
      var updater = addElementStyle(obj, options);
      options.byIndex = i;
      stylesInDOM.splice(i, 0, {
        identifier: identifier,
        updater: updater,
        references: 1
      });
    }

    identifiers.push(identifier);
  }

  return identifiers;
}

function addElementStyle(obj, options) {
  var api = options.domAPI(options);
  api.update(obj);

  var updater = function updater(newObj) {
    if (newObj) {
      if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
        return;
      }

      api.update(obj = newObj);
    } else {
      api.remove();
    }
  };

  return updater;
}

module.exports = function (list, options) {
  options = options || {};
  list = list || [];
  var lastIdentifiers = modulesToDom(list, options);
  return function update(newList) {
    newList = newList || [];

    for (var i = 0; i < lastIdentifiers.length; i++) {
      var identifier = lastIdentifiers[i];
      var index = getIndexByIdentifier(identifier);
      stylesInDOM[index].references--;
    }

    var newLastIdentifiers = modulesToDom(newList, options);

    for (var _i = 0; _i < lastIdentifiers.length; _i++) {
      var _identifier = lastIdentifiers[_i];

      var _index = getIndexByIdentifier(_identifier);

      if (stylesInDOM[_index].references === 0) {
        stylesInDOM[_index].updater();

        stylesInDOM.splice(_index, 1);
      }
    }

    lastIdentifiers = newLastIdentifiers;
  };
};

/***/ }),

/***/ 8215:
/*!*********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertBySelector.js ***!
  \*********************************************************************/
/***/ ((module) => {

"use strict";


var memo = {};
/* istanbul ignore next  */

function getTarget(target) {
  if (typeof memo[target] === "undefined") {
    var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself

    if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
      try {
        // This will throw an exception if access to iframe is blocked
        // due to cross-origin restrictions
        styleTarget = styleTarget.contentDocument.head;
      } catch (e) {
        // istanbul ignore next
        styleTarget = null;
      }
    }

    memo[target] = styleTarget;
  }

  return memo[target];
}
/* istanbul ignore next  */


function insertBySelector(insert, style) {
  var target = getTarget(insert);

  if (!target) {
    throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
  }

  target.appendChild(style);
}

module.exports = insertBySelector;

/***/ }),

/***/ 5603:
/*!***********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
  \***********************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function insertStyleElement(options) {
  var element = document.createElement("style");
  options.setAttributes(element, options.attributes);
  options.insert(element, options.options);
  return element;
}

module.exports = insertStyleElement;

/***/ }),

/***/ 8291:
/*!***********************************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
  \***********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


/* istanbul ignore next  */
function setAttributesWithoutAttributes(styleElement) {
  var nonce =  true ? __webpack_require__.nc : 0;

  if (nonce) {
    styleElement.setAttribute("nonce", nonce);
  }
}

module.exports = setAttributesWithoutAttributes;

/***/ }),

/***/ 3005:
/*!****************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
  \****************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function apply(styleElement, options, obj) {
  var css = "";

  if (obj.supports) {
    css += "@supports (".concat(obj.supports, ") {");
  }

  if (obj.media) {
    css += "@media ".concat(obj.media, " {");
  }

  var needLayer = typeof obj.layer !== "undefined";

  if (needLayer) {
    css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
  }

  css += obj.css;

  if (needLayer) {
    css += "}";
  }

  if (obj.media) {
    css += "}";
  }

  if (obj.supports) {
    css += "}";
  }

  var sourceMap = obj.sourceMap;

  if (sourceMap && typeof btoa !== "undefined") {
    css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
  } // For old IE

  /* istanbul ignore if  */


  options.styleTagTransform(css, styleElement, options.options);
}

function removeStyleElement(styleElement) {
  // istanbul ignore if
  if (styleElement.parentNode === null) {
    return false;
  }

  styleElement.parentNode.removeChild(styleElement);
}
/* istanbul ignore next  */


function domAPI(options) {
  var styleElement = options.insertStyleElement(options);
  return {
    update: function update(obj) {
      apply(styleElement, options, obj);
    },
    remove: function remove() {
      removeStyleElement(styleElement);
    }
  };
}

module.exports = domAPI;

/***/ }),

/***/ 8592:
/*!**********************************************************************!*\
  !*** ../node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
  \**********************************************************************/
/***/ ((module) => {

"use strict";


/* istanbul ignore next  */
function styleTagTransform(css, styleElement) {
  if (styleElement.styleSheet) {
    styleElement.styleSheet.cssText = css;
  } else {
    while (styleElement.firstChild) {
      styleElement.removeChild(styleElement.firstChild);
    }

    styleElement.appendChild(document.createTextNode(css));
  }
}

module.exports = styleTagTransform;

/***/ }),

/***/ 3976:
/*!******************************************************!*\
  !*** ../node_modules/which-boxed-primitive/index.js ***!
  \******************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var isString = __webpack_require__(/*! is-string */ 8550);
var isNumber = __webpack_require__(/*! is-number-object */ 9531);
var isBoolean = __webpack_require__(/*! is-boolean-object */ 4942);
var isSymbol = __webpack_require__(/*! is-symbol */ 3540);
var isBigInt = __webpack_require__(/*! is-bigint */ 6987);

// eslint-disable-next-line consistent-return
module.exports = function whichBoxedPrimitive(value) {
	// eslint-disable-next-line eqeqeq
	if (value == null || (typeof value !== 'object' && typeof value !== 'function')) {
		return null;
	}
	if (isString(value)) {
		return 'String';
	}
	if (isNumber(value)) {
		return 'Number';
	}
	if (isBoolean(value)) {
		return 'Boolean';
	}
	if (isSymbol(value)) {
		return 'Symbol';
	}
	if (isBigInt(value)) {
		return 'BigInt';
	}
};


/***/ }),

/***/ 8047:
/*!**************************************************!*\
  !*** ../node_modules/which-typed-array/index.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var forEach = __webpack_require__(/*! foreach */ 2854);
var availableTypedArrays = __webpack_require__(/*! available-typed-arrays */ 8642);
var callBound = __webpack_require__(/*! call-bind/callBound */ 3040);

var $toString = callBound('Object.prototype.toString');
var hasToStringTag = __webpack_require__(/*! has-tostringtag/shams */ 4088)();

var typedArrays = availableTypedArrays();

var $slice = callBound('String.prototype.slice');
var toStrTags = {};
var gOPD = __webpack_require__(/*! es-abstract/helpers/getOwnPropertyDescriptor */ 2087);
var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
if (hasToStringTag && gOPD && getPrototypeOf) {
	forEach(typedArrays, function (typedArray) {
		if (typeof global[typedArray] === 'function') {
			var arr = new global[typedArray]();
			if (Symbol.toStringTag in arr) {
				var proto = getPrototypeOf(arr);
				var descriptor = gOPD(proto, Symbol.toStringTag);
				if (!descriptor) {
					var superProto = getPrototypeOf(proto);
					descriptor = gOPD(superProto, Symbol.toStringTag);
				}
				toStrTags[typedArray] = descriptor.get;
			}
		}
	});
}

var tryTypedArrays = function tryAllTypedArrays(value) {
	var foundName = false;
	forEach(toStrTags, function (getter, typedArray) {
		if (!foundName) {
			try {
				var name = getter.call(value);
				if (name === typedArray) {
					foundName = name;
				}
			} catch (e) {}
		}
	});
	return foundName;
};

var isTypedArray = __webpack_require__(/*! is-typed-array */ 3163);

module.exports = function whichTypedArray(value) {
	if (!isTypedArray(value)) { return false; }
	if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
	return tryTypedArrays(value);
};


/***/ }),

/***/ 353:
/*!***************************************************!*\
  !*** ./node_modules/ansi-color/lib/ansi-color.js ***!
  \***************************************************/
/***/ ((__unused_webpack_module, exports) => {

// ANSI color code outputs for strings

var ANSI_CODES = {
  "off": 0,
  "bold": 1,
  "italic": 3,
  "underline": 4,
  "blink": 5,
  "inverse": 7,
  "hidden": 8,
  "black": 30,
  "red": 31,
  "green": 32,
  "yellow": 33,
  "blue": 34,
  "magenta": 35,
  "cyan": 36,
  "white": 37,
  "black_bg": 40,
  "red_bg": 41,
  "green_bg": 42,
  "yellow_bg": 43,
  "blue_bg": 44,
  "magenta_bg": 45,
  "cyan_bg": 46,
  "white_bg": 47
};

exports.t = function(str, color) {
  if(!color) return str;

  var color_attrs = color.split("+");
  var ansi_str = "";
  for(var i=0, attr; attr = color_attrs[i]; i++) {
    ansi_str += "\033[" + ANSI_CODES[attr] + "m";
  }
  ansi_str += str + "\033[" + ANSI_CODES["off"] + "m";
  return ansi_str;
};

/***/ }),

/***/ 1884:
/*!*******************************************!*\
  !*** ./node_modules/ansi-colors/index.js ***!
  \*******************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


const isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
const identity = val => val;

/* eslint-disable no-control-regex */
// this is a modified version of https://github.com/chalk/ansi-regex (MIT License)
const ANSI_REGEX = /[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g;

const create = () => {
  const colors = { enabled: true, visible: true, styles: {}, keys: {} };

  if ('FORCE_COLOR' in process.env) {
    colors.enabled = process.env.FORCE_COLOR !== '0';
  }

  const ansi = style => {
    let open = style.open = `\u001b[${style.codes[0]}m`;
    let close = style.close = `\u001b[${style.codes[1]}m`;
    let regex = style.regex = new RegExp(`\\u001b\\[${style.codes[1]}m`, 'g');
    style.wrap = (input, newline) => {
      if (input.includes(close)) input = input.replace(regex, close + open);
      let output = open + input + close;
      // see https://github.com/chalk/chalk/pull/92, thanks to the
      // chalk contributors for this fix. However, we've confirmed that
      // this issue is also present in Windows terminals
      return newline ? output.replace(/\r*\n/g, `${close}$&${open}`) : output;
    };
    return style;
  };

  const wrap = (style, input, newline) => {
    return typeof style === 'function' ? style(input) : style.wrap(input, newline);
  };

  const style = (input, stack) => {
    if (input === '' || input == null) return '';
    if (colors.enabled === false) return input;
    if (colors.visible === false) return '';
    let str = '' + input;
    let nl = str.includes('\n');
    let n = stack.length;
    if (n > 0 && stack.includes('unstyle')) {
      stack = [...new Set(['unstyle', ...stack])].reverse();
    }
    while (n-- > 0) str = wrap(colors.styles[stack[n]], str, nl);
    return str;
  };

  const define = (name, codes, type) => {
    colors.styles[name] = ansi({ name, codes });
    let keys = colors.keys[type] || (colors.keys[type] = []);
    keys.push(name);

    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(name) : [name];
        return color;
      }
    });
  };

  define('reset', [0, 0], 'modifier');
  define('bold', [1, 22], 'modifier');
  define('dim', [2, 22], 'modifier');
  define('italic', [3, 23], 'modifier');
  define('underline', [4, 24], 'modifier');
  define('inverse', [7, 27], 'modifier');
  define('hidden', [8, 28], 'modifier');
  define('strikethrough', [9, 29], 'modifier');

  define('black', [30, 39], 'color');
  define('red', [31, 39], 'color');
  define('green', [32, 39], 'color');
  define('yellow', [33, 39], 'color');
  define('blue', [34, 39], 'color');
  define('magenta', [35, 39], 'color');
  define('cyan', [36, 39], 'color');
  define('white', [37, 39], 'color');
  define('gray', [90, 39], 'color');
  define('grey', [90, 39], 'color');

  define('bgBlack', [40, 49], 'bg');
  define('bgRed', [41, 49], 'bg');
  define('bgGreen', [42, 49], 'bg');
  define('bgYellow', [43, 49], 'bg');
  define('bgBlue', [44, 49], 'bg');
  define('bgMagenta', [45, 49], 'bg');
  define('bgCyan', [46, 49], 'bg');
  define('bgWhite', [47, 49], 'bg');

  define('blackBright', [90, 39], 'bright');
  define('redBright', [91, 39], 'bright');
  define('greenBright', [92, 39], 'bright');
  define('yellowBright', [93, 39], 'bright');
  define('blueBright', [94, 39], 'bright');
  define('magentaBright', [95, 39], 'bright');
  define('cyanBright', [96, 39], 'bright');
  define('whiteBright', [97, 39], 'bright');

  define('bgBlackBright', [100, 49], 'bgBright');
  define('bgRedBright', [101, 49], 'bgBright');
  define('bgGreenBright', [102, 49], 'bgBright');
  define('bgYellowBright', [103, 49], 'bgBright');
  define('bgBlueBright', [104, 49], 'bgBright');
  define('bgMagentaBright', [105, 49], 'bgBright');
  define('bgCyanBright', [106, 49], 'bgBright');
  define('bgWhiteBright', [107, 49], 'bgBright');

  colors.ansiRegex = ANSI_REGEX;
  colors.hasColor = colors.hasAnsi = str => {
    colors.ansiRegex.lastIndex = 0;
    return typeof str === 'string' && str !== '' && colors.ansiRegex.test(str);
  };

  colors.alias = (name, color) => {
    let fn = typeof color === 'string' ? colors[color] : color;

    if (typeof fn !== 'function') {
      throw new TypeError('Expected alias to be the name of an existing color (string) or a function');
    }

    if (!fn.stack) {
      Reflect.defineProperty(fn, 'name', { value: name });
      colors.styles[name] = fn;
      fn.stack = [name];
    }

    Reflect.defineProperty(colors, name, {
      configurable: true,
      enumerable: true,
      set(value) {
        colors.alias(name, value);
      },
      get() {
        let color = input => style(input, color.stack);
        Reflect.setPrototypeOf(color, colors);
        color.stack = this.stack ? this.stack.concat(fn.stack) : fn.stack;
        return color;
      }
    });
  };

  colors.theme = custom => {
    if (!isObject(custom)) throw new TypeError('Expected theme to be an object');
    for (let name of Object.keys(custom)) {
      colors.alias(name, custom[name]);
    }
    return colors;
  };

  colors.alias('unstyle', str => {
    if (typeof str === 'string' && str !== '') {
      colors.ansiRegex.lastIndex = 0;
      return str.replace(colors.ansiRegex, '');
    }
    return '';
  });

  colors.alias('noop', str => str);
  colors.none = colors.clear = colors.noop;

  colors.stripColor = colors.unstyle;
  colors.symbols = __webpack_require__(/*! ./symbols */ 5435);
  colors.define = define;
  return colors;
};

module.exports = create();
module.exports.create = create;


/***/ }),

/***/ 5435:
/*!*********************************************!*\
  !*** ./node_modules/ansi-colors/symbols.js ***!
  \*********************************************/
/***/ ((module) => {

"use strict";


const isHyper = process.env.TERM_PROGRAM === 'Hyper';
const isWindows = process.platform === 'win32';
const isLinux = process.platform === 'linux';

const common = {
  ballotDisabled: '☒',
  ballotOff: '☐',
  ballotOn: '☑',
  bullet: '•',
  bulletWhite: '◦',
  fullBlock: '█',
  heart: '❤',
  identicalTo: '≡',
  line: '─',
  mark: '※',
  middot: '·',
  minus: '－',
  multiplication: '×',
  obelus: '÷',
  pencilDownRight: '✎',
  pencilRight: '✏',
  pencilUpRight: '✐',
  percent: '%',
  pilcrow2: '❡',
  pilcrow: '¶',
  plusMinus: '±',
  section: '§',
  starsOff: '☆',
  starsOn: '★',
  upDownArrow: '↕'
};

const windows = Object.assign({}, common, {
  check: '√',
  cross: '×',
  ellipsisLarge: '...',
  ellipsis: '...',
  info: 'i',
  question: '?',
  questionSmall: '?',
  pointer: '>',
  pointerSmall: '»',
  radioOff: '( )',
  radioOn: '(*)',
  warning: '‼'
});

const other = Object.assign({}, common, {
  ballotCross: '✘',
  check: '✔',
  cross: '✖',
  ellipsisLarge: '⋯',
  ellipsis: '…',
  info: 'ℹ',
  question: '?',
  questionFull: '？',
  questionSmall: '﹖',
  pointer: isLinux ? '▸' : '❯',
  pointerSmall: isLinux ? '‣' : '›',
  radioOff: '◯',
  radioOn: '◉',
  warning: '⚠'
});

module.exports = (isWindows && !isHyper) ? windows : other;
Reflect.defineProperty(module.exports, 'common', { enumerable: false, value: common });
Reflect.defineProperty(module.exports, 'windows', { enumerable: false, value: windows });
Reflect.defineProperty(module.exports, 'other', { enumerable: false, value: other });


/***/ }),

/***/ 8576:
/*!*************************************************!*\
  !*** ./node_modules/binstring/lib/binstring.js ***!
  \*************************************************/
/***/ ((module) => {

"use strict";


function bufferToBytes(data) {
  var rs = [];
  for (var i = 0; i < data.length; i++) {
    rs.push(data[i]);
  }
  return rs;
}

var binString = module.exports = function binString(data, options) {
  // Set default options
  options = options || {};
  if (Array.isArray(data)) {
    data = new Buffer(data);
  } else if (typeof data == 'number') {
    data = new Buffer(data.toString(16), 'hex');
  } else if (typeof data == 'string') {
    if (!options.in) {
      // Quack, quack! Duck-type the input
      if (data.slice(0,2) == '0x') {
        data = new Buffer(data.slice(2), 'hex');
      } else {
        // Binary string
        data = new Buffer(data, 'binary');
      }
    } else {
      data = new Buffer(data, options.in);
    }
  }
  if (!options.out) options.out = 'buffer';
  
  // Convert
  switch (options.out) {
    case 'buffer':
      return data;
    case 'hex':
      return data.toString('hex');
    case 'binary':
      return data.toString('binary');
    case 'utf8':
      return data.toString('utf8');
    case 'base64':
      return data.toString('base64');
    case 'bytes':
      return bufferToBytes(data);
    default:
      throw new Error('Output format "'+options.out+'" not understood');
  }
};


/***/ }),

/***/ 6121:
/*!**********************************************!*\
  !*** ./node_modules/buffer-replace/index.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


const replace = (buf, a, b) => {
  if (!Buffer.isBuffer(buf)) buf = Buffer(buf);
  const idx = buf.indexOf(a);
  if (idx === -1) return buf;
  if (!Buffer.isBuffer(b)) b = Buffer(b);

  const before = buf.slice(0, idx);
  const after = replace(buf.slice(idx + a.length), a, b);

  return Buffer.concat([
    before,
    b,
    after
  ], idx + b.length + after.length);
}

module.exports = replace;



/***/ }),

/***/ 255:
/*!*******************************************!*\
  !*** ./node_modules/cli-spinner/index.js ***!
  \*******************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

var readline = __webpack_require__(/*! readline */ 2908);

var defaultSpinnerString = 0;
var defaultSpinnerDelay = 60;

function defaultOnTick(msg) {
  this.clearLine(this.stream);
  this.stream.write(msg);
};

var Spinner = function(options){
  if(!(this instanceof Spinner)) return new Spinner(options)

  if(typeof options === "string"){
    options = { text: options };
  } else if(!options){
    options = {};
  }

  this.text = options.text || '';
  this.setSpinnerString(defaultSpinnerString);
  this.setSpinnerDelay(defaultSpinnerDelay);
  this.onTick = options.onTick || defaultOnTick;
  this.stream = options.stream || process.stdout;
};

Spinner.spinners = __webpack_require__(/*! ./spinners.json */ 3974);

Spinner.setDefaultSpinnerString = function(value) {
  defaultSpinnerString = value;

  return this;
};

Spinner.setDefaultSpinnerDelay = function(value) {
  defaultSpinnerDelay = value;

  return this;
};

Spinner.prototype.start = function() {
  if(this.stream === process.stdout && this.stream.isTTY !== true) {
    return this;
  }

  var current = 0;
  var self = this;

  var iteration = function() {
    var msg = self.text.indexOf('%s') > -1
      ? self.text.replace('%s', self.chars[current])
      : self.chars[current] + ' ' + self.text;

    self.onTick(msg);

    current = ++current % self.chars.length;
  };

  iteration();
  this.id = setInterval(iteration, this.delay);

  return this;
};

Spinner.prototype.isSpinning = function() {
  return this.id !== undefined;
}

Spinner.prototype.setSpinnerDelay = function(n) {
  this.delay = n;

  return this;
};

Spinner.prototype.setSpinnerString = function(str) {
  const map = mapToSpinner(str, this.spinners);
  this.chars = Array.isArray(map) ? map : map.split('');

  return this;
};

Spinner.prototype.setSpinnerTitle = function(str) {
  this.text = str;

  return this;
}

Spinner.prototype.stop = function(clear) {
  if(this.isSpinning === false) {
    return this;
  }

  clearInterval(this.id);
  this.id = undefined;

  if (clear) {
    this.clearLine(this.stream);
  }

  return this;
};

Spinner.prototype.clearLine = function(stream) {
  readline.clearLine(stream, 0);
  readline.cursorTo(stream, 0);

  return this;
}

// Helpers

function isInt(value) {
  return (typeof value==='number' && (value%1)===0);
}

function mapToSpinner(value, spinners) {
  // Not an integer, return as strng
  if (!isInt(value)) {
    return value + '';
  }

  var length = Spinner.spinners.length;

  // Check if index is within bounds
  value = (value >= length) ? 0 : value;
  // If negative, count from the end
  value = (value < 0) ? length + value : value;

  return Spinner.spinners[value];
}

exports.$ = Spinner;


/***/ }),

/***/ 6026:
/*!**************************************!*\
  !*** ./node_modules/crc-32/crc32.js ***!
  \**************************************/
/***/ ((__unused_webpack_module, exports) => {

/* crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
/* vim: set ts=2: */
/*exported CRC32 */
var CRC32;
(function (factory) {
	/*jshint ignore:start */
	/*eslint-disable */
	if(typeof DO_NOT_EXPORT_CRC === 'undefined') {
		if(true) {
			factory(exports);
		} else {}
	} else {
		factory(CRC32 = {});
	}
	/*eslint-enable */
	/*jshint ignore:end */
}(function(CRC32) {
CRC32.version = '1.2.0';
/* see perf/crc32table.js */
/*global Int32Array */
function signed_crc_table() {
	var c = 0, table = new Array(256);

	for(var n =0; n != 256; ++n){
		c = n;
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		c = ((c&1) ? (-306674912 ^ (c >>> 1)) : (c >>> 1));
		table[n] = c;
	}

	return typeof Int32Array !== 'undefined' ? new Int32Array(table) : table;
}

var T = signed_crc_table();
function crc32_bstr(bstr, seed) {
	var C = seed ^ -1, L = bstr.length - 1;
	for(var i = 0; i < L;) {
		C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];
		C = (C>>>8) ^ T[(C^bstr.charCodeAt(i++))&0xFF];
	}
	if(i === L) C = (C>>>8) ^ T[(C ^ bstr.charCodeAt(i))&0xFF];
	return C ^ -1;
}

function crc32_buf(buf, seed) {
	if(buf.length > 10000) return crc32_buf_8(buf, seed);
	var C = seed ^ -1, L = buf.length - 3;
	for(var i = 0; i < L;) {
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
	}
	while(i < L+3) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
	return C ^ -1;
}

function crc32_buf_8(buf, seed) {
	var C = seed ^ -1, L = buf.length - 7;
	for(var i = 0; i < L;) {
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
		C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
	}
	while(i < L+7) C = (C>>>8) ^ T[(C^buf[i++])&0xFF];
	return C ^ -1;
}

function crc32_str(str, seed) {
	var C = seed ^ -1;
	for(var i = 0, L=str.length, c, d; i < L;) {
		c = str.charCodeAt(i++);
		if(c < 0x80) {
			C = (C>>>8) ^ T[(C ^ c)&0xFF];
		} else if(c < 0x800) {
			C = (C>>>8) ^ T[(C ^ (192|((c>>6)&31)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];
		} else if(c >= 0xD800 && c < 0xE000) {
			c = (c&1023)+64; d = str.charCodeAt(i++)&1023;
			C = (C>>>8) ^ T[(C ^ (240|((c>>8)&7)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|((c>>2)&63)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|((d>>6)&15)|((c&3)<<4)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|(d&63)))&0xFF];
		} else {
			C = (C>>>8) ^ T[(C ^ (224|((c>>12)&15)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|((c>>6)&63)))&0xFF];
			C = (C>>>8) ^ T[(C ^ (128|(c&63)))&0xFF];
		}
	}
	return C ^ -1;
}
CRC32.table = T;
// $FlowIgnore
CRC32.bstr = crc32_bstr;
// $FlowIgnore
CRC32.buf = crc32_buf;
// $FlowIgnore
CRC32.str = crc32_str;
}));


/***/ }),

/***/ 4028:
/*!**************************************************!*\
  !*** ./node_modules/font-finder/dist/extract.js ***!
  \**************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const os = __webpack_require__(/*! os */ 9044);
var Type;
(function (Type) {
    Type["Serif"] = "serif";
    Type["SansSerif"] = "sansSerif";
    Type["Monospace"] = "monospace";
    Type["Cursive"] = "cursive";
    Type["Unknown"] = "unknown";
})(Type = exports.Type || (exports.Type = {}));
var Style;
(function (Style) {
    Style["Regular"] = "regular";
    Style["Italic"] = "italic";
    Style["Oblique"] = "oblique";
    Style["Bold"] = "bold";
    Style["BoldItalic"] = "boldItalic";
    Style["BoldOblique"] = "boldOblique";
    Style["Other"] = "other";
})(Style = exports.Style || (exports.Style = {}));
const standardEndings = [
    ' Regular',
    ' Bold',
    ' Bold Italic',
    ' Bold Oblique',
    ' Italic',
    ' Oblique'
];
function name(fontData, language) {
    const family = fontData.names.preferredFamily && fontData.names.preferredFamily[language]
        ? fontData.names.preferredFamily[language]
        : fontData.names.fontFamily[language];
    // On Windows, if the full font name doesn't end with one of the standard
    // forms, the full name is needed to identify the font. Notably, this is not
    // the same thing as the subfamily matching it, as with 'Roboto Thin Italic'
    // where the subfamily is 'Thin Italic'. In this case, the 'Italic' should
    // be removed, but not the 'Thin'.
    // TODO: actually, 'Roboto' and 'Roboto Thin' seem to both work. This needs
    // more work to figure out the exact logic
    if (os.platform() === 'win32') {
        const subfamily = fontData.names.preferredSubfamily && fontData.names.preferredSubfamily[language]
            ? fontData.names.preferredSubfamily[language]
            : fontData.names.fontSubfamily[language];
        const fullName = `${family} ${subfamily}`;
        let endIndex = -1;
        for (const end of standardEndings) {
            const index = fullName.lastIndexOf(end);
            if (index !== -1) {
                endIndex = index;
                break;
            }
        }
        if (endIndex !== -1) {
            return fullName.substring(0, endIndex);
        }
        return fullName;
    }
    return family;
}
exports.name = name;
function type(fontData) {
    if (fontData.os2) {
        // Panose specification: https://monotype.github.io/panose/pan1.htm
        switch (fontData.os2.panose[0]) {
            case 2:
                // https://monotype.github.io/panose/pan2.htm#_Toc380547256
                if (fontData.os2.panose[3] === 9) {
                    return Type.Monospace;
                }
                // https://monotype.github.io/panose/pan2.htm#Sec2SerifStyle
                if (fontData.os2.panose[1] >= 11 &&
                    fontData.os2.panose[1] <= 15 ||
                    fontData.os2.panose[1] === 0) {
                    return Type.SansSerif;
                }
                return Type.Serif;
            case 3:
                return Type.Cursive;
        }
    }
    else if (fontData.post && fontData.post.isFixedPitch) {
        return Type.Monospace;
    }
    // TODO: better classification
    return Type.Unknown;
}
exports.type = type;
// https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fsselection
function style(fontData) {
    // If we don't have an OS/2 or head table, there's no good way to figure out
    // what's in the font
    if (!fontData.os2 && !fontData.head) {
        return Style.Other;
    }
    const bold = fontData.os2
        ? fontData.os2.fsSelection & 0x20 // OS/2: fsSelection bit 5
        : fontData.head.macStyle & 0x01; // head: macStyle bit 0
    const italic = fontData.os2
        ? fontData.os2.fsSelection & 0x01 // OS/2: fsSelection bit 0
        : fontData.post
            ? fontData.post.italicAngle < 0 // post: negative italicAngle
            : fontData.head.macStyle & 0x02; // head: macStyle bit 1
    const oblique = fontData.os2
        ? fontData.os2.fsSelection & 0x200 // OS/2: fsSelection bit 9
        : fontData.post
            ? fontData.post.italicAngle > 0 // post: positive italicAngle
            : 0; // head: N/A
    const regular = fontData.os2
        ? fontData.os2.fsSelection & 0x140 // OS/2: fsSelection bit 6 or 8 (WWS)
        : 1; // head: N/A (assume yes for fallback)
    if (bold) {
        // Oblique has to come before italic for it to get picked up
        if (oblique) {
            return Style.BoldOblique;
        }
        if (italic) {
            return Style.BoldItalic;
        }
        return Style.Bold;
    }
    // Oblique has to come before italic for it to get picked up
    if (oblique) {
        return Style.Oblique;
    }
    if (italic) {
        return Style.Italic;
    }
    if (regular) {
        return Style.Regular;
    }
    // TODO: better classification
    return Style.Other;
}
exports.style = style;
const boldStyles = [Style.Bold, Style.BoldItalic, Style.BoldOblique];
function weight(fontData) {
    if (fontData.os2) {
        // Use the OS/2 weight class if available
        return fontData.os2.usWeightClass;
    }
    else if (boldStyles.includes(style(fontData))) {
        // Assume 700 if the font is a bold font
        return 700;
    }
    else {
        // Assume the standard 400 if all else fails
        return 400;
    }
}
exports.weight = weight;


/***/ }),

/***/ 2117:
/*!************************************************!*\
  !*** ./node_modules/font-finder/dist/index.js ***!
  \************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

"use strict";

var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const get_system_fonts_1 = __webpack_require__(/*! get-system-fonts */ 7311);
const parse_1 = __webpack_require__(/*! ./parse */ 694);
const extract = __webpack_require__(/*! ./extract */ 4028);
var extract_1 = __webpack_require__(/*! ./extract */ 4028);
exports.Type = extract_1.Type;
exports.Style = extract_1.Style;
/**
 * Retrieve metadata for all fonts installed on the system.
 *
 * @param options Options to configure font retrieval
 */
async function list(options) {
    const opts = Object.assign({ concurrency: 4, language: 'en', onFontError: null }, options);
    // TODO: support woff, woff2, ttc
    const files = await get_system_fonts_1.default({ extensions: ['ttf', 'otf'] });
    // Process each font in parallel, swallowing any errors found along the way.
    const results = await parallelize(async (file) => {
        try {
            const fontData = await parse_1.default(file);
            return getMetadata(file, fontData, opts.language);
        }
        catch (e) {
            if (opts.onFontError) {
                opts.onFontError(file, e);
            }
        }
    }, files, opts.concurrency);
    // Group the fonts by their font family
    const fonts = {};
    for (let _a of results.filter(font => font)) {
        const { name } = _a, font = __rest(_a, ["name"]);
        if (!fonts[name]) {
            fonts[name] = [];
        }
        fonts[name].push(font);
    }
    return fonts;
}
exports.list = list;
/**
 * Lists all variants found for the provided font family. If no variants are
 * found, an empty array is returned.
 *
 * @param name The name of the font family to retrieve
 * @param options Options to configure font retrieval
 */
async function listVariants(name, options) {
    const fonts = await list(options);
    return fonts[name] || [];
}
exports.listVariants = listVariants;
/**
 * Gets metadata for a single font file, returning metadata for the first
 * font variant found in the file. If there is an error extracting the font, an
 * error is thrown (unlike in list, where the font is simply ignored).
 *
 * @param path Absolute path to the file to retrieve
 * @param options Options to configure font retrieval
 */
async function get(path, options) {
    const opts = Object.assign({ language: 'en' }, options);
    const fontData = await parse_1.default(path);
    return getMetadata(path, fontData, opts.language);
}
exports.get = get;
/**
 * Extracts font metadata, given the font information.
 *
 * @param path Absolute path to the font file
 * @param fontData Table data for the font
 * @param language Language to use when resolving names
 */
function getMetadata(path, fontData, language) {
    return {
        name: extract.name(fontData, language),
        path,
        type: extract.type(fontData),
        weight: extract.weight(fontData),
        style: extract.style(fontData)
    };
}
/**
 * Runs an asynchronous operation against a list of inputs, capping the
 * concurrency of execution at the provided number.
 *
 * @param operation Function to run with each input
 * @param data Array of inputs to be applied to the function. Inputs are started
 *             in array order
 * @param concurrency The maximum number of operations to run simultaneously
 */
async function parallelize(operation, data, concurrency) {
    const results = [];
    let index = 0;
    const wrapper = async (i) => {
        results.push(await operation(data[i]));
        if (index < data.length) {
            await wrapper(index++);
        }
    };
    const promises = [];
    for (; index < data.length && index < concurrency; index++) {
        promises.push(wrapper(index));
    }
    await Promise.all(promises);
    return results;
}


/***/ }),

/***/ 694:
/*!************************************************!*\
  !*** ./node_modules/font-finder/dist/parse.js ***!
  \************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs = __webpack_require__(/*! fs */ 2089);
const promise_stream_reader_1 = __webpack_require__(/*! promise-stream-reader */ 2946);
const name_1 = __webpack_require__(/*! ./tables/name */ 3085);
const ltag_1 = __webpack_require__(/*! ./tables/ltag */ 8946);
const os2_1 = __webpack_require__(/*! ./tables/os2 */ 606);
const head_1 = __webpack_require__(/*! ./tables/head */ 9288);
const post_1 = __webpack_require__(/*! ./tables/post */ 3660);
var SignatureType;
(function (SignatureType) {
    SignatureType[SignatureType["TrueType"] = 0] = "TrueType";
    SignatureType[SignatureType["CFF"] = 1] = "CFF";
    SignatureType[SignatureType["Woff"] = 2] = "Woff";
})(SignatureType || (SignatureType = {}));
const tableInfo = {
    name: {
        tag: Buffer.from('name'),
        parse: name_1.default
    },
    ltag: {
        tag: Buffer.from('ltag'),
        parse: ltag_1.default
    },
    os2: {
        tag: Buffer.from('OS/2'),
        parse: os2_1.default
    },
    head: {
        tag: Buffer.from('head'),
        parse: head_1.default
    },
    post: {
        tag: Buffer.from('post'),
        parse: post_1.default
    }
};
/**
 * Loads the bare minimum information needed to retrieve the metadata that we
 * want, streaming the data from the file until we've found everything we need.
 *
 * @param filePath Absolute path to the font to load
 */
async function parseFont(filePath) {
    return new Promise((resolve, reject) => {
        (async () => {
            const pStream = promise_stream_reader_1.default();
            const stream = fs.createReadStream(filePath);
            // Track the stream state so we don't try to destroy a closed socket
            let streamFinished = false;
            const markFinished = () => { streamFinished = true; };
            stream.once('close', markFinished);
            stream.once('end', markFinished);
            stream.once('error', e => {
                streamFinished = true;
                reject(e);
            });
            stream.pipe(pStream);
            try {
                const signature = parseTag(await pStream.read(4));
                switch (signature) {
                    case SignatureType.TrueType:
                    case SignatureType.CFF:
                        const numTables = (await pStream.read(2)).readUInt16BE(0);
                        // Skip the rest of the offset table
                        await pStream.skip(6);
                        // Get the table metadata
                        const tableMeta = await findTableRecords(pStream, numTables);
                        // Order the tables based on location in the file. We
                        // want to look for earlier tables first
                        const orderedTables = Object.entries(tableMeta)
                            .sort((a, b) => a[1].offset - b[1].offset);
                        // Get the buffer representing each of the tables
                        const tableData = {};
                        for (const [name, meta] of orderedTables) {
                            // Skip the data between the end of the previous
                            // table and the start of this one
                            await pStream.skip(meta.offset - pStream.offset);
                            tableData[name] = await pStream.read(meta.length);
                        }
                        // The ltag table is usually not present, but parse it
                        // first if it is because we need it for the name table.
                        let ltag = [];
                        if (tableData.ltag) {
                            ltag = tableInfo.ltag.parse(tableData.ltag);
                        }
                        // If any of the necessary font tables are missing,
                        // throw
                        if (!tableData.name) {
                            throw new Error(`missing required OpenType table 'name' in font file: ${filePath}`);
                        }
                        // Parse and return the tables we need
                        return {
                            names: tableInfo.name.parse(tableData.name, ltag),
                            os2: tableData.os2 && tableInfo.os2.parse(tableData.os2),
                            head: tableData.head && tableInfo.head.parse(tableData.head),
                            post: tableData.post && tableInfo.post.parse(tableData.post)
                        };
                    case SignatureType.Woff:
                    default:
                        throw new Error('provided font type is not supported yet');
                }
            }
            finally {
                // Clean up our state so that the file stream doesn't leak
                stream.unpipe(pStream);
                if (!streamFinished) {
                    stream.destroy();
                    pStream.destroy();
                }
            }
        })().then(resolve, reject);
    });
}
exports["default"] = parseFont;
const signatures = {
    one: Buffer.from([0x00, 0x01, 0x00, 0x00]),
    otto: Buffer.from('OTTO'),
    true: Buffer.from('true'),
    typ1: Buffer.from('typ1'),
    woff: Buffer.from('wOFF')
};
/**
 * Parses a tag buffer, returning the type of font contained within.
 *
 * @param tag 4-byte buffer to parse for the tag
 */
function parseTag(tag) {
    if (tag.equals(signatures.one) ||
        tag.equals(signatures.true) ||
        tag.equals(signatures.typ1)) {
        return SignatureType.TrueType;
    }
    else if (tag.equals(signatures.otto)) {
        return SignatureType.CFF;
    }
    else if (tag.equals(signatures.woff)) {
        return SignatureType.Woff;
    }
    else {
        throw new Error(`Unsupported signature type: ${tag}`);
    }
}
/**
 * Parse the table record list for the specific tables that we care about.
 *
 * @param stream Promise stream positioned at the table record list
 * @param numTables The number of tables in the table record list
 */
async function findTableRecords(stream, numTables) {
    const tableMeta = {};
    for (let i = 0; i < numTables; i++) {
        const tag = await stream.read(4);
        const data = await stream.read(12);
        for (const [name, table] of Object.entries(tableInfo)) {
            if (tag.equals(table.tag)) {
                tableMeta[name] = {
                    offset: data.readUInt32BE(4),
                    length: data.readUInt32BE(8)
                };
                if (tableMeta.name && tableMeta.ltag && tableMeta.os2) {
                    return tableMeta;
                }
            }
        }
    }
    return tableMeta;
}


/***/ }),

/***/ 9288:
/*!******************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/head.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const utility_1 = __webpack_require__(/*! ./utility */ 4180);
// Parse the header `head` table
function parseHeadTable(data) {
    return {
        version: utility_1.formatFixed(data.readUInt16BE(0), data.readUInt16BE(2)),
        fontRevision: utility_1.formatFixed(data.readUInt16BE(4), data.readUInt16BE(6)),
        checkSumAdjustment: data.readUInt32BE(8),
        magicNumber: data.readUInt32BE(12),
        flags: data.readUInt16BE(16),
        unitsPerEm: data.readUInt16BE(18),
        created: utility_1.formatLongDateTime(data.readUInt32BE(20), data.readUInt32BE(24)),
        modified: utility_1.formatLongDateTime(data.readUInt32BE(28), data.readUInt32BE(32)),
        xMin: data.readInt16BE(36),
        yMin: data.readInt16BE(38),
        xMax: data.readInt16BE(40),
        yMax: data.readInt16BE(42),
        macStyle: data.readUInt16BE(44),
        lowestRecPPEM: data.readUInt16BE(46),
        fontDirectionHint: data.readInt16BE(48),
        indexToLocFormat: data.readInt16BE(50),
        glyphDataFormat: data.readInt16BE(52)
    };
}
exports["default"] = parseHeadTable;


/***/ }),

/***/ 8946:
/*!******************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/ltag.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// This file is modified from opentype.js. All credit for the capabilities
// provided herein goes to that project and its maintainers. The project can be
// found at https://github.com/nodebox/opentype.js
Object.defineProperty(exports, "__esModule", ({ value: true }));
// The `ltag` table stores IETF BCP-47 language tags. It allows supporting
// languages for which TrueType does not assign a numeric code.
// https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6ltag.html
// http://www.w3.org/International/articles/language-tags/
// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
function parseLtagTable(data) {
    const tableVersion = data.readUInt32BE(0);
    if (tableVersion !== 1) {
        throw new Error('Unsupported ltag table version.');
    }
    // The 'ltag' specification does not define any flags; skip the field.
    const numTags = data.readUInt32BE(8);
    const tags = [];
    for (let i = 0; i < numTags; i++) {
        let tag = '';
        const offset = data.readUInt16BE(12 + i * 4);
        const length = data.readUInt16BE(14 + i * 4);
        for (let j = offset; j < offset + length; ++j) {
            tag += String.fromCharCode(data.readInt8(j));
        }
        tags.push(tag);
    }
    return tags;
}
exports["default"] = parseLtagTable;


/***/ }),

/***/ 3085:
/*!******************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/name.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// This file is modified from opentype.js. All credit for the capabilities
// provided herein goes to that project and its maintainers. The project can be
// found at https://github.com/nodebox/opentype.js
Object.defineProperty(exports, "__esModule", ({ value: true }));
// The `name` naming table.
// https://www.microsoft.com/typography/OTSPEC/name.htm
// NameIDs for the name table.
const nameTableNames = [
    'copyright',
    'fontFamily',
    'fontSubfamily',
    'uniqueID',
    'fullName',
    'version',
    'postScriptName',
    'trademark',
    'manufacturer',
    'designer',
    'description',
    'manufacturerURL',
    'designerURL',
    'license',
    'licenseURL',
    'reserved',
    'preferredFamily',
    'preferredSubfamily',
    'compatibleFullName',
    'sampleText',
    'postScriptFindFontName',
    'wwsFamily',
    'wwsSubfamily' // 22
];
const macLanguages = {
    0: 'en',
    1: 'fr',
    2: 'de',
    3: 'it',
    4: 'nl',
    5: 'sv',
    6: 'es',
    7: 'da',
    8: 'pt',
    9: 'no',
    10: 'he',
    11: 'ja',
    12: 'ar',
    13: 'fi',
    14: 'el',
    15: 'is',
    16: 'mt',
    17: 'tr',
    18: 'hr',
    19: 'zh-Hant',
    20: 'ur',
    21: 'hi',
    22: 'th',
    23: 'ko',
    24: 'lt',
    25: 'pl',
    26: 'hu',
    27: 'es',
    28: 'lv',
    29: 'se',
    30: 'fo',
    31: 'fa',
    32: 'ru',
    33: 'zh',
    34: 'nl-BE',
    35: 'ga',
    36: 'sq',
    37: 'ro',
    38: 'cz',
    39: 'sk',
    40: 'si',
    41: 'yi',
    42: 'sr',
    43: 'mk',
    44: 'bg',
    45: 'uk',
    46: 'be',
    47: 'uz',
    48: 'kk',
    49: 'az-Cyrl',
    50: 'az-Arab',
    51: 'hy',
    52: 'ka',
    53: 'mo',
    54: 'ky',
    55: 'tg',
    56: 'tk',
    57: 'mn-CN',
    58: 'mn',
    59: 'ps',
    60: 'ks',
    61: 'ku',
    62: 'sd',
    63: 'bo',
    64: 'ne',
    65: 'sa',
    66: 'mr',
    67: 'bn',
    68: 'as',
    69: 'gu',
    70: 'pa',
    71: 'or',
    72: 'ml',
    73: 'kn',
    74: 'ta',
    75: 'te',
    76: 'si',
    77: 'my',
    78: 'km',
    79: 'lo',
    80: 'vi',
    81: 'id',
    82: 'tl',
    83: 'ms',
    84: 'ms-Arab',
    85: 'am',
    86: 'ti',
    87: 'om',
    88: 'so',
    89: 'sw',
    90: 'rw',
    91: 'rn',
    92: 'ny',
    93: 'mg',
    94: 'eo',
    128: 'cy',
    129: 'eu',
    130: 'ca',
    131: 'la',
    132: 'qu',
    133: 'gn',
    134: 'ay',
    135: 'tt',
    136: 'ug',
    137: 'dz',
    138: 'jv',
    139: 'su',
    140: 'gl',
    141: 'af',
    142: 'br',
    143: 'iu',
    144: 'gd',
    145: 'gv',
    146: 'ga',
    147: 'to',
    148: 'el-polyton',
    149: 'kl',
    150: 'az',
    151: 'nn'
};
// While Microsoft indicates a region/country for all its language
// IDs, we omit the region code if it's equal to the "most likely
// region subtag" according to Unicode CLDR. For scripts, we omit
// the subtag if it is equal to the Suppress-Script entry in the
// IANA language subtag registry for IETF BCP 47.
//
// For example, Microsoft states that its language code 0x041A is
// Croatian in Croatia. We transform this to the BCP 47 language code 'hr'
// and not 'hr-HR' because Croatia is the default country for Croatian,
// according to Unicode CLDR. As another example, Microsoft states
// that 0x101A is Croatian (Latin) in Bosnia-Herzegovina. We transform
// this to 'hr-BA' and not 'hr-Latn-BA' because Latin is the default script
// for the Croatian language, according to IANA.
//
// http://www.unicode.org/cldr/charts/latest/supplemental/likely_subtags.html
// http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
const windowsLanguages = {
    0x0436: 'af',
    0x041C: 'sq',
    0x0484: 'gsw',
    0x045E: 'am',
    0x1401: 'ar-DZ',
    0x3C01: 'ar-BH',
    0x0C01: 'ar',
    0x0801: 'ar-IQ',
    0x2C01: 'ar-JO',
    0x3401: 'ar-KW',
    0x3001: 'ar-LB',
    0x1001: 'ar-LY',
    0x1801: 'ary',
    0x2001: 'ar-OM',
    0x4001: 'ar-QA',
    0x0401: 'ar-SA',
    0x2801: 'ar-SY',
    0x1C01: 'aeb',
    0x3801: 'ar-AE',
    0x2401: 'ar-YE',
    0x042B: 'hy',
    0x044D: 'as',
    0x082C: 'az-Cyrl',
    0x042C: 'az',
    0x046D: 'ba',
    0x042D: 'eu',
    0x0423: 'be',
    0x0845: 'bn',
    0x0445: 'bn-IN',
    0x201A: 'bs-Cyrl',
    0x141A: 'bs',
    0x047E: 'br',
    0x0402: 'bg',
    0x0403: 'ca',
    0x0C04: 'zh-HK',
    0x1404: 'zh-MO',
    0x0804: 'zh',
    0x1004: 'zh-SG',
    0x0404: 'zh-TW',
    0x0483: 'co',
    0x041A: 'hr',
    0x101A: 'hr-BA',
    0x0405: 'cs',
    0x0406: 'da',
    0x048C: 'prs',
    0x0465: 'dv',
    0x0813: 'nl-BE',
    0x0413: 'nl',
    0x0C09: 'en-AU',
    0x2809: 'en-BZ',
    0x1009: 'en-CA',
    0x2409: 'en-029',
    0x4009: 'en-IN',
    0x1809: 'en-IE',
    0x2009: 'en-JM',
    0x4409: 'en-MY',
    0x1409: 'en-NZ',
    0x3409: 'en-PH',
    0x4809: 'en-SG',
    0x1C09: 'en-ZA',
    0x2C09: 'en-TT',
    0x0809: 'en-GB',
    0x0409: 'en',
    0x3009: 'en-ZW',
    0x0425: 'et',
    0x0438: 'fo',
    0x0464: 'fil',
    0x040B: 'fi',
    0x080C: 'fr-BE',
    0x0C0C: 'fr-CA',
    0x040C: 'fr',
    0x140C: 'fr-LU',
    0x180C: 'fr-MC',
    0x100C: 'fr-CH',
    0x0462: 'fy',
    0x0456: 'gl',
    0x0437: 'ka',
    0x0C07: 'de-AT',
    0x0407: 'de',
    0x1407: 'de-LI',
    0x1007: 'de-LU',
    0x0807: 'de-CH',
    0x0408: 'el',
    0x046F: 'kl',
    0x0447: 'gu',
    0x0468: 'ha',
    0x040D: 'he',
    0x0439: 'hi',
    0x040E: 'hu',
    0x040F: 'is',
    0x0470: 'ig',
    0x0421: 'id',
    0x045D: 'iu',
    0x085D: 'iu-Latn',
    0x083C: 'ga',
    0x0434: 'xh',
    0x0435: 'zu',
    0x0410: 'it',
    0x0810: 'it-CH',
    0x0411: 'ja',
    0x044B: 'kn',
    0x043F: 'kk',
    0x0453: 'km',
    0x0486: 'quc',
    0x0487: 'rw',
    0x0441: 'sw',
    0x0457: 'kok',
    0x0412: 'ko',
    0x0440: 'ky',
    0x0454: 'lo',
    0x0426: 'lv',
    0x0427: 'lt',
    0x082E: 'dsb',
    0x046E: 'lb',
    0x042F: 'mk',
    0x083E: 'ms-BN',
    0x043E: 'ms',
    0x044C: 'ml',
    0x043A: 'mt',
    0x0481: 'mi',
    0x047A: 'arn',
    0x044E: 'mr',
    0x047C: 'moh',
    0x0450: 'mn',
    0x0850: 'mn-CN',
    0x0461: 'ne',
    0x0414: 'nb',
    0x0814: 'nn',
    0x0482: 'oc',
    0x0448: 'or',
    0x0463: 'ps',
    0x0415: 'pl',
    0x0416: 'pt',
    0x0816: 'pt-PT',
    0x0446: 'pa',
    0x046B: 'qu-BO',
    0x086B: 'qu-EC',
    0x0C6B: 'qu',
    0x0418: 'ro',
    0x0417: 'rm',
    0x0419: 'ru',
    0x243B: 'smn',
    0x103B: 'smj-NO',
    0x143B: 'smj',
    0x0C3B: 'se-FI',
    0x043B: 'se',
    0x083B: 'se-SE',
    0x203B: 'sms',
    0x183B: 'sma-NO',
    0x1C3B: 'sms',
    0x044F: 'sa',
    0x1C1A: 'sr-Cyrl-BA',
    0x0C1A: 'sr',
    0x181A: 'sr-Latn-BA',
    0x081A: 'sr-Latn',
    0x046C: 'nso',
    0x0432: 'tn',
    0x045B: 'si',
    0x041B: 'sk',
    0x0424: 'sl',
    0x2C0A: 'es-AR',
    0x400A: 'es-BO',
    0x340A: 'es-CL',
    0x240A: 'es-CO',
    0x140A: 'es-CR',
    0x1C0A: 'es-DO',
    0x300A: 'es-EC',
    0x440A: 'es-SV',
    0x100A: 'es-GT',
    0x480A: 'es-HN',
    0x080A: 'es-MX',
    0x4C0A: 'es-NI',
    0x180A: 'es-PA',
    0x3C0A: 'es-PY',
    0x280A: 'es-PE',
    0x500A: 'es-PR',
    // Microsoft has defined two different language codes for
    // “Spanish with modern sorting” and “Spanish with traditional
    // sorting”. This makes sense for collation APIs, and it would be
    // possible to express this in BCP 47 language tags via Unicode
    // extensions (eg., es-u-co-trad is Spanish with traditional
    // sorting). However, for storing names in fonts, the distinction
    // does not make sense, so we give “es” in both cases.
    0x0C0A: 'es',
    0x040A: 'es',
    0x540A: 'es-US',
    0x380A: 'es-UY',
    0x200A: 'es-VE',
    0x081D: 'sv-FI',
    0x041D: 'sv',
    0x045A: 'syr',
    0x0428: 'tg',
    0x085F: 'tzm',
    0x0449: 'ta',
    0x0444: 'tt',
    0x044A: 'te',
    0x041E: 'th',
    0x0451: 'bo',
    0x041F: 'tr',
    0x0442: 'tk',
    0x0480: 'ug',
    0x0422: 'uk',
    0x042E: 'hsb',
    0x0420: 'ur',
    0x0843: 'uz-Cyrl',
    0x0443: 'uz',
    0x042A: 'vi',
    0x0452: 'cy',
    0x0488: 'wo',
    0x0485: 'sah',
    0x0478: 'ii',
    0x046A: 'yo'
};
// Returns a IETF BCP 47 language code, for example 'zh-Hant'
// for 'Chinese in the traditional script'.
function getLanguageCode(platformID, languageID, ltag) {
    switch (platformID) {
        case 0: // Unicode
            if (languageID === 0xFFFF) {
                return 'und';
            }
            else if (ltag) {
                return ltag[languageID];
            }
            break;
        case 1: // Macintosh
            return macLanguages[languageID];
        case 3: // Windows
            return windowsLanguages[languageID];
    }
    return undefined;
}
const utf16 = 'utf-16';
// MacOS script ID → encoding. This table stores the default case,
// which can be overridden by macLanguageEncodings.
const macScriptEncodings = {
    0: 'macintosh',
    1: 'x-mac-japanese',
    2: 'x-mac-chinesetrad',
    3: 'x-mac-korean',
    6: 'x-mac-greek',
    7: 'x-mac-cyrillic',
    9: 'x-mac-devanagai',
    10: 'x-mac-gurmukhi',
    11: 'x-mac-gujarati',
    12: 'x-mac-oriya',
    13: 'x-mac-bengali',
    14: 'x-mac-tamil',
    15: 'x-mac-telugu',
    16: 'x-mac-kannada',
    17: 'x-mac-malayalam',
    18: 'x-mac-sinhalese',
    19: 'x-mac-burmese',
    20: 'x-mac-khmer',
    21: 'x-mac-thai',
    22: 'x-mac-lao',
    23: 'x-mac-georgian',
    24: 'x-mac-armenian',
    25: 'x-mac-chinesesimp',
    26: 'x-mac-tibetan',
    27: 'x-mac-mongolian',
    28: 'x-mac-ethiopic',
    29: 'x-mac-ce',
    30: 'x-mac-vietnamese',
    31: 'x-mac-extarabic' // smExtArabic
};
// MacOS language ID → encoding. This table stores the exceptional
// cases, which override macScriptEncodings. For writing MacOS naming
// tables, we need to emit a MacOS script ID. Therefore, we cannot
// merge macScriptEncodings into macLanguageEncodings.
//
// http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt
const macLanguageEncodings = {
    15: 'x-mac-icelandic',
    17: 'x-mac-turkish',
    18: 'x-mac-croatian',
    24: 'x-mac-ce',
    25: 'x-mac-ce',
    26: 'x-mac-ce',
    27: 'x-mac-ce',
    28: 'x-mac-ce',
    30: 'x-mac-icelandic',
    37: 'x-mac-romanian',
    38: 'x-mac-ce',
    39: 'x-mac-ce',
    40: 'x-mac-ce',
    143: 'x-mac-inuit',
    146: 'x-mac-gaelic' // langIrishGaelicScript
};
function getEncoding(platformID, encodingID, languageID) {
    switch (platformID) {
        case 0: // Unicode
            return utf16;
        case 1: // Apple Macintosh
            return macLanguageEncodings[languageID] || macScriptEncodings[encodingID];
        case 3: // Microsoft Windows
            if (encodingID === 1 || encodingID === 10) {
                return utf16;
            }
            break;
    }
    return undefined;
}
// Parse the naming `name` table.
// FIXME: Format 1 additional fields are not supported yet.
// ltag is the content of the `ltag' table, such as ['en', 'zh-Hans', 'de-CH-1904'].
function parseNameTable(data, ltag) {
    const name = {};
    // const format = data.readUInt16BE(0);
    const count = data.readUInt16BE(2);
    const stringOffset = data.readUInt16BE(4);
    let tableOffset = 6;
    for (let i = 0; i < count; i++) {
        const platformID = data.readUInt16BE(tableOffset + 0);
        const encodingID = data.readUInt16BE(tableOffset + 2);
        const languageID = data.readUInt16BE(tableOffset + 4);
        const nameID = data.readUInt16BE(tableOffset + 6);
        const property = nameTableNames[nameID] || String(nameID);
        const byteLength = data.readUInt16BE(tableOffset + 8);
        const offset = data.readUInt16BE(tableOffset + 10);
        const language = getLanguageCode(platformID, languageID, ltag);
        const encoding = getEncoding(platformID, encodingID, languageID);
        tableOffset += 12;
        if (encoding !== undefined && language !== undefined) {
            let text;
            if (encoding === utf16) {
                const charLength = byteLength / 2;
                const chars = Array(charLength);
                for (let i = 0; i < charLength; i++) {
                    chars[i] = data.readUInt16BE(stringOffset + offset + i * 2);
                }
                text = String.fromCharCode(...chars);
            }
            else {
                text = decodeMacString(data, stringOffset + offset, byteLength, encoding);
            }
            if (text) {
                let translations = name[property];
                // tslint:disable-next-line
                if (translations === undefined) {
                    translations = name[property] = {};
                }
                translations[language] = text;
            }
        }
    }
    return name;
}
exports["default"] = parseNameTable;
// Data for converting old eight-bit Macintosh encodings to Unicode.
// This representation is optimized for decoding; encoding is slower
// and needs more memory. The assumption is that all opentype.js users
// want to open fonts, but saving a font will be comparatively rare
// so it can be more expensive. Keyed by IANA character set name.
//
// Python script for generating these strings:
//
//     s = u''.join([chr(c).decode('mac_greek') for c in range(128, 256)])
//     print(s.encode('utf-8'))
/**
 * @private
 */
const eightBitMacEncodings = {
    'x-mac-croatian': // Python: 'mac_croatian'
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø' +
        '¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ',
    'x-mac-cyrillic': // Python: 'mac_cyrillic'
    'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњ' +
        'јЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю',
    'x-mac-gaelic': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/GAELIC.TXT
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæø' +
        'ṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ',
    'x-mac-greek': // Python: 'mac_greek'
    'Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩ' +
        'άΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ\u00AD',
    'x-mac-icelandic': // Python: 'mac_iceland'
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
        '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
    'x-mac-inuit': // http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/INUIT.TXT
    'ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗ' +
        'ᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł',
    'x-mac-ce': // Python: 'mac_latin2'
    'ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅ' +
        'ņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ',
    macintosh: // Python: 'mac_roman'
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
        '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
    'x-mac-romanian': // Python: 'mac_romanian'
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș' +
        '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ',
    'x-mac-turkish': // Python: 'mac_turkish'
    'ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø' +
        '¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ'
};
/**
 * Decodes an old-style Macintosh string. Returns either a Unicode JavaScript
 * string, or 'undefined' if the encoding is unsupported. For example, we do
 * not support Chinese, Japanese or Korean because these would need large
 * mapping tables.
 * @param {DataView} dataView
 * @param {number} offset
 * @param {number} dataLength
 * @param {string} encoding
 * @returns {string}
 */
function decodeMacString(data, offset, dataLength, encoding) {
    const table = eightBitMacEncodings[encoding];
    if (table === undefined) {
        return undefined;
    }
    let result = '';
    for (let i = 0; i < dataLength; i++) {
        const c = data.readUInt8(offset + i);
        // In all eight-bit Mac encodings, the characters 0x00..0x7F are
        // mapped to U+0000..U+007F; we only need to look up the others.
        if (c <= 0x7F) {
            result += String.fromCharCode(c);
        }
        else {
            result += table[c & 0x7F];
        }
    }
    return result;
}


/***/ }),

/***/ 606:
/*!*****************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/os2.js ***!
  \*****************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";

// This file is modified from opentype.js. All credit for the capabilities
// provided herein goes to that project and its maintainers. The project can be
// found at https://github.com/nodebox/opentype.js
Object.defineProperty(exports, "__esModule", ({ value: true }));
// Parse the OS/2 and Windows metrics `OS/2` table
function parseOS2Table(data) {
    // The OS/2 table must be at least 78 bytes long
    if (data.length < 78) {
        return undefined;
    }
    const os2 = {
        version: data.readUInt16BE(0),
        xAvgCharWidth: data.readUInt16BE(2),
        usWeightClass: data.readUInt16BE(4),
        usWidthClass: data.readUInt16BE(6),
        fsType: data.readUInt16BE(8),
        ySubscriptXSize: data.readInt16BE(10),
        ySubscriptYSize: data.readInt16BE(12),
        ySubscriptXOffset: data.readInt16BE(14),
        ySubscriptYOffset: data.readInt16BE(16),
        ySuperscriptXSize: data.readInt16BE(18),
        ySuperscriptYSize: data.readInt16BE(20),
        ySuperscriptXOffset: data.readInt16BE(22),
        ySuperscriptYOffset: data.readInt16BE(24),
        yStrikeoutSize: data.readInt16BE(26),
        yStrikeoutPosition: data.readInt16BE(28),
        sFamilyClass: data.readInt16BE(30),
        panose: [
            data.readUInt8(32),
            data.readUInt8(33),
            data.readUInt8(34),
            data.readUInt8(35),
            data.readUInt8(36),
            data.readUInt8(37),
            data.readUInt8(38),
            data.readUInt8(39),
            data.readUInt8(40),
            data.readUInt8(41)
        ],
        ulUnicodeRange1: data.readUInt32BE(42),
        ulUnicodeRange2: data.readUInt32BE(46),
        ulUnicodeRange3: data.readUInt32BE(50),
        ulUnicodeRange4: data.readUInt32BE(54),
        achVendID: String.fromCharCode(data.readUInt8(58), data.readUInt8(59), data.readUInt8(60), data.readUInt8(61)),
        fsSelection: data.readUInt16BE(62),
        usFirstCharIndex: data.readUInt16BE(64),
        usLastCharIndex: data.readUInt16BE(66),
        sTypoAscender: data.readInt16BE(68),
        sTypoDescender: data.readInt16BE(70),
        sTypoLineGap: data.readInt16BE(72),
        usWinAscent: data.readUInt16BE(74),
        usWinDescent: data.readUInt16BE(76)
    };
    if (os2.version >= 1 && data.length >= 86) {
        os2.ulCodePageRange1 = data.readUInt32BE(78);
        os2.ulCodePageRange2 = data.readUInt32BE(82);
    }
    if (os2.version >= 2 && data.length >= 96) {
        os2.sxHeight = data.readInt16BE(86);
        os2.sCapHeight = data.readInt16BE(88);
        os2.usDefaultChar = data.readUInt16BE(90);
        os2.usBreakChar = data.readUInt16BE(92);
        os2.usMaxContent = data.readUInt16BE(94);
    }
    return os2;
}
exports["default"] = parseOS2Table;


/***/ }),

/***/ 3660:
/*!******************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/post.js ***!
  \******************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const utility_1 = __webpack_require__(/*! ./utility */ 4180);
// Parse the PostScript `post` table. We don't bother with version-specific data
// because it doesn't impact any of our computations
function parsePostTable(data) {
    return {
        version: utility_1.formatFixed(data.readUInt16BE(0), data.readUInt16BE(2)),
        italicAngle: utility_1.formatFixed(data.readUInt16BE(4), data.readUInt16BE(6)),
        underlinePosition: data.readInt16BE(8),
        underlineThickness: data.readInt16BE(10),
        isFixedPitch: data.readUInt32BE(12),
        minMemType42: data.readUInt32BE(16),
        maxMemType42: data.readUInt32BE(20),
        minMemType1: data.readUInt32BE(24),
        maxMemType1: data.readUInt32BE(28)
    };
}
exports["default"] = parsePostTable;


/***/ }),

/***/ 4180:
/*!*********************************************************!*\
  !*** ./node_modules/font-finder/dist/tables/utility.js ***!
  \*********************************************************/
/***/ ((__unused_webpack_module, exports) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
function formatFixed(whole, fraction) {
    return whole + fraction / 2 ** 16;
}
exports.formatFixed = formatFixed;
function formatLongDateTime(high, low) {
    // OpenType dates are since 1904. We make them since 1970 to align with unix
    // and multiply by 1000 to make it a millisecond time like the rest of
    // Javascript
    return ((high * 2 ** 32) + low - 2082844800) * 1000;
}
exports.formatLongDateTime = formatLongDateTime;


/***/ }),

/***/ 7311:
/*!*****************************************************!*\
  !*** ./node_modules/get-system-fonts/dist/index.js ***!
  \*****************************************************/
/***/ ((module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const path = __webpack_require__(/*! path */ 3056);
const os = __webpack_require__(/*! os */ 9044);
const recursiveWalk_1 = __webpack_require__(/*! ./recursiveWalk */ 8389);
const directories = {
    win32: () => {
        const globalDir = path.join(process.env.WINDIR || 'C:\\Windows', 'Fonts');
        const appDataDir = 'Microsoft\\Windows\\Fonts';
        let localDir;
        if (process.env.LOCALAPPDATA) {
            localDir = path.join(process.env.LOCALAPPDATA, appDataDir);
        }
        else if (process.env.APPDATA) {
            localDir = path.join(process.env.APPDATA, 'Local', appDataDir);
        }
        else if (process.env.USERPROFILE) {
            localDir = path.join(process.env.USERPROFILE, 'AppData', 'Local', appDataDir);
        }
        if (localDir) {
            return [globalDir, localDir];
        }
        else {
            return [globalDir];
        }
    },
    darwin: () => {
        const home = os.homedir();
        const userFolders = home
            ? [path.join(home, '/Library/Fonts')]
            : [];
        return [
            ...userFolders,
            '/Library/Fonts',
            '/Network/Library/Fonts',
            '/System/Library/Fonts',
            '/System Folder/Fonts'
        ];
    },
    linux: () => {
        const home = os.homedir();
        const userFolders = home
            ? [
                path.join(home, '.fonts'),
                path.join(home, '.local/share/fonts')
            ]
            : [];
        return [
            // TODO: use fontconfig to find the folder locations
            '/usr/share/fonts',
            '/usr/local/share/fonts',
            ...userFolders
        ];
    }
};
/**
 * List absolute paths to all installed system fonts present.
 *
 * @param options Configuration options
 */
function getSystemFonts(options) {
    const opts = Object.assign({ extensions: ['ttf', 'otf', 'ttc', 'woff', 'woff2'], additionalFolders: [] }, options);
    const platform = os.platform();
    const getDirs = directories[platform];
    if (!getDirs) {
        throw new Error(`Unsupported platform: ${platform}`);
    }
    const dirs = getDirs();
    return recursiveWalk_1.default([...dirs, ...opts.additionalFolders], opts.extensions);
}
module.exports = Object.assign(getSystemFonts, { default: getSystemFonts });
exports["default"] = getSystemFonts;


/***/ }),

/***/ 8389:
/*!*************************************************************!*\
  !*** ./node_modules/get-system-fonts/dist/recursiveWalk.js ***!
  \*************************************************************/
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const fs = __webpack_require__(/*! fs */ 2089);
const util = __webpack_require__(/*! util */ 3837);
const path = __webpack_require__(/*! path */ 3056);
const readdirAsync = util.promisify(fs.readdir);
const statAsync = util.promisify(fs.stat);
/**
 * Recursively scans the list of directories for files with one of the provided
 * extensions.
 *
 * @param baseDirs Directories to search for files
 * @param extensions List of valid extensions that files may have
 */
async function recursiveWalk(baseDirs, extensions) {
    // We put the results in a set to ensure there are no duplicates
    const results = new Set();
    await Promise.all(baseDirs.map(async (baseDir) => {
        const files = await recursiveWalkInternal(path.resolve(baseDir), new RegExp(`\\.${extensions.map(ext => `(?:${ext})`).join('|')}$`, 'i'));
        for (const file of files) {
            results.add(file);
        }
    }));
    return [...results];
}
exports["default"] = recursiveWalk;
/**
 * Recursively walk the filesystem to find files with the proper extensions.
 *
 * @param baseDir The fully resolved starting directory (absolute path)
 * @param extensionRegex Regular expression to verify the file extension
 * @param maxDepth The maximum number of recursive calls to make before stopping
 */
async function recursiveWalkInternal(baseDir, extensionRegex, maxDepth = 10) {
    if (maxDepth <= 0) {
        return [];
    }
    let entries;
    try {
        entries = await readdirAsync(baseDir);
    }
    catch (_a) {
        return [];
    }
    // We collect the results up in this array as we find them rather than
    // mapping/reducing the data to avoid the cost of creating and concatenating
    // intermediate arrays.
    const results = [];
    await Promise.all(entries.map(async (entry) => {
        const entryPath = path.join(baseDir, entry);
        let stats;
        try {
            stats = await statAsync(entryPath);
        }
        catch (_a) {
            return;
        }
        if (stats.isFile() && extensionRegex.test(entryPath)) {
            results.push(entryPath);
        }
        else if (stats.isDirectory()) {
            results.push(...await recursiveWalkInternal(entryPath, extensionRegex, maxDepth - 1));
        }
    }));
    return results;
}


/***/ }),

/***/ 9588:
/*!*****************************************************!*\
  !*** ./node_modules/hexer/chunked_hex_transform.js ***!
  \*****************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var util = __webpack_require__(/*! util */ 3837);
var HexTransform = __webpack_require__(/*! ./hex_transform */ 6836);

function ChunkedHexTransform(options) {
    if (!(this instanceof ChunkedHexTransform)) {
        return new ChunkedHexTransform(options);
    }
    // istanbul ignore next
    if (!options) options = {};
    HexTransform.call(this, options);
    var self = this;
    if (typeof options.header === 'function') {
        self.header = options.header;
    } else if (typeof options.header === 'object') {
        self.header = simpleHeader(options.header);
    } else if (typeof options.header === 'string') {
        self.header = simpleHeader({
            label: options.header
        });
    } else {
        self.header = simpleHeader();
    }
    self.chunkNum = 0;
}
util.inherits(ChunkedHexTransform, HexTransform);

ChunkedHexTransform.prototype._transform = function transform(chunk, encoding, done) {
    var self = this;
    // istanbul ignore next
    if (self.totalOffset) {
        self.reset();
    }

    ++self.chunkNum;
    var header = self.header(self.chunkNum, chunk);
    if (header.length) {
        self.push(header);
    }

    HexTransform.prototype._transform.call(self, chunk, encoding, function subDone(err) {
        self.reset();
        done(err);
    });
};

function simpleHeader(opts) {
    opts = opts || {};
    var fmt = '-- ';
    if (opts.label) fmt += opts.label + ' ';
    fmt += 'chunk[%s] length: %s (0x%s)\n';
    return function header(chunkNum, chunk) {
        var len = chunk.length;
        var hexlen = len.toString(16);
        return util.format(fmt, chunkNum, len, hexlen);
    };
}

module.exports = ChunkedHexTransform;


/***/ }),

/***/ 8989:
/*!***************************************!*\
  !*** ./node_modules/hexer/hex_spy.js ***!
  \***************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

var util = __webpack_require__(/*! util */ 3837);
var Transform = (__webpack_require__(/*! stream */ 3978).Transform);
var ChunkedHexTransform = __webpack_require__(/*! ./chunked_hex_transform */ 9588);

module.exports = HexSpy;

function HexSpy(sink, options) {
    if (!(this instanceof HexSpy)) {
        return new HexSpy(sink, options);
    }
    // istanbul ignore next
    if (!options) options = {};
    // istanbul ignore else
    if (options.highWaterMark === undefined) {
        options.highWaterMark = 1;
    }
    var self = this;
    Transform.call(self, options);
    self.hex = ChunkedHexTransform(options);
    self.hex.pipe(sink);
}
util.inherits(HexSpy, Transform);

HexSpy.prototype._transform = function _transform(chunk, encoding, callback) {
    var self = this;
    self.hex.write(chunk, encoding, function writeDone() {
        self.push(chunk);
        callback();
    });
};

HexSpy.prototype._flush = function _flush(callback) {
    var self = this;
    self.hex.end(null, null, callback);
};


/***/ }),

/***/ 6836:
/*!*********************************************!*\
  !*** ./node_modules/hexer/hex_transform.js ***!
  \*********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var extend = __webpack_require__(/*! xtend */ 7644);
var util = __webpack_require__(/*! util */ 3837);
var Transform = (__webpack_require__(/*! stream */ 3978).Transform);
var render = __webpack_require__(/*! ./render */ 7972);

function HexTransform(options) {
    if (!(this instanceof HexTransform)) {
        return new HexTransform(options);
    }
    // istanbul ignore next
    if (!options) options = {};
    if (options.colored) options = extend(render.coloredOptions, options);
    Transform.call(this, options);
    var self = this;
    self.options = options;
    self.prefix = self.options.prefix || '';
    self.cols = self.options.cols || 16;
    self.group = self.options.group || 2;
    self.gutter = self.options.gutter || 0;
    // istanbul ignore if
    self.annotateLine = options.annotateLine || null;
    self.decorateHexen = self.options.decorateHexen || noopDecorate;
    self.decorateHuman = self.options.decorateHuman || noopDecorate;
    self.renderHexen = self.options.renderHexen || render.byte2hex;
    self.renderHuman = self.options.renderHuman || render.byte2char;
    // istanbul ignore next
    self.groupSeparator = self.options.groupSeparator === undefined ? ' ' : self.options.groupSeparator;
    self.headSep = self.options.headSep === undefined ? ': ' : self.options.headSep;
    // istanbul ignore next
    self.divide = self.options.divide === undefined ? '  ' : self.options.divide;
    // istanbul ignore next
    self.emptyHexen = self.options.emptyHexen === undefined ? '  ' : self.options.emptyHexen;
    self.emptyHuman = self.options.emptyHuman || '';
    self.nullHuman = self.options.nullHuman || '';
    self.offsetWidth = self.options.offsetWidth || 8;
    self.gutter = Math.max(self.offsetWidth, self.gutter);
    self.line = '';
    self.hexen = '';
    self.human = '';
    self.reset();
}
util.inherits(HexTransform, Transform);

HexTransform.prototype.reset = function reset() {
    var self = this;
    self._finishLine();
    self.screenOffset = 0;
    self.totalOffset = 0;
};

HexTransform.prototype._transform = function transform(chunk, encoding, done) {
    var self = this;
    for (var offset=0; offset<chunk.length; offset++) {
        if (self.screenOffset % self.cols === 0) {
            self._finishLine();
            self._startLine();
        }
        self._addByte(chunk[offset]);
    }
    done(null);
};

HexTransform.prototype._flush = function flush(done) {
    var self = this;
    if (self.totalOffset === 0 && self.nullHuman) {
        self._startLine();
        self.human += self.nullHuman;
    }
    self._finishLine();
    done(null);
};

HexTransform.prototype._startLine = function startLine() {
    var self = this;
    var head = render.pad('0', self.totalOffset.toString(16), self.offsetWidth);
    self.line = self.prefix + render.pad(' ', head, self.gutter) + self.headSep;
};

HexTransform.prototype._finishLine = function finishLine() {
    var self = this;
    if (self.line.length) {
        var rem = self.screenOffset % self.cols;
        if (rem !== 0 || (self.totalOffset === 0 && self.nullHuman)) {
            rem = self.cols - rem;
            for (var i=0; i<rem; i++) {
                self._addEmpty();
            }
        }
        self.line += self.hexen + self.divide + self.human;
        // istanbul ignore if
        if (self.annotateLine) {
            self.line += self.annotateLine(self.totalOffset - self.cols, self.totalOffset);
        }
        self.line += '\n';
        self.push(self.line);
        self.line = '';
        self.hexen = '';
        self.human = '';
    }
};

HexTransform.prototype._addEmpty = function addEmpty() {
    var self = this;
    self._addPart(self.emptyHexen, self.emptyHuman);
};

HexTransform.prototype._addByte = function addByte(b) {
    var self = this;
    var hexen = self.renderHexen(b);
    var human = self.renderHuman(b);
    self._addPart(hexen, human, b);
};

HexTransform.prototype._addPart = function addByte(hexen, human, b) {
    var self = this;
    hexen = self.decorateHexen(self.totalOffset, self.screenOffset, hexen, b);
    human = self.decorateHuman(self.totalOffset, self.screenOffset, human, b);
    var isStartOfRow = self.screenOffset % self.cols === 0;
    var isStartOfGroup = self.screenOffset % self.group === 0;
    if (!isStartOfRow && isStartOfGroup) {
        self.hexen += self.groupSeparator;
    }
    self.hexen += hexen;
    self.human += human;
    self.totalOffset++;
    self.screenOffset++;
};

function noopDecorate(offset, screenOffset, s) {
    return s;
}

module.exports = HexTransform;


/***/ }),

/***/ 1068:
/*!*************************************!*\
  !*** ./node_modules/hexer/index.js ***!
  \*************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


hex.Transform = __webpack_require__(/*! ./hex_transform */ 6836);
hex.ChunkedTransform = __webpack_require__(/*! ./chunked_hex_transform */ 9588);
hex.Spy = __webpack_require__(/*! ./hex_spy */ 8989);

module.exports = hex;

function hex(buffer, options) {
    if (typeof buffer === 'string') {
        return hex(Buffer(buffer), options);
    }
    if (!Buffer.isBuffer(buffer)) {
        throw new Error('invalid argument to hex, expected a buffer or string');
    }
    options = options || {};
    if (!options.offsetWidth) {
        options.offsetWidth = 2 * Math.ceil(buffer.length.toString(16).length / 2);
    }
    var stream = hex.Transform(options);
    stream.write(buffer);
    stream.end();
    var out = stream.read();
    if (out === null) {
        return '';
    }
    out = String(out);
    out = out.replace(/\n+$/, '');
    return out;
}


/***/ }),

/***/ 7972:
/*!**************************************!*\
  !*** ./node_modules/hexer/render.js ***!
  \**************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var color = (__webpack_require__(/*! ansi-color */ 353)/* .set */ .t);

function pad(c, s, width) {
    while (s.length < width) s = c + s;
    return s;
}

function byte2hex(b) {
    return pad('0', b.toString(16), 2);
}

function byte2char(c) {
    if (c > 0x1f && c < 0x7f) {
        return String.fromCharCode(c);
    } else {
        return '.';
    }
    // TODO: could provide perhaps some unicode renderings for certain control chars
}

function renderColoredHuman(c) {
    if (c > 0x1f && c < 0x7f) {
        return String.fromCharCode(c);
    } else {
        return color('.', 'black+bold');
    }
}

// istanbul ignore next
function stripColor(str) {
    while (true) {
        var i = str.indexOf('\x1b[');
        if (i < 0) return str;
        var j = str.indexOf('m', i);
        if (j < 0) return str;
        str = str.slice(0, i) + str.slice(j + 1);
    }
}

module.exports.coloredHeadSep = color(':', 'cyan') + ' ';

module.exports.coloredOptions = {
    headSep: module.exports.coloredHeadSep,
    renderHuman: renderColoredHuman
};

module.exports.pad = pad;
module.exports.byte2hex = byte2hex;
module.exports.byte2char = byte2char;
module.exports.renderHuman = renderColoredHuman;
module.exports.stripColor = stripColor;


/***/ }),

/***/ 2946:
/*!**********************************************************!*\
  !*** ./node_modules/promise-stream-reader/dist/index.js ***!
  \**********************************************************/
/***/ ((module, exports, __webpack_require__) => {

"use strict";

Object.defineProperty(exports, "__esModule", ({ value: true }));
const stream_1 = __webpack_require__(/*! stream */ 3978);
class PromiseStreamImpl extends stream_1.Writable {
    constructor() {
        super(...arguments);
        this.offset = 0;
        this._waiters = [];
        this._closed = false;
    }
    _write(chunk, encoding, callback) {
        let readPos = 0;
        const process = () => {
            while (this._waiters.length > 0) {
                const waiter = this._waiters[0];
                if (this._buffer) {
                    const bufAvailable = this._buffer.size - this._buffer.offset;
                    if (bufAvailable + chunk.length >= waiter.size) {
                        // If the waiter doesn't actually want the data, just
                        // drop it.
                        if (waiter.skip) {
                            this._buffer = undefined;
                            waiter.resolve();
                        }
                        else {
                            // If we get here the buffer must be defined because
                            // we only drop the data if we were waiting
                            const bufToCopy = Math.min(bufAvailable, waiter.size);
                            const buf = Buffer.alloc(waiter.size);
                            this._buffer.buf.copy(buf, 0, this._buffer.offset, this._buffer.offset + bufToCopy);
                            chunk.copy(buf, bufToCopy, 0, waiter.size - bufToCopy);
                            waiter.resolve(buf);
                        }
                        this.offset += waiter.size;
                        this._waiters.shift();
                        this._buffer = undefined;
                        if (bufAvailable + chunk.length === waiter.size) {
                            // There's no more data left. Finish processing.
                            callback();
                            break;
                        }
                        else {
                            readPos += waiter.size - bufAvailable;
                        }
                    }
                    else {
                        // There's not enough data to fill the waiter. Add it to
                        // the buffer and wait.
                        if (!waiter.skip) {
                            const buf = Buffer.alloc(bufAvailable + chunk.length);
                            this._buffer.buf.copy(buf, 0, this._buffer.offset, this._buffer.size);
                            chunk.copy(buf, bufAvailable, 0, chunk.length);
                            this._buffer.buf = buf;
                        }
                        this._buffer.offset = 0;
                        this._buffer.size = bufAvailable + chunk.length;
                        // We can't do anything else with our data. Call the
                        // callback and break
                        callback();
                        break;
                    }
                }
                else {
                    if (chunk.length - readPos >= waiter.size) {
                        if (waiter.skip) {
                            waiter.resolve();
                        }
                        else {
                            waiter.resolve(chunk.slice(readPos, readPos + waiter.size));
                        }
                        this.offset += waiter.size;
                        this._waiters.shift();
                        readPos += waiter.size;
                        if (chunk.length === readPos) {
                            // There's no more data left. Finish processing.
                            callback();
                            break;
                        }
                    }
                    else {
                        // There's not enough data to fill the waiter. Add it to
                        // the buffer and wait.
                        this._buffer = {
                            buf: waiter.skip ? undefined : chunk.slice(readPos),
                            offset: 0,
                            size: chunk.length - readPos
                        };
                        readPos = chunk.length;
                        callback();
                        break;
                    }
                }
            }
            // If we made it down here and there's still data left in the chunk,
            // we need to wait for more requests to come in. Pass our processing
            // function out to the rest of the object so we can get triggered
            // when there's more work to do. Otherwise, we should clear out the
            this._processTrigger = chunk.length - readPos > 0
                ? process
                : undefined;
        };
        // Run the processing function
        process();
    }
    _destroy(err, callback) {
        this._processTrigger = undefined;
        for (const waiter of this._waiters) {
            waiter.reject(err || new Error('stream destroyed'));
        }
        this._waiters = [];
        this._closed = true;
    }
    _final(callback) {
        this._processTrigger = undefined;
        for (const waiter of this._waiters) {
            waiter.reject(new Error('not enough data in stream'));
        }
        this._waiters = [];
        this._closed = true;
    }
    read(size) {
        return new Promise((resolve, reject) => {
            if (this._closed) {
                reject(new Error('stream is closed'));
            }
            this._waiters.push({ resolve, reject, size, skip: false });
            // Flush any waiting data
            if (this._processTrigger) {
                this._processTrigger();
            }
        });
    }
    skip(size) {
        return new Promise((resolve, reject) => {
            if (this._closed) {
                reject(new Error('stream is closed'));
            }
            this._waiters.push({ resolve, reject, size, skip: true });
            // Flush any waiting data
            if (this._processTrigger) {
                this._processTrigger();
            }
        });
    }
}
function create() {
    return new PromiseStreamImpl();
}
// Use the first line for the actual export and the second to get the typings
// right for typescript. This allows both the standard require and typescript
// syntaxes simultaneously.
module.exports = Object.assign(create, { default: create });
exports["default"] = create;


/***/ }),

/***/ 7644:
/*!*****************************************!*\
  !*** ./node_modules/xtend/immutable.js ***!
  \*****************************************/
/***/ ((module) => {

module.exports = extend

var hasOwnProperty = Object.prototype.hasOwnProperty;

function extend() {
    var target = {}

    for (var i = 0; i < arguments.length; i++) {
        var source = arguments[i]

        for (var key in source) {
            if (hasOwnProperty.call(source, key)) {
                target[key] = source[key]
            }
        }
    }

    return target
}


/***/ }),

/***/ 447:
/*!*************************************************************!*\
  !*** ./node_modules/xterm-addon-fit/lib/xterm-addon-fit.js ***!
  \*************************************************************/
/***/ ((module) => {

!function(e,t){ true?module.exports=t():0}(self,(function(){return(()=>{"use strict";var e={};return(()=>{var t=e;Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0;var r=function(){function e(){}return e.prototype.activate=function(e){this._terminal=e},e.prototype.dispose=function(){},e.prototype.fit=function(){var e=this.proposeDimensions();if(e&&this._terminal&&!isNaN(e.cols)&&!isNaN(e.rows)){var t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}},e.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var e=this._terminal._core;if(0!==e._renderService.dimensions.actualCellWidth&&0!==e._renderService.dimensions.actualCellHeight){var t=0===this._terminal.options.scrollback?0:e.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),i=parseInt(r.getPropertyValue("height")),o=Math.max(0,parseInt(r.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),a=i-(parseInt(n.getPropertyValue("padding-top"))+parseInt(n.getPropertyValue("padding-bottom"))),s=o-(parseInt(n.getPropertyValue("padding-right"))+parseInt(n.getPropertyValue("padding-left")))-t;return{cols:Math.max(2,Math.floor(s/e._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(a/e._renderService.dimensions.actualCellHeight))}}}},e}();t.FitAddon=r})(),e})()}));


/***/ }),

/***/ 5643:
/*!*****************************************************************!*\
  !*** ./node_modules/xterm-addon-image/lib/xterm-addon-image.js ***!
  \*****************************************************************/
/***/ ((module) => {

/*! For license information please see xterm-addon-image.js.LICENSE.txt */
!function(e,t){ true?module.exports=t():0}(self,(function(){return(()=>{"use strict";var e={477:(e,t)=>{function i(e){return 255&e}function r(e){return e>>>8&255}function s(e){return e>>>16&255}function o(e,t,i,r=255){return((255&r)<<24|(255&i)<<16|(255&t)<<8|255&e)>>>0}function a(e,t,i){return Math.max(e,Math.min(i,t))}function l(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),6*i<1?t+6*(e-t)*i:2*i<1?e:3*i<2?t+(e-t)*(4-6*i):t}function n(e,t,i){return(4278190080|Math.round(i/100*255)<<16|Math.round(t/100*255)<<8|Math.round(e/100*255))>>>0}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FOREGROUND=t.DEFAULT_BACKGROUND=t.PALETTE_ANSI_256=t.PALETTE_VT340_GREY=t.PALETTE_VT340_COLOR=t.normalizeHLS=t.normalizeRGB=t.nearestColorIndex=t.fromRGBA8888=t.toRGBA8888=t.alpha=t.blue=t.green=t.red=t.BIG_ENDIAN=void 0,t.BIG_ENDIAN=255===new Uint8Array(new Uint32Array([4278190080]).buffer)[0],t.BIG_ENDIAN&&console.warn("BE platform detected. This version of node-sixel works only on LE properly."),t.red=i,t.green=r,t.blue=s,t.alpha=function(e){return e>>>24&255},t.toRGBA8888=o,t.fromRGBA8888=function(e){return[255&e,e>>8&255,e>>16&255,e>>>24]},t.nearestColorIndex=function(e,t){const o=i(e),a=r(e),l=s(e);let n=Number.MAX_SAFE_INTEGER,h=-1;for(let e=0;e<t.length;++e){const i=o-t[e][0],r=a-t[e][1],s=l-t[e][2],d=i*i+r*r+s*s;if(!d)return e;d<n&&(n=d,h=e)}return h},t.normalizeRGB=n,t.normalizeHLS=function(e,t,i){return function(e,t,i){if(!i){const e=Math.round(255*t);return o(e,e,e)}const r=t<.5?t*(1+i):t+i-t*i,s=2*t-r;return o(a(0,255,Math.round(255*l(r,s,e+1/3))),a(0,255,Math.round(255*l(r,s,e))),a(0,255,Math.round(255*l(r,s,e-1/3))))}((e+240)/360,t/100,i/100)},t.PALETTE_VT340_COLOR=new Uint32Array([n(0,0,0),n(20,20,80),n(80,13,13),n(20,80,20),n(80,20,80),n(20,80,80),n(80,80,20),n(53,53,53),n(26,26,26),n(33,33,60),n(60,26,26),n(33,60,33),n(60,33,60),n(33,60,60),n(60,60,33),n(80,80,80)]),t.PALETTE_VT340_GREY=new Uint32Array([n(0,0,0),n(13,13,13),n(26,26,26),n(40,40,40),n(6,6,6),n(20,20,20),n(33,33,33),n(46,46,46),n(0,0,0),n(13,13,13),n(26,26,26),n(40,40,40),n(6,6,6),n(20,20,20),n(33,33,33),n(46,46,46)]),t.PALETTE_ANSI_256=(()=>{const e=[o(0,0,0),o(205,0,0),o(0,205,0),o(205,205,0),o(0,0,238),o(205,0,205),o(0,250,205),o(229,229,229),o(127,127,127),o(255,0,0),o(0,255,0),o(255,255,0),o(92,92,255),o(255,0,255),o(0,255,255),o(255,255,255)],t=[0,95,135,175,215,255];for(let i=0;i<6;++i)for(let r=0;r<6;++r)for(let s=0;s<6;++s)e.push(o(t[i],t[r],t[s]));for(let t=8;t<=238;t+=10)e.push(o(t,t,t));return new Uint32Array(e)})(),t.DEFAULT_BACKGROUND=o(0,0,0,255),t.DEFAULT_FOREGROUND=o(255,255,255,255)},782:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageRenderer=void 0;const r=i(477);class s{constructor(e,t){this._terminal=e,this._showPlaceholder=t,this._oldOpen=this._terminal._core.open,this._terminal._core.open=e=>{var t;null===(t=this._oldOpen)||void 0===t||t.call(this._terminal._core,e),this._open()},this._terminal._core.screenElement&&this._open(),this._optionsRefresh=this._terminal._core.optionsService.onOptionChange((e=>{var t;"fontSize"===e&&(this.rescaleCanvas(),null===(t=this._renderService)||void 0===t||t.refreshRows(0,this._terminal.rows))}))}static createCanvas(e,t){const i=document.createElement("canvas");return i.width=0|e,i.height=0|t,i}static createImageData(e,t,i,r){if("function"!=typeof ImageData){const s=e.createImageData(t,i);return r&&s.data.set(new Uint8ClampedArray(r,0,t*i*4)),s}return r?new ImageData(new Uint8ClampedArray(r,0,t*i*4),t,i):new ImageData(t,i)}static createImageBitmap(e){return"function"!=typeof createImageBitmap?Promise.resolve(void 0):createImageBitmap(e)}dispose(){var e,t;null===(e=this._optionsRefresh)||void 0===e||e.dispose(),this._removeLayerFromDom(),this._terminal._core&&this._oldOpen&&(this._terminal._core.open=this._oldOpen,this._oldOpen=void 0),this._renderService&&this._oldSetRenderer&&(this._renderService.setRenderer=this._oldSetRenderer,this._oldSetRenderer=void 0),this._renderService=void 0,this.canvas=void 0,this._ctx=void 0,null===(t=this._placeholderBitmap)||void 0===t||t.close(),this._placeholderBitmap=void 0,this._placeholder=void 0}showPlaceholder(e){var t,i;e?this._placeholder||-1===this.cellSize.height||this._createPlaceHolder(Math.max(this.cellSize.height+1,24)):(null===(t=this._placeholderBitmap)||void 0===t||t.close(),this._placeholderBitmap=void 0,this._placeholder=void 0),null===(i=this._renderService)||void 0===i||i.refreshRows(0,this._terminal.rows)}get dimensions(){var e;return null===(e=this._renderService)||void 0===e?void 0:e.dimensions}get cellSize(){var e,t;return{width:(null===(e=this.dimensions)||void 0===e?void 0:e.actualCellWidth)||-1,height:(null===(t=this.dimensions)||void 0===t?void 0:t.actualCellHeight)||-1}}clearLines(e,t){var i,r,s,o;null===(i=this._ctx)||void 0===i||i.clearRect(0,e*((null===(r=this.dimensions)||void 0===r?void 0:r.actualCellHeight)||0),(null===(s=this.dimensions)||void 0===s?void 0:s.canvasWidth)||0,(++t-e)*((null===(o=this.dimensions)||void 0===o?void 0:o.actualCellHeight)||0))}clearAll(){var e,t,i;null===(e=this._ctx)||void 0===e||e.clearRect(0,0,(null===(t=this.canvas)||void 0===t?void 0:t.width)||0,(null===(i=this.canvas)||void 0===i?void 0:i.height)||0)}draw(e,t,i,r,s=1){if(!this._ctx)return;const{width:o,height:a}=this.cellSize;if(-1===o||-1===a)return;this._rescaleImage(e,o,a);const l=e.actual,n=Math.ceil(l.width/o),h=t%n*o,d=Math.floor(t/n)*a,c=i*o,_=r*a,u=s*o+h>l.width?l.width-h:s*o,g=d+a>l.height?l.height-d:a;this._ctx.drawImage(l,Math.floor(h),Math.floor(d),Math.floor(u),Math.floor(g),Math.floor(c),Math.floor(_),Math.floor(u),Math.floor(g))}extractTile(e,t){const{width:i,height:r}=this.cellSize;if(-1===i||-1===r)return;this._rescaleImage(e,i,r);const o=e.actual,a=Math.ceil(o.width/i),l=t%a*i,n=Math.floor(t/a)*r,h=i+l>o.width?o.width-l:i,d=n+r>o.height?o.height-n:r,c=s.createCanvas(h,d),_=c.getContext("2d");return _?(_.drawImage(o,Math.floor(l),Math.floor(n),Math.floor(h),Math.floor(d),0,0,Math.floor(h),Math.floor(d)),c):void 0}drawPlaceholder(e,t,i=1){if((this._placeholderBitmap||this._placeholder)&&this._ctx){const{width:r,height:s}=this.cellSize;if(-1===r||-1===s)return;s>=this._placeholder.height&&this._createPlaceHolder(s+1),this._ctx.drawImage(this._placeholderBitmap||this._placeholder,e*r,t*s%2?0:1,r*i,s,e*r,t*s,r*i,s)}}rescaleCanvas(){var e,t,i;this.canvas&&(this.canvas.width===(null===(e=this.dimensions)||void 0===e?void 0:e.canvasWidth)&&this.canvas.height===this.dimensions.canvasHeight||(this.canvas.width=(null===(t=this.dimensions)||void 0===t?void 0:t.canvasWidth)||0,this.canvas.height=(null===(i=this.dimensions)||void 0===i?void 0:i.canvasHeight)||0))}_rescaleImage(e,t,i){if(t===e.actualCellSize.width&&i===e.actualCellSize.height)return;const{width:r,height:o}=e.origCellSize;if(t===r&&i===o)return e.actual=e.orig,e.actualCellSize.width=r,void(e.actualCellSize.height=o);const a=s.createCanvas(Math.ceil(e.orig.width*t/r),Math.ceil(e.orig.height*i/o)),l=a.getContext("2d");l&&(l.drawImage(e.orig,0,0,a.width,a.height),e.actual=a,e.actualCellSize.width=t,e.actualCellSize.height=i)}_open(){this._renderService=this._terminal._core._renderService,this._oldSetRenderer=this._renderService.setRenderer.bind(this._renderService),this._renderService.setRenderer=e=>{var t;this._removeLayerFromDom(),null===(t=this._oldSetRenderer)||void 0===t||t.call(this._renderService,e),this._insertLayerToDom()},this._insertLayerToDom(),this._showPlaceholder&&this._createPlaceHolder()}_insertLayerToDom(){var e,t,i;this.canvas=s.createCanvas((null===(e=this.dimensions)||void 0===e?void 0:e.canvasWidth)||0,(null===(t=this.dimensions)||void 0===t?void 0:t.canvasHeight)||0),this.canvas.classList.add("xterm-image-layer"),null===(i=this._terminal._core.screenElement)||void 0===i||i.appendChild(this.canvas),this._ctx=this.canvas.getContext("2d",{alpha:!0,desynchronized:!0})}_removeLayerFromDom(){var e,t;null===(t=null===(e=this.canvas)||void 0===e?void 0:e.parentNode)||void 0===t||t.removeChild(this.canvas)}_createPlaceHolder(e=24){var t;null===(t=this._placeholderBitmap)||void 0===t||t.close(),this._placeholderBitmap=void 0;const i=32,o=s.createCanvas(i,e),a=o.getContext("2d",{alpha:!1});if(!a)return;const l=s.createImageData(a,i,e),n=new Uint32Array(l.data.buffer),h=(0,r.toRGBA8888)(0,0,0),d=(0,r.toRGBA8888)(255,255,255);n.fill(h);for(let t=0;t<e;++t){const e=t%2,r=t*i;for(let t=0;t<i;t+=2)n[r+t+e]=d}a.putImageData(l,0,0);const c=screen.width+i-1&-32||4096;this._placeholder=s.createCanvas(c,e);const _=this._placeholder.getContext("2d",{alpha:!1});if(_){for(let e=0;e<c;e+=i)_.drawImage(o,e,0);s.createImageBitmap(this._placeholder).then((e=>this._placeholderBitmap=e))}else this._placeholder=void 0}}t.ImageRenderer=s},216:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageStorage=t.ExtendedAttrsImage=t.CELL_SIZE_DEFAULT=void 0,t.CELL_SIZE_DEFAULT={width:7,height:14};class i{constructor(e=0,t=-1,i=-1,r=-1){this.underlineStyle=e,this.underlineColor=t,this.imageId=i,this.tileId=r}clone(){return new i(this.underlineStyle,this.underlineColor,this.imageId,this.tileId)}isEmpty(){return 0===this.underlineStyle&&-1===this.imageId}}t.ExtendedAttrsImage=i;const r=new i;t.ImageStorage=class{constructor(e,t,i){this._terminal=e,this._renderer=t,this._opts=i,this._images=new Map,this._lastId=0,this._lowestId=0,this._hasDrawn=!1,this._pixelLimit=25e5;try{this.setLimit(this._opts.storageLimit)}catch(e){console.error(e.message),console.warn(`storageLimit is set to ${this.getLimit()} MB`)}this._viewportMetrics={cols:this._terminal.cols,rows:this._terminal.rows}}dispose(){this.reset()}reset(){var e;for(const t of this._images.values())null===(e=t.marker)||void 0===e||e.dispose();this._images.clear(),this._renderer.clearAll()}getLimit(){return 4*this._pixelLimit/1e6}setLimit(e){if(e<1||e>1e3)throw RangeError("invalid storageLimit, should be at least 1 MB and not exceed 1G");this._pixelLimit=e/4*1e6>>>0,this._evictOldest(0)}getUsage(){return 4*this._getStoredPixels()/1e6}_getStoredPixels(){let e=0;for(const t of this._images.values())t.orig&&(e+=t.orig.width*t.orig.height,t.actual&&t.actual!==t.orig&&(e+=t.actual.width*t.actual.height));return e}wipeAlternate(){var e;const t=[];for(const[i,r]of this._images.entries())"alternate"===r.bufferType&&(null===(e=r.marker)||void 0===e||e.dispose(),t.push(i));for(const e of t)this._images.delete(e);this._hasDrawn=!0}addImage(e){var i;this._evictOldest(e.width*e.height);let r=this._renderer.cellSize;-1!==r.width&&-1!==r.height||(r=t.CELL_SIZE_DEFAULT);const s=Math.ceil(e.width/r.width),o=Math.ceil(e.height/r.height),a=++this._lastId,l=this._terminal._core.buffer,n=this._terminal.cols,h=this._terminal.rows,d=l.x,c=l.y;let _=d,u=0;this._opts.sixelScrolling||(this._terminal._core._dirtyRowService.markAllDirty(),l.x=0,l.y=0,_=0);for(let e=0;e<o;++e){const t=l.lines.get(l.y+l.ybase);for(let i=0;i<s&&!(_+i>=n);++i)this._writeToCell(t,_+i,a,e*s+i),u++;if(this._opts.sixelScrolling)e<o-1&&this._terminal._core._inputHandler.lineFeed();else if(++l.y>=h)break;l.x=_}this._opts.sixelScrolling?l.x=_:(l.x=d,l.y=c);const g=[];for(const[e,t]of this._images.entries())t.tileCount<1&&(null===(i=t.marker)||void 0===i||i.dispose(),g.push(e));for(const e of g)this._images.delete(e);const v=this._terminal.registerMarker(0);null==v||v.onDispose((()=>{this._images.get(a)&&this._images.delete(a)})),"alternate"===this._terminal.buffer.active.type&&this._evictOnAlternate();const f={orig:e,origCellSize:r,actual:e,actualCellSize:Object.assign({},r),marker:v||void 0,tileCount:u,bufferType:this._terminal.buffer.active.type};this._images.set(a,f)}render(e){if(!this._images.size||!this._renderer.canvas)return void(this._hasDrawn&&(this._renderer.clearAll(),this._hasDrawn=!1));const{start:t,end:i}=e,s=this._terminal._core.buffer,o=this._terminal._core.cols;this._hasDrawn=!1,this._renderer.clearLines(t,i),this._renderer.rescaleCanvas();for(let e=t;e<=i;++e){const t=s.lines.get(e+s.ydisp);if(!t)return;for(let i=0;i<o;++i)if(268435456&t.getBg(i)){let s=t._extendedAttrs[i]||r;const a=s.imageId;if(void 0===a||-1===a)continue;const l=this._images.get(a);if(-1!==s.tileId){const n=s.tileId,h=i;let d=1;for(;++i<o&&268435456&t.getBg(i)&&(s=t._extendedAttrs[i]||r)&&s.imageId===a&&s.tileId===n+d;)d++;i--,l?l.actual&&this._renderer.draw(l,n,h,e,d):this._opts.showPlaceholder&&this._renderer.drawPlaceholder(h,e,d),this._hasDrawn=!0}}}}viewportResize(e){var t;if(!this._images.size)return void(this._viewportMetrics=e);if(this._viewportMetrics.cols>=e.cols)return void(this._viewportMetrics=e);const i=this._terminal._core.buffer,s=i.lines.length,o=this._viewportMetrics.cols-1;for(let a=0;a<s;++a){const s=i.lines.get(a);if(268435456&s.getBg(o)){const i=s._extendedAttrs[o]||r,a=i.imageId;if(void 0===a||-1===a)continue;const l=this._images.get(a);if(!l)continue;const n=Math.ceil(((null===(t=l.actual)||void 0===t?void 0:t.width)||0)/l.actualCellSize.width);if(i.tileId%n+1>=n)continue;let h=!1;for(let t=o+1;t>e.cols;++t)if(4194303&s._data[3*t+0]){h=!0;break}if(h)continue;const d=Math.min(e.cols,n-i.tileId%n+o);let c=i.tileId;for(let e=o+1;e<d;++e)this._writeToCell(s,e,a,++c),l.tileCount++}}this._viewportMetrics=e}getImageAtBufferCell(e,t){var i;const s=this._terminal._core.buffer.lines.get(t);if(s&&268435456&s.getBg(e)){const t=s._extendedAttrs[e]||r;if(t.imageId&&-1!==t.imageId)return null===(i=this._images.get(t.imageId))||void 0===i?void 0:i.orig}}extractTileAtBufferCell(e,t){const i=this._terminal._core.buffer.lines.get(t);if(i&&268435456&i.getBg(e)){const t=i._extendedAttrs[e]||r;if(t.imageId&&-1!==t.imageId&&-1!==t.tileId){const e=this._images.get(t.imageId);if(e)return this._renderer.extractTile(e,t.tileId)}}}_evictOldest(e){var t;const i=this._getStoredPixels();let r=i;for(;this._pixelLimit<r+e&&this._images.size;){const e=this._images.get(++this._lowestId);e&&e.orig&&(r-=e.orig.width*e.orig.height,e.actual&&e.orig!==e.actual&&(r-=e.actual.width*e.actual.height),null===(t=e.marker)||void 0===t||t.dispose(),this._images.delete(this._lowestId))}return i-r}_writeToCell(e,t,r,s){if(268435456&e._data[3*t+2]){const o=e._extendedAttrs[t];if(o){if(void 0!==o.imageId){const e=this._images.get(o.imageId);return e&&e.tileCount--,o.imageId=r,void(o.tileId=s)}return void(e._extendedAttrs[t]=new i(o.underlineStyle,o.underlineColor,r,s))}}e._data[3*t+2]|=268435456,e._extendedAttrs[t]=new i(0,-1,r,s)}_evictOnAlternate(){var e,t;for(const e of this._images.values())"alternate"===e.bufferType&&(e.tileCount=0);const i=this._terminal._core.buffer;for(let t=0;t<this._terminal.rows;++t){const r=i.lines.get(t);if(r)for(let t=0;t<this._terminal.cols;++t)if(268435456&r._data[3*t+2]){const i=null===(e=r._extendedAttrs[t])||void 0===e?void 0:e.imageId;if(i){const e=this._images.get(i);e&&e.tileCount++}}}const r=[];for(const[e,i]of this._images.entries())"alternate"!==i.bufferType||i.tileCount||(null===(t=i.marker)||void 0===t||t.dispose(),r.push(e));for(const e of r)this._images.delete(e)}}},973:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SixelHandler=void 0;const r=i(477),s=i(782);function o(e){return r.BIG_ENDIAN?e:(255&e)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255}t.SixelHandler=class{constructor(e,t,i,r){this._opts=e,this._storage=t,this._coreTerminal=i,this._workerManager=r,this._size=0,this._fillColor=0,this._aborted=!1}reset(){console.log("SixelHandler.reset...")}hook(e){this._aborted=this._workerManager.failed,this._aborted||(this._fillColor=1===e.params[1]?0:function(e,t){let i=0;if(e.isInverse())if(e.isFgDefault())i=o(t.foreground.rgba);else if(e.isFgRGB()){const t=e.constructor.toColorRGB(e.getFgColor());i=(0,r.toRGBA8888)(...t)}else i=o(t.ansi[e.getFgColor()].rgba);else if(e.isBgDefault())i=o(t.background.rgba);else if(e.isBgRGB()){const t=e.constructor.toColorRGB(e.getBgColor());i=(0,r.toRGBA8888)(...t)}else i=o(t.ansi[e.getBgColor()].rgba);return i}(this._coreTerminal._core._inputHandler._curAttrData,this._coreTerminal._core._colorManager.colors),this._size=0,this._workerManager.sixelInit(this._fillColor,this._opts.sixelPaletteLimit))}put(e,t,i){if(this._aborted||this._workerManager.failed)return;if(this._workerManager.sizeExceeded)return this._workerManager.sixelEnd(!1),void(this._aborted=!0);if(this._size+=i-t,this._size>this._opts.sixelSizeLimit)return console.warn("SIXEL: too much data, aborting"),this._workerManager.sixelEnd(!1),void(this._aborted=!0);let r=t;for(;r<i;){const t=new Uint8Array(this._workerManager.getChunk()),s=Math.min(i-r,t.length);t.set(e.subarray(r,r+=s)),this._workerManager.sixelPut(t,s)}}unhook(e){if(this._aborted||this._workerManager.failed)return!0;const t=this._workerManager.sixelEnd(e);return!t||t.then((e=>{if(!e)return!0;const t=s.ImageRenderer.createCanvas(e.width,e.height),i=t.getContext("2d");if(i){const r=s.ImageRenderer.createImageData(i,e.width,e.height,e.buffer);i.putImageData(r,0,0),this._storage.addImage(t)}return this._workerManager.sixelSendBuffer(e.buffer),!0}))}}},870:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerManager=void 0,t.WorkerManager=class{constructor(e,t,i=131072,r=50){this.url=e,this._opts=t,this.chunkSize=i,this.maxPoolSize=r,this._memPool=[],this._failedToLoad=!1,this._lastActive=0,this.sizeExceeded=!1,this._startupError=()=>{console.warn("ImageAddon worker failed to load, image output is disabled."),this._failedToLoad=!0,this.dispose()},this._message=e=>{var t;const i=e.data;switch(i.type){case 6:this.storeChunk(i.payload);break;case 5:this._sixelResolver&&(this._sixelResolver(i.payload),this._sixelResolver=void 0);break;case 1:null===(t=this._worker)||void 0===t||t.removeEventListener("error",this._startupError);break;case 7:this.sizeExceeded=!0}}}_setSixelResolver(e){this._sixelResolver&&this._sixelResolver(null),this._sixelResolver=e}dispose(){var e;null===(e=this._worker)||void 0===e||e.terminate(),this._worker=void 0,this._setSixelResolver(),this.flushPool(),this._poolCheckerInterval&&(clearInterval(this._poolCheckerInterval),this._poolCheckerInterval=void 0)}reset(){this._worker&&this._worker.terminate(),this._worker=void 0,this._failedToLoad=!1}get failed(){return this._failedToLoad}get worker(){return this._worker||this._failedToLoad||(this._worker=new Worker(this.url),this._worker.addEventListener("message",this._message,!1),this._worker.addEventListener("error",this._startupError,!1),this._worker.postMessage({type:1,payload:0,options:{pixelLimit:this._opts.pixelLimit}})),this._worker}getChunk(){return this._lastActive=Date.now(),this._memPool.pop()||new ArrayBuffer(this.chunkSize)}storeChunk(e){this._poolCheckerInterval||(this._poolCheckerInterval=setInterval((()=>{Date.now()-this._lastActive>2e4&&(this.flushPool(),clearInterval(this._poolCheckerInterval),this._poolCheckerInterval=void 0)}),2e4)),this._memPool.length<this.maxPoolSize&&this._memPool.push(e)}flushPool(){this._memPool.length=0}sixelInit(e,t){var i;this._setSixelResolver(),this.sizeExceeded=!1,null===(i=this.worker)||void 0===i||i.postMessage({type:2,payload:{fillColor:e,limit:t}})}sixelPut(e,t){var i;null===(i=this.worker)||void 0===i||i.postMessage({type:3,payload:{buffer:e.buffer,length:t}},[e.buffer])}sixelEnd(e){var t;let i;return e&&this.worker&&(i=new Promise((e=>this._setSixelResolver(e)))),null===(t=this.worker)||void 0===t||t.postMessage({type:4,payload:e}),i}sixelSendBuffer(e){var t;null===(t=this.worker)||void 0===t||t.postMessage({type:6,payload:e},[e])}}}},t={};function i(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,i),o.exports}var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.ImageAddon=void 0;const t=i(782),s=i(216),o=i(973),a=i(870),l={enableSizeReports:!0,pixelLimit:16777216,sixelSupport:!0,sixelScrolling:!0,sixelPaletteLimit:256,sixelSizeLimit:25e6,storageLimit:128,showPlaceholder:!0};e.ImageAddon=class{constructor(e,t){this._disposables=[],this._handlers=new Map,this._opts=Object.assign({},l,t),this._defaultOpts=Object.assign({},l,t),this._workerManager=new a.WorkerManager(e,this._opts),this._disposeLater(this._workerManager)}dispose(){for(const e of this._disposables)e.dispose();this._disposables.length=0,this._handlers.clear()}_disposeLater(...e){for(const t of e)this._disposables.push(t)}activate(e){if(this._terminal=e,this._renderer=new t.ImageRenderer(e,this._opts.showPlaceholder),this._storage=new s.ImageStorage(e,this._renderer,this._opts),this._opts.enableSizeReports){const t=e.options.windowOptions||{};t.getWinSizePixels=!0,t.getCellSizePixels=!0,t.getWinSizeChars=!0,e.options.windowOptions=t}if(this._disposeLater(this._renderer,this._storage,e.parser.registerCsiHandler({prefix:"?",final:"h"},(e=>this._decset(e))),e.parser.registerCsiHandler({prefix:"?",final:"l"},(e=>this._decrst(e))),e.parser.registerCsiHandler({final:"c"},(e=>this._da1(e))),e.parser.registerCsiHandler({prefix:"?",final:"S"},(e=>this._xtermGraphicsAttributes(e))),e.onRender((e=>{var t;return null===(t=this._storage)||void 0===t?void 0:t.render(e)})),e.parser.registerCsiHandler({intermediates:"!",final:"p"},(()=>this.reset())),e.parser.registerEscHandler({final:"c"},(()=>this.reset())),e._core._inputHandler.onRequestReset((()=>this.reset())),e.buffer.onBufferChange((()=>{var e;return null===(e=this._storage)||void 0===e?void 0:e.wipeAlternate()})),e.onResize((e=>{var t;return null===(t=this._storage)||void 0===t?void 0:t.viewportResize(e)}))),this._opts.sixelSupport){const t=new o.SixelHandler(this._opts,this._storage,e,this._workerManager);this._handlers.set("sixel",t),this._disposeLater(e._core._inputHandler._parser.registerDcsHandler({final:"q"},t))}}reset(){var e;this._opts.sixelScrolling=this._defaultOpts.sixelScrolling,this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,null===(e=this._storage)||void 0===e||e.reset(),this._workerManager.reset();for(const e of this._handlers.values())e.reset();return!1}get storageLimit(){var e;return(null===(e=this._storage)||void 0===e?void 0:e.getLimit())||-1}set storageLimit(e){var t;null===(t=this._storage)||void 0===t||t.setLimit(e),this._opts.storageLimit=e}get storageUsage(){return this._storage?this._storage.getUsage():-1}get showPlaceholder(){return this._opts.showPlaceholder}set showPlaceholder(e){var t;this._opts.showPlaceholder=e,null===(t=this._renderer)||void 0===t||t.showPlaceholder(e)}getImageAtBufferCell(e,t){var i;return null===(i=this._storage)||void 0===i?void 0:i.getImageAtBufferCell(e,t)}extractTileAtBufferCell(e,t){var i;return null===(i=this._storage)||void 0===i?void 0:i.extractTileAtBufferCell(e,t)}_report(e){var t;null===(t=this._terminal)||void 0===t||t._core.coreService.triggerDataEvent(e)}_decset(e){for(let t=0;t<e.length;++t)80===e[t]&&(this._opts.sixelScrolling=!1);return!1}_decrst(e){for(let t=0;t<e.length;++t)80===e[t]&&(this._opts.sixelScrolling=!0);return!1}_da1(e){return e[0]>0||!(!this._opts.sixelSupport||this._workerManager.failed)&&(this._report("[?62;4;9;22c"),!0)}_xtermGraphicsAttributes(e){var t,i,r,o,a,l;if(e.length<2)return!0;if(this._workerManager.failed)return this._report(`[?${e[0]};1S`),!0;if(1===e[0])switch(e[1]){case 1:return this._report(`[?${e[0]};0;${this._opts.sixelPaletteLimit}S`),!0;case 2:return this._opts.sixelPaletteLimit=this._defaultOpts.sixelPaletteLimit,this._report(`[?${e[0]};0;${this._opts.sixelPaletteLimit}S`),this._workerManager.reset(),!0;case 3:return e.length>2&&!(e[2]instanceof Array)&&e[2]<=4096?(this._opts.sixelPaletteLimit=e[2],this._report(`[?${e[0]};0;${this._opts.sixelPaletteLimit}S`)):this._report(`[?${e[0]};2S`),!0;case 4:return this._report(`[?${e[0]};0;4096S`),!0;default:return this._report(`[?${e[0]};2S`),!0}if(2===e[0])switch(e[1]){case 1:let n=null===(i=null===(t=this._renderer)||void 0===t?void 0:t.dimensions)||void 0===i?void 0:i.canvasWidth,h=null===(o=null===(r=this._renderer)||void 0===r?void 0:r.dimensions)||void 0===o?void 0:o.canvasHeight;if(!n||!h){const e=s.CELL_SIZE_DEFAULT;n=((null===(a=this._terminal)||void 0===a?void 0:a.cols)||80)*e.width,h=((null===(l=this._terminal)||void 0===l?void 0:l.rows)||24)*e.height}if(n*h<this._opts.pixelLimit)this._report(`[?${e[0]};0;${n.toFixed(0)};${h.toFixed(0)}S`);else{const t=Math.floor(Math.sqrt(this._opts.pixelLimit));this._report(`[?${e[0]};0;${t};${t}S`)}return!0;case 4:const d=Math.floor(Math.sqrt(this._opts.pixelLimit));return this._report(`[?${e[0]};0;${d};${d}S`),!0;default:return this._report(`[?${e[0]};2S`),!0}return this._report(`[?${e[0]};1S`),!0}}})(),r})()}));


/***/ }),

/***/ 6181:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-ligatures/lib/xterm-addon-ligatures.js ***!
  \*************************************************************************/
/***/ ((module, exports, __webpack_require__) => {

/*! For license information please see xterm-addon-ligatures.js.LICENSE.txt */
!function(e,t){ true?module.exports=t(__webpack_require__(/*! font-finder */ 2117),__webpack_require__(/*! util */ 3837)):0}(global,(function(e,t){return(()=>{var n={185:(e,t)=>{"use strict";function n(e){const t={};for(const[n,s]of Object.entries(e.individual))t[n]=o(s);for(const{range:n,entry:s}of e.range){const e=o(s);for(let o=n[0];o<n[1];o++)t[o]=e}return t}function o(e){const t={};return e.forward&&(t.forward=n(e.forward)),e.reverse&&(t.reverse=n(e.reverse)),e.lookup&&(t.lookup=e.lookup),t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},98:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(602),s=n(593),r=n(233),i=n(694),a=n(532),l=n(595),u=n(223),c=n(439),p=n(349),h=n(185);class f{constructor(e,t){this._lookupTrees=[],this._glyphLookups={},this._font=e,t.cacheSize>0&&(this._cache=new s({max:t.cacheSize,length:(e,t)=>t.length}));const n=(this._font.tables.gsub&&this._font.tables.gsub.features.filter((e=>"calt"===e.tag))||[]).reduce(((e,t)=>[...e,...t.feature.lookupListIndexes]),[]),o=this._font.tables.gsub&&this._font.tables.gsub.lookups||[],i=o.filter(((e,t)=>n.some((e=>e===t))));for(const[e,t]of i.entries()){const n=[];switch(t.lookupType){case 6:for(const[e,s]of t.subtables.entries())switch(s.substFormat){case 1:n.push(l.default(s,o,e));break;case 2:n.push(u.default(s,o,e));break;case 3:n.push(c.default(s,o,e))}break;case 8:for(const[e,o]of t.subtables.entries())n.push(p.default(o,e))}const s=h.default(r.default(n));this._lookupTrees.push({tree:s,processForward:8!==t.lookupType});for(const t of Object.keys(s))this._glyphLookups[t]||(this._glyphLookups[t]=[]),this._glyphLookups[t].push(e)}}findLigatures(e){const t=this._cache&&this._cache.get(e);if(t&&!Array.isArray(t))return t;const n=[];for(const t of e)n.push(this._font.charToGlyphIndex(t));if(0===this._lookupTrees.length)return{inputGlyphs:n,outputGlyphs:n,contextRanges:[]};const o=this._findInternal(n.slice()),s={inputGlyphs:n,outputGlyphs:o.sequence,contextRanges:o.ranges};return this._cache&&this._cache.set(e,s),s}findLigatureRanges(e){if(0===this._lookupTrees.length)return[];const t=this._cache&&this._cache.get(e);if(t)return Array.isArray(t)?t:t.contextRanges;const n=[];for(const t of e)n.push(this._font.charToGlyphIndex(t));const o=this._findInternal(n);return this._cache&&this._cache.set(e,o.ranges),o.ranges}_findInternal(e){const t=[];let n=this._getNextLookup(e,0);for(;null!==n.index;){const o=this._lookupTrees[n.index];if(o.processForward){let s=n.last;for(let r=n.first;r<s;r++){const n=i.default(o.tree,e,r,r);if(n){for(let t=0;t<n.substitutions.length;t++){const o=n.substitutions[t];null!==o&&(e[r+t]=o)}a.default(t,n.contextRange[0]+r,n.contextRange[1]+r),r+n.length>=s&&(s=r+n.length+1),r+=n.length-1}}}else for(let s=n.last-1;s>=n.first;s--){const n=i.default(o.tree,e,s,s);if(n){for(let t=0;t<n.substitutions.length;t++){const o=n.substitutions[t];null!==o&&(e[s+t]=o)}a.default(t,n.contextRange[0]+s,n.contextRange[1]+s),s-=n.length-1}}n=this._getNextLookup(e,n.index+1)}return{sequence:e,ranges:t}}_getNextLookup(e,t){const n={index:null,first:1/0,last:-1};for(let o=0;o<e.length;o++){const s=this._glyphLookups[e[o]];if(s)for(let e=0;e<s.length;e++){const r=s[e];if(r>=t){(null===n.index||r<=n.index)&&(n.index=r,n.first>o&&(n.first=o),n.last=o+1);break}}}return n}}async function d(e,t){const s=await Promise.resolve().then((()=>n(269))).then((t=>t.promisify(o.load)(e)));return new f(s,Object.assign({cacheSize:0},t))}t.load=async function(e,t){const[o]=await Promise.resolve().then((()=>n(741))).then((t=>t.listVariants(e)));if(!o)throw new Error(`Font ${e} not found`);return d(o.path,t)},t.loadFile=d,t.loadBuffer=function(e,t){const n=o.parse(e);return new f(n,Object.assign({cacheSize:0},t))}},233:(e,t)=>{"use strict";function n(e,t){for(const[n,s]of Object.entries(t.individual))if(e.individual[n])o(e.individual[n],s);else{let t=!1;for(const[i,{range:l,entry:u}]of e.range.entries()){const c=r(Number(n),l);if(null!==c.both){t=!0,e.individual[n]=s,o(e.individual[n],a(u)),e.range.splice(i,1);for(const t of c.second)Array.isArray(t)?e.range.push({range:t,entry:a(u)}):e.individual[t]=a(u)}}t||(e.individual[n]=s)}for(const{range:n,entry:i}of t.range){let t=[n];for(let n=0;n<e.range.length;n++){const{range:l,entry:u}=e.range[n];for(const[c,p]of t.entries()){if(!Array.isArray(p)){const s=r(p,l);if(null===s.both)continue;e.individual[p]=a(i),o(e.individual[p],a(u)),e.range.splice(n,1),n--;for(const t of s.second)Array.isArray(t)?e.range.push({range:t,entry:a(u)}):e.individual[t]=a(u);t.splice(c,1,...s.first);break}{const r=s(p,l);if(null===r.both)continue;e.range.splice(n,1),n--;const c=a(u);Array.isArray(r.both)?e.range.push({range:r.both,entry:c}):e.individual[r.both]=c,o(c,a(i));for(const t of r.second)Array.isArray(t)?e.range.push({range:t,entry:a(u)}):e.individual[t]=a(u);t=r.first}}}for(const n of Object.keys(e.individual))for(const[s,l]of t.entries()){if(Array.isArray(l)){const u=r(Number(n),l);if(null===u.both)continue;o(e.individual[n],a(i)),t.splice(s,1,...u.second);break}if(Number(n)===l){o(e.individual[n],a(i));break}}for(const n of t)Array.isArray(n)?e.range.push({range:n,entry:a(i)}):e.individual[n]=a(i)}}function o(e,t){t.lookup&&(!e.lookup||e.lookup.index>t.lookup.index||e.lookup.index===t.lookup.index&&e.lookup.subIndex>t.lookup.subIndex)&&(e.lookup=t.lookup),t.forward&&(e.forward?n(e.forward,t.forward):e.forward=t.forward),t.reverse&&(e.reverse?n(e.reverse,t.reverse):e.reverse=t.reverse)}function s(e,t){const n={first:[],second:[],both:null};if(e[0]<t[1]&&t[0]<e[1]){const o=Math.max(e[0],t[0]),s=Math.min(e[1],t[1]);n.both=i(o,s)}if(e[0]<t[0]){const o=e[0],s=Math.min(t[0],e[1]);n.first.push(i(o,s))}else if(t[0]<e[0]){const o=t[0],s=Math.min(t[1],e[0]);n.second.push(i(o,s))}if(e[1]>t[1]){const o=Math.max(e[0],t[1]),s=e[1];n.first.push(i(o,s))}else if(t[1]>e[1]){const o=Math.max(e[1],t[0]),s=t[1];n.second.push(i(o,s))}return n}function r(e,t){if(e<t[0]||e>t[1])return{first:[e],second:[t],both:null};const n={first:[],second:[],both:e};return t[0]<e&&n.second.push(i(t[0],e)),t[1]>e&&n.second.push(i(e+1,t[1])),n}function i(e,t){return t-e==1?e:[e,t]}function a(e){const t={};return e.forward&&(t.forward=l(e.forward)),e.reverse&&(t.reverse=l(e.reverse)),e.lookup&&(t.lookup={contextRange:e.lookup.contextRange.slice(),index:e.lookup.index,length:e.lookup.length,subIndex:e.lookup.subIndex,substitutions:e.lookup.substitutions.slice()}),t}function l(e){const t={};for(const[n,o]of Object.entries(e.individual))t[n]=a(o);return{individual:t,range:e.range.map((({range:e,entry:t})=>({range:e.slice(),entry:a(t)})))}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t={individual:{},range:[]};for(const o of e)n(t,o);return t}},532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){let o=!1;for(let s=0;s<e.length;s++){const r=e[s];if(o){if(n<=r[0])return e[s-1][1]=n,e;if(n<=r[1])return e[s-1][1]=Math.max(n,r[1]),e.splice(s,1),o=!1,e;e.splice(s,1),s--}else{if(n<=r[0])return e.splice(s,0,[t,n]),e;if(n<=r[1])return r[0]=Math.min(t,r[0]),e;if(!(t<r[1]))continue;r[0]=Math.min(t,r[0]),o=!0}}return o?e[e.length-1][1]=n:e.push([t,n]),e}},595:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(283),s=n(267);t.default=function(e,t,n){const r={individual:{},range:[]},i=o.listGlyphsByIndex(e.coverage);for(const{glyphId:o,index:a}of i){const i=e.chainRuleSets[a];if(i)for(const[e,a]of i.entries()){let i=s.getInputTree(r,a.lookupRecords,t,0,o).map((({entry:e,substitution:t})=>({entry:e,substitutions:[t]})));for(const[e,n]of a.input.entries())i=s.processInputPosition([n],e+1,i,a.lookupRecords,t);for(const e of a.lookahead)i=s.processLookaheadPosition([e],i);for(const e of a.backtrack)i=s.processBacktrackPosition([e],i);for(const{entry:t,substitutions:o}of i)t.lookup={substitutions:o,length:a.input.length+1,index:n,subIndex:e,contextRange:[-1*a.backtrack.length,1+a.input.length+a.lookahead.length]}}}return r}},223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(233),s=n(283),r=n(91),i=n(267);t.default=function(e,t,n){const a=[],l=s.listGlyphsByIndex(e.coverage);for(const{glyphId:o}of l){const s=r.default(e.inputClassDef,o);for(const[o,l]of s.entries()){if(null===l)continue;const s=e.chainClassSet[l];if(s)for(const[l,u]of s.entries()){const s={individual:{},range:[]};let c=i.getInputTree(s,u.lookupRecords,t,0,o).map((({entry:e,substitution:t})=>({entry:e,substitutions:[t]})));for(const[n,o]of u.input.entries())c=i.processInputPosition(r.listClassGlyphs(e.inputClassDef,o),n+1,c,u.lookupRecords,t);for(const t of u.lookahead)c=i.processLookaheadPosition(r.listClassGlyphs(e.lookaheadClassDef,t),c);for(const t of u.backtrack)c=i.processBacktrackPosition(r.listClassGlyphs(e.backtrackClassDef,t),c);for(const{entry:e,substitutions:t}of c)e.lookup={substitutions:t,index:n,subIndex:l,length:u.input.length+1,contextRange:[-1*u.backtrack.length,1+u.input.length+u.lookahead.length]};a.push(s)}}}return o.default(a)}},439:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(283),s=n(267);t.default=function(e,t,n){const r={individual:{},range:[]},i=o.listGlyphsByIndex(e.inputCoverage[0]);for(const{glyphId:a}of i){let i=s.getInputTree(r,e.lookupRecords,t,0,a).map((({entry:e,substitution:t})=>({entry:e,substitutions:[t]})));for(const[n,r]of e.inputCoverage.slice(1).entries())i=s.processInputPosition(o.listGlyphsByIndex(r).map((e=>e.glyphId)),n+1,i,e.lookupRecords,t);for(const t of e.lookaheadCoverage)i=s.processLookaheadPosition(o.listGlyphsByIndex(t).map((e=>e.glyphId)),i);for(const t of e.backtrackCoverage)i=s.processBacktrackPosition(o.listGlyphsByIndex(t).map((e=>e.glyphId)),i);for(const{entry:t,substitutions:o}of i)t.lookup={substitutions:o,index:n,subIndex:0,length:e.inputCoverage.length,contextRange:[-1*e.backtrackCoverage.length,e.inputCoverage.length+e.lookaheadCoverage.length]}}return r}},349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(283),s=n(267);t.default=function(e,t){const n={individual:{},range:[]},r=o.listGlyphsByIndex(e.coverage);for(const{glyphId:i,index:a}of r){const r={};Array.isArray(i)?n.range.push({entry:r,range:i}):n.individual[i]=r;let l=[{entry:r,substitutions:[e.substitutes[a]]}];for(const t of e.lookaheadCoverage)l=s.processLookaheadPosition(o.listGlyphsByIndex(t).map((e=>e.glyphId)),l);for(const t of e.backtrackCoverage)l=s.processBacktrackPosition(o.listGlyphsByIndex(t).map((e=>e.glyphId)),l);for(const{entry:n,substitutions:o}of l)n.lookup={substitutions:o,index:t,subIndex:0,length:1,contextRange:[-1*e.backtrackCoverage.length,1+e.lookaheadCoverage.length]}}return n}},91:(e,t)=>{"use strict";function n(e,t){for(const n of e.ranges)if(n.start<=t&&n.end>=t)return n.classId;return null}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return 2===e.format?Array.isArray(t)?function(e,t){let o=t[0],s=n(e,o),r=t[0]+1;const i=new Map;for(;r<t[1];)n(e,r)!==s&&(r-o<=1?i.set(o,s):i.set([o,r],s)),r++;return r-o<=1?i.set(o,s):i.set([o,r],s),i}(e,t):new Map([[t,n(e,t)]]):new Map([[t,null]])},t.listClassGlyphs=function(e,t){if(2===e.format){const n=[];for(const o of e.ranges)o.classId===t&&(o.end===o.start?n.push(o.start):n.push([o.start,o.end+1]));return n}return[]}},283:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){switch(e.format){case 1:const n=e.glyphs.indexOf(t);return-1!==n?n:null;case 2:const o=e.ranges.find((e=>e.start<=t&&e.end>=t));return o?o.index:null}},t.listGlyphsByIndex=function(e){switch(e.format){case 1:return e.glyphs.map(((e,t)=>({glyphId:e,index:t})));case 2:let t=[];for(const[n,o]of e.ranges.entries())o.end===o.start?t.push({glyphId:o.start,index:n}):t.push({glyphId:[o.start,o.end+1],index:n});return t}}},267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(603);function s(e,t,n,s,i){const a=[];if(Array.isArray(i)){const r=function(e,t,n,s){for(const r of e.filter((e=>e.sequenceIndex===n)))for(const e of t[r.lookupListIndex].subtables){const t=o.getRangeSubstitutionGlyphs(e,s);if(!Array.from(t.values()).every((e=>null!==e)))return t}return new Map([[s,null]])}(t,n,s,i);for(const[t,n]of r){const o={};Array.isArray(t)?e.range.push({range:t,entry:o}):e.individual[t]={},a.push({entry:o,substitution:n})}}else e.individual[i]={},a.push({entry:e.individual[i],substitution:r(t,n,s,i)});return a}function r(e,t,n,s){for(const r of e.filter((e=>e.sequenceIndex===n)))for(const e of t[r.lookupListIndex].subtables){const t=o.getIndividualSubstitutionGlyph(e,s);if(null!==t)return t}return null}t.processInputPosition=function(e,t,n,o,r){const i=[];for(const a of n){a.entry.forward={individual:{},range:[]};for(const n of e)i.push(...s(a.entry.forward,o,r,t,n).map((({entry:e,substitution:t})=>({entry:e,substitutions:[...a.substitutions,t]}))))}return i},t.processLookaheadPosition=function(e,t){const n=[];for(const o of t)for(const t of e){const e={};o.entry.forward||(o.entry.forward={individual:{},range:[]}),n.push({entry:e,substitutions:o.substitutions}),Array.isArray(t)?o.entry.forward.range.push({entry:e,range:t}):o.entry.forward.individual[t]=e}return n},t.processBacktrackPosition=function(e,t){const n=[];for(const o of t)for(const t of e){const e={};o.entry.reverse||(o.entry.reverse={individual:{},range:[]}),n.push({entry:e,substitutions:o.substitutions}),Array.isArray(t)?o.entry.reverse.range.push({entry:e,range:t}):o.entry.reverse.individual[t]=e}return n},t.getInputTree=s},603:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(283);function s(e,t){const n=o.default(e.coverage,t);if(null===n)return null;switch(e.substFormat){case 1:return(t+e.deltaGlyphId)%65536;case 2:return null!=e.substitute[n]?e.substitute[n]:null}}t.getRangeSubstitutionGlyphs=function(e,t){let n=t[0],o=s(e,n),r=t[0]+1;const i=new Map;for(;r<t[1];)s(e,r)!==o&&(r-n<=1?i.set(n,o):i.set([n,r],o)),r++;return r-n<=1?i.set(n,o):i.set([n,r],o),i},t.getIndividualSubstitutionGlyph=s},694:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n,o,s){let r=t[n[s]];if(!r)return;let i=r.lookup;if(r.reverse){const e=function(e,t,n){let o=e[t[--n]],s=o&&o.lookup;for(;o&&((!s&&o.lookup||o.lookup&&s&&s.index>o.lookup.index)&&(s=o.lookup),!(--n<0)&&o.reverse);)o=o.reverse[t[n]];return s}(r.reverse,n,o);(!i&&e||e&&i&&(i.index>e.index||i.index===e.index&&i.subIndex>e.subIndex))&&(i=e)}if(++s>=n.length||!r.forward)return i;const a=e(r.forward,n,o,s);return(!i&&a||a&&i&&(i.index>a.index||i.index===a.index&&i.subIndex>a.subIndex))&&(i=a),i}},593:(e,t,n)=>{"use strict";const o=n(411),s=Symbol("max"),r=Symbol("length"),i=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),u=Symbol("dispose"),c=Symbol("noDisposeOnSet"),p=Symbol("lruList"),h=Symbol("cache"),f=Symbol("updateAgeOnGet"),d=()=>1,g=(e,t,n)=>{const o=e[h].get(t);if(o){const t=o.value;if(y(e,t)){if(v(e,o),!e[a])return}else n&&(e[f]&&(o.value.now=Date.now()),e[p].unshiftNode(o));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[l]&&n>e[l]},m=e=>{if(e[r]>e[s])for(let t=e[p].tail;e[r]>e[s]&&null!==t;){const n=t.prev;v(e,t),t=n}},v=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[r]-=n.length,e[h].delete(n.key),e[p].removeNode(t)}};class b{constructor(e,t,n,o,s){this.key=e,this.value=t,this.length=n,this.now=o,this.maxAge=s||0}}const x=(e,t,n,o)=>{let s=n.value;y(e,s)&&(v(e,n),e[a]||(s=void 0)),s&&t.call(o,s.value,s.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[s]=e.max||1/0;const t=e.length||d;if(this[i]="function"!=typeof t?d:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[u]=e.dispose,this[c]=e.noDisposeOnSet||!1,this[f]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[s]=e||1/0,m(this)}get max(){return this[s]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,m(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=d),e!==this[i]&&(this[i]=e,this[r]=0,this[p].forEach((e=>{e.length=this[i](e.value,e.key),this[r]+=e.length}))),m(this)}get lengthCalculator(){return this[i]}get length(){return this[r]}get itemCount(){return this[p].length}rforEach(e,t){t=t||this;for(let n=this[p].tail;null!==n;){const o=n.prev;x(this,e,n,t),n=o}}forEach(e,t){t=t||this;for(let n=this[p].head;null!==n;){const o=n.next;x(this,e,n,t),n=o}}keys(){return this[p].toArray().map((e=>e.key))}values(){return this[p].toArray().map((e=>e.value))}reset(){this[u]&&this[p]&&this[p].length&&this[p].forEach((e=>this[u](e.key,e.value))),this[h]=new Map,this[p]=new o,this[r]=0}dump(){return this[p].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[p]}set(e,t,n){if((n=n||this[l])&&"number"!=typeof n)throw new TypeError("maxAge must be a number");const o=n?Date.now():0,a=this[i](t,e);if(this[h].has(e)){if(a>this[s])return v(this,this[h].get(e)),!1;const i=this[h].get(e).value;return this[u]&&(this[c]||this[u](e,i.value)),i.now=o,i.maxAge=n,i.value=t,this[r]+=a-i.length,i.length=a,this.get(e),m(this),!0}const f=new b(e,t,a,o,n);return f.length>this[s]?(this[u]&&this[u](e,t),!1):(this[r]+=f.length,this[p].unshift(f),this[h].set(e,this[p].head),m(this),!0)}has(e){if(!this[h].has(e))return!1;const t=this[h].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[p].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[h].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const o=e[n],s=o.e||0;if(0===s)this.set(o.k,o.v);else{const e=s-t;e>0&&this.set(o.k,o.v,e)}}}prune(){this[h].forEach(((e,t)=>g(this,t,!1)))}}},602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BoundingBox:()=>a,Font:()=>Rn,Glyph:()=>le,Path:()=>u,_parse:()=>z,load:()=>_n,loadSync:()=>zn,parse:()=>Hn});var o=n(311),s=n.n(o);function r(e,t,n,o,s){return Math.pow(1-s,3)*e+3*Math.pow(1-s,2)*s*t+3*(1-s)*Math.pow(s,2)*n+Math.pow(s,3)*o}function i(){this.x1=Number.NaN,this.y1=Number.NaN,this.x2=Number.NaN,this.y2=Number.NaN}i.prototype.isEmpty=function(){return isNaN(this.x1)||isNaN(this.y1)||isNaN(this.x2)||isNaN(this.y2)},i.prototype.addPoint=function(e,t){"number"==typeof e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))},i.prototype.addX=function(e){this.addPoint(e,null)},i.prototype.addY=function(e){this.addPoint(null,e)},i.prototype.addBezier=function(e,t,n,o,s,i,a,l){const u=[e,t],c=[n,o],p=[s,i],h=[a,l];this.addPoint(e,t),this.addPoint(a,l);for(let e=0;e<=1;e++){const t=6*u[e]-12*c[e]+6*p[e],n=-3*u[e]+9*c[e]-9*p[e]+3*h[e],o=3*c[e]-3*u[e];if(0===n){if(0===t)continue;const n=-o/t;0<n&&n<1&&(0===e&&this.addX(r(u[e],c[e],p[e],h[e],n)),1===e&&this.addY(r(u[e],c[e],p[e],h[e],n)));continue}const s=Math.pow(t,2)-4*o*n;if(s<0)continue;const i=(-t+Math.sqrt(s))/(2*n);0<i&&i<1&&(0===e&&this.addX(r(u[e],c[e],p[e],h[e],i)),1===e&&this.addY(r(u[e],c[e],p[e],h[e],i)));const a=(-t-Math.sqrt(s))/(2*n);0<a&&a<1&&(0===e&&this.addX(r(u[e],c[e],p[e],h[e],a)),1===e&&this.addY(r(u[e],c[e],p[e],h[e],a)))}},i.prototype.addQuad=function(e,t,n,o,s,r){const i=e+2/3*(n-e),a=t+2/3*(o-t),l=i+1/3*(s-e),u=a+1/3*(r-t);this.addBezier(e,t,i,a,l,u,s,r)};const a=i;function l(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}l.prototype.moveTo=function(e,t){this.commands.push({type:"M",x:e,y:t})},l.prototype.lineTo=function(e,t){this.commands.push({type:"L",x:e,y:t})},l.prototype.curveTo=l.prototype.bezierCurveTo=function(e,t,n,o,s,r){this.commands.push({type:"C",x1:e,y1:t,x2:n,y2:o,x:s,y:r})},l.prototype.quadTo=l.prototype.quadraticCurveTo=function(e,t,n,o){this.commands.push({type:"Q",x1:e,y1:t,x:n,y:o})},l.prototype.close=l.prototype.closePath=function(){this.commands.push({type:"Z"})},l.prototype.extend=function(e){if(e.commands)e=e.commands;else if(e instanceof a){const t=e;return this.moveTo(t.x1,t.y1),this.lineTo(t.x2,t.y1),this.lineTo(t.x2,t.y2),this.lineTo(t.x1,t.y2),void this.close()}Array.prototype.push.apply(this.commands,e)},l.prototype.getBoundingBox=function(){const e=new a;let t=0,n=0,o=0,s=0;for(let r=0;r<this.commands.length;r++){const i=this.commands[r];switch(i.type){case"M":e.addPoint(i.x,i.y),t=o=i.x,n=s=i.y;break;case"L":e.addPoint(i.x,i.y),o=i.x,s=i.y;break;case"Q":e.addQuad(o,s,i.x1,i.y1,i.x,i.y),o=i.x,s=i.y;break;case"C":e.addBezier(o,s,i.x1,i.y1,i.x2,i.y2,i.x,i.y),o=i.x,s=i.y;break;case"Z":o=t,s=n;break;default:throw new Error("Unexpected path command "+i.type)}}return e.isEmpty()&&e.addPoint(0,0),e},l.prototype.draw=function(e){e.beginPath();for(let t=0;t<this.commands.length;t+=1){const n=this.commands[t];"M"===n.type?e.moveTo(n.x,n.y):"L"===n.type?e.lineTo(n.x,n.y):"C"===n.type?e.bezierCurveTo(n.x1,n.y1,n.x2,n.y2,n.x,n.y):"Q"===n.type?e.quadraticCurveTo(n.x1,n.y1,n.x,n.y):"Z"===n.type&&e.closePath()}this.fill&&(e.fillStyle=this.fill,e.fill()),this.stroke&&(e.strokeStyle=this.stroke,e.lineWidth=this.strokeWidth,e.stroke())},l.prototype.toPathData=function(e){function t(t){return Math.round(t)===t?""+Math.round(t):t.toFixed(e)}function n(){let e="";for(let n=0;n<arguments.length;n+=1){const o=arguments[n];o>=0&&n>0&&(e+=" "),e+=t(o)}return e}e=void 0!==e?e:2;let o="";for(let e=0;e<this.commands.length;e+=1){const t=this.commands[e];"M"===t.type?o+="M"+n(t.x,t.y):"L"===t.type?o+="L"+n(t.x,t.y):"C"===t.type?o+="C"+n(t.x1,t.y1,t.x2,t.y2,t.x,t.y):"Q"===t.type?o+="Q"+n(t.x1,t.y1,t.x,t.y):"Z"===t.type&&(o+="Z")}return o},l.prototype.toSVG=function(e){let t='<path d="';return t+=this.toPathData(e),t+='"',this.fill&&"black"!==this.fill&&(null===this.fill?t+=' fill="none"':t+=' fill="'+this.fill+'"'),this.stroke&&(t+=' stroke="'+this.stroke+'" stroke-width="'+this.strokeWidth+'"'),t+="/>",t},l.prototype.toDOMElement=function(e){const t=this.toPathData(e),n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",t),n};const u=l;function c(e){throw new Error(e)}function p(e,t){e||c(t)}const h={fail:c,argument:p,assert:p},f=2147483648,d={},g={},y={};function m(e){return function(){return e}}g.BYTE=function(e){return h.argument(e>=0&&e<=255,"Byte value should be between 0 and 255."),[e]},y.BYTE=m(1),g.CHAR=function(e){return[e.charCodeAt(0)]},y.CHAR=m(1),g.CHARARRAY=function(e){const t=[];for(let n=0;n<e.length;n+=1)t[n]=e.charCodeAt(n);return t},y.CHARARRAY=function(e){return e.length},g.USHORT=function(e){return[e>>8&255,255&e]},y.USHORT=m(2),g.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},y.SHORT=m(2),g.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},y.UINT24=m(3),g.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},y.ULONG=m(4),g.LONG=function(e){return e>=f&&(e=-(2*f-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},y.LONG=m(4),g.FIXED=g.ULONG,y.FIXED=y.ULONG,g.FWORD=g.SHORT,y.FWORD=y.SHORT,g.UFWORD=g.USHORT,y.UFWORD=y.USHORT,g.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},y.LONGDATETIME=m(8),g.TAG=function(e){return h.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},y.TAG=m(4),g.Card8=g.BYTE,y.Card8=y.BYTE,g.Card16=g.USHORT,y.Card16=y.USHORT,g.OffSize=g.BYTE,y.OffSize=y.BYTE,g.SID=g.USHORT,y.SID=y.USHORT,g.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?g.NUMBER16(e):g.NUMBER32(e)},y.NUMBER=function(e){return g.NUMBER(e).length},g.NUMBER16=function(e){return[28,e>>8&255,255&e]},y.NUMBER16=m(3),g.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},y.NUMBER32=m(5),g.REAL=function(e){let t=e.toString();const n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){const o=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*o)/o).toString()}let o="";for(let e=0,n=t.length;e<n;e+=1){const n=t[e];o+="e"===n?"-"===t[++e]?"c":"b":"."===n?"a":"-"===n?"e":n}o+=1&o.length?"f":"ff";const s=[30];for(let e=0,t=o.length;e<t;e+=2)s.push(parseInt(o.substr(e,2),16));return s},y.REAL=function(e){return g.REAL(e).length},g.NAME=g.CHARARRAY,y.NAME=y.CHARARRAY,g.STRING=g.CHARARRAY,y.STRING=y.CHARARRAY,d.UTF8=function(e,t,n){const o=[],s=n;for(let n=0;n<s;n++,t+=1)o[n]=e.getUint8(t);return String.fromCharCode.apply(null,o)},d.UTF16=function(e,t,n){const o=[],s=n/2;for(let n=0;n<s;n++,t+=2)o[n]=e.getUint16(t);return String.fromCharCode.apply(null,o)},g.UTF16=function(e){const t=[];for(let n=0;n<e.length;n+=1){const o=e.charCodeAt(n);t[t.length]=o>>8&255,t[t.length]=255&o}return t},y.UTF16=function(e){return 2*e.length};const v={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ä¹²É³ÖÜ΅àâä΄¨çéèêë£™îï•½‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆćéŹźĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņŃ¬√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›ﬁﬂ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};d.MACSTRING=function(e,t,n,o){const s=v[o];if(void 0===s)return;let r="";for(let o=0;o<n;o++){const n=e.getUint8(t+o);r+=n<=127?String.fromCharCode(n):s[127&n]}return r};const b="function"==typeof WeakMap&&new WeakMap;let x;function S(e){return e>=-128&&e<=127}function U(e,t,n){let o=0;const s=e.length;for(;t<s&&o<64&&0===e[t];)++t,++o;return n.push(128|o-1),t}function T(e,t,n){let o=0;const s=e.length;let r=t;for(;r<s&&o<64;){const t=e[r];if(!S(t))break;if(0===t&&r+1<s&&0===e[r+1])break;++r,++o}n.push(o-1);for(let o=t;o<r;++o)n.push(e[o]+256&255);return r}function k(e,t,n){let o=0;const s=e.length;let r=t;for(;r<s&&o<64;){const t=e[r];if(0===t)break;if(S(t)&&r+1<s&&S(e[r+1]))break;++r,++o}n.push(64|o-1);for(let o=t;o<r;++o){const t=e[o];n.push(t+65536>>8&255,t+256&255)}return r}g.MACSTRING=function(e,t){const n=function(e){if(!x){x={};for(let e in v)x[e]=new String(e)}const t=x[e];if(void 0===t)return;if(b){const e=b.get(t);if(void 0!==e)return e}const n=v[e];if(void 0===n)return;const o={};for(let e=0;e<n.length;e++)o[n.charCodeAt(e)]=e+128;return b&&b.set(t,o),o}(t);if(void 0===n)return;const o=[];for(let t=0;t<e.length;t++){let s=e.charCodeAt(t);if(s>=128&&(s=n[s],void 0===s))return;o[t]=s}return o},y.MACSTRING=function(e,t){const n=g.MACSTRING(e,t);return void 0!==n?n.length:0},g.VARDELTAS=function(e){let t=0;const n=[];for(;t<e.length;){const o=e[t];t=0===o?U(e,t,n):o>=-128&&o<=127?T(e,t,n):k(e,t,n)}return n},g.INDEX=function(e){let t=1;const n=[t],o=[];for(let s=0;s<e.length;s+=1){const r=g.OBJECT(e[s]);Array.prototype.push.apply(o,r),t+=r.length,n.push(t)}if(0===o.length)return[0,0];const s=[],r=1+Math.floor(Math.log(t)/Math.log(2))/8|0,i=[void 0,g.BYTE,g.USHORT,g.UINT24,g.ULONG][r];for(let e=0;e<n.length;e+=1){const t=i(n[e]);Array.prototype.push.apply(s,t)}return Array.prototype.concat(g.Card16(e.length),g.OffSize(r),s,o)},y.INDEX=function(e){return g.INDEX(e).length},g.DICT=function(e){let t=[];const n=Object.keys(e),o=n.length;for(let s=0;s<o;s+=1){const o=parseInt(n[s],0),r=e[o];t=t.concat(g.OPERAND(r.value,r.type)),t=t.concat(g.OPERATOR(o))}return t},y.DICT=function(e){return g.DICT(e).length},g.OPERATOR=function(e){return e<1200?[e]:[12,e-1200]},g.OPERAND=function(e,t){let n=[];if(Array.isArray(t))for(let o=0;o<t.length;o+=1)h.argument(e.length===t.length,"Not enough arguments given for type"+t),n=n.concat(g.OPERAND(e[o],t[o]));else if("SID"===t)n=n.concat(g.NUMBER(e));else if("offset"===t)n=n.concat(g.NUMBER32(e));else if("number"===t)n=n.concat(g.NUMBER(e));else{if("real"!==t)throw new Error("Unknown operand type "+t);n=n.concat(g.REAL(e))}return n},g.OP=g.BYTE,y.OP=y.BYTE;const O="function"==typeof WeakMap&&new WeakMap;function w(e,t,n){for(let e=0;e<t.length;e+=1){const n=t[e];this[n.name]=n.value}if(this.tableName=e,this.fields=t,n){const e=Object.keys(n);for(let t=0;t<e.length;t+=1){const o=e[t],s=n[o];void 0!==this[o]&&(this[o]=s)}}}function E(e,t,n){void 0===n&&(n=t.length);const o=new Array(t.length+1);o[0]={name:e+"Count",type:"USHORT",value:n};for(let n=0;n<t.length;n++)o[n+1]={name:e+n,type:"USHORT",value:t[n]};return o}function R(e,t,n){const o=t.length,s=new Array(o+1);s[0]={name:e+"Count",type:"USHORT",value:o};for(let r=0;r<o;r++)s[r+1]={name:e+r,type:"TABLE",value:n(t[r],r)};return s}function L(e,t,n){const o=t.length;let s=[];s[0]={name:e+"Count",type:"USHORT",value:o};for(let e=0;e<o;e++)s=s.concat(n(t[e],e));return s}function D(e){1===e.format?w.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(E("glyph",e.glyphs))):h.assert(!1,"Can't create coverage table format 2 yet.")}function C(e){w.call(this,"scriptListTable",L("scriptRecord",e,(function(e,t){const n=e.script;let o=n.defaultLangSys;return h.assert(!!o,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new w("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new w("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:o.reqFeatureIndex}].concat(E("featureIndex",o.featureIndexes)))}].concat(L("langSys",n.langSysRecords,(function(e,t){const n=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new w("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:n.reqFeatureIndex}].concat(E("featureIndex",n.featureIndexes)))}]}))))}]})))}function I(e){w.call(this,"featureListTable",L("featureRecord",e,(function(e,t){const n=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new w("featureTable",[{name:"featureParams",type:"USHORT",value:n.featureParams}].concat(E("lookupListIndex",n.lookupListIndexes)))}]})))}function M(e,t){w.call(this,"lookupListTable",R("lookup",e,(function(e){let n=t[e.lookupType];return h.assert(!!n,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new w("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(R("subtable",e.subtables,n)))})))}g.CHARSTRING=function(e){if(O){const t=O.get(e);if(void 0!==t)return t}let t=[];const n=e.length;for(let o=0;o<n;o+=1){const n=e[o];t=t.concat(g[n.type](n.value))}return O&&O.set(e,t),t},y.CHARSTRING=function(e){return g.CHARSTRING(e).length},g.OBJECT=function(e){const t=g[e.type];return h.argument(void 0!==t,"No encoding function for type "+e.type),t(e.value)},y.OBJECT=function(e){const t=y[e.type];return h.argument(void 0!==t,"No sizeOf function for type "+e.type),t(e.value)},g.TABLE=function(e){let t=[];const n=e.fields.length,o=[],s=[];for(let r=0;r<n;r+=1){const n=e.fields[r],i=g[n.type];h.argument(void 0!==i,"No encoding function for field type "+n.type+" ("+n.name+")");let a=e[n.name];void 0===a&&(a=n.value);const l=i(a);"TABLE"===n.type?(s.push(t.length),t=t.concat([0,0]),o.push(l)):t=t.concat(l)}for(let n=0;n<o.length;n+=1){const r=s[n],i=t.length;h.argument(i<65536,"Table "+e.tableName+" too big."),t[r]=i>>8,t[r+1]=255&i,t=t.concat(o[n])}return t},y.TABLE=function(e){let t=0;const n=e.fields.length;for(let o=0;o<n;o+=1){const n=e.fields[o],s=y[n.type];h.argument(void 0!==s,"No sizeOf function for field type "+n.type+" ("+n.name+")");let r=e[n.name];void 0===r&&(r=n.value),t+=s(r),"TABLE"===n.type&&(t+=2)}return t},g.RECORD=g.TABLE,y.RECORD=y.TABLE,g.LITERAL=function(e){return e},y.LITERAL=function(e){return e.length},w.prototype.encode=function(){return g.TABLE(this)},w.prototype.sizeOf=function(){return y.TABLE(this)},D.prototype=Object.create(w.prototype),D.prototype.constructor=D,C.prototype=Object.create(w.prototype),C.prototype.constructor=C,I.prototype=Object.create(w.prototype),I.prototype.constructor=I,M.prototype=Object.create(w.prototype),M.prototype.constructor=M;const G={Table:w,Record:w,Coverage:D,ScriptList:C,FeatureList:I,LookupList:M,ushortList:E,tableList:R,recordList:L};function A(e,t){return e.getUint8(t)}function B(e,t){return e.getUint16(t,!1)}function P(e,t){return e.getUint32(t,!1)}function N(e,t){return e.getInt16(t,!1)+e.getUint16(t+2,!1)/65535}const F={byte:1,uShort:2,short:2,uLong:4,fixed:4,longDateTime:8,tag:4};function H(e,t){this.data=e,this.offset=t,this.relativeOffset=0}H.prototype.parseByte=function(){const e=this.data.getUint8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},H.prototype.parseChar=function(){const e=this.data.getInt8(this.offset+this.relativeOffset);return this.relativeOffset+=1,e},H.prototype.parseCard8=H.prototype.parseByte,H.prototype.parseUShort=function(){const e=this.data.getUint16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},H.prototype.parseCard16=H.prototype.parseUShort,H.prototype.parseSID=H.prototype.parseUShort,H.prototype.parseOffset16=H.prototype.parseUShort,H.prototype.parseShort=function(){const e=this.data.getInt16(this.offset+this.relativeOffset);return this.relativeOffset+=2,e},H.prototype.parseF2Dot14=function(){const e=this.data.getInt16(this.offset+this.relativeOffset)/16384;return this.relativeOffset+=2,e},H.prototype.parseULong=function(){const e=P(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},H.prototype.parseOffset32=H.prototype.parseULong,H.prototype.parseFixed=function(){const e=N(this.data,this.offset+this.relativeOffset);return this.relativeOffset+=4,e},H.prototype.parseString=function(e){const t=this.data,n=this.offset+this.relativeOffset;let o="";this.relativeOffset+=e;for(let s=0;s<e;s++)o+=String.fromCharCode(t.getUint8(n+s));return o},H.prototype.parseTag=function(){return this.parseString(4)},H.prototype.parseLongDateTime=function(){let e=P(this.data,this.offset+this.relativeOffset+4);return e-=2082844800,this.relativeOffset+=8,e},H.prototype.parseVersion=function(e){const t=B(this.data,this.offset+this.relativeOffset),n=B(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,void 0===e&&(e=4096),t+n/e/10},H.prototype.skip=function(e,t){void 0===t&&(t=1),this.relativeOffset+=F[e]*t},H.prototype.parseULongList=function(e){void 0===e&&(e=this.parseULong());const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint32(o),o+=4;return this.relativeOffset+=4*e,t},H.prototype.parseOffset16List=H.prototype.parseUShortList=function(e){void 0===e&&(e=this.parseUShort());const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint16(o),o+=2;return this.relativeOffset+=2*e,t},H.prototype.parseShortList=function(e){const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getInt16(o),o+=2;return this.relativeOffset+=2*e,t},H.prototype.parseByteList=function(e){const t=new Array(e),n=this.data;let o=this.offset+this.relativeOffset;for(let s=0;s<e;s++)t[s]=n.getUint8(o++);return this.relativeOffset+=e,t},H.prototype.parseList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e);for(let o=0;o<e;o++)n[o]=t.call(this);return n},H.prototype.parseList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e);for(let o=0;o<e;o++)n[o]=t.call(this);return n},H.prototype.parseRecordList=function(e,t){t||(t=e,e=this.parseUShort());const n=new Array(e),o=Object.keys(t);for(let s=0;s<e;s++){const e={};for(let n=0;n<o.length;n++){const s=o[n],r=t[s];e[s]=r.call(this)}n[s]=e}return n},H.prototype.parseRecordList32=function(e,t){t||(t=e,e=this.parseULong());const n=new Array(e),o=Object.keys(t);for(let s=0;s<e;s++){const e={};for(let n=0;n<o.length;n++){const s=o[n],r=t[s];e[s]=r.call(this)}n[s]=e}return n},H.prototype.parseStruct=function(e){if("function"==typeof e)return e.call(this);{const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o],r=e[s];n[s]=r.call(this)}return n}},H.prototype.parseValueRecord=function(e){if(void 0===e&&(e=this.parseUShort()),0===e)return;const t={};return 1&e&&(t.xPlacement=this.parseShort()),2&e&&(t.yPlacement=this.parseShort()),4&e&&(t.xAdvance=this.parseShort()),8&e&&(t.yAdvance=this.parseShort()),16&e&&(t.xPlaDevice=void 0,this.parseShort()),32&e&&(t.yPlaDevice=void 0,this.parseShort()),64&e&&(t.xAdvDevice=void 0,this.parseShort()),128&e&&(t.yAdvDevice=void 0,this.parseShort()),t},H.prototype.parseValueRecordList=function(){const e=this.parseUShort(),t=this.parseUShort(),n=new Array(t);for(let o=0;o<t;o++)n[o]=this.parseValueRecord(e);return n},H.prototype.parsePointer=function(e){const t=this.parseOffset16();if(t>0)return new H(this.data,this.offset+t).parseStruct(e)},H.prototype.parsePointer32=function(e){const t=this.parseOffset32();if(t>0)return new H(this.data,this.offset+t).parseStruct(e)},H.prototype.parseListOfLists=function(e){const t=this.parseOffset16List(),n=t.length,o=this.relativeOffset,s=new Array(n);for(let o=0;o<n;o++){const n=t[o];if(0!==n)if(this.relativeOffset=n,e){const t=this.parseOffset16List(),r=new Array(t.length);for(let o=0;o<t.length;o++)this.relativeOffset=n+t[o],r[o]=e.call(this);s[o]=r}else s[o]=this.parseUShortList();else s[o]=void 0}return this.relativeOffset=o,s},H.prototype.parseCoverage=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parseUShort();if(1===t)return{format:1,glyphs:this.parseUShortList(n)};if(2===t){const e=new Array(n);for(let t=0;t<n;t++)e[t]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:e}}throw new Error("0x"+e.toString(16)+": Coverage format must be 1 or 2.")},H.prototype.parseClassDef=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()};if(2===t)return{format:2,ranges:this.parseRecordList({start:H.uShort,end:H.uShort,classId:H.uShort})};throw new Error("0x"+e.toString(16)+": ClassDef format must be 1 or 2.")},H.list=function(e,t){return function(){return this.parseList(e,t)}},H.list32=function(e,t){return function(){return this.parseList32(e,t)}},H.recordList=function(e,t){return function(){return this.parseRecordList(e,t)}},H.recordList32=function(e,t){return function(){return this.parseRecordList32(e,t)}},H.pointer=function(e){return function(){return this.parsePointer(e)}},H.pointer32=function(e){return function(){return this.parsePointer32(e)}},H.tag=H.prototype.parseTag,H.byte=H.prototype.parseByte,H.uShort=H.offset16=H.prototype.parseUShort,H.uShortList=H.prototype.parseUShortList,H.uLong=H.offset32=H.prototype.parseULong,H.uLongList=H.prototype.parseULongList,H.struct=H.prototype.parseStruct,H.coverage=H.prototype.parseCoverage,H.classDef=H.prototype.parseClassDef;const _={reserved:H.uShort,reqFeatureIndex:H.uShort,featureIndexes:H.uShortList};H.prototype.parseScriptList=function(){return this.parsePointer(H.recordList({tag:H.tag,script:H.pointer({defaultLangSys:H.pointer(_),langSysRecords:H.recordList({tag:H.tag,langSys:H.pointer(_)})})}))||[]},H.prototype.parseFeatureList=function(){return this.parsePointer(H.recordList({tag:H.tag,feature:H.pointer({featureParams:H.offset16,lookupListIndexes:H.uShortList})}))||[]},H.prototype.parseLookupList=function(e){return this.parsePointer(H.list(H.pointer((function(){const t=this.parseUShort();h.argument(1<=t&&t<=9,"GPOS/GSUB lookup type "+t+" unknown.");const n=this.parseUShort(),o=16&n;return{lookupType:t,lookupFlag:n,subtables:this.parseList(H.pointer(e[t])),markFilteringSet:o?this.parseUShort():void 0}}))))||[]},H.prototype.parseFeatureVariationsList=function(){return this.parsePointer32((function(){const e=this.parseUShort(),t=this.parseUShort();return h.argument(1===e&&t<1,"GPOS/GSUB feature variations table unknown."),this.parseRecordList32({conditionSetOffset:H.offset32,featureTableSubstitutionOffset:H.offset32})}))||[]};const z={getByte:A,getCard8:A,getUShort:B,getCard16:B,getShort:function(e,t){return e.getInt16(t,!1)},getULong:P,getFixed:N,getTag:function(e,t){let n="";for(let o=t;o<t+4;o+=1)n+=String.fromCharCode(e.getInt8(o));return n},getOffset:function(e,t,n){let o=0;for(let s=0;s<n;s+=1)o<<=8,o+=e.getUint8(t+s);return o},getBytes:function(e,t,n){const o=[];for(let s=t;s<n;s+=1)o.push(e.getUint8(s));return o},bytesToString:function(e){let t="";for(let n=0;n<e.length;n+=1)t+=String.fromCharCode(e[n]);return t},Parser:H};function W(e,t,n){e.segments.push({end:t,start:t,delta:-(t-n),offset:0,glyphIndex:n})}const q=function(e,t){const n={};n.version=z.getUShort(e,t),h.argument(0===n.version,"cmap table version should be 0."),n.numTables=z.getUShort(e,t+2);let o=-1;for(let s=n.numTables-1;s>=0;s-=1){const n=z.getUShort(e,t+4+8*s),r=z.getUShort(e,t+4+8*s+2);if(3===n&&(0===r||1===r||10===r)){o=z.getULong(e,t+4+8*s+4);break}}if(-1===o)throw new Error("No valid cmap sub-tables found.");const s=new z.Parser(e,t+o);if(n.format=s.parseUShort(),12===n.format)!function(e,t){let n;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=n=t.parseULong(),e.glyphIndexMap={};for(let o=0;o<n;o+=1){const n=t.parseULong(),o=t.parseULong();let s=t.parseULong();for(let t=n;t<=o;t+=1)e.glyphIndexMap[t]=s,s++}}(n,s);else{if(4!==n.format)throw new Error("Only format 4 and 12 cmap tables are supported (found format "+n.format+").");!function(e,t,n,o,s){let r;e.length=t.parseUShort(),e.language=t.parseUShort(),e.segCount=r=t.parseUShort()>>1,t.skip("uShort",3),e.glyphIndexMap={};const i=new z.Parser(n,o+s+14),a=new z.Parser(n,o+s+16+2*r),l=new z.Parser(n,o+s+16+4*r),u=new z.Parser(n,o+s+16+6*r);let c=o+s+16+8*r;for(let t=0;t<r-1;t+=1){let t;const o=i.parseUShort(),s=a.parseUShort(),r=l.parseShort(),p=u.parseUShort();for(let i=s;i<=o;i+=1)0!==p?(c=u.offset+u.relativeOffset-2,c+=p,c+=2*(i-s),t=z.getUShort(n,c),0!==t&&(t=t+r&65535)):t=i+r&65535,e.glyphIndexMap[i]=t}}(n,s,e,t,o)}return n},j=function(e){let t,n=!0;for(t=e.length-1;t>0;t-=1)if(e.get(t).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),n=!1;break}let o=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:n?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:n?12:20}];n||(o=o.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),o=o.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);const s=new G.Table("cmap",o);for(s.segments=[],t=0;t<e.length;t+=1){const n=e.get(t);for(let e=0;e<n.unicodes.length;e+=1)W(s,n.unicodes[e],t);s.segments=s.segments.sort((function(e,t){return e.start-t.start}))}!function(e){e.segments.push({end:65535,start:65535,delta:1,offset:0})}(s);const r=s.segments.length;let i=0,a=[],l=[],u=[],c=[],p=[],h=[];for(t=0;t<r;t+=1){const e=s.segments[t];e.end<=65535&&e.start<=65535?(a=a.concat({name:"end_"+t,type:"USHORT",value:e.end}),l=l.concat({name:"start_"+t,type:"USHORT",value:e.start}),u=u.concat({name:"idDelta_"+t,type:"SHORT",value:e.delta}),c=c.concat({name:"idRangeOffset_"+t,type:"USHORT",value:e.offset}),void 0!==e.glyphId&&(p=p.concat({name:"glyph_"+t,type:"USHORT",value:e.glyphId}))):i+=1,n||void 0===e.glyphIndex||(h=h.concat({name:"cmap12Start_"+t,type:"ULONG",value:e.start}),h=h.concat({name:"cmap12End_"+t,type:"ULONG",value:e.end}),h=h.concat({name:"cmap12Glyph_"+t,type:"ULONG",value:e.glyphIndex}))}if(s.segCountX2=2*(r-i),s.searchRange=2*Math.pow(2,Math.floor(Math.log(r-i)/Math.log(2))),s.entrySelector=Math.log(s.searchRange/2)/Math.log(2),s.rangeShift=s.segCountX2-s.searchRange,s.fields=s.fields.concat(a),s.fields.push({name:"reservedPad",type:"USHORT",value:0}),s.fields=s.fields.concat(l),s.fields=s.fields.concat(u),s.fields=s.fields.concat(c),s.fields=s.fields.concat(p),s.cmap4Length=14+2*a.length+2+2*l.length+2*u.length+2*c.length+2*p.length,!n){const e=16+4*h.length;s.cmap12Offset=20+s.cmap4Length,s.fields=s.fields.concat([{name:"cmap12Format",type:"USHORT",value:12},{name:"cmap12Reserved",type:"USHORT",value:0},{name:"cmap12Length",type:"ULONG",value:e},{name:"cmap12Language",type:"ULONG",value:0},{name:"cmap12nGroups",type:"ULONG",value:h.length/3}]),s.fields=s.fields.concat(h)}return s},X=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","266 ff","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],V=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],Y=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],Z=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter","threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function Q(e){this.font=e}function K(e){this.cmap=e}function J(e,t){this.encoding=e,this.charset=t}function $(e){switch(e.version){case 1:this.names=Z.slice();break;case 2:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)e.glyphNameIndex[t]<Z.length?this.names[t]=Z[e.glyphNameIndex[t]]:this.names[t]=e.names[e.glyphNameIndex[t]-Z.length];break;case 2.5:this.names=new Array(e.numberOfGlyphs);for(let t=0;t<e.numberOfGlyphs;t++)this.names[t]=Z[t+e.glyphNameIndex[t]];break;default:this.names=[]}}Q.prototype.charToGlyphIndex=function(e){const t=e.charCodeAt(0),n=this.font.glyphs;if(n)for(let e=0;e<n.length;e+=1){const o=n.get(e);for(let n=0;n<o.unicodes.length;n+=1)if(o.unicodes[n]===t)return e}return null},K.prototype.charToGlyphIndex=function(e){return this.cmap.glyphIndexMap[e.charCodeAt(0)]||0},J.prototype.charToGlyphIndex=function(e){const t=e.charCodeAt(0),n=this.encoding[t];return this.charset.indexOf(n)},$.prototype.nameToGlyphIndex=function(e){return this.names.indexOf(e)},$.prototype.glyphIndexToName=function(e){return this.names[e]};const ee=function(e,t,n,o,s){e.beginPath(),e.moveTo(t,n),e.lineTo(o,s),e.stroke()};function te(e,t,n,o,s){let r;return(t&o)>0?(r=e.parseByte(),0==(t&s)&&(r=-r),r=n+r):r=(t&s)>0?n:n+e.parseShort(),r}function ne(e,t,n){const o=new z.Parser(t,n);let s,r;if(e.numberOfContours=o.parseShort(),e._xMin=o.parseShort(),e._yMin=o.parseShort(),e._xMax=o.parseShort(),e._yMax=o.parseShort(),e.numberOfContours>0){const t=e.endPointIndices=[];for(let n=0;n<e.numberOfContours;n+=1)t.push(o.parseUShort());e.instructionLength=o.parseUShort(),e.instructions=[];for(let t=0;t<e.instructionLength;t+=1)e.instructions.push(o.parseByte());const n=t[t.length-1]+1;s=[];for(let e=0;e<n;e+=1)if(r=o.parseByte(),s.push(r),(8&r)>0){const t=o.parseByte();for(let n=0;n<t;n+=1)s.push(r),e+=1}if(h.argument(s.length===n,"Bad flags."),t.length>0){const i=[];let a;if(n>0){for(let e=0;e<n;e+=1)r=s[e],a={},a.onCurve=!!(1&r),a.lastPointOfContour=t.indexOf(e)>=0,i.push(a);let e=0;for(let t=0;t<n;t+=1)r=s[t],a=i[t],a.x=te(o,r,e,2,16),e=a.x;let l=0;for(let e=0;e<n;e+=1)r=s[e],a=i[e],a.y=te(o,r,l,4,32),l=a.y}e.points=i}else e.points=[]}else if(0===e.numberOfContours)e.points=[];else{e.isComposite=!0,e.points=[],e.components=[];let t=!0;for(;t;){s=o.parseUShort();const n={glyphIndex:o.parseUShort(),xScale:1,scale01:0,scale10:0,yScale:1,dx:0,dy:0};(1&s)>0?(2&s)>0?(n.dx=o.parseShort(),n.dy=o.parseShort()):n.matchedPoints=[o.parseUShort(),o.parseUShort()]:(2&s)>0?(n.dx=o.parseChar(),n.dy=o.parseChar()):n.matchedPoints=[o.parseByte(),o.parseByte()],(8&s)>0?n.xScale=n.yScale=o.parseF2Dot14():(64&s)>0?(n.xScale=o.parseF2Dot14(),n.yScale=o.parseF2Dot14()):(128&s)>0&&(n.xScale=o.parseF2Dot14(),n.scale01=o.parseF2Dot14(),n.scale10=o.parseF2Dot14(),n.yScale=o.parseF2Dot14()),e.components.push(n),t=!!(32&s)}if(256&s){e.instructionLength=o.parseUShort(),e.instructions=[];for(let t=0;t<e.instructionLength;t+=1)e.instructions.push(o.parseByte())}}}function oe(e,t){const n=[];for(let o=0;o<e.length;o+=1){const s=e[o],r={x:t.xScale*s.x+t.scale01*s.y+t.dx,y:t.scale10*s.x+t.yScale*s.y+t.dy,onCurve:s.onCurve,lastPointOfContour:s.lastPointOfContour};n.push(r)}return n}function se(e){const t=new u;if(!e)return t;const n=function(e){const t=[];let n=[];for(let o=0;o<e.length;o+=1){const s=e[o];n.push(s),s.lastPointOfContour&&(t.push(n),n=[])}return h.argument(0===n.length,"There are still points left in the current contour."),t}(e);for(let e=0;e<n.length;++e){const o=n[e];let s=null,r=o[o.length-1],i=o[0];if(r.onCurve)t.moveTo(r.x,r.y);else if(i.onCurve)t.moveTo(i.x,i.y);else{const e={x:.5*(r.x+i.x),y:.5*(r.y+i.y)};t.moveTo(e.x,e.y)}for(let e=0;e<o.length;++e)if(s=r,r=i,i=o[(e+1)%o.length],r.onCurve)t.lineTo(r.x,r.y);else{let e=s,n=i;s.onCurve||(e={x:.5*(r.x+s.x),y:.5*(r.y+s.y)},t.lineTo(e.x,e.y)),i.onCurve||(n={x:.5*(r.x+i.x),y:.5*(r.y+i.y)}),t.lineTo(e.x,e.y),t.quadraticCurveTo(r.x,r.y,n.x,n.y)}t.closePath()}return t}function re(e,t){if(t.isComposite)for(let n=0;n<t.components.length;n+=1){const o=t.components[n],s=e.get(o.glyphIndex);if(s.getPath(),s.points){let e;if(void 0===o.matchedPoints)e=oe(s.points,o);else{if(o.matchedPoints[0]>t.points.length-1||o.matchedPoints[1]>s.points.length-1)throw Error("Matched points out of range in "+t.name);const n=t.points[o.matchedPoints[0]];let r=s.points[o.matchedPoints[1]];const i={xScale:o.xScale,scale01:o.scale01,scale10:o.scale10,yScale:o.yScale,dx:0,dy:0};r=oe([r],i)[0],i.dx=n.x-r.x,i.dy=n.y-r.y,e=oe(s.points,i)}t.points=t.points.concat(e)}}return se(t.points)}const ie={getPath:se,parse:function(e,t,n,o){const s=new pe.GlyphSet(o);for(let r=0;r<n.length-1;r+=1){const i=n[r];i!==n[r+1]?s.push(r,pe.ttfGlyphLoader(o,r,ne,e,t+i,re)):s.push(r,pe.glyphLoader(o,r))}return s}};function ae(e){this.bindConstructorValues(e)}ae.prototype.bindConstructorValues=function(e){this.index=e.index||0,this.name=e.name||null,this.unicode=e.unicode||void 0,this.unicodes=e.unicodes||void 0!==e.unicode?[e.unicode]:[],e.xMin&&(this.xMin=e.xMin),e.yMin&&(this.yMin=e.yMin),e.xMax&&(this.xMax=e.xMax),e.yMax&&(this.yMax=e.yMax),e.advanceWidth&&(this.advanceWidth=e.advanceWidth),Object.defineProperty(this,"path",function(e,t){let n=t||new u;return{configurable:!0,get:function(){return"function"==typeof n&&(n=n()),n},set:function(e){n=e}}}(0,e.path))},ae.prototype.addUnicode=function(e){0===this.unicodes.length&&(this.unicode=e),this.unicodes.push(e)},ae.prototype.getBoundingBox=function(){return this.path.getBoundingBox()},ae.prototype.getPath=function(e,t,n,o,s){let r,i;e=void 0!==e?e:0,t=void 0!==t?t:0,n=void 0!==n?n:72,o||(o={});let a=o.xScale,l=o.yScale;if(o.hinting&&s&&s.hinting&&(i=this.path&&s.hinting.exec(this,n)),i)r=ie.getPath(i).commands,e=Math.round(e),t=Math.round(t),a=l=1;else{r=this.path.commands;const e=1/this.path.unitsPerEm*n;void 0===a&&(a=e),void 0===l&&(l=e)}const c=new u;for(let n=0;n<r.length;n+=1){const o=r[n];"M"===o.type?c.moveTo(e+o.x*a,t+-o.y*l):"L"===o.type?c.lineTo(e+o.x*a,t+-o.y*l):"Q"===o.type?c.quadraticCurveTo(e+o.x1*a,t+-o.y1*l,e+o.x*a,t+-o.y*l):"C"===o.type?c.curveTo(e+o.x1*a,t+-o.y1*l,e+o.x2*a,t+-o.y2*l,e+o.x*a,t+-o.y*l):"Z"===o.type&&c.closePath()}return c},ae.prototype.getContours=function(){if(void 0===this.points)return[];const e=[];let t=[];for(let n=0;n<this.points.length;n+=1){const o=this.points[n];t.push(o),o.lastPointOfContour&&(e.push(t),t=[])}return h.argument(0===t.length,"There are still points left in the current contour."),e},ae.prototype.getMetrics=function(){const e=this.path.commands,t=[],n=[];for(let o=0;o<e.length;o+=1){const s=e[o];"Z"!==s.type&&(t.push(s.x),n.push(s.y)),"Q"!==s.type&&"C"!==s.type||(t.push(s.x1),n.push(s.y1)),"C"===s.type&&(t.push(s.x2),n.push(s.y2))}const o={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,t),yMax:Math.max.apply(null,n),leftSideBearing:this.leftSideBearing};return isFinite(o.xMin)||(o.xMin=0),isFinite(o.xMax)||(o.xMax=this.advanceWidth),isFinite(o.yMin)||(o.yMin=0),isFinite(o.yMax)||(o.yMax=0),o.rightSideBearing=this.advanceWidth-o.leftSideBearing-(o.xMax-o.xMin),o},ae.prototype.draw=function(e,t,n,o,s){this.getPath(t,n,o,s).draw(e)},ae.prototype.drawPoints=function(e,t,n,o){function s(t,n,o,s){const r=2*Math.PI;e.beginPath();for(let i=0;i<t.length;i+=1)e.moveTo(n+t[i].x*s,o+t[i].y*s),e.arc(n+t[i].x*s,o+t[i].y*s,2,0,r,!1);e.closePath(),e.fill()}t=void 0!==t?t:0,n=void 0!==n?n:0,o=void 0!==o?o:24;const r=1/this.path.unitsPerEm*o,i=[],a=[],l=this.path;for(let e=0;e<l.commands.length;e+=1){const t=l.commands[e];void 0!==t.x&&i.push({x:t.x,y:-t.y}),void 0!==t.x1&&a.push({x:t.x1,y:-t.y1}),void 0!==t.x2&&a.push({x:t.x2,y:-t.y2})}e.fillStyle="blue",s(i,t,n,r),e.fillStyle="red",s(a,t,n,r)},ae.prototype.drawMetrics=function(e,t,n,o){let s;t=void 0!==t?t:0,n=void 0!==n?n:0,o=void 0!==o?o:24,s=1/this.path.unitsPerEm*o,e.lineWidth=1,e.strokeStyle="black",ee(e,t,-1e4,t,1e4),ee(e,-1e4,n,1e4,n);const r=this.xMin||0;let i=this.yMin||0;const a=this.xMax||0;let l=this.yMax||0;const u=this.advanceWidth||0;e.strokeStyle="blue",ee(e,t+r*s,-1e4,t+r*s,1e4),ee(e,t+a*s,-1e4,t+a*s,1e4),ee(e,-1e4,n+-i*s,1e4,n+-i*s),ee(e,-1e4,n+-l*s,1e4,n+-l*s),e.strokeStyle="green",ee(e,t+u*s,-1e4,t+u*s,1e4)};const le=ae;function ue(e,t,n){Object.defineProperty(e,t,{get:function(){return e.path,e[n]},set:function(t){e[n]=t},enumerable:!0,configurable:!0})}function ce(e,t){if(this.font=e,this.glyphs={},Array.isArray(t))for(let e=0;e<t.length;e++)this.glyphs[e]=t[e];this.length=t&&t.length||0}ce.prototype.get=function(e){return"function"==typeof this.glyphs[e]&&(this.glyphs[e]=this.glyphs[e]()),this.glyphs[e]},ce.prototype.push=function(e,t){this.glyphs[e]=t,this.length++};const pe={GlyphSet:ce,glyphLoader:function(e,t){return new le({index:t,font:e})},ttfGlyphLoader:function(e,t,n,o,s,r){return function(){const i=new le({index:t,font:e});return i.path=function(){n(i,o,s);const t=r(e.glyphs,i);return t.unitsPerEm=e.unitsPerEm,t},ue(i,"xMin","_xMin"),ue(i,"xMax","_xMax"),ue(i,"yMin","_yMin"),ue(i,"yMax","_yMax"),i}},cffGlyphLoader:function(e,t,n,o){return function(){const s=new le({index:t,font:e});return s.path=function(){const t=n(e,s,o);return t.unitsPerEm=e.unitsPerEm,t},s}}};function he(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!he(e[n],t[n]))return!1;return!0}return!1}function fe(e){let t;return t=e.length<1240?107:e.length<33900?1131:32768,t}function de(e,t,n){const o=[],s=[],r=z.getCard16(e,t);let i,a;if(0!==r){const n=z.getByte(e,t+2);i=t+(r+1)*n+2;let s=t+3;for(let t=0;t<r+1;t+=1)o.push(z.getOffset(e,s,n)),s+=n;a=i+o[r]}else a=t+2;for(let t=0;t<o.length-1;t+=1){let r=z.getBytes(e,i+o[t],i+o[t+1]);n&&(r=n(r)),s.push(r)}return{objects:s,startOffset:t,endOffset:a}}function ge(e,t){let n,o,s,r;if(28===t)return n=e.parseByte(),o=e.parseByte(),n<<8|o;if(29===t)return n=e.parseByte(),o=e.parseByte(),s=e.parseByte(),r=e.parseByte(),n<<24|o<<16|s<<8|r;if(30===t)return function(e){let t="";const n=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"];for(;;){const o=e.parseByte(),s=o>>4,r=15&o;if(15===s)break;if(t+=n[s],15===r)break;t+=n[r]}return parseFloat(t)}(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return n=e.parseByte(),256*(t-247)+n+108;if(t>=251&&t<=254)return n=e.parseByte(),256*-(t-251)-n-108;throw new Error("Invalid b0 "+t)}function ye(e,t,n){t=void 0!==t?t:0;const o=new z.Parser(e,t),s=[];let r=[];for(n=void 0!==n?n:e.length;o.relativeOffset<n;){let e=o.parseByte();e<=21?(12===e&&(e=1200+o.parseByte()),s.push([e,r]),r=[]):r.push(ge(o,e))}return function(e){const t={};for(let n=0;n<e.length;n+=1){const o=e[n][0],s=e[n][1];let r;if(r=1===s.length?s[0]:s,t.hasOwnProperty(o)&&!isNaN(t[o]))throw new Error("Object "+t+" already has key "+o);t[o]=r}return t}(s)}function me(e,t){return t<=390?X[t]:e[t-391]}function ve(e,t,n){const o={};let s;for(let r=0;r<t.length;r+=1){const i=t[r];if(Array.isArray(i.type)){const t=[];t.length=i.type.length;for(let o=0;o<i.type.length;o++)s=void 0!==e[i.op]?e[i.op][o]:void 0,void 0===s&&(s=void 0!==i.value&&void 0!==i.value[o]?i.value[o]:null),"SID"===i.type[o]&&(s=me(n,s)),t[o]=s;o[i.name]=t}else s=e[i.op],void 0===s&&(s=void 0!==i.value?i.value:null),"SID"===i.type&&(s=me(n,s)),o[i.name]=s}return o}const be=[{name:"version",op:0,type:"SID"},{name:"notice",op:1,type:"SID"},{name:"copyright",op:1200,type:"SID"},{name:"fullName",op:2,type:"SID"},{name:"familyName",op:3,type:"SID"},{name:"weight",op:4,type:"SID"},{name:"isFixedPitch",op:1201,type:"number",value:0},{name:"italicAngle",op:1202,type:"number",value:0},{name:"underlinePosition",op:1203,type:"number",value:-100},{name:"underlineThickness",op:1204,type:"number",value:50},{name:"paintType",op:1205,type:"number",value:0},{name:"charstringType",op:1206,type:"number",value:2},{name:"fontMatrix",op:1207,type:["real","real","real","real","real","real"],value:[.001,0,0,.001,0,0]},{name:"uniqueId",op:13,type:"number"},{name:"fontBBox",op:5,type:["number","number","number","number"],value:[0,0,0,0]},{name:"strokeWidth",op:1208,type:"number",value:0},{name:"xuid",op:14,type:[],value:null},{name:"charset",op:15,type:"offset",value:0},{name:"encoding",op:16,type:"offset",value:0},{name:"charStrings",op:17,type:"offset",value:0},{name:"private",op:18,type:["number","offset"],value:[0,0]},{name:"ros",op:1230,type:["SID","SID","number"]},{name:"cidFontVersion",op:1231,type:"number",value:0},{name:"cidFontRevision",op:1232,type:"number",value:0},{name:"cidFontType",op:1233,type:"number",value:0},{name:"cidCount",op:1234,type:"number",value:8720},{name:"uidBase",op:1235,type:"number"},{name:"fdArray",op:1236,type:"offset"},{name:"fdSelect",op:1237,type:"offset"},{name:"fontName",op:1238,type:"SID"}],xe=[{name:"subrs",op:19,type:"offset",value:0},{name:"defaultWidthX",op:20,type:"number",value:0},{name:"nominalWidthX",op:21,type:"number",value:0}];function Se(e,t){return ve(ye(e,0,e.byteLength),be,t)}function Ue(e,t,n,o){return ve(ye(e,t,n),xe,o)}function Te(e,t,n,o){const s=[];for(let r=0;r<n.length;r+=1){const i=Se(new DataView(new Uint8Array(n[r]).buffer),o);i._subrs=[],i._subrsBias=0;const a=i.private[0],l=i.private[1];if(0!==a&&0!==l){const n=Ue(e,l+t,a,o);if(i._defaultWidthX=n.defaultWidthX,i._nominalWidthX=n.nominalWidthX,0!==n.subrs){const o=de(e,l+n.subrs+t);i._subrs=o.objects,i._subrsBias=fe(i._subrs)}i._privateDict=n}s.push(i)}return s}function ke(e,t,n){let o,s,r,i;const a=new u,l=[];let c,p,h,f,d=0,g=!1,y=!1,m=0,v=0;if(e.isCIDFont){const n=e.tables.cff.topDict._fdSelect[t.index],o=e.tables.cff.topDict._fdArray[n];c=o._subrs,p=o._subrsBias,h=o._defaultWidthX,f=o._nominalWidthX}else c=e.tables.cff.topDict._subrs,p=e.tables.cff.topDict._subrsBias,h=e.tables.cff.topDict._defaultWidthX,f=e.tables.cff.topDict._nominalWidthX;let b=h;function x(e,t){y&&a.closePath(),a.moveTo(e,t),y=!0}function S(){let e;e=l.length%2!=0,e&&!g&&(b=l.shift()+f),d+=l.length>>1,l.length=0,g=!0}return function n(u){let h,U,T,k,O,w,E,R,L,D,C,I,M=0;for(;M<u.length;){let G=u[M];switch(M+=1,G){case 1:case 3:case 18:case 23:S();break;case 4:l.length>1&&!g&&(b=l.shift()+f,g=!0),v+=l.pop(),x(m,v);break;case 5:for(;l.length>0;)m+=l.shift(),v+=l.shift(),a.lineTo(m,v);break;case 6:for(;l.length>0&&(m+=l.shift(),a.lineTo(m,v),0!==l.length);)v+=l.shift(),a.lineTo(m,v);break;case 7:for(;l.length>0&&(v+=l.shift(),a.lineTo(m,v),0!==l.length);)m+=l.shift(),a.lineTo(m,v);break;case 8:for(;l.length>0;)o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i+l.shift(),a.curveTo(o,s,r,i,m,v);break;case 10:O=l.pop()+p,w=c[O],w&&n(w);break;case 11:return;case 12:switch(G=u[M],M+=1,G){case 35:o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),E=r+l.shift(),R=i+l.shift(),L=E+l.shift(),D=R+l.shift(),C=L+l.shift(),I=D+l.shift(),m=C+l.shift(),v=I+l.shift(),l.shift(),a.curveTo(o,s,r,i,E,R),a.curveTo(L,D,C,I,m,v);break;case 34:o=m+l.shift(),s=v,r=o+l.shift(),i=s+l.shift(),E=r+l.shift(),R=i,L=E+l.shift(),D=i,C=L+l.shift(),I=v,m=C+l.shift(),a.curveTo(o,s,r,i,E,R),a.curveTo(L,D,C,I,m,v);break;case 36:o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),E=r+l.shift(),R=i,L=E+l.shift(),D=i,C=L+l.shift(),I=D+l.shift(),m=C+l.shift(),a.curveTo(o,s,r,i,E,R),a.curveTo(L,D,C,I,m,v);break;case 37:o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),E=r+l.shift(),R=i+l.shift(),L=E+l.shift(),D=R+l.shift(),C=L+l.shift(),I=D+l.shift(),Math.abs(C-m)>Math.abs(I-v)?m=C+l.shift():v=I+l.shift(),a.curveTo(o,s,r,i,E,R),a.curveTo(L,D,C,I,m,v);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+G),l.length=0}break;case 14:l.length>0&&!g&&(b=l.shift()+f,g=!0),y&&(a.closePath(),y=!1);break;case 19:case 20:S(),M+=d+7>>3;break;case 21:l.length>2&&!g&&(b=l.shift()+f,g=!0),v+=l.pop(),m+=l.pop(),x(m,v);break;case 22:l.length>1&&!g&&(b=l.shift()+f,g=!0),m+=l.pop(),x(m,v);break;case 24:for(;l.length>2;)o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i+l.shift(),a.curveTo(o,s,r,i,m,v);m+=l.shift(),v+=l.shift(),a.lineTo(m,v);break;case 25:for(;l.length>6;)m+=l.shift(),v+=l.shift(),a.lineTo(m,v);o=m+l.shift(),s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i+l.shift(),a.curveTo(o,s,r,i,m,v);break;case 26:for(l.length%2&&(m+=l.shift());l.length>0;)o=m,s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r,v=i+l.shift(),a.curveTo(o,s,r,i,m,v);break;case 27:for(l.length%2&&(v+=l.shift());l.length>0;)o=m+l.shift(),s=v,r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i,a.curveTo(o,s,r,i,m,v);break;case 28:h=u[M],U=u[M+1],l.push((h<<24|U<<16)>>16),M+=2;break;case 29:O=l.pop()+e.gsubrsBias,w=e.gsubrs[O],w&&n(w);break;case 30:for(;l.length>0&&(o=m,s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i+(1===l.length?l.shift():0),a.curveTo(o,s,r,i,m,v),0!==l.length);)o=m+l.shift(),s=v,r=o+l.shift(),i=s+l.shift(),v=i+l.shift(),m=r+(1===l.length?l.shift():0),a.curveTo(o,s,r,i,m,v);break;case 31:for(;l.length>0&&(o=m+l.shift(),s=v,r=o+l.shift(),i=s+l.shift(),v=i+l.shift(),m=r+(1===l.length?l.shift():0),a.curveTo(o,s,r,i,m,v),0!==l.length);)o=m,s=v+l.shift(),r=o+l.shift(),i=s+l.shift(),m=r+l.shift(),v=i+(1===l.length?l.shift():0),a.curveTo(o,s,r,i,m,v);break;default:G<32?console.log("Glyph "+t.index+": unknown operator "+G):G<247?l.push(G-139):G<251?(h=u[M],M+=1,l.push(256*(G-247)+h+108)):G<255?(h=u[M],M+=1,l.push(256*-(G-251)-h-108)):(h=u[M],U=u[M+1],T=u[M+2],k=u[M+3],M+=4,l.push((h<<24|U<<16|T<<8|k)/65536))}}}(n),t.advanceWidth=b,a}function Oe(e,t){let n,o=X.indexOf(e);return o>=0&&(n=o),o=t.indexOf(e),o>=0?n=o+X.length:(n=X.length+t.length,t.push(e)),n}function we(e,t,n){const o={};for(let s=0;s<e.length;s+=1){const r=e[s];let i=t[r.name];void 0===i||he(i,r.value)||("SID"===r.type&&(i=Oe(i,n)),o[r.op]={name:r.name,type:r.type,value:i})}return o}function Ee(e,t){const n=new G.Record("Top DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=we(be,e,t),n}function Re(e){const t=new G.Record("Top DICT INDEX",[{name:"topDicts",type:"INDEX",value:[]}]);return t.topDicts=[{name:"topDict_0",type:"TABLE",value:e}],t}function Le(e){const t=[],n=e.path;t.push({name:"width",type:"NUMBER",value:e.advanceWidth});let o=0,s=0;for(let e=0;e<n.commands.length;e+=1){let r,i,a=n.commands[e];if("Q"===a.type){const e=1/3,t=2/3;a={type:"C",x:a.x,y:a.y,x1:e*o+t*a.x1,y1:e*s+t*a.y1,x2:e*a.x+t*a.x1,y2:e*a.y+t*a.y1}}if("M"===a.type)r=Math.round(a.x-o),i=Math.round(a.y-s),t.push({name:"dx",type:"NUMBER",value:r}),t.push({name:"dy",type:"NUMBER",value:i}),t.push({name:"rmoveto",type:"OP",value:21}),o=Math.round(a.x),s=Math.round(a.y);else if("L"===a.type)r=Math.round(a.x-o),i=Math.round(a.y-s),t.push({name:"dx",type:"NUMBER",value:r}),t.push({name:"dy",type:"NUMBER",value:i}),t.push({name:"rlineto",type:"OP",value:5}),o=Math.round(a.x),s=Math.round(a.y);else if("C"===a.type){const e=Math.round(a.x1-o),n=Math.round(a.y1-s),l=Math.round(a.x2-a.x1),u=Math.round(a.y2-a.y1);r=Math.round(a.x-a.x2),i=Math.round(a.y-a.y2),t.push({name:"dx1",type:"NUMBER",value:e}),t.push({name:"dy1",type:"NUMBER",value:n}),t.push({name:"dx2",type:"NUMBER",value:l}),t.push({name:"dy2",type:"NUMBER",value:u}),t.push({name:"dx",type:"NUMBER",value:r}),t.push({name:"dy",type:"NUMBER",value:i}),t.push({name:"rrcurveto",type:"OP",value:8}),o=Math.round(a.x),s=Math.round(a.y)}}return t.push({name:"endchar",type:"OP",value:14}),t}const De=function(e,t,n){n.tables.cff={};const o=function(e,t){const n={};return n.formatMajor=z.getCard8(e,t),n.formatMinor=z.getCard8(e,t+1),n.size=z.getCard8(e,t+2),n.offsetSize=z.getCard8(e,t+3),n.startOffset=t,n.endOffset=t+4,n}(e,t),s=de(e,o.endOffset,z.bytesToString),r=de(e,s.endOffset),i=de(e,r.endOffset,z.bytesToString),a=de(e,i.endOffset);n.gsubrs=a.objects,n.gsubrsBias=fe(n.gsubrs);const l=Te(e,t,r.objects,i.objects);if(1!==l.length)throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = "+l.length);const u=l[0];if(n.tables.cff.topDict=u,u._privateDict&&(n.defaultWidthX=u._privateDict.defaultWidthX,n.nominalWidthX=u._privateDict.nominalWidthX),void 0!==u.ros[0]&&void 0!==u.ros[1]&&(n.isCIDFont=!0),n.isCIDFont){let o=u.fdArray,s=u.fdSelect;if(0===o||0===s)throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");o+=t;const r=Te(e,t,de(e,o).objects,i.objects);u._fdArray=r,s+=t,u._fdSelect=function(e,t,n,o){const s=[];let r;const i=new z.Parser(e,t),a=i.parseCard8();if(0===a)for(let e=0;e<n;e++){if(r=i.parseCard8(),r>=o)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+o+")");s.push(r)}else{if(3!==a)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+a);{const e=i.parseCard16();let t,a=i.parseCard16();if(0!==a)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+a);for(let l=0;l<e;l++){if(r=i.parseCard8(),t=i.parseCard16(),r>=o)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+o+")");if(t>n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+t);for(;a<t;a++)s.push(r);a=t}if(t!==n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad final GID "+t)}}return s}(e,s,n.numGlyphs,r.length)}const c=t+u.private[1],p=Ue(e,c,u.private[0],i.objects);if(n.defaultWidthX=p.defaultWidthX,n.nominalWidthX=p.nominalWidthX,0!==p.subrs){const t=de(e,c+p.subrs);n.subrs=t.objects,n.subrsBias=fe(n.subrs)}else n.subrs=[],n.subrsBias=0;const h=de(e,t+u.charStrings);n.nGlyphs=h.objects.length;const f=function(e,t,n,o){let s,r;const i=new z.Parser(e,t);n-=1;const a=[".notdef"],l=i.parseCard8();if(0===l)for(let e=0;e<n;e+=1)s=i.parseSID(),a.push(me(o,s));else if(1===l)for(;a.length<=n;){s=i.parseSID(),r=i.parseCard8();for(let e=0;e<=r;e+=1)a.push(me(o,s)),s+=1}else{if(2!==l)throw new Error("Unknown charset format "+l);for(;a.length<=n;){s=i.parseSID(),r=i.parseCard16();for(let e=0;e<=r;e+=1)a.push(me(o,s)),s+=1}}return a}(e,t+u.charset,n.nGlyphs,i.objects);0===u.encoding?n.cffEncoding=new J(V,f):1===u.encoding?n.cffEncoding=new J(Y,f):n.cffEncoding=function(e,t,n){let o;const s={},r=new z.Parser(e,t),i=r.parseCard8();if(0===i){const e=r.parseCard8();for(let t=0;t<e;t+=1)o=r.parseCard8(),s[o]=t}else{if(1!==i)throw new Error("Unknown encoding format "+i);{const e=r.parseCard8();o=1;for(let t=0;t<e;t+=1){const e=r.parseCard8(),t=r.parseCard8();for(let n=e;n<=e+t;n+=1)s[n]=o,o+=1}}}return new J(s,n)}(e,t+u.encoding,f),n.encoding=n.encoding||n.cffEncoding,n.glyphs=new pe.GlyphSet(n);for(let e=0;e<n.nGlyphs;e+=1){const t=h.objects[e];n.glyphs.push(e,pe.cffGlyphLoader(n,e,ke,t))}},Ce=function(e,t){const n=new G.Table("CFF ",[{name:"header",type:"RECORD"},{name:"nameIndex",type:"RECORD"},{name:"topDictIndex",type:"RECORD"},{name:"stringIndex",type:"RECORD"},{name:"globalSubrIndex",type:"RECORD"},{name:"charsets",type:"RECORD"},{name:"charStringsIndex",type:"RECORD"},{name:"privateDict",type:"RECORD"}]),o=1/t.unitsPerEm,s={version:t.version,fullName:t.fullName,familyName:t.familyName,weight:t.weightName,fontBBox:t.fontBBox||[0,0,0,0],fontMatrix:[o,0,0,o,0,0],charset:999,encoding:0,charStrings:999,private:[0,999]},r=[];let i;for(let t=1;t<e.length;t+=1)i=e.get(t),r.push(i.name);const a=[];n.header=new G.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}]),n.nameIndex=function(e){const t=new G.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(let n=0;n<e.length;n+=1)t.names.push({name:"name_"+n,type:"NAME",value:e[n]});return t}([t.postScriptName]);let l=Ee(s,a);n.topDictIndex=Re(l),n.globalSubrIndex=new G.Record("Global Subr INDEX",[{name:"subrs",type:"INDEX",value:[]}]),n.charsets=function(e,t){const n=new G.Record("Charsets",[{name:"format",type:"Card8",value:0}]);for(let o=0;o<e.length;o+=1){const s=Oe(e[o],t);n.fields.push({name:"glyph_"+o,type:"SID",value:s})}return n}(r,a),n.charStringsIndex=function(e){const t=new G.Record("CharStrings INDEX",[{name:"charStrings",type:"INDEX",value:[]}]);for(let n=0;n<e.length;n+=1){const o=e.get(n),s=Le(o);t.charStrings.push({name:o.name,type:"CHARSTRING",value:s})}return t}(e),n.privateDict=function(e,t){const n=new G.Record("Private DICT",[{name:"dict",type:"DICT",value:{}}]);return n.dict=we(xe,{},t),n}(0,a),n.stringIndex=function(e){const t=new G.Record("String INDEX",[{name:"strings",type:"INDEX",value:[]}]);t.strings=[];for(let n=0;n<e.length;n+=1)t.strings.push({name:"string_"+n,type:"STRING",value:e[n]});return t}(a);const u=n.header.sizeOf()+n.nameIndex.sizeOf()+n.topDictIndex.sizeOf()+n.stringIndex.sizeOf()+n.globalSubrIndex.sizeOf();return s.charset=u,s.encoding=0,s.charStrings=s.charset+n.charsets.sizeOf(),s.private[1]=s.charStrings+n.charStringsIndex.sizeOf(),l=Ee(s,a),n.topDictIndex=Re(l),n},Ie=function(e,t){const n={},o=new z.Parser(e,t);return n.version=o.parseVersion(),n.fontRevision=Math.round(1e3*o.parseFixed())/1e3,n.checkSumAdjustment=o.parseULong(),n.magicNumber=o.parseULong(),h.argument(1594834165===n.magicNumber,"Font header has wrong magic number."),n.flags=o.parseUShort(),n.unitsPerEm=o.parseUShort(),n.created=o.parseLongDateTime(),n.modified=o.parseLongDateTime(),n.xMin=o.parseShort(),n.yMin=o.parseShort(),n.xMax=o.parseShort(),n.yMax=o.parseShort(),n.macStyle=o.parseUShort(),n.lowestRecPPEM=o.parseUShort(),n.fontDirectionHint=o.parseShort(),n.indexToLocFormat=o.parseShort(),n.glyphDataFormat=o.parseShort(),n},Me=function(e){const t=Math.round((new Date).getTime()/1e3)+2082844800;let n=t;return e.createdTimestamp&&(n=e.createdTimestamp+2082844800),new G.Table("head",[{name:"version",type:"FIXED",value:65536},{name:"fontRevision",type:"FIXED",value:65536},{name:"checkSumAdjustment",type:"ULONG",value:0},{name:"magicNumber",type:"ULONG",value:1594834165},{name:"flags",type:"USHORT",value:0},{name:"unitsPerEm",type:"USHORT",value:1e3},{name:"created",type:"LONGDATETIME",value:n},{name:"modified",type:"LONGDATETIME",value:t},{name:"xMin",type:"SHORT",value:0},{name:"yMin",type:"SHORT",value:0},{name:"xMax",type:"SHORT",value:0},{name:"yMax",type:"SHORT",value:0},{name:"macStyle",type:"USHORT",value:0},{name:"lowestRecPPEM",type:"USHORT",value:0},{name:"fontDirectionHint",type:"SHORT",value:2},{name:"indexToLocFormat",type:"SHORT",value:0},{name:"glyphDataFormat",type:"SHORT",value:0}],e)},Ge=function(e,t){const n={},o=new z.Parser(e,t);return n.version=o.parseVersion(),n.ascender=o.parseShort(),n.descender=o.parseShort(),n.lineGap=o.parseShort(),n.advanceWidthMax=o.parseUShort(),n.minLeftSideBearing=o.parseShort(),n.minRightSideBearing=o.parseShort(),n.xMaxExtent=o.parseShort(),n.caretSlopeRise=o.parseShort(),n.caretSlopeRun=o.parseShort(),n.caretOffset=o.parseShort(),o.relativeOffset+=8,n.metricDataFormat=o.parseShort(),n.numberOfHMetrics=o.parseUShort(),n},Ae=function(e){return new G.Table("hhea",[{name:"version",type:"FIXED",value:65536},{name:"ascender",type:"FWORD",value:0},{name:"descender",type:"FWORD",value:0},{name:"lineGap",type:"FWORD",value:0},{name:"advanceWidthMax",type:"UFWORD",value:0},{name:"minLeftSideBearing",type:"FWORD",value:0},{name:"minRightSideBearing",type:"FWORD",value:0},{name:"xMaxExtent",type:"FWORD",value:0},{name:"caretSlopeRise",type:"SHORT",value:1},{name:"caretSlopeRun",type:"SHORT",value:0},{name:"caretOffset",type:"SHORT",value:0},{name:"reserved1",type:"SHORT",value:0},{name:"reserved2",type:"SHORT",value:0},{name:"reserved3",type:"SHORT",value:0},{name:"reserved4",type:"SHORT",value:0},{name:"metricDataFormat",type:"SHORT",value:0},{name:"numberOfHMetrics",type:"USHORT",value:0}],e)},Be=function(e,t,n,o,s){let r,i;const a=new z.Parser(e,t);for(let e=0;e<o;e+=1){e<n&&(r=a.parseUShort(),i=a.parseShort());const t=s.get(e);t.advanceWidth=r,t.leftSideBearing=i}},Pe=function(e){const t=new G.Table("hmtx",[]);for(let n=0;n<e.length;n+=1){const o=e.get(n),s=o.advanceWidth||0,r=o.leftSideBearing||0;t.fields.push({name:"advanceWidth_"+n,type:"USHORT",value:s}),t.fields.push({name:"leftSideBearing_"+n,type:"SHORT",value:r})}return t},Ne=function(e){const t=new G.Table("ltag",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"numTags",type:"ULONG",value:e.length}]);let n="";const o=12+4*e.length;for(let s=0;s<e.length;++s){let r=n.indexOf(e[s]);r<0&&(r=n.length,n+=e[s]),t.fields.push({name:"offset "+s,type:"USHORT",value:o+r}),t.fields.push({name:"length "+s,type:"USHORT",value:e[s].length})}return t.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),t},Fe=function(e,t){const n=new z.Parser(e,t),o=n.parseULong();h.argument(1===o,"Unsupported ltag table version."),n.skip("uLong",1);const s=n.parseULong(),r=[];for(let o=0;o<s;o++){let o="";const s=t+n.parseUShort(),i=n.parseUShort();for(let t=s;t<s+i;++t)o+=String.fromCharCode(e.getInt8(t));r.push(o)}return r},He=function(e,t){const n={},o=new z.Parser(e,t);return n.version=o.parseVersion(),n.numGlyphs=o.parseUShort(),1===n.version&&(n.maxPoints=o.parseUShort(),n.maxContours=o.parseUShort(),n.maxCompositePoints=o.parseUShort(),n.maxCompositeContours=o.parseUShort(),n.maxZones=o.parseUShort(),n.maxTwilightPoints=o.parseUShort(),n.maxStorage=o.parseUShort(),n.maxFunctionDefs=o.parseUShort(),n.maxInstructionDefs=o.parseUShort(),n.maxStackElements=o.parseUShort(),n.maxSizeOfInstructions=o.parseUShort(),n.maxComponentElements=o.parseUShort(),n.maxComponentDepth=o.parseUShort()),n},_e=function(e){return new G.Table("maxp",[{name:"version",type:"FIXED",value:20480},{name:"numGlyphs",type:"USHORT",value:e}])},ze=["copyright","fontFamily","fontSubfamily","uniqueID","fullName","version","postScriptName","trademark","manufacturer","designer","description","manufacturerURL","designerURL","license","licenseURL","reserved","preferredFamily","preferredSubfamily","compatibleFullName","sampleText","postScriptFindFontName","wwsFamily","wwsSubfamily"],We={0:"en",1:"fr",2:"de",3:"it",4:"nl",5:"sv",6:"es",7:"da",8:"pt",9:"no",10:"he",11:"ja",12:"ar",13:"fi",14:"el",15:"is",16:"mt",17:"tr",18:"hr",19:"zh-Hant",20:"ur",21:"hi",22:"th",23:"ko",24:"lt",25:"pl",26:"hu",27:"es",28:"lv",29:"se",30:"fo",31:"fa",32:"ru",33:"zh",34:"nl-BE",35:"ga",36:"sq",37:"ro",38:"cz",39:"sk",40:"si",41:"yi",42:"sr",43:"mk",44:"bg",45:"uk",46:"be",47:"uz",48:"kk",49:"az-Cyrl",50:"az-Arab",51:"hy",52:"ka",53:"mo",54:"ky",55:"tg",56:"tk",57:"mn-CN",58:"mn",59:"ps",60:"ks",61:"ku",62:"sd",63:"bo",64:"ne",65:"sa",66:"mr",67:"bn",68:"as",69:"gu",70:"pa",71:"or",72:"ml",73:"kn",74:"ta",75:"te",76:"si",77:"my",78:"km",79:"lo",80:"vi",81:"id",82:"tl",83:"ms",84:"ms-Arab",85:"am",86:"ti",87:"om",88:"so",89:"sw",90:"rw",91:"rn",92:"ny",93:"mg",94:"eo",128:"cy",129:"eu",130:"ca",131:"la",132:"qu",133:"gn",134:"ay",135:"tt",136:"ug",137:"dz",138:"jv",139:"su",140:"gl",141:"af",142:"br",143:"iu",144:"gd",145:"gv",146:"ga",147:"to",148:"el-polyton",149:"kl",150:"az",151:"nn"},qe={0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:5,11:1,12:4,13:0,14:6,15:0,16:0,17:0,18:0,19:2,20:4,21:9,22:21,23:3,24:29,25:29,26:29,27:29,28:29,29:0,30:0,31:4,32:7,33:25,34:0,35:0,36:0,37:0,38:29,39:29,40:0,41:5,42:7,43:7,44:7,45:7,46:7,47:7,48:7,49:7,50:4,51:24,52:23,53:7,54:7,55:7,56:7,57:27,58:7,59:4,60:4,61:4,62:4,63:26,64:9,65:9,66:9,67:13,68:13,69:11,70:10,71:12,72:17,73:16,74:14,75:15,76:18,77:19,78:20,79:22,80:30,81:0,82:0,83:0,84:4,85:28,86:28,87:28,88:0,89:0,90:0,91:0,92:0,93:0,94:0,128:0,129:0,130:0,131:0,132:0,133:0,134:0,135:7,136:4,137:26,138:0,139:0,140:0,141:0,142:0,143:28,144:0,145:0,146:0,147:0,148:6,149:0,150:0,151:0},je={1078:"af",1052:"sq",1156:"gsw",1118:"am",5121:"ar-DZ",15361:"ar-BH",3073:"ar",2049:"ar-IQ",11265:"ar-JO",13313:"ar-KW",12289:"ar-LB",4097:"ar-LY",6145:"ary",8193:"ar-OM",16385:"ar-QA",1025:"ar-SA",10241:"ar-SY",7169:"aeb",14337:"ar-AE",9217:"ar-YE",1067:"hy",1101:"as",2092:"az-Cyrl",1068:"az",1133:"ba",1069:"eu",1059:"be",2117:"bn",1093:"bn-IN",8218:"bs-Cyrl",5146:"bs",1150:"br",1026:"bg",1027:"ca",3076:"zh-HK",5124:"zh-MO",2052:"zh",4100:"zh-SG",1028:"zh-TW",1155:"co",1050:"hr",4122:"hr-BA",1029:"cs",1030:"da",1164:"prs",1125:"dv",2067:"nl-BE",1043:"nl",3081:"en-AU",10249:"en-BZ",4105:"en-CA",9225:"en-029",16393:"en-IN",6153:"en-IE",8201:"en-JM",17417:"en-MY",5129:"en-NZ",13321:"en-PH",18441:"en-SG",7177:"en-ZA",11273:"en-TT",2057:"en-GB",1033:"en",12297:"en-ZW",1061:"et",1080:"fo",1124:"fil",1035:"fi",2060:"fr-BE",3084:"fr-CA",1036:"fr",5132:"fr-LU",6156:"fr-MC",4108:"fr-CH",1122:"fy",1110:"gl",1079:"ka",3079:"de-AT",1031:"de",5127:"de-LI",4103:"de-LU",2055:"de-CH",1032:"el",1135:"kl",1095:"gu",1128:"ha",1037:"he",1081:"hi",1038:"hu",1039:"is",1136:"ig",1057:"id",1117:"iu",2141:"iu-Latn",2108:"ga",1076:"xh",1077:"zu",1040:"it",2064:"it-CH",1041:"ja",1099:"kn",1087:"kk",1107:"km",1158:"quc",1159:"rw",1089:"sw",1111:"kok",1042:"ko",1088:"ky",1108:"lo",1062:"lv",1063:"lt",2094:"dsb",1134:"lb",1071:"mk",2110:"ms-BN",1086:"ms",1100:"ml",1082:"mt",1153:"mi",1146:"arn",1102:"mr",1148:"moh",1104:"mn",2128:"mn-CN",1121:"ne",1044:"nb",2068:"nn",1154:"oc",1096:"or",1123:"ps",1045:"pl",1046:"pt",2070:"pt-PT",1094:"pa",1131:"qu-BO",2155:"qu-EC",3179:"qu",1048:"ro",1047:"rm",1049:"ru",9275:"smn",4155:"smj-NO",5179:"smj",3131:"se-FI",1083:"se",2107:"se-SE",8251:"sms",6203:"sma-NO",7227:"sms",1103:"sa",7194:"sr-Cyrl-BA",3098:"sr",6170:"sr-Latn-BA",2074:"sr-Latn",1132:"nso",1074:"tn",1115:"si",1051:"sk",1060:"sl",11274:"es-AR",16394:"es-BO",13322:"es-CL",9226:"es-CO",5130:"es-CR",7178:"es-DO",12298:"es-EC",17418:"es-SV",4106:"es-GT",18442:"es-HN",2058:"es-MX",19466:"es-NI",6154:"es-PA",15370:"es-PY",10250:"es-PE",20490:"es-PR",3082:"es",1034:"es",21514:"es-US",14346:"es-UY",8202:"es-VE",2077:"sv-FI",1053:"sv",1114:"syr",1064:"tg",2143:"tzm",1097:"ta",1092:"tt",1098:"te",1054:"th",1105:"bo",1055:"tr",1090:"tk",1152:"ug",1058:"uk",1070:"hsb",1056:"ur",2115:"uz-Cyrl",1091:"uz",1066:"vi",1106:"cy",1160:"wo",1157:"sah",1144:"ii",1130:"yo"};function Xe(e,t,n){switch(e){case 0:if(65535===t)return"und";if(n)return n[t];break;case 1:return We[t];case 3:return je[t]}}const Ve="utf-16",Ye={0:"macintosh",1:"x-mac-japanese",2:"x-mac-chinesetrad",3:"x-mac-korean",6:"x-mac-greek",7:"x-mac-cyrillic",9:"x-mac-devanagai",10:"x-mac-gurmukhi",11:"x-mac-gujarati",12:"x-mac-oriya",13:"x-mac-bengali",14:"x-mac-tamil",15:"x-mac-telugu",16:"x-mac-kannada",17:"x-mac-malayalam",18:"x-mac-sinhalese",19:"x-mac-burmese",20:"x-mac-khmer",21:"x-mac-thai",22:"x-mac-lao",23:"x-mac-georgian",24:"x-mac-armenian",25:"x-mac-chinesesimp",26:"x-mac-tibetan",27:"x-mac-mongolian",28:"x-mac-ethiopic",29:"x-mac-ce",30:"x-mac-vietnamese",31:"x-mac-extarabic"},Ze={15:"x-mac-icelandic",17:"x-mac-turkish",18:"x-mac-croatian",24:"x-mac-ce",25:"x-mac-ce",26:"x-mac-ce",27:"x-mac-ce",28:"x-mac-ce",30:"x-mac-icelandic",37:"x-mac-romanian",38:"x-mac-ce",39:"x-mac-ce",40:"x-mac-ce",143:"x-mac-inuit",146:"x-mac-gaelic"};function Qe(e,t,n){switch(e){case 0:return Ve;case 1:return Ze[n]||Ye[t];case 3:if(1===t||10===t)return Ve}}function Ke(e){const t={};for(let n in e)t[e[n]]=parseInt(n);return t}function Je(e,t,n,o,s,r){return new G.Record("NameRecord",[{name:"platformID",type:"USHORT",value:e},{name:"encodingID",type:"USHORT",value:t},{name:"languageID",type:"USHORT",value:n},{name:"nameID",type:"USHORT",value:o},{name:"length",type:"USHORT",value:s},{name:"offset",type:"USHORT",value:r}])}function $e(e,t){let n=function(e,t){const n=e.length,o=t.length-n+1;e:for(let s=0;s<o;s++)for(;s<o;s++){for(let o=0;o<n;o++)if(t[s+o]!==e[o])continue e;return s}return-1}(e,t);if(n<0){n=t.length;let o=0;const s=e.length;for(;o<s;++o)t.push(e[o])}return n}const et=function(e,t,n){const o={},s=new z.Parser(e,t),r=s.parseUShort(),i=s.parseUShort(),a=s.offset+s.parseUShort();for(let t=0;t<i;t++){const t=s.parseUShort(),r=s.parseUShort(),i=s.parseUShort(),l=s.parseUShort(),u=ze[l]||l,c=s.parseUShort(),p=s.parseUShort(),h=Xe(t,i,n),f=Qe(t,r,i);if(void 0!==f&&void 0!==h){let t;if(t=f===Ve?d.UTF16(e,a+p,c):d.MACSTRING(e,a+p,c,f),t){let e=o[u];void 0===e&&(e=o[u]={}),e[h]=t}}}let l=0;return 1===r&&s.parseUShort(),o},tt=function(e,t){let n;const o=[],s={},r=Ke(ze);for(let t in e){let i=r[t];if(void 0===i&&(i=t),n=parseInt(i),isNaN(n))throw new Error('Name table entry "'+t+'" does not exist, see nameTableNames for complete list.');s[n]=e[t],o.push(n)}const i=Ke(We),a=Ke(je),l=[],u=[];for(let e=0;e<o.length;e++){n=o[e];const r=s[n];for(let e in r){const o=r[e];let s=1,c=i[e],p=qe[c];const h=Qe(s,p,c);let f=g.MACSTRING(o,h);void 0===f&&(s=0,c=t.indexOf(e),c<0&&(c=t.length,t.push(e)),p=4,f=g.UTF16(o));const d=$e(f,u);l.push(Je(s,p,c,n,f.length,d));const y=a[e];if(void 0!==y){const e=g.UTF16(o),t=$e(e,u);l.push(Je(3,1,y,n,e.length,t))}}}l.sort((function(e,t){return e.platformID-t.platformID||e.encodingID-t.encodingID||e.languageID-t.languageID||e.nameID-t.nameID}));const c=new G.Table("name",[{name:"format",type:"USHORT",value:0},{name:"count",type:"USHORT",value:l.length},{name:"stringOffset",type:"USHORT",value:6+12*l.length}]);for(let e=0;e<l.length;e++)c.fields.push({name:"record_"+e,type:"RECORD",value:l[e]});return c.fields.push({name:"strings",type:"LITERAL",value:u}),c},nt=[{begin:0,end:127},{begin:128,end:255},{begin:256,end:383},{begin:384,end:591},{begin:592,end:687},{begin:688,end:767},{begin:768,end:879},{begin:880,end:1023},{begin:11392,end:11519},{begin:1024,end:1279},{begin:1328,end:1423},{begin:1424,end:1535},{begin:42240,end:42559},{begin:1536,end:1791},{begin:1984,end:2047},{begin:2304,end:2431},{begin:2432,end:2559},{begin:2560,end:2687},{begin:2688,end:2815},{begin:2816,end:2943},{begin:2944,end:3071},{begin:3072,end:3199},{begin:3200,end:3327},{begin:3328,end:3455},{begin:3584,end:3711},{begin:3712,end:3839},{begin:4256,end:4351},{begin:6912,end:7039},{begin:4352,end:4607},{begin:7680,end:7935},{begin:7936,end:8191},{begin:8192,end:8303},{begin:8304,end:8351},{begin:8352,end:8399},{begin:8400,end:8447},{begin:8448,end:8527},{begin:8528,end:8591},{begin:8592,end:8703},{begin:8704,end:8959},{begin:8960,end:9215},{begin:9216,end:9279},{begin:9280,end:9311},{begin:9312,end:9471},{begin:9472,end:9599},{begin:9600,end:9631},{begin:9632,end:9727},{begin:9728,end:9983},{begin:9984,end:10175},{begin:12288,end:12351},{begin:12352,end:12447},{begin:12448,end:12543},{begin:12544,end:12591},{begin:12592,end:12687},{begin:43072,end:43135},{begin:12800,end:13055},{begin:13056,end:13311},{begin:44032,end:55215},{begin:55296,end:57343},{begin:67840,end:67871},{begin:19968,end:40959},{begin:57344,end:63743},{begin:12736,end:12783},{begin:64256,end:64335},{begin:64336,end:65023},{begin:65056,end:65071},{begin:65040,end:65055},{begin:65104,end:65135},{begin:65136,end:65279},{begin:65280,end:65519},{begin:65520,end:65535},{begin:3840,end:4095},{begin:1792,end:1871},{begin:1920,end:1983},{begin:3456,end:3583},{begin:4096,end:4255},{begin:4608,end:4991},{begin:5024,end:5119},{begin:5120,end:5759},{begin:5760,end:5791},{begin:5792,end:5887},{begin:6016,end:6143},{begin:6144,end:6319},{begin:10240,end:10495},{begin:40960,end:42127},{begin:5888,end:5919},{begin:66304,end:66351},{begin:66352,end:66383},{begin:66560,end:66639},{begin:118784,end:119039},{begin:119808,end:120831},{begin:1044480,end:1048573},{begin:65024,end:65039},{begin:917504,end:917631},{begin:6400,end:6479},{begin:6480,end:6527},{begin:6528,end:6623},{begin:6656,end:6687},{begin:11264,end:11359},{begin:11568,end:11647},{begin:19904,end:19967},{begin:43008,end:43055},{begin:65536,end:65663},{begin:65856,end:65935},{begin:66432,end:66463},{begin:66464,end:66527},{begin:66640,end:66687},{begin:66688,end:66735},{begin:67584,end:67647},{begin:68096,end:68191},{begin:119552,end:119647},{begin:73728,end:74751},{begin:119648,end:119679},{begin:7040,end:7103},{begin:7168,end:7247},{begin:7248,end:7295},{begin:43136,end:43231},{begin:43264,end:43311},{begin:43312,end:43359},{begin:43520,end:43615},{begin:65936,end:65999},{begin:66e3,end:66047},{begin:66208,end:66271},{begin:127024,end:127135}],ot=function(e,t){const n={},o=new z.Parser(e,t);n.version=o.parseUShort(),n.xAvgCharWidth=o.parseShort(),n.usWeightClass=o.parseUShort(),n.usWidthClass=o.parseUShort(),n.fsType=o.parseUShort(),n.ySubscriptXSize=o.parseShort(),n.ySubscriptYSize=o.parseShort(),n.ySubscriptXOffset=o.parseShort(),n.ySubscriptYOffset=o.parseShort(),n.ySuperscriptXSize=o.parseShort(),n.ySuperscriptYSize=o.parseShort(),n.ySuperscriptXOffset=o.parseShort(),n.ySuperscriptYOffset=o.parseShort(),n.yStrikeoutSize=o.parseShort(),n.yStrikeoutPosition=o.parseShort(),n.sFamilyClass=o.parseShort(),n.panose=[];for(let e=0;e<10;e++)n.panose[e]=o.parseByte();return n.ulUnicodeRange1=o.parseULong(),n.ulUnicodeRange2=o.parseULong(),n.ulUnicodeRange3=o.parseULong(),n.ulUnicodeRange4=o.parseULong(),n.achVendID=String.fromCharCode(o.parseByte(),o.parseByte(),o.parseByte(),o.parseByte()),n.fsSelection=o.parseUShort(),n.usFirstCharIndex=o.parseUShort(),n.usLastCharIndex=o.parseUShort(),n.sTypoAscender=o.parseShort(),n.sTypoDescender=o.parseShort(),n.sTypoLineGap=o.parseShort(),n.usWinAscent=o.parseUShort(),n.usWinDescent=o.parseUShort(),n.version>=1&&(n.ulCodePageRange1=o.parseULong(),n.ulCodePageRange2=o.parseULong()),n.version>=2&&(n.sxHeight=o.parseShort(),n.sCapHeight=o.parseShort(),n.usDefaultChar=o.parseUShort(),n.usBreakChar=o.parseUShort(),n.usMaxContent=o.parseUShort()),n},st=function(e){return new G.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},rt=function(e){for(let t=0;t<nt.length;t+=1){const n=nt[t];if(e>=n.begin&&e<n.end)return t}return-1},it=function(e,t){const n={},o=new z.Parser(e,t);switch(n.version=o.parseVersion(),n.italicAngle=o.parseFixed(),n.underlinePosition=o.parseShort(),n.underlineThickness=o.parseShort(),n.isFixedPitch=o.parseULong(),n.minMemType42=o.parseULong(),n.maxMemType42=o.parseULong(),n.minMemType1=o.parseULong(),n.maxMemType1=o.parseULong(),n.version){case 1:n.names=Z.slice();break;case 2:n.numberOfGlyphs=o.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(let e=0;e<n.numberOfGlyphs;e++)n.glyphNameIndex[e]=o.parseUShort();n.names=[];for(let e=0;e<n.numberOfGlyphs;e++)if(n.glyphNameIndex[e]>=Z.length){const e=o.parseChar();n.names.push(o.parseString(e))}break;case 2.5:n.numberOfGlyphs=o.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(let e=0;e<n.numberOfGlyphs;e++)n.offset[e]=o.parseChar()}return n},at=function(){return new G.Table("post",[{name:"version",type:"FIXED",value:196608},{name:"italicAngle",type:"FIXED",value:0},{name:"underlinePosition",type:"FWORD",value:0},{name:"underlineThickness",type:"FWORD",value:0},{name:"isFixedPitch",type:"ULONG",value:0},{name:"minMemType42",type:"ULONG",value:0},{name:"maxMemType42",type:"ULONG",value:0},{name:"minMemType1",type:"ULONG",value:0},{name:"maxMemType1",type:"ULONG",value:0}])},lt=new Array(9);lt[1]=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(H.coverage),deltaGlyphId:this.parseUShort()}:2===t?{substFormat:2,coverage:this.parsePointer(H.coverage),substitute:this.parseOffset16List()}:void h.assert(!1,"0x"+e.toString(16)+": lookup type 1 format must be 1 or 2.")},lt[2]=function(){const e=this.parseUShort();return h.argument(1===e,"GSUB Multiple Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(H.coverage),sequences:this.parseListOfLists()}},lt[3]=function(){const e=this.parseUShort();return h.argument(1===e,"GSUB Alternate Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(H.coverage),alternateSets:this.parseListOfLists()}},lt[4]=function(){const e=this.parseUShort();return h.argument(1===e,"GSUB ligature table identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(H.coverage),ligatureSets:this.parseListOfLists((function(){return{ligGlyph:this.parseUShort(),components:this.parseUShortList(this.parseUShort()-1)}}))}};const ut={sequenceIndex:H.uShort,lookupListIndex:H.uShort};lt[5]=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();if(1===t)return{substFormat:t,coverage:this.parsePointer(H.coverage),ruleSets:this.parseListOfLists((function(){const e=this.parseUShort(),t=this.parseUShort();return{input:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,ut)}}))};if(2===t)return{substFormat:t,coverage:this.parsePointer(H.coverage),classDef:this.parsePointer(H.classDef),classSets:this.parseListOfLists((function(){const e=this.parseUShort(),t=this.parseUShort();return{classes:this.parseUShortList(e-1),lookupRecords:this.parseRecordList(t,ut)}}))};if(3===t){const e=this.parseUShort(),n=this.parseUShort();return{substFormat:t,coverages:this.parseList(e,H.pointer(H.coverage)),lookupRecords:this.parseRecordList(n,ut)}}h.assert(!1,"0x"+e.toString(16)+": lookup type 5 format must be 1, 2 or 3.")},lt[6]=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{substFormat:1,coverage:this.parsePointer(H.coverage),chainRuleSets:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ut)}}))}:2===t?{substFormat:2,coverage:this.parsePointer(H.coverage),backtrackClassDef:this.parsePointer(H.classDef),inputClassDef:this.parsePointer(H.classDef),lookaheadClassDef:this.parsePointer(H.classDef),chainClassSet:this.parseListOfLists((function(){return{backtrack:this.parseUShortList(),input:this.parseUShortList(this.parseShort()-1),lookahead:this.parseUShortList(),lookupRecords:this.parseRecordList(ut)}}))}:3===t?{substFormat:3,backtrackCoverage:this.parseList(H.pointer(H.coverage)),inputCoverage:this.parseList(H.pointer(H.coverage)),lookaheadCoverage:this.parseList(H.pointer(H.coverage)),lookupRecords:this.parseRecordList(ut)}:void h.assert(!1,"0x"+e.toString(16)+": lookup type 6 format must be 1, 2 or 3.")},lt[7]=function(){const e=this.parseUShort();h.argument(1===e,"GSUB Extension Substitution subtable identifier-format must be 1");const t=this.parseUShort(),n=new H(this.data,this.offset+this.parseULong());return{substFormat:1,lookupType:t,extension:lt[t].call(n)}},lt[8]=function(){const e=this.parseUShort();return h.argument(1===e,"GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"),{substFormat:e,coverage:this.parsePointer(H.coverage),backtrackCoverage:this.parseList(H.pointer(H.coverage)),lookaheadCoverage:this.parseList(H.pointer(H.coverage)),substitutes:this.parseUShortList()}};const ct=new Array(9);ct[1]=function(e){return 1===e.substFormat?new G.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new G.Coverage(e.coverage)},{name:"deltaGlyphID",type:"USHORT",value:e.deltaGlyphId}]):new G.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:2},{name:"coverage",type:"TABLE",value:new G.Coverage(e.coverage)}].concat(G.ushortList("substitute",e.substitute)))},ct[3]=function(e){return h.assert(1===e.substFormat,"Lookup type 3 substFormat must be 1."),new G.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new G.Coverage(e.coverage)}].concat(G.tableList("altSet",e.alternateSets,(function(e){return new G.Table("alternateSetTable",G.ushortList("alternate",e))}))))},ct[4]=function(e){return h.assert(1===e.substFormat,"Lookup type 4 substFormat must be 1."),new G.Table("substitutionTable",[{name:"substFormat",type:"USHORT",value:1},{name:"coverage",type:"TABLE",value:new G.Coverage(e.coverage)}].concat(G.tableList("ligSet",e.ligatureSets,(function(e){return new G.Table("ligatureSetTable",G.tableList("ligature",e,(function(e){return new G.Table("ligatureTable",[{name:"ligGlyph",type:"USHORT",value:e.ligGlyph}].concat(G.ushortList("component",e.components,e.components.length+1)))})))}))))};const pt=function(e,t){const n=new H(e,t=t||0),o=n.parseVersion(1);return h.argument(1===o||1.1===o,"Unsupported GSUB table version."),1===o?{version:o,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(lt)}:{version:o,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(lt),variations:n.parseFeatureVariationsList()}},ht=function(e){return new G.Table("GSUB",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new G.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new G.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new G.LookupList(e.lookups,ct)}])},ft=function(e,t){const n=new z.Parser(e,t),o=n.parseULong();h.argument(1===o,"Unsupported META table version."),n.parseULong(),n.parseULong();const s=n.parseULong(),r={};for(let o=0;o<s;o++){const o=n.parseTag(),s=n.parseULong(),i=n.parseULong(),a=d.UTF8(e,t+s,i);r[o]=a}return r},dt=function(e){const t=Object.keys(e).length;let n="";const o=16+12*t,s=new G.Table("meta",[{name:"version",type:"ULONG",value:1},{name:"flags",type:"ULONG",value:0},{name:"offset",type:"ULONG",value:o},{name:"numTags",type:"ULONG",value:t}]);for(let t in e){const r=n.length;n+=e[t],s.fields.push({name:"tag "+t,type:"TAG",value:t}),s.fields.push({name:"offset "+t,type:"ULONG",value:o+r}),s.fields.push({name:"length "+t,type:"ULONG",value:e[t].length})}return s.fields.push({name:"stringPool",type:"CHARARRAY",value:n}),s};function gt(e){return Math.log(e)/Math.log(2)|0}function yt(e){for(;e.length%4!=0;)e.push(0);let t=0;for(let n=0;n<e.length;n+=4)t+=(e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];return t%=Math.pow(2,32),t}function mt(e,t,n,o){return new G.Record("Table Record",[{name:"tag",type:"TAG",value:void 0!==e?e:""},{name:"checkSum",type:"ULONG",value:void 0!==t?t:0},{name:"offset",type:"ULONG",value:void 0!==n?n:0},{name:"length",type:"ULONG",value:void 0!==o?o:0}])}function vt(e){const t=new G.Table("sfnt",[{name:"version",type:"TAG",value:"OTTO"},{name:"numTables",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);t.tables=e,t.numTables=e.length;const n=Math.pow(2,gt(t.numTables));t.searchRange=16*n,t.entrySelector=gt(n),t.rangeShift=16*t.numTables-t.searchRange;const o=[],s=[];let r=t.sizeOf()+mt().sizeOf()*t.numTables;for(;r%4!=0;)r+=1,s.push({name:"padding",type:"BYTE",value:0});for(let t=0;t<e.length;t+=1){const n=e[t];h.argument(4===n.tableName.length,"Table name"+n.tableName+" is invalid.");const i=n.sizeOf(),a=mt(n.tableName,yt(n.encode()),r,i);for(o.push({name:a.tag+" Table Record",type:"RECORD",value:a}),s.push({name:n.tableName+" table",type:"RECORD",value:n}),r+=i,h.argument(!isNaN(r),"Something went wrong calculating the offset.");r%4!=0;)r+=1,s.push({name:"padding",type:"BYTE",value:0})}return o.sort((function(e,t){return e.value.tag>t.value.tag?1:-1})),t.fields=t.fields.concat(o),t.fields=t.fields.concat(s),t}function bt(e,t,n){for(let n=0;n<t.length;n+=1){const o=e.charToGlyphIndex(t[n]);if(o>0)return e.glyphs.get(o).getMetrics()}return n}function xt(e){let t=0;for(let n=0;n<e.length;n+=1)t+=e[n];return t/e.length}const St=function(e){const t=[],n=[],o=[],s=[],r=[],i=[],a=[];let l,u=0,c=0,p=0,h=0,f=0;for(let d=0;d<e.glyphs.length;d+=1){const g=e.glyphs.get(d),y=0|g.unicode;if(isNaN(g.advanceWidth))throw new Error("Glyph "+g.name+" ("+d+"): advanceWidth is not a number.");(l>y||void 0===l)&&y>0&&(l=y),u<y&&(u=y);const m=rt(y);if(m<32)c|=1<<m;else if(m<64)p|=1<<m-32;else if(m<96)h|=1<<m-64;else{if(!(m<123))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");f|=1<<m-96}if(".notdef"===g.name)continue;const v=g.getMetrics();t.push(v.xMin),n.push(v.yMin),o.push(v.xMax),s.push(v.yMax),i.push(v.leftSideBearing),a.push(v.rightSideBearing),r.push(g.advanceWidth)}const d={xMin:Math.min.apply(null,t),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,o),yMax:Math.max.apply(null,s),advanceWidthMax:Math.max.apply(null,r),advanceWidthAvg:xt(r),minLeftSideBearing:Math.min.apply(null,i),maxLeftSideBearing:Math.max.apply(null,i),minRightSideBearing:Math.min.apply(null,a)};d.ascender=e.ascender,d.descender=e.descender;const g=Me({flags:3,unitsPerEm:e.unitsPerEm,xMin:d.xMin,yMin:d.yMin,xMax:d.xMax,yMax:d.yMax,lowestRecPPEM:3,createdTimestamp:e.createdTimestamp}),y=Ae({ascender:d.ascender,descender:d.descender,advanceWidthMax:d.advanceWidthMax,minLeftSideBearing:d.minLeftSideBearing,minRightSideBearing:d.minRightSideBearing,xMaxExtent:d.maxLeftSideBearing+(d.xMax-d.xMin),numberOfHMetrics:e.glyphs.length}),m=_e(e.glyphs.length),v=st({xAvgCharWidth:Math.round(d.advanceWidthAvg),usWeightClass:e.tables.os2.usWeightClass,usWidthClass:e.tables.os2.usWidthClass,usFirstCharIndex:l,usLastCharIndex:u,ulUnicodeRange1:c,ulUnicodeRange2:p,ulUnicodeRange3:h,ulUnicodeRange4:f,fsSelection:e.tables.os2.fsSelection,sTypoAscender:d.ascender,sTypoDescender:d.descender,sTypoLineGap:0,usWinAscent:d.yMax,usWinDescent:Math.abs(d.yMin),ulCodePageRange1:1,sxHeight:bt(e,"xyvw",{yMax:Math.round(d.ascender/2)}).yMax,sCapHeight:bt(e,"HIKLEFJMNTZBDPRAGOQSUVWXY",d).yMax,usDefaultChar:e.hasChar(" ")?32:0,usBreakChar:e.hasChar(" ")?32:0}),b=Pe(e.glyphs),x=j(e.glyphs),S=e.getEnglishName("fontFamily"),U=e.getEnglishName("fontSubfamily"),T=S+" "+U;let k=e.getEnglishName("postScriptName");k||(k=S.replace(/\s/g,"")+"-"+U);const O={};for(let t in e.names)O[t]=e.names[t];O.uniqueID||(O.uniqueID={en:e.getEnglishName("manufacturer")+":"+T}),O.postScriptName||(O.postScriptName={en:k}),O.preferredFamily||(O.preferredFamily=e.names.fontFamily),O.preferredSubfamily||(O.preferredSubfamily=e.names.fontSubfamily);const w=[],E=tt(O,w),R=w.length>0?Ne(w):void 0,L=at(),D=Ce(e.glyphs,{version:e.getEnglishName("version"),fullName:T,familyName:S,weightName:U,postScriptName:k,unitsPerEm:e.unitsPerEm,fontBBox:[0,d.yMin,d.ascender,d.advanceWidthMax]}),C=e.metas&&Object.keys(e.metas).length>0?dt(e.metas):void 0,I=[g,y,m,v,E,x,L,D,b];R&&I.push(R),e.tables.gsub&&I.push(ht(e.tables.gsub)),C&&I.push(C);const M=vt(I),G=yt(M.encode()),A=M.fields;let B=!1;for(let e=0;e<A.length;e+=1)if("head table"===A[e].name){A[e].value.checkSumAdjustment=2981146554-G,B=!0;break}if(!B)throw new Error("Could not find head table with checkSum to adjust.");return M};function Ut(e,t){let n=0,o=e.length-1;for(;n<=o;){const s=n+o>>>1,r=e[s].tag;if(r===t)return s;r<t?n=s+1:o=s-1}return-n-1}function Tt(e,t){let n=0,o=e.length-1;for(;n<=o;){const s=n+o>>>1,r=e[s];if(r===t)return s;r<t?n=s+1:o=s-1}return-n-1}function kt(e,t){let n,o=0,s=e.length-1;for(;o<=s;){const r=o+s>>>1;n=e[r];const i=n.start;if(i===t)return n;i<t?o=r+1:s=r-1}if(o>0)return n=e[o-1],t>n.end?0:n}function Ot(e,t){this.font=e,this.tableName=t}Ot.prototype={searchTag:Ut,binSearch:Tt,getTable:function(e){let t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){let e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){let e=this.getTable();if(!e)return;let t=!1;for(let n=0;n<e.scripts.length;n++){const o=e.scripts[n].tag;if("DFLT"===o)return o;"latn"===o&&(t=!0)}return t?"latn":void 0},getScriptTable:function(e,t){const n=this.getTable(t);if(n){e=e||"DFLT";const o=n.scripts,s=Ut(n.scripts,e);if(s>=0)return o[s].script;if(t){const t={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return o.splice(-1-s,0,t),t.script}}},getLangSysTable:function(e,t,n){const o=this.getScriptTable(e,n);if(o){if(!t||"dflt"===t||"DFLT"===t)return o.defaultLangSys;const e=Ut(o.langSysRecords,t);if(e>=0)return o.langSysRecords[e].langSys;if(n){const n={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return o.langSysRecords.splice(-1-e,0,n),n.langSys}}},getFeatureTable:function(e,t,n,o){const s=this.getLangSysTable(e,t,o);if(s){let e;const t=s.featureIndexes,r=this.font.tables[this.tableName].features;for(let o=0;o<t.length;o++)if(e=r[t[o]],e.tag===n)return e.feature;if(o){const o=r.length;return h.assert(0===o||n>=r[o-1].tag,"Features must be added in alphabetical order."),e={tag:n,feature:{params:0,lookupListIndexes:[]}},r.push(e),t.push(o),e.feature}}},getLookupTables:function(e,t,n,o,s){const r=this.getFeatureTable(e,t,n,s),i=[];if(r){let e;const t=r.lookupListIndexes,n=this.font.tables[this.tableName].lookups;for(let s=0;s<t.length;s++)e=n[t[s]],e.lookupType===o&&i.push(e);if(0===i.length&&s){e={lookupType:o,lookupFlag:0,subtables:[],markFilteringSet:void 0};const s=n.length;return n.push(e),t.push(s),[e]}}return i},getGlyphClass:function(e,t){switch(e.format){case 1:return e.startGlyph<=t&&t<e.startGlyph+e.classes.length?e.classes[t-e.startGlyph]:0;case 2:const n=kt(e.ranges,t);return n?n.classId:0}},getCoverageIndex:function(e,t){switch(e.format){case 1:const n=Tt(e.glyphs,t);return n>=0?n:-1;case 2:const o=kt(e.ranges,t);return o?o.index+t-o.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;{const t=[],n=e.ranges;for(let e=0;e<n.length;e++){const o=n[e],s=o.start,r=o.end;for(let e=s;e<=r;e++)t.push(e)}return t}}};const wt=Ot;function Et(e){wt.call(this,e,"gpos")}Et.prototype=wt.prototype,Et.prototype.getKerningValue=function(e,t,n){for(let o=0;o<e.length;o++){const s=e[o].subtables;for(let e=0;e<s.length;e++){const o=s[e],r=this.getCoverageIndex(o.coverage,t);if(!(r<0))switch(o.posFormat){case 1:let e=o.pairSets[r];for(let t=0;t<e.length;t++){let o=e[t];if(o.secondGlyph===n)return o.value1&&o.value1.xAdvance||0}break;case 2:const s=this.getGlyphClass(o.classDef1,t),i=this.getGlyphClass(o.classDef2,n),a=o.classRecords[s][i];return a.value1&&a.value1.xAdvance||0}}}return 0},Et.prototype.getKerningTables=function(e,t){if(this.font.tables.gpos)return this.getLookupTables(e,t,"kern",2)};const Rt=Et;function Lt(e){wt.call(this,e,"gsub")}function Dt(e,t){const n=e.length;if(n!==t.length)return!1;for(let o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}function Ct(e,t,n){const o=e.subtables;for(let e=0;e<o.length;e++){const n=o[e];if(n.substFormat===t)return n}if(n)return o.push(n),n}Lt.prototype=wt.prototype,Lt.prototype.createDefaultTable=function(){return{version:1,scripts:[{tag:"DFLT",script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}}],features:[],lookups:[]}},Lt.prototype.getSingle=function(e,t,n){const o=[],s=this.getLookupTables(t,n,e,1);for(let e=0;e<s.length;e++){const t=s[e].subtables;for(let e=0;e<t.length;e++){const n=t[e],s=this.expandCoverage(n.coverage);let r;if(1===n.substFormat){const e=n.deltaGlyphId;for(r=0;r<s.length;r++){const t=s[r];o.push({sub:t,by:t+e})}}else{const e=n.substitute;for(r=0;r<s.length;r++)o.push({sub:s[r],by:e[r]})}}}return o},Lt.prototype.getAlternates=function(e,t,n){const o=[],s=this.getLookupTables(t,n,e,3);for(let e=0;e<s.length;e++){const t=s[e].subtables;for(let e=0;e<t.length;e++){const n=t[e],s=this.expandCoverage(n.coverage),r=n.alternateSets;for(let e=0;e<s.length;e++)o.push({sub:s[e],by:r[e]})}}return o},Lt.prototype.getLigatures=function(e,t,n){const o=[],s=this.getLookupTables(t,n,e,4);for(let e=0;e<s.length;e++){const t=s[e].subtables;for(let e=0;e<t.length;e++){const n=t[e],s=this.expandCoverage(n.coverage),r=n.ligatureSets;for(let e=0;e<s.length;e++){const t=s[e],n=r[e];for(let e=0;e<n.length;e++){const s=n[e];o.push({sub:[t].concat(s.components),by:s.ligGlyph})}}}}return o},Lt.prototype.addSingle=function(e,t,n,o){const s=Ct(this.getLookupTables(n,o,e,1,!0)[0],2,{substFormat:2,coverage:{format:1,glyphs:[]},substitute:[]});h.assert(1===s.coverage.format,"Ligature: unable to modify coverage table format "+s.coverage.format);const r=t.sub;let i=this.binSearch(s.coverage.glyphs,r);i<0&&(i=-1-i,s.coverage.glyphs.splice(i,0,r),s.substitute.splice(i,0,0)),s.substitute[i]=t.by},Lt.prototype.addAlternate=function(e,t,n,o){const s=Ct(this.getLookupTables(n,o,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});h.assert(1===s.coverage.format,"Ligature: unable to modify coverage table format "+s.coverage.format);const r=t.sub;let i=this.binSearch(s.coverage.glyphs,r);i<0&&(i=-1-i,s.coverage.glyphs.splice(i,0,r),s.alternateSets.splice(i,0,0)),s.alternateSets[i]=t.by},Lt.prototype.addLigature=function(e,t,n,o){const s=this.getLookupTables(n,o,e,4,!0)[0];let r=s.subtables[0];r||(r={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},s.subtables[0]=r),h.assert(1===r.coverage.format,"Ligature: unable to modify coverage table format "+r.coverage.format);const i=t.sub[0],a=t.sub.slice(1),l={ligGlyph:t.by,components:a};let u=this.binSearch(r.coverage.glyphs,i);if(u>=0){const e=r.ligatureSets[u];for(let t=0;t<e.length;t++)if(Dt(e[t].components,a))return;e.push(l)}else u=-1-u,r.coverage.glyphs.splice(u,0,i),r.ligatureSets.splice(u,0,[l])},Lt.prototype.getFeature=function(e,t,n){if(/ss\d\d/.test(e))return this.getSingle(e,t,n);switch(e){case"aalt":case"salt":return this.getSingle(e,t,n).concat(this.getAlternates(e,t,n));case"dlig":case"liga":case"rlig":return this.getLigatures(e,t,n)}},Lt.prototype.add=function(e,t,n,o){if(/ss\d\d/.test(e))return this.addSingle(e,t,n,o);switch(e){case"aalt":case"salt":return"number"==typeof t.by?this.addSingle(e,t,n,o):this.addAlternate(e,t,n,o);case"dlig":case"liga":case"rlig":return this.addLigature(e,t,n,o)}};const It=Lt;function Mt(e){const t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;++t)n[t]=e[t];return t}function Gt(e,t){if(!e)throw t}let At,Bt,Pt,Nt;function Ft(e){this.font=e,this._fpgmState=this._prepState=void 0,this._errorState=0}function Ht(e){return e}function _t(e){return Math.sign(e)*Math.round(Math.abs(e))}function zt(e){return Math.sign(e)*Math.round(Math.abs(2*e))/2}function Wt(e){return Math.sign(e)*(Math.round(Math.abs(e)+.5)-.5)}function qt(e){return Math.sign(e)*Math.ceil(Math.abs(e))}function jt(e){return Math.sign(e)*Math.floor(Math.abs(e))}const Xt=function(e){const t=this.srPeriod;let n=this.srPhase,o=1;return e<0&&(e=-e,o=-1),e+=this.srThreshold-n,e=Math.trunc(e/t)*t,(e+=n)<0?n*o:e*o},Vt={x:1,y:0,axis:"x",distance:function(e,t,n,o){return(n?e.xo:e.x)-(o?t.xo:t.x)},interpolate:function(e,t,n,o){let s,r,i,a,l,u,c;if(!o||o===this)return s=e.xo-t.xo,r=e.xo-n.xo,l=t.x-t.xo,u=n.x-n.xo,i=Math.abs(s),a=Math.abs(r),c=i+a,0===c?void(e.x=e.xo+(l+u)/2):void(e.x=e.xo+(l*a+u*i)/c);s=o.distance(e,t,!0,!0),r=o.distance(e,n,!0,!0),l=o.distance(t,t,!1,!0),u=o.distance(n,n,!1,!0),i=Math.abs(s),a=Math.abs(r),c=i+a,0!==c?Vt.setRelative(e,e,(l*a+u*i)/c,o,!0):Vt.setRelative(e,e,(l+u)/2,o,!0)},normalSlope:Number.NEGATIVE_INFINITY,setRelative:function(e,t,n,o,s){if(!o||o===this)return void(e.x=(s?t.xo:t.x)+n);const r=s?t.xo:t.x,i=s?t.yo:t.y,a=r+n*o.x,l=i+n*o.y;e.x=a+(e.y-l)/o.normalSlope},slope:0,touch:function(e){e.xTouched=!0},touched:function(e){return e.xTouched},untouch:function(e){e.xTouched=!1}},Yt={x:0,y:1,axis:"y",distance:function(e,t,n,o){return(n?e.yo:e.y)-(o?t.yo:t.y)},interpolate:function(e,t,n,o){let s,r,i,a,l,u,c;if(!o||o===this)return s=e.yo-t.yo,r=e.yo-n.yo,l=t.y-t.yo,u=n.y-n.yo,i=Math.abs(s),a=Math.abs(r),c=i+a,0===c?void(e.y=e.yo+(l+u)/2):void(e.y=e.yo+(l*a+u*i)/c);s=o.distance(e,t,!0,!0),r=o.distance(e,n,!0,!0),l=o.distance(t,t,!1,!0),u=o.distance(n,n,!1,!0),i=Math.abs(s),a=Math.abs(r),c=i+a,0!==c?Yt.setRelative(e,e,(l*a+u*i)/c,o,!0):Yt.setRelative(e,e,(l+u)/2,o,!0)},normalSlope:0,setRelative:function(e,t,n,o,s){if(!o||o===this)return void(e.y=(s?t.yo:t.y)+n);const r=s?t.xo:t.x,i=s?t.yo:t.y,a=r+n*o.x,l=i+n*o.y;e.y=l+o.normalSlope*(e.x-a)},slope:Number.POSITIVE_INFINITY,touch:function(e){e.yTouched=!0},touched:function(e){return e.yTouched},untouch:function(e){e.yTouched=!1}};function Zt(e,t){this.x=e,this.y=t,this.axis=void 0,this.slope=t/e,this.normalSlope=-e/t,Object.freeze(this)}function Qt(e,t){const n=Math.sqrt(e*e+t*t);return t/=n,1==(e/=n)&&0===t?Vt:0===e&&1===t?Yt:new Zt(e,t)}function Kt(e,t,n,o){this.x=this.xo=Math.round(64*e)/64,this.y=this.yo=Math.round(64*t)/64,this.lastPointOfContour=n,this.onCurve=o,this.prevPointOnContour=void 0,this.nextPointOnContour=void 0,this.xTouched=!1,this.yTouched=!1,Object.preventExtensions(this)}Object.freeze(Vt),Object.freeze(Yt),Zt.prototype.distance=function(e,t,n,o){return this.x*Vt.distance(e,t,n,o)+this.y*Yt.distance(e,t,n,o)},Zt.prototype.interpolate=function(e,t,n,o){let s,r,i,a,l,u,c;i=o.distance(e,t,!0,!0),a=o.distance(e,n,!0,!0),s=o.distance(t,t,!1,!0),r=o.distance(n,n,!1,!0),l=Math.abs(i),u=Math.abs(a),c=l+u,0!==c?this.setRelative(e,e,(s*u+r*l)/c,o,!0):this.setRelative(e,e,(s+r)/2,o,!0)},Zt.prototype.setRelative=function(e,t,n,o,s){o=o||this;const r=s?t.xo:t.x,i=s?t.yo:t.y,a=r+n*o.x,l=i+n*o.y,u=o.normalSlope,c=this.slope,p=e.x,h=e.y;e.x=(c*p-u*a+l-h)/(c-u),e.y=c*(e.x-p)+h},Zt.prototype.touch=function(e){e.xTouched=!0,e.yTouched=!0},Kt.prototype.nextTouched=function(e){let t=this.nextPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.nextPointOnContour;return t},Kt.prototype.prevTouched=function(e){let t=this.prevPointOnContour;for(;!e.touched(t)&&t!==this;)t=t.prevPointOnContour;return t};const Jt=Object.freeze(new Kt(0,0)),$t={cvCutIn:17/16,deltaBase:9,deltaShift:.125,loop:1,minDis:1,autoFlip:!0};function en(e,t){switch(this.env=e,this.stack=[],this.prog=t,e){case"glyf":this.zp0=this.zp1=this.zp2=1,this.rp0=this.rp1=this.rp2=0;case"prep":this.fv=this.pv=this.dpv=Vt,this.round=_t}}function tn(e){const t=e.tZone=new Array(e.gZone.length);for(let e=0;e<t.length;e++)t[e]=new Kt(0,0)}function nn(e,t){const n=e.prog;let o,s=e.ip,r=1;do{if(o=n[++s],88===o)r++;else if(89===o)r--;else if(64===o)s+=n[s+1]+1;else if(65===o)s+=2*n[s+1]+1;else if(o>=176&&o<=183)s+=o-176+1;else if(o>=184&&o<=191)s+=2*(o-184+1);else if(t&&1===r&&27===o)break}while(r>0);e.ip=s}function on(e,t){exports.DEBUG&&console.log(t.step,"SVTCA["+e.axis+"]"),t.fv=t.pv=t.dpv=e}function sn(e,t){exports.DEBUG&&console.log(t.step,"SPVTCA["+e.axis+"]"),t.pv=t.dpv=e}function rn(e,t){exports.DEBUG&&console.log(t.step,"SFVTCA["+e.axis+"]"),t.fv=e}function an(e,t){const n=t.stack,o=n.pop(),s=n.pop(),r=t.z2[o],i=t.z1[s];let a,l;exports.DEBUG&&console.log("SPVTL["+e+"]",o,s),e?(a=r.y-i.y,l=i.x-r.x):(a=i.x-r.x,l=i.y-r.y),t.pv=t.dpv=Qt(a,l)}function ln(e,t){const n=t.stack,o=n.pop(),s=n.pop(),r=t.z2[o],i=t.z1[s];let a,l;exports.DEBUG&&console.log("SFVTL["+e+"]",o,s),e?(a=r.y-i.y,l=i.x-r.x):(a=i.x-r.x,l=i.y-r.y),t.fv=Qt(a,l)}function un(e){exports.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function cn(e,t){const n=t.stack.pop(),o=t.z0[n],s=t.fv,r=t.pv;exports.DEBUG&&console.log(t.step,"MDAP["+e+"]",n);let i=r.distance(o,Jt);e&&(i=t.round(i)),s.setRelative(o,Jt,i,r),s.touch(o),t.rp0=t.rp1=n}function pn(e,t){const n=t.z2,o=n.length-2;let s,r,i;exports.DEBUG&&console.log(t.step,"IUP["+e.axis+"]");for(let t=0;t<o;t++)s=n[t],e.touched(s)||(r=s.prevTouched(e),r!==s&&(i=s.nextTouched(e),r===i&&e.setRelative(s,s,e.distance(r,r,!1,!0),e,!0),e.interpolate(s,r,i,e)))}function hn(e,t){const n=t.stack,o=e?t.rp1:t.rp2,s=(e?t.z0:t.z1)[o],r=t.fv,i=t.pv;let a=t.loop;const l=t.z2;for(;a--;){const o=n.pop(),u=l[o],c=i.distance(s,s,!1,!0);r.setRelative(u,u,c,i),r.touch(u),exports.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-a)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",o)}t.loop=1}function fn(e,t){const n=t.stack,o=e?t.rp1:t.rp2,s=(e?t.z0:t.z1)[o],r=t.fv,i=t.pv,a=n.pop(),l=t.z2[t.contours[a]];let u=l;exports.DEBUG&&console.log(t.step,"SHC["+e+"]",a);const c=i.distance(s,s,!1,!0);do{u!==s&&r.setRelative(u,u,c,i),u=u.nextPointOnContour}while(u!==l)}function dn(e,t){const n=t.stack,o=e?t.rp1:t.rp2,s=(e?t.z0:t.z1)[o],r=t.fv,i=t.pv,a=n.pop();let l,u;switch(exports.DEBUG&&console.log(t.step,"SHZ["+e+"]",a),a){case 0:l=t.tZone;break;case 1:l=t.gZone;break;default:throw new Error("Invalid zone")}const c=i.distance(s,s,!1,!0),p=l.length-2;for(let e=0;e<p;e++)u=l[e],r.setRelative(u,u,c,i)}function gn(e,t){const n=t.stack,o=n.pop()/64,s=n.pop(),r=t.z1[s],i=t.z0[t.rp0],a=t.fv,l=t.pv;a.setRelative(r,i,o,l),a.touch(r),exports.DEBUG&&console.log(t.step,"MSIRP["+e+"]",o,s),t.rp1=t.rp0,t.rp2=s,e&&(t.rp0=s)}function yn(e,t){const n=t.stack,o=n.pop(),s=n.pop(),r=t.z0[s],i=t.fv,a=t.pv;let l=t.cvt[o];exports.DEBUG&&console.log(t.step,"MIAP["+e+"]",o,"(",l,")",s);let u=a.distance(r,Jt);e&&(Math.abs(u-l)<t.cvCutIn&&(u=l),u=t.round(u)),i.setRelative(r,Jt,u,a),0===t.zp0&&(r.xo=r.x,r.yo=r.y),i.touch(r),t.rp0=t.rp1=s}function mn(e,t){const n=t.stack,o=n.pop(),s=t.z2[o];exports.DEBUG&&console.log(t.step,"GC["+e+"]",o),n.push(64*t.dpv.distance(s,Jt,e,!1))}function vn(e,t){const n=t.stack,o=n.pop(),s=n.pop(),r=t.z1[o],i=t.z0[s],a=t.dpv.distance(i,r,e,e);exports.DEBUG&&console.log(t.step,"MD["+e+"]",o,s,"->",a),t.stack.push(Math.round(64*a))}function bn(e,t){const n=t.stack,o=n.pop(),s=t.fv,r=t.pv,i=t.ppem,a=t.deltaBase+16*(e-1),l=t.deltaShift,u=t.z0;exports.DEBUG&&console.log(t.step,"DELTAP["+e+"]",o,n);for(let e=0;e<o;e++){const e=n.pop(),o=n.pop();if(a+((240&o)>>4)!==i)continue;let c=(15&o)-8;c>=0&&c++,exports.DEBUG&&console.log(t.step,"DELTAPFIX",e,"by",c*l);const p=u[e];s.setRelative(p,p,c*l,r)}}function xn(e,t){const n=t.stack,o=n.pop();exports.DEBUG&&console.log(t.step,"ROUND[]"),n.push(64*t.round(o/64))}function Sn(e,t){const n=t.stack,o=n.pop(),s=t.ppem,r=t.deltaBase+16*(e-1),i=t.deltaShift;exports.DEBUG&&console.log(t.step,"DELTAC["+e+"]",o,n);for(let e=0;e<o;e++){const e=n.pop(),o=n.pop();if(r+((240&o)>>4)!==s)continue;let a=(15&o)-8;a>=0&&a++;const l=a*i;exports.DEBUG&&console.log(t.step,"DELTACFIX",e,"by",l),t.cvt[e]+=l}}function Un(e,t){const n=t.stack,o=n.pop(),s=n.pop(),r=t.z2[o],i=t.z1[s];let a,l;exports.DEBUG&&console.log(t.step,"SDPVTL["+e+"]",o,s),e?(a=r.y-i.y,l=i.x-r.x):(a=i.x-r.x,l=i.y-r.y),t.dpv=Qt(a,l)}function Tn(e,t){const n=t.stack,o=t.prog;let s=t.ip;exports.DEBUG&&console.log(t.step,"PUSHB["+e+"]");for(let t=0;t<e;t++)n.push(o[++s]);t.ip=s}function kn(e,t){let n=t.ip;const o=t.prog,s=t.stack;exports.DEBUG&&console.log(t.ip,"PUSHW["+e+"]");for(let t=0;t<e;t++){let e=o[++n]<<8|o[++n];32768&e&&(e=-(1+(65535^e))),s.push(e)}t.ip=n}function On(e,t,n,o,s,r){const i=r.stack,a=e&&i.pop(),l=i.pop(),u=r.rp0,c=r.z0[u],p=r.z1[l],h=r.minDis,f=r.fv,d=r.dpv;let g,y,m,v;y=g=d.distance(p,c,!0,!0),m=y>=0?1:-1,y=Math.abs(y),e&&(v=r.cvt[a],o&&Math.abs(y-v)<r.cvCutIn&&(y=v)),n&&y<h&&(y=h),o&&(y=r.round(y)),f.setRelative(p,c,m*y,d),f.touch(p),exports.DEBUG&&console.log(r.step,(e?"MIRP[":"MDRP[")+(t?"M":"m")+(n?">":"_")+(o?"R":"_")+(0===s?"Gr":1===s?"Bl":2===s?"Wh":"")+"]",e?a+"("+r.cvt[a]+","+v+")":"",l,"(d =",g,"->",m*y,")"),r.rp1=r.rp0,r.rp2=l,t&&(r.rp0=l)}Ft.prototype.exec=function(e,t){if("number"!=typeof t)throw new Error("Point size is not a number!");if(this._errorState>2)return;const n=this.font;let o=this._prepState;if(!o||o.ppem!==t){let e=this._fpgmState;if(!e){en.prototype=$t,e=this._fpgmState=new en("fpgm",n.tables.fpgm),e.funcs=[],e.font=n,exports.DEBUG&&(console.log("---EXEC FPGM---"),e.step=-1);try{Bt(e)}catch(e){return console.log("Hinting error in FPGM:"+e),void(this._errorState=3)}}en.prototype=e,o=this._prepState=new en("prep",n.tables.prep),o.ppem=t;const s=n.tables.cvt;if(s){const e=o.cvt=new Array(s.length),r=t/n.unitsPerEm;for(let t=0;t<s.length;t++)e[t]=s[t]*r}else o.cvt=[];exports.DEBUG&&(console.log("---EXEC PREP---"),o.step=-1);try{Bt(o)}catch(e){this._errorState<2&&console.log("Hinting error in PREP:"+e),this._errorState=2}}if(!(this._errorState>1))try{return Pt(e,o)}catch(e){return this._errorState<1&&(console.log("Hinting error:"+e),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}},Pt=function(e,t){const n=t.ppem/t.font.unitsPerEm,o=n;let s,r,i,a=e.components;if(en.prototype=t,a){const l=t.font;r=[],s=[];for(let e=0;e<a.length;e++){const t=a[e],u=l.glyphs.get(t.glyphIndex);i=new en("glyf",u.instructions),exports.DEBUG&&(console.log("---EXEC COMP "+e+"---"),i.step=-1),Nt(u,i,n,o);const c=Math.round(t.dx*n),p=Math.round(t.dy*o),h=i.gZone,f=i.contours;for(let e=0;e<h.length;e++){const t=h[e];t.xTouched=t.yTouched=!1,t.xo=t.x=t.x+c,t.yo=t.y=t.y+p}const d=r.length;r.push.apply(r,h);for(let e=0;e<f.length;e++)s.push(f[e]+d)}e.instructions&&!i.inhibitGridFit&&(i=new en("glyf",e.instructions),i.gZone=i.z0=i.z1=i.z2=r,i.contours=s,r.push(new Kt(0,0),new Kt(Math.round(e.advanceWidth*n),0)),exports.DEBUG&&(console.log("---EXEC COMPOSITE---"),i.step=-1),Bt(i),r.length-=2)}else i=new en("glyf",e.instructions),exports.DEBUG&&(console.log("---EXEC GLYPH---"),i.step=-1),Nt(e,i,n,o),r=i.gZone;return r},Nt=function(e,t,n,o){const s=e.points||[],r=s.length,i=t.gZone=t.z0=t.z1=t.z2=[],a=t.contours=[];let l,u,c;for(let e=0;e<r;e++)l=s[e],i[e]=new Kt(l.x*n,l.y*o,l.lastPointOfContour,l.onCurve);for(let e=0;e<r;e++)l=i[e],u||(u=l,a.push(e)),l.lastPointOfContour?(l.nextPointOnContour=u,u.prevPointOnContour=l,u=void 0):(c=i[e+1],l.nextPointOnContour=c,c.prevPointOnContour=l);if(!t.inhibitGridFit){if(exports.DEBUG){console.log("PROCESSING GLYPH",t.stack);for(let e=0;e<r;e++)console.log(e,i[e].x,i[e].y)}if(i.push(new Kt(0,0),new Kt(Math.round(e.advanceWidth*n),0)),Bt(t),i.length-=2,exports.DEBUG){console.log("FINISHED GLYPH",t.stack);for(let e=0;e<r;e++)console.log(e,i[e].x,i[e].y)}}},Bt=function(e){let t=e.prog;if(!t)return;const n=t.length;let o;for(e.ip=0;e.ip<n;e.ip++){if(exports.DEBUG&&e.step++,o=At[t[e.ip]],!o)throw new Error("unknown instruction: 0x"+Number(t[e.ip]).toString(16));o(e)}},At=[on.bind(void 0,Yt),on.bind(void 0,Vt),sn.bind(void 0,Yt),sn.bind(void 0,Vt),rn.bind(void 0,Yt),rn.bind(void 0,Vt),an.bind(void 0,0),an.bind(void 0,1),ln.bind(void 0,0),ln.bind(void 0,1),function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"SPVFS[]",n,o),e.pv=e.dpv=Qt(o,n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"SPVFS[]",n,o),e.fv=Qt(o,n)},function(e){const t=e.stack,n=e.pv;exports.DEBUG&&console.log(e.step,"GPV[]"),t.push(16384*n.x),t.push(16384*n.y)},function(e){const t=e.stack,n=e.fv;exports.DEBUG&&console.log(e.step,"GFV[]"),t.push(16384*n.x),t.push(16384*n.y)},function(e){e.fv=e.pv,exports.DEBUG&&console.log(e.step,"SFVTPV[]")},function(e){const t=e.stack,n=t.pop(),o=t.pop(),s=t.pop(),r=t.pop(),i=t.pop(),a=e.z0,l=e.z1,u=a[n],c=a[o],p=l[s],h=l[r],f=e.z2[i];exports.DEBUG&&console.log("ISECT[], ",n,o,s,r,i);const d=u.x,g=u.y,y=c.x,m=c.y,v=p.x,b=p.y,x=h.x,S=h.y,U=(d-y)*(b-S)-(g-m)*(v-x),T=d*m-g*y,k=v*S-b*x;f.x=(T*(v-x)-k*(d-y))/U,f.y=(T*(b-S)-k*(g-m))/U},function(e){e.rp0=e.stack.pop(),exports.DEBUG&&console.log(e.step,"SRP0[]",e.rp0)},function(e){e.rp1=e.stack.pop(),exports.DEBUG&&console.log(e.step,"SRP1[]",e.rp1)},function(e){e.rp2=e.stack.pop(),exports.DEBUG&&console.log(e.step,"SRP2[]",e.rp2)},function(e){const t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SZP0[]",t),e.zp0=t,t){case 0:e.tZone||tn(e),e.z0=e.tZone;break;case 1:e.z0=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){const t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SZP1[]",t),e.zp1=t,t){case 0:e.tZone||tn(e),e.z1=e.tZone;break;case 1:e.z1=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){const t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SZP2[]",t),e.zp2=t,t){case 0:e.tZone||tn(e),e.z2=e.tZone;break;case 1:e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){const t=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SZPS[]",t),e.zp0=e.zp1=e.zp2=t,t){case 0:e.tZone||tn(e),e.z0=e.z1=e.z2=e.tZone;break;case 1:e.z0=e.z1=e.z2=e.gZone;break;default:throw new Error("Invalid zone pointer")}},function(e){e.loop=e.stack.pop(),exports.DEBUG&&console.log(e.step,"SLOOP[]",e.loop)},function(e){exports.DEBUG&&console.log(e.step,"RTG[]"),e.round=_t},function(e){exports.DEBUG&&console.log(e.step,"RTHG[]"),e.round=Wt},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SMD[]",t),e.minDis=t/64},function(e){exports.DEBUG&&console.log(e.step,"ELSE[]"),nn(e,!1)},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"JMPR[]",t),e.ip+=t-1},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SCVTCI[]",t),e.cvCutIn=t/64},void 0,void 0,function(e){const t=e.stack;exports.DEBUG&&console.log(e.step,"DUP[]"),t.push(t[t.length-1])},un,function(e){exports.DEBUG&&console.log(e.step,"CLEAR[]"),e.stack.length=0},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"SWAP[]"),t.push(n),t.push(o)},function(e){const t=e.stack;exports.DEBUG&&console.log(e.step,"DEPTH[]"),t.push(t.length)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"CINDEX[]",n),t.push(t[t.length-n])},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"MINDEX[]",n),t.push(t.splice(t.length-n,1)[0])},void 0,void 0,void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"LOOPCALL[]",n,o);const s=e.ip,r=e.prog;e.prog=e.funcs[n];for(let t=0;t<o;t++)Bt(e),exports.DEBUG&&console.log(++e.step,t+1<o?"next loopcall":"done loopcall",t);e.ip=s,e.prog=r},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"CALL[]",t);const n=e.ip,o=e.prog;e.prog=e.funcs[t],Bt(e),e.ip=n,e.prog=o,exports.DEBUG&&console.log(++e.step,"returning from",t)},function(e){if("fpgm"!==e.env)throw new Error("FDEF not allowed here");const t=e.stack,n=e.prog;let o=e.ip;const s=t.pop(),r=o;for(exports.DEBUG&&console.log(e.step,"FDEF[]",s);45!==n[++o];);e.ip=o,e.funcs[s]=n.slice(r+1,o)},void 0,cn.bind(void 0,0),cn.bind(void 0,1),pn.bind(void 0,Yt),pn.bind(void 0,Vt),hn.bind(void 0,0),hn.bind(void 0,1),fn.bind(void 0,0),fn.bind(void 0,1),dn.bind(void 0,0),dn.bind(void 0,1),function(e){const t=e.stack;let n=e.loop;const o=e.fv,s=t.pop()/64,r=e.z2;for(;n--;){const i=t.pop(),a=r[i];exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-n)+": ":"")+"SHPIX[]",i,s),o.setRelative(a,a,s),o.touch(a)}e.loop=1},function(e){const t=e.stack,n=e.rp1,o=e.rp2;let s=e.loop;const r=e.z0[n],i=e.z1[o],a=e.fv,l=e.dpv,u=e.z2;for(;s--;){const c=t.pop(),p=u[c];exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-s)+": ":"")+"IP[]",c,n,"<->",o),a.interpolate(p,r,i,l),a.touch(p)}e.loop=1},gn.bind(void 0,0),gn.bind(void 0,1),function(e){const t=e.stack,n=e.rp0,o=e.z0[n];let s=e.loop;const r=e.fv,i=e.pv,a=e.z1;for(;s--;){const n=t.pop(),l=a[n];exports.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-s)+": ":"")+"ALIGNRP[]",n),r.setRelative(l,o,0,i),r.touch(l)}e.loop=1},function(e){exports.DEBUG&&console.log(e.step,"RTDG[]"),e.round=zt},yn.bind(void 0,0),yn.bind(void 0,1),function(e){const t=e.prog;let n=e.ip;const o=e.stack,s=t[++n];exports.DEBUG&&console.log(e.step,"NPUSHB[]",s);for(let e=0;e<s;e++)o.push(t[++n]);e.ip=n},function(e){let t=e.ip;const n=e.prog,o=e.stack,s=n[++t];exports.DEBUG&&console.log(e.step,"NPUSHW[]",s);for(let e=0;e<s;e++){let e=n[++t]<<8|n[++t];32768&e&&(e=-(1+(65535^e))),o.push(e)}e.ip=t},function(e){const t=e.stack;let n=e.store;n||(n=e.store=[]);const o=t.pop(),s=t.pop();exports.DEBUG&&console.log(e.step,"WS",o,s),n[s]=o},function(e){const t=e.stack,n=e.store,o=t.pop();exports.DEBUG&&console.log(e.step,"RS",o);const s=n&&n[o]||0;t.push(s)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"WCVTP",n,o),e.cvt[o]=n/64},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"RCVT",n),t.push(64*e.cvt[n])},mn.bind(void 0,0),mn.bind(void 0,1),void 0,vn.bind(void 0,0),vn.bind(void 0,1),function(e){exports.DEBUG&&console.log(e.step,"MPPEM[]"),e.stack.push(e.ppem)},void 0,function(e){exports.DEBUG&&console.log(e.step,"FLIPON[]"),e.autoFlip=!0},void 0,void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"LT[]",n,o),t.push(o<n?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"LTEQ[]",n,o),t.push(o<=n?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"GT[]",n,o),t.push(o>n?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"GTEQ[]",n,o),t.push(o>=n?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"EQ[]",n,o),t.push(n===o?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"NEQ[]",n,o),t.push(n!==o?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ODD[]",n),t.push(Math.trunc(n)%2?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"EVEN[]",n),t.push(Math.trunc(n)%2?0:1)},function(e){let t=e.stack.pop();exports.DEBUG&&console.log(e.step,"IF[]",t),t||(nn(e,!0),exports.DEBUG&&console.log(e.step,"EIF[]"))},function(e){exports.DEBUG&&console.log(e.step,"EIF[]")},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"AND[]",n,o),t.push(n&&o?1:0)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"OR[]",n,o),t.push(n||o?1:0)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"NOT[]",n),t.push(n?0:1)},bn.bind(void 0,1),function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SDB[]",t),e.deltaBase=t},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SDS[]",t),e.deltaShift=Math.pow(.5,t)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"ADD[]",n,o),t.push(o+n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"SUB[]",n,o),t.push(o-n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"DIV[]",n,o),t.push(64*o/n)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MUL[]",n,o),t.push(o*n/64)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"ABS[]",n),t.push(Math.abs(n))},function(e){const t=e.stack;let n=t.pop();exports.DEBUG&&console.log(e.step,"NEG[]",n),t.push(-n)},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"FLOOR[]",n),t.push(64*Math.floor(n/64))},function(e){const t=e.stack,n=t.pop();exports.DEBUG&&console.log(e.step,"CEILING[]",n),t.push(64*Math.ceil(n/64))},xn.bind(void 0,0),xn.bind(void 0,1),xn.bind(void 0,2),xn.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"WCVTF[]",n,o),e.cvt[o]=n*e.ppem/e.font.unitsPerEm},bn.bind(void 0,2),bn.bind(void 0,3),Sn.bind(void 0,1),Sn.bind(void 0,2),Sn.bind(void 0,3),function(e){let t,n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"SROUND[]",n),e.round=Xt,192&n){case 0:t=.5;break;case 64:t=1;break;case 128:t=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=t,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid SROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*t},function(e){let t,n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"S45ROUND[]",n),e.round=Xt,192&n){case 0:t=Math.sqrt(2)/2;break;case 64:t=Math.sqrt(2);break;case 128:t=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=t,48&n){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*t;break;case 32:e.srPhase=.5*t;break;case 48:e.srPhase=.75*t;break;default:throw new Error("invalid S45ROUND value")}n&=15,e.srThreshold=0===n?0:(n/8-.5)*t},void 0,void 0,function(e){exports.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Ht},void 0,function(e){exports.DEBUG&&console.log(e.step,"RUTG[]"),e.round=qt},function(e){exports.DEBUG&&console.log(e.step,"RDTG[]"),e.round=jt},un,un,void 0,void 0,void 0,void 0,void 0,function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SCANCTRL[]",t)},Un.bind(void 0,0),Un.bind(void 0,1),function(e){const t=e.stack,n=t.pop();let o=0;exports.DEBUG&&console.log(e.step,"GETINFO[]",n),1&n&&(o=35),32&n&&(o|=4096),t.push(o)},void 0,function(e){const t=e.stack,n=t.pop(),o=t.pop(),s=t.pop();exports.DEBUG&&console.log(e.step,"ROLL[]"),t.push(o),t.push(n),t.push(s)},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MAX[]",n,o),t.push(Math.max(o,n))},function(e){const t=e.stack,n=t.pop(),o=t.pop();exports.DEBUG&&console.log(e.step,"MIN[]",n,o),t.push(Math.min(o,n))},function(e){const t=e.stack.pop();exports.DEBUG&&console.log(e.step,"SCANTYPE[]",t)},function(e){const t=e.stack.pop();let n=e.stack.pop();switch(exports.DEBUG&&console.log(e.step,"INSTCTRL[]",t,n),t){case 1:return void(e.inhibitGridFit=!!n);case 2:return void(e.ignoreCvt=!!n);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Tn.bind(void 0,1),Tn.bind(void 0,2),Tn.bind(void 0,3),Tn.bind(void 0,4),Tn.bind(void 0,5),Tn.bind(void 0,6),Tn.bind(void 0,7),Tn.bind(void 0,8),kn.bind(void 0,1),kn.bind(void 0,2),kn.bind(void 0,3),kn.bind(void 0,4),kn.bind(void 0,5),kn.bind(void 0,6),kn.bind(void 0,7),kn.bind(void 0,8),On.bind(void 0,0,0,0,0,0),On.bind(void 0,0,0,0,0,1),On.bind(void 0,0,0,0,0,2),On.bind(void 0,0,0,0,0,3),On.bind(void 0,0,0,0,1,0),On.bind(void 0,0,0,0,1,1),On.bind(void 0,0,0,0,1,2),On.bind(void 0,0,0,0,1,3),On.bind(void 0,0,0,1,0,0),On.bind(void 0,0,0,1,0,1),On.bind(void 0,0,0,1,0,2),On.bind(void 0,0,0,1,0,3),On.bind(void 0,0,0,1,1,0),On.bind(void 0,0,0,1,1,1),On.bind(void 0,0,0,1,1,2),On.bind(void 0,0,0,1,1,3),On.bind(void 0,0,1,0,0,0),On.bind(void 0,0,1,0,0,1),On.bind(void 0,0,1,0,0,2),On.bind(void 0,0,1,0,0,3),On.bind(void 0,0,1,0,1,0),On.bind(void 0,0,1,0,1,1),On.bind(void 0,0,1,0,1,2),On.bind(void 0,0,1,0,1,3),On.bind(void 0,0,1,1,0,0),On.bind(void 0,0,1,1,0,1),On.bind(void 0,0,1,1,0,2),On.bind(void 0,0,1,1,0,3),On.bind(void 0,0,1,1,1,0),On.bind(void 0,0,1,1,1,1),On.bind(void 0,0,1,1,1,2),On.bind(void 0,0,1,1,1,3),On.bind(void 0,1,0,0,0,0),On.bind(void 0,1,0,0,0,1),On.bind(void 0,1,0,0,0,2),On.bind(void 0,1,0,0,0,3),On.bind(void 0,1,0,0,1,0),On.bind(void 0,1,0,0,1,1),On.bind(void 0,1,0,0,1,2),On.bind(void 0,1,0,0,1,3),On.bind(void 0,1,0,1,0,0),On.bind(void 0,1,0,1,0,1),On.bind(void 0,1,0,1,0,2),On.bind(void 0,1,0,1,0,3),On.bind(void 0,1,0,1,1,0),On.bind(void 0,1,0,1,1,1),On.bind(void 0,1,0,1,1,2),On.bind(void 0,1,0,1,1,3),On.bind(void 0,1,1,0,0,0),On.bind(void 0,1,1,0,0,1),On.bind(void 0,1,1,0,0,2),On.bind(void 0,1,1,0,0,3),On.bind(void 0,1,1,0,1,0),On.bind(void 0,1,1,0,1,1),On.bind(void 0,1,1,0,1,2),On.bind(void 0,1,1,0,1,3),On.bind(void 0,1,1,1,0,0),On.bind(void 0,1,1,1,0,1),On.bind(void 0,1,1,1,0,2),On.bind(void 0,1,1,1,0,3),On.bind(void 0,1,1,1,1,0),On.bind(void 0,1,1,1,1,1),On.bind(void 0,1,1,1,1,2),On.bind(void 0,1,1,1,1,3)];const wn=Ft;function En(e){(e=e||{}).empty||(Gt(e.familyName,"When creating a new Font object, familyName is required."),Gt(e.styleName,"When creating a new Font object, styleName is required."),Gt(e.unitsPerEm,"When creating a new Font object, unitsPerEm is required."),Gt(e.ascender,"When creating a new Font object, ascender is required."),Gt(e.descender,"When creating a new Font object, descender is required."),Gt(e.descender<0,"Descender should be negative (e.g. -512)."),this.names={fontFamily:{en:e.familyName||" "},fontSubfamily:{en:e.styleName||" "},fullName:{en:e.fullName||e.familyName+" "+e.styleName},postScriptName:{en:e.postScriptName||e.familyName+e.styleName},designer:{en:e.designer||" "},designerURL:{en:e.designerURL||" "},manufacturer:{en:e.manufacturer||" "},manufacturerURL:{en:e.manufacturerURL||" "},license:{en:e.license||" "},licenseURL:{en:e.licenseURL||" "},version:{en:e.version||"Version 0.1"},description:{en:e.description||" "},copyright:{en:e.copyright||" "},trademark:{en:e.trademark||" "}},this.unitsPerEm=e.unitsPerEm||1e3,this.ascender=e.ascender,this.descender=e.descender,this.createdTimestamp=e.createdTimestamp,this.tables={os2:{usWeightClass:e.weightClass||this.usWeightClasses.MEDIUM,usWidthClass:e.widthClass||this.usWidthClasses.MEDIUM,fsSelection:e.fsSelection||this.fsSelectionValues.REGULAR}}),this.supported=!0,this.glyphs=new pe.GlyphSet(this,e.glyphs||[]),this.encoding=new Q(this),this.position=new Rt(this),this.substitution=new It(this),this.tables=this.tables||{},Object.defineProperty(this,"hinting",{get:function(){return this._hinting?this._hinting:"truetype"===this.outlinesFormat?this._hinting=new wn(this):void 0}})}En.prototype.hasChar=function(e){return null!==this.encoding.charToGlyphIndex(e)},En.prototype.charToGlyphIndex=function(e){return this.encoding.charToGlyphIndex(e)},En.prototype.charToGlyph=function(e){const t=this.charToGlyphIndex(e);let n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},En.prototype.stringToGlyphs=function(e,t){t=t||this.defaultRenderOptions;const n=[];for(let t=0;t<e.length;t+=1){const o=e[t];n.push(this.charToGlyphIndex(o))}let o=n.length;if(t.features){const e=t.script||this.substitution.getDefaultScriptName();let s=[];t.features.liga&&(s=s.concat(this.substitution.getFeature("liga",e,t.language))),t.features.rlig&&(s=s.concat(this.substitution.getFeature("rlig",e,t.language)));for(let e=0;e<o;e+=1)for(let t=0;t<s.length;t++){const r=s[t],i=r.sub,a=i.length;let l=0;for(;l<a&&i[l]===n[e+l];)l++;l===a&&(n.splice(e,a,r.by),o=o-a+1)}}const s=new Array(o),r=this.glyphs.get(0);for(let e=0;e<o;e+=1)s[e]=this.glyphs.get(n[e])||r;return s},En.prototype.nameToGlyphIndex=function(e){return this.glyphNames.nameToGlyphIndex(e)},En.prototype.nameToGlyph=function(e){const t=this.nameToGlyphIndex(e);let n=this.glyphs.get(t);return n||(n=this.glyphs.get(0)),n},En.prototype.glyphIndexToName=function(e){return this.glyphNames.glyphIndexToName?this.glyphNames.glyphIndexToName(e):""},En.prototype.getKerningValue=function(e,t){return e=e.index||e,t=t.index||t,this.kerningPairs[e+","+t]||0},En.prototype.defaultRenderOptions={kerning:!0,features:{liga:!0,rlig:!0}},En.prototype.forEachGlyph=function(e,t,n,o,s,r){t=void 0!==t?t:0,n=void 0!==n?n:0,o=void 0!==o?o:72,s=s||this.defaultRenderOptions;const i=1/this.unitsPerEm*o,a=this.stringToGlyphs(e,s);let l;if(s.kerning){const e=s.script||this.position.getDefaultScriptName();l=this.position.getKerningTables(e,s.language)}for(let e=0;e<a.length;e+=1){const u=a[e];r.call(this,u,t,n,o,s),u.advanceWidth&&(t+=u.advanceWidth*i),s.kerning&&e<a.length-1&&(t+=(l?this.position.getKerningValue(l,u.index,a[e+1].index):this.getKerningValue(u,a[e+1]))*i),s.letterSpacing?t+=s.letterSpacing*o:s.tracking&&(t+=s.tracking/1e3*o)}return t},En.prototype.getPath=function(e,t,n,o,s){const r=new u;return this.forEachGlyph(e,t,n,o,s,(function(e,t,n,o){const i=e.getPath(t,n,o,s,this);r.extend(i)})),r},En.prototype.getPaths=function(e,t,n,o,s){const r=[];return this.forEachGlyph(e,t,n,o,s,(function(e,t,n,o){const i=e.getPath(t,n,o,s,this);r.push(i)})),r},En.prototype.getAdvanceWidth=function(e,t,n){return this.forEachGlyph(e,0,0,t,n,(function(){}))},En.prototype.draw=function(e,t,n,o,s,r){this.getPath(t,n,o,s,r).draw(e)},En.prototype.drawPoints=function(e,t,n,o,s,r){this.forEachGlyph(t,n,o,s,r,(function(t,n,o,s){t.drawPoints(e,n,o,s)}))},En.prototype.drawMetrics=function(e,t,n,o,s,r){this.forEachGlyph(t,n,o,s,r,(function(t,n,o,s){t.drawMetrics(e,n,o,s)}))},En.prototype.getEnglishName=function(e){const t=this.names[e];if(t)return t.en},En.prototype.validate=function(){const e=[],t=this;function n(t,n){t||e.push(n)}function o(e){const o=t.getEnglishName(e);n(o&&o.trim().length>0,"No English "+e+" specified.")}o("fontFamily"),o("weightName"),o("manufacturer"),o("copyright"),o("version"),n(this.unitsPerEm>0,"No unitsPerEm specified.")},En.prototype.toTables=function(){return St(this)},En.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},En.prototype.toArrayBuffer=function(){const e=this.toTables().encode(),t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;t++)n[t]=e[t];return t},En.prototype.download=function(e){const t=this.getEnglishName("fontFamily"),o=this.getEnglishName("fontSubfamily");e=e||t.replace(/\s/g,"")+"-"+o+".otf";const s=this.toArrayBuffer();if("undefined"!=typeof window)window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem,window.requestFileSystem(window.TEMPORARY,s.byteLength,(function(t){t.root.getFile(e,{create:!0},(function(e){e.createWriter((function(t){const n=new DataView(s),o=new Blob([n],{type:"font/opentype"});t.write(o),t.addEventListener("writeend",(function(){location.href=e.toURL()}),!1)}))}))}),(function(e){throw new Error(e.name+": "+e.message)}));else{const t=n(147),o=function(e){const t=new Buffer(e.byteLength),n=new Uint8Array(e);for(let e=0;e<t.length;++e)t[e]=n[e];return t}(s);t.writeFileSync(e,o)}},En.prototype.fsSelectionValues={ITALIC:1,UNDERSCORE:2,NEGATIVE:4,OUTLINED:8,STRIKEOUT:16,BOLD:32,REGULAR:64,USER_TYPO_METRICS:128,WWS:256,OBLIQUE:512},En.prototype.usWidthClasses={ULTRA_CONDENSED:1,EXTRA_CONDENSED:2,CONDENSED:3,SEMI_CONDENSED:4,MEDIUM:5,SEMI_EXPANDED:6,EXPANDED:7,EXTRA_EXPANDED:8,ULTRA_EXPANDED:9},En.prototype.usWeightClasses={THIN:100,EXTRA_LIGHT:200,LIGHT:300,NORMAL:400,MEDIUM:500,SEMI_BOLD:600,BOLD:700,EXTRA_BOLD:800,BLACK:900};const Rn=En;function Ln(e,t,n){const o={},s=new z.Parser(e,t);return o.tag=s.parseTag(),o.minValue=s.parseFixed(),o.defaultValue=s.parseFixed(),o.maxValue=s.parseFixed(),s.skip("uShort",1),o.name=n[s.parseUShort()]||{},o}function Dn(e,t,n,o){const s={},r=new z.Parser(e,t);s.name=o[r.parseUShort()]||{},r.skip("uShort",1),s.coordinates={};for(let e=0;e<n.length;++e)s.coordinates[n[e].tag]=r.parseFixed();return s}const Cn=function(e,t,n){const o=new z.Parser(e,t),s=o.parseULong();h.argument(65536===s,"Unsupported fvar table version.");const r=o.parseOffset16();o.skip("uShort",1);const i=o.parseUShort(),a=o.parseUShort(),l=o.parseUShort(),u=o.parseUShort(),c=[];for(let o=0;o<i;o++)c.push(Ln(e,t+r+o*a,n));const p=[],f=t+r+i*a;for(let t=0;t<l;t++)p.push(Dn(e,f+t*u,c,n));return{axes:c,instances:p}},In=new Array(10);In[1]=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(H.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(H.coverage),values:this.parseValueRecordList()}:void h.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},In[2]=function(){const e=this.offset+this.relativeOffset,t=this.parseUShort(),n=this.parsePointer(H.coverage),o=this.parseUShort(),s=this.parseUShort();if(1===t)return{posFormat:t,coverage:n,valueFormat1:o,valueFormat2:s,pairSets:this.parseList(H.pointer(H.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(o),value2:this.parseValueRecord(s)}}))))};if(2===t){const e=this.parsePointer(H.classDef),r=this.parsePointer(H.classDef),i=this.parseUShort(),a=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:o,valueFormat2:s,classDef1:e,classDef2:r,class1Count:i,class2Count:a,classRecords:this.parseList(i,H.list(a,(function(){return{value1:this.parseValueRecord(o),value2:this.parseValueRecord(s)}})))}}h.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.")},In[3]=function(){return{error:"GPOS Lookup 3 not supported"}},In[4]=function(){return{error:"GPOS Lookup 4 not supported"}},In[5]=function(){return{error:"GPOS Lookup 5 not supported"}},In[6]=function(){return{error:"GPOS Lookup 6 not supported"}},In[7]=function(){return{error:"GPOS Lookup 7 not supported"}},In[8]=function(){return{error:"GPOS Lookup 8 not supported"}},In[9]=function(){return{error:"GPOS Lookup 9 not supported"}};new Array(10);const Mn=function(e,t){const n=new H(e,t=t||0),o=n.parseVersion(1);return h.argument(1===o||1.1===o,"Unsupported GPOS table version "+o),1===o?{version:o,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(In)}:{version:o,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(In),variations:n.parseFeatureVariationsList()}},Gn=function(e,t){const n=new z.Parser(e,t),o=n.parseUShort();if(0===o)return function(e){const t={};e.skip("uShort");const n=e.parseUShort();h.argument(0===n,"Unsupported kern sub-table version."),e.skip("uShort",2);const o=e.parseUShort();e.skip("uShort",3);for(let n=0;n<o;n+=1){const n=e.parseUShort(),o=e.parseUShort(),s=e.parseShort();t[n+","+o]=s}return t}(n);if(1===o)return function(e){const t={};e.skip("uShort"),e.parseULong()>1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");const n=255&e.parseUShort();if(e.skip("uShort"),0===n){const n=e.parseUShort();e.skip("uShort",3);for(let o=0;o<n;o+=1){const n=e.parseUShort(),o=e.parseUShort(),s=e.parseShort();t[n+","+o]=s}}return t}(n);throw new Error("Unsupported kern table version ("+o+").")},An=function(e,t,n,o){const s=new z.Parser(e,t),r=o?s.parseUShort:s.parseULong,i=[];for(let e=0;e<n+1;e+=1){let e=r.call(s);o&&(e*=2),i.push(e)}return i};function Bn(e,t){n(147).readFile(e,(function(e,n){if(e)return t(e.message);t(null,Mt(n))}))}function Pn(e,t){const n=new XMLHttpRequest;n.open("get",e,!0),n.responseType="arraybuffer",n.onload=function(){return n.response?t(null,n.response):t("Font could not be loaded: "+n.statusText)},n.onerror=function(){t("Font could not be loaded")},n.send()}function Nn(e,t){const n=[];let o=12;for(let s=0;s<t;s+=1){const t=z.getTag(e,o),s=z.getULong(e,o+4),r=z.getULong(e,o+8),i=z.getULong(e,o+12);n.push({tag:t,checksum:s,offset:r,length:i,compression:!1}),o+=16}return n}function Fn(e,t){if("WOFF"===t.compression){const n=new Uint8Array(e.buffer,t.offset+2,t.compressedLength-2),o=new Uint8Array(t.length);if(s()(n,o),o.byteLength!==t.length)throw new Error("Decompression error: "+t.tag+" decompressed length doesn't match recorded length");return{data:new DataView(o.buffer,0),offset:0}}return{data:e,offset:t.offset}}function Hn(e){let t,n;const o=new Rn({empty:!0}),s=new DataView(e,0);let r,i=[];const a=z.getTag(s,0);if(a===String.fromCharCode(0,1,0,0)||"true"===a||"typ1"===a)o.outlinesFormat="truetype",r=z.getUShort(s,4),i=Nn(s,r);else if("OTTO"===a)o.outlinesFormat="cff",r=z.getUShort(s,4),i=Nn(s,r);else{if("wOFF"!==a)throw new Error("Unsupported OpenType signature "+a);{const e=z.getTag(s,4);if(e===String.fromCharCode(0,1,0,0))o.outlinesFormat="truetype";else{if("OTTO"!==e)throw new Error("Unsupported OpenType flavor "+a);o.outlinesFormat="cff"}r=z.getUShort(s,12),i=function(e,t){const n=[];let o=44;for(let s=0;s<t;s+=1){const t=z.getTag(e,o),s=z.getULong(e,o+4),r=z.getULong(e,o+8),i=z.getULong(e,o+12);let a;a=r<i&&"WOFF",n.push({tag:t,offset:s,compression:a,compressedLength:r,length:i}),o+=20}return n}(s,r)}}let l,u,c,p,h,f,d,g,y,m,v;for(let e=0;e<r;e+=1){const r=i[e];let a;switch(r.tag){case"cmap":a=Fn(s,r),o.tables.cmap=q(a.data,a.offset),o.encoding=new K(o.tables.cmap);break;case"cvt ":a=Fn(s,r),v=new z.Parser(a.data,a.offset),o.tables.cvt=v.parseShortList(r.length/2);break;case"fvar":u=r;break;case"fpgm":a=Fn(s,r),v=new z.Parser(a.data,a.offset),o.tables.fpgm=v.parseByteList(r.length);break;case"head":a=Fn(s,r),o.tables.head=Ie(a.data,a.offset),o.unitsPerEm=o.tables.head.unitsPerEm,t=o.tables.head.indexToLocFormat;break;case"hhea":a=Fn(s,r),o.tables.hhea=Ge(a.data,a.offset),o.ascender=o.tables.hhea.ascender,o.descender=o.tables.hhea.descender,o.numberOfHMetrics=o.tables.hhea.numberOfHMetrics;break;case"hmtx":f=r;break;case"ltag":a=Fn(s,r),n=Fe(a.data,a.offset);break;case"maxp":a=Fn(s,r),o.tables.maxp=He(a.data,a.offset),o.numGlyphs=o.tables.maxp.numGlyphs;break;case"name":y=r;break;case"OS/2":a=Fn(s,r),o.tables.os2=ot(a.data,a.offset);break;case"post":a=Fn(s,r),o.tables.post=it(a.data,a.offset),o.glyphNames=new $(o.tables.post);break;case"prep":a=Fn(s,r),v=new z.Parser(a.data,a.offset),o.tables.prep=v.parseByteList(r.length);break;case"glyf":c=r;break;case"loca":g=r;break;case"CFF ":l=r;break;case"kern":d=r;break;case"GPOS":p=r;break;case"GSUB":h=r;break;case"meta":m=r}}const b=Fn(s,y);if(o.tables.name=et(b.data,b.offset,n),o.names=o.tables.name,c&&g){const e=0===t,n=Fn(s,g),r=An(n.data,n.offset,o.numGlyphs,e),i=Fn(s,c);o.glyphs=ie.parse(i.data,i.offset,r,o)}else{if(!l)throw new Error("Font doesn't contain TrueType or CFF outlines.");{const e=Fn(s,l);De(e.data,e.offset,o)}}const x=Fn(s,f);if(Be(x.data,x.offset,o.numberOfHMetrics,o.numGlyphs,o.glyphs),function(e){let t;const n=e.tables.cmap.glyphIndexMap,o=Object.keys(n);for(let s=0;s<o.length;s+=1){const r=o[s],i=n[r];t=e.glyphs.get(i),t.addUnicode(parseInt(r))}for(let n=0;n<e.glyphs.length;n+=1)t=e.glyphs.get(n),e.cffEncoding?e.isCIDFont?t.name="gid"+n:t.name=e.cffEncoding.charset[n]:e.glyphNames.names&&(t.name=e.glyphNames.glyphIndexToName(n))}(o),d){const e=Fn(s,d);o.kerningPairs=Gn(e.data,e.offset)}else o.kerningPairs={};if(p){const e=Fn(s,p);o.tables.gpos=Mn(e.data,e.offset)}if(h){const e=Fn(s,h);o.tables.gsub=pt(e.data,e.offset)}if(u){const e=Fn(s,u);o.tables.fvar=Cn(e.data,e.offset,o.names)}if(m){const e=Fn(s,m);o.tables.meta=ft(e.data,e.offset),o.metas=o.tables.meta}return o}function _n(e,t){("undefined"==typeof window?Bn:Pn)(e,(function(e,n){if(e)return t(e);let o;try{o=Hn(n)}catch(e){return t(e,null)}return t(null,o)}))}function zn(e){return Hn(Mt(n(147).readFileSync(e)))}},311:e=>{function t(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function n(e,n){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=n,this.destLen=0,this.ltree=new t,this.dtree=new t}var o=new t,s=new t,r=new Uint8Array(30),i=new Uint16Array(30),a=new Uint8Array(30),l=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new t,p=new Uint8Array(320);function h(e,t,n,o){var s,r;for(s=0;s<n;++s)e[s]=0;for(s=0;s<30-n;++s)e[s+n]=s/n|0;for(r=o,s=0;s<30;++s)t[s]=r,r+=1<<e[s]}var f=new Uint16Array(16);function d(e,t,n,o){var s,r;for(s=0;s<16;++s)e.table[s]=0;for(s=0;s<o;++s)e.table[t[n+s]]++;for(e.table[0]=0,r=0,s=0;s<16;++s)f[s]=r,r+=e.table[s];for(s=0;s<o;++s)t[n+s]&&(e.trans[f[t[n+s]]++]=s)}function g(e){e.bitcount--||(e.tag=e.source[e.sourceIndex++],e.bitcount=7);var t=1&e.tag;return e.tag>>>=1,t}function y(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var o=e.tag&65535>>>16-t;return e.tag>>>=t,e.bitcount-=t,o+n}function m(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<<e.bitcount,e.bitcount+=8;var n=0,o=0,s=0,r=e.tag;do{o=2*o+(1&r),r>>>=1,++s,n+=t.table[s],o-=t.table[s]}while(o>=0);return e.tag=r,e.bitcount-=s,t.trans[n+o]}function v(e,t,n){var o,s,r,i,a,l;for(o=y(e,5,257),s=y(e,5,1),r=y(e,4,4),i=0;i<19;++i)p[i]=0;for(i=0;i<r;++i){var h=y(e,3,0);p[u[i]]=h}for(d(c,p,0,19),a=0;a<o+s;){var f=m(e,c);switch(f){case 16:var g=p[a-1];for(l=y(e,2,3);l;--l)p[a++]=g;break;case 17:for(l=y(e,3,3);l;--l)p[a++]=0;break;case 18:for(l=y(e,7,11);l;--l)p[a++]=0;break;default:p[a++]=f}}d(t,p,0,o),d(n,p,o,s)}function b(e,t,n){for(;;){var o,s,u,c,p=m(e,t);if(256===p)return 0;if(p<256)e.dest[e.destLen++]=p;else for(o=y(e,r[p-=257],i[p]),s=m(e,n),c=u=e.destLen-y(e,a[s],l[s]);c<u+o;++c)e.dest[e.destLen++]=e.dest[c]}}function x(e){for(var t,n;e.bitcount>8;)e.sourceIndex--,e.bitcount-=8;if((t=256*(t=e.source[e.sourceIndex+1])+e.source[e.sourceIndex])!==(65535&~(256*e.source[e.sourceIndex+3]+e.source[e.sourceIndex+2])))return-3;for(e.sourceIndex+=4,n=t;n;--n)e.dest[e.destLen++]=e.source[e.sourceIndex++];return e.bitcount=0,0}!function(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}(o,s),h(r,i,4,3),h(a,l,2,1),r[28]=0,i[28]=258,e.exports=function(e,t){var r,i,a=new n(e,t);do{switch(r=g(a),y(a,2,0)){case 0:i=x(a);break;case 1:i=b(a,o,s);break;case 2:v(a,a.ltree,a.dtree),i=b(a,a.ltree,a.dtree);break;default:i=-3}if(0!==i)throw new Error("Data error")}while(!r);return a.destLen<a.dest.length?"function"==typeof a.dest.slice?a.dest.slice(0,a.destLen):a.dest.subarray(0,a.destLen):a.dest}},371:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},411:(e,t,n)=>{"use strict";function o(e){var t=this;if(t instanceof o||(t=new o),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,s=arguments.length;n<s;n++)t.push(arguments[n]);return t}function s(e,t){e.tail=new i(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function r(e,t){e.head=new i(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function i(e,t,n,o){if(!(this instanceof i))return new i(e,t,n,o);this.list=o,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=o,o.Node=i,o.create=o,o.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},o.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},o.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},o.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},o.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)r(this,arguments[e]);return this.length},o.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},o.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},o.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,o=0;null!==n;o++)e.call(t,n.value,o,this),n=n.next},o.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,o=this.length-1;null!==n;o--)e.call(t,n.value,o,this),n=n.prev},o.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},o.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},o.prototype.map=function(e,t){t=t||this;for(var n=new o,s=this.head;null!==s;)n.push(e.call(t,s.value,this)),s=s.next;return n},o.prototype.mapReverse=function(e,t){t=t||this;for(var n=new o,s=this.tail;null!==s;)n.push(e.call(t,s.value,this)),s=s.prev;return n},o.prototype.reduce=function(e,t){var n,o=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");o=this.head.next,n=this.head.value}for(var s=0;null!==o;s++)n=e(n,o.value,s),o=o.next;return n},o.prototype.reduceReverse=function(e,t){var n,o=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");o=this.tail.prev,n=this.tail.value}for(var s=this.length-1;null!==o;s--)n=e(n,o.value,s),o=o.prev;return n},o.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},o.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},o.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=0,r=this.head;null!==r&&s<e;s++)r=r.next;for(;null!==r&&s<t;s++,r=r.next)n.push(r.value);return n},o.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new o;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var s=this.length,r=this.tail;null!==r&&s>t;s--)r=r.prev;for(;null!==r&&s>e;s--,r=r.prev)n.push(r.value);return n},o.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var o=0,s=this.head;null!==s&&o<e;o++)s=s.next;var r,a,l,u,c=[];for(o=0;s&&o<t;o++)c.push(s.value),s=this.removeNode(s);for(null===s&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev),o=0;o<n.length;o++)r=this,a=s,l=n[o],u=void 0,null===(u=a===r.head?new i(l,null,a,r):new i(l,a,a.next,r)).next&&(r.tail=u),null===u.prev&&(r.head=u),r.length++,s=u;return c},o.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var o=n.prev;n.prev=n.next,n.next=o}return this.head=t,this.tail=e,this};try{n(371)(o)}catch(e){}},109:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const o=n(98),s=n(104);let r;t.default=async function(e,t){var a,l;if(!r){if("undefined"!=typeof navigator&&"fonts"in navigator){try{const e=await(null===(l=(a=navigator.permissions).request)||void 0===l?void 0:l.call(a,{name:"local-fonts"}));if(e&&"granted"!==e.state)throw new Error("Permission to access local fonts not granted.")}catch(e){if("TypeError"!==e.name)throw e}const e={};try{const t=await navigator.fonts.query();for(const n of t)e.hasOwnProperty(n.family)||(e[n.family]=[]),e[n.family].push(n);r=Promise.resolve(e)}catch(e){console.error(e.name,e.message)}}else try{r=(await Promise.resolve().then((()=>n(741)))).list()}catch(e){}r||(r=Promise.resolve({}))}const u=await r;for(const n of(0,s.default)(e)){if(i.includes(n))return;if(u.hasOwnProperty(n)&&u[n].length>0){const e=u[n][0];return"blob"in e?(0,o.loadBuffer)(await(await e.blob()).arrayBuffer(),{cacheSize:t}):await(0,o.loadFile)(e.path,{cacheSize:t})}}};const i=["serif","sans-serif","cursive","fantasy","monospace","system-ui","emoji","math","fangsong"]},833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.enableLigatures=void 0;const o=n(109);t.enableLigatures=function(e){let t,n,s,r=0;e.registerCharacterJoiner((i=>{const a=e.options.fontFamily;if(a&&(0===r||t!==a)){n=void 0,r=1,t=a;const i=t;(0,o.default)(i,1e5).then((t=>{i===e.options.fontFamily&&(r=2,n=t,t&&e.refresh(0,e.options.rows-1))})).catch((t=>{i===e.options.fontFamily&&(r=3,n=void 0,s=t)}))}if(n&&2===r)return n.findLigatureRanges(i).map((e=>[e[0],e[1]]));if(3===r)throw s||new Error("Failure while loading font");return[]}))}},104:(e,t)=>{"use strict";function n(e,t){let n="",o=!1;for(;e.offset<e.input.length;){const r=e.input[e.offset++];if(o)/[\dA-Fa-f]/.test(r)?(e.offset--,n+=s(e)):"\n"!==r&&(n+=r),o=!1;else switch(r){case t:return n;case"\\":o=!0;break;default:n+=r}}throw new Error("Unterminated string")}function o(e){let t="",n=!1;for(;e.offset<e.input.length;){const o=e.input[e.offset++];if(n)/[\dA-Fa-f]/.test(o)?(e.offset--,t+=s(e)):t+=o,n=!1;else switch(o){case"\\":n=!0;break;case",":return t;default:/\s/.test(o)?t.endsWith(" ")||(t+=" "):t+=o}}return t}function s(e){let t="";for(;e.offset<e.input.length;){const n=e.input[e.offset++];if(/\s/.test(n))return r(t);if(t.length>=6||!/[\dA-Fa-f]/.test(n))return e.offset--,r(t);t+=n}return r(t)}function r(e){return String.fromCodePoint(parseInt(e,16))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new Error("Font family must be a string");const t={input:e,offset:0},s=[];let r="";for(;t.offset<t.input.length;){const e=t.input[t.offset++];switch(e){case"'":case'"':r+=n(t,e);break;case",":s.push(r),r="";break;default:/\s/.test(e)||(t.offset--,r+=o(t),s.push(r),r="")}}return s}},147:e=>{"use strict";e.exports=__webpack_require__(/*! fs */ 2089)},741:t=>{"use strict";t.exports=e},269:e=>{"use strict";e.exports=t}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return n[e](r,r.exports,s),r.exports}s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var n in t)s.o(t,n)&&!s.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.LigaturesAddon=void 0;const t=s(833);e.LigaturesAddon=class{constructor(){}activate(e){(0,t.enableLigatures)(e)}dispose(){}}})(),r})()}));


/***/ }),

/***/ 9570:
/*!*******************************************************************!*\
  !*** ./node_modules/xterm-addon-search/lib/xterm-addon-search.js ***!
  \*******************************************************************/
/***/ ((module) => {

!function(e,t){ true?module.exports=t():0}(self,(function(){return(()=>{"use strict";var e={258:function(e,t,i){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var s in t=arguments[i])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchAddon=void 0;var s=i(345),n=" ~!@#$%^&*()+`-=[]{}|\\;:\"',./<>?",o=function(){function e(){this._linesCacheTimeoutId=0,this._onDidChangeResults=new s.EventEmitter,this.onDidChangeResults=this._onDidChangeResults.event}return e.prototype.activate=function(e){var t=this;this._terminal=e,this._onDataDisposable=this._terminal.onWriteParsed((function(){return t._updateMatches()})),this._onResizeDisposable=this._terminal.onResize((function(){return t._updateMatches()}))},e.prototype._updateMatches=function(){var e,t=this;this._highlightTimeout&&window.clearTimeout(this._highlightTimeout),this._cachedSearchTerm&&(null===(e=this._lastSearchOptions)||void 0===e?void 0:e.decorations)&&(this._highlightTimeout=setTimeout((function(){t.findPrevious(t._cachedSearchTerm,r(r({},t._lastSearchOptions),{incremental:!0,noScroll:!0})),t._resultIndex=t._searchResults?t._searchResults.size-1:-1,t._onDidChangeResults.fire({resultIndex:t._searchResults?t._searchResults.size-1:-1,resultCount:t._searchResults?t._searchResults.size:-1})}),200))},e.prototype.dispose=function(){var e,t;this.clearDecorations(),null===(e=this._onDataDisposable)||void 0===e||e.dispose(),null===(t=this._onResizeDisposable)||void 0===t||t.dispose()},e.prototype.clearDecorations=function(e){var t,i,r,s;null===(t=this._selectedDecoration)||void 0===t||t.dispose(),null===(i=this._searchResults)||void 0===i||i.clear(),null===(r=this._resultDecorations)||void 0===r||r.forEach((function(e){for(var t=0,i=e;t<i.length;t++)i[t].dispose()})),null===(s=this._resultDecorations)||void 0===s||s.clear(),this._searchResults=void 0,this._resultDecorations=void 0,e||(this._cachedSearchTerm=void 0)},e.prototype.clearActiveDecoration=function(){var e;null===(e=this._selectedDecoration)||void 0===e||e.dispose(),this._selectedDecoration=void 0},e.prototype.findNext=function(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._lastSearchOptions=t,(null==t?void 0:t.decorations)&&(void 0!==this._resultIndex||this._cachedSearchTerm&&e!==this._cachedSearchTerm)&&this._highlightAllMatches(e,t),this._fireResults(e,this._findNextAndSelect(e,t),t)},e.prototype._highlightAllMatches=function(e,t){var i=this;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(e&&0!==e.length){t=t||{},this.clearDecorations(!0),this._searchResults=new Map,this._resultDecorations=new Map;for(var r=this._resultDecorations,s=this._find(e,0,0,t);s&&!this._searchResults.get(s.row+"-"+s.col);)if(this._searchResults.set(s.row+"-"+s.col,s),s=this._find(e,s.col+s.term.length>=this._terminal.cols?s.row+1:s.row,s.col+s.term.length>=this._terminal.cols?0:s.col+1,t),this._searchResults.size>1e3)return this.clearDecorations(),void(this._resultIndex=void 0);this._searchResults.forEach((function(e){var s=i._createResultDecoration(e,t.decorations);if(s){var n=r.get(s.marker.line)||[];n.push(s),r.set(s.marker.line,n)}}))}else this.clearDecorations()},e.prototype._find=function(e,t,i,r){var s;if(!this._terminal||!e||0===e.length)return null===(s=this._terminal)||void 0===s||s.clearSelection(),void this.clearDecorations();if(i>this._terminal.cols)throw new Error("Invalid col: "+i+" to search in terminal of "+this._terminal.cols+" cols");var n=void 0;this._initLinesCache();var o={startRow:t,startCol:i};if(!(n=this._findInLine(e,o,r)))for(var l=t+1;l<this._terminal.buffer.active.baseY+this._terminal.rows&&(o.startRow=l,o.startCol=0,!(n=this._findInLine(e,o,r)));l++);return n},e.prototype._findNextAndSelect=function(e,t){var i;if(!this._terminal||!e||0===e.length)return null===(i=this._terminal)||void 0===i||i.clearSelection(),this.clearDecorations(),this._cachedSearchTerm=void 0,this._resultIndex=-1,!1;this._cachedSearchTerm!==e&&(this._resultIndex=void 0,this._terminal.clearSelection());var r,s=0,n=0;if(this._terminal.hasSelection()){var o=!!t&&t.incremental;r=this._terminal.getSelectionPosition(),n=o?r.startRow:r.endRow,s=o?r.startColumn:r.endColumn}this._initLinesCache();var l={startRow:n,startCol:s},a=this._findInLine(e,l,t);if(!a)for(var h=n+1;h<this._terminal.buffer.active.baseY+this._terminal.rows&&(l.startRow=h,l.startCol=0,!(a=this._findInLine(e,l,t)));h++);if(!a&&0!==n)for(h=0;h<n&&(l.startRow=h,l.startCol=0,!(a=this._findInLine(e,l,t)));h++);return!a&&r&&(l.startRow=r.startRow,l.startCol=0,a=this._findInLine(e,l,t)),this._searchResults&&(void 0===this._resultIndex?this._resultIndex=0:(this._resultIndex++,this._resultIndex>=this._searchResults.size&&(this._resultIndex=0))),this._selectResult(a,null==t?void 0:t.decorations,null==t?void 0:t.noScroll)},e.prototype.findPrevious=function(e,t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._lastSearchOptions=t,!(null==t?void 0:t.decorations)||void 0===this._resultIndex&&e===this._cachedSearchTerm||this._highlightAllMatches(e,t),this._fireResults(e,this._findPreviousAndSelect(e,t),t)},e.prototype._fireResults=function(e,t,i){var r;return(null==i?void 0:i.decorations)&&(t&&void 0!==this._resultIndex&&(null===(r=this._searchResults)||void 0===r?void 0:r.size)?this._onDidChangeResults.fire({resultIndex:this._resultIndex,resultCount:this._searchResults.size}):-1===this._resultIndex?this._onDidChangeResults.fire({resultIndex:-1,resultCount:-1}):this._onDidChangeResults.fire(void 0)),this._cachedSearchTerm=e,t},e.prototype._findPreviousAndSelect=function(e,t){var i,r,s,n;if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");if(!this._terminal||!e||0===e.length)return n=void 0,null===(i=this._terminal)||void 0===i||i.clearSelection(),this.clearDecorations(),this._resultIndex=-1,!1;this._cachedSearchTerm!==e&&(this._resultIndex=void 0,this._terminal.clearSelection());var o,l=this._terminal.buffer.active.baseY+this._terminal.rows,a=this._terminal.cols,h=!0,c=!!t&&t.incremental;this._terminal.hasSelection()&&(l=(o=this._terminal.getSelectionPosition()).startRow,a=o.startColumn),this._initLinesCache();var u={startRow:l,startCol:a};if(c?(n=this._findInLine(e,u,t,!1))&&n.row===l&&n.col===a||(o&&(u.startRow=o.endRow,u.startCol=o.endColumn),n=this._findInLine(e,u,t,!0)):n=this._findInLine(e,u,t,h),!n){u.startCol=Math.max(u.startCol,this._terminal.cols);for(var d=l-1;d>=0&&(u.startRow=d,!(n=this._findInLine(e,u,t,h)));d--);}if(!n&&l!==this._terminal.buffer.active.baseY+this._terminal.rows)for(d=this._terminal.buffer.active.baseY+this._terminal.rows;d>=l&&(u.startRow=d,!(n=this._findInLine(e,u,t,h)));d--);return this._searchResults&&(void 0===this._resultIndex||this._resultIndex<0?this._resultIndex=(null===(r=this._searchResults)||void 0===r?void 0:r.size)-1:(this._resultIndex--,-1===this._resultIndex&&(this._resultIndex=(null===(s=this._searchResults)||void 0===s?void 0:s.size)-1))),!(n||!o)||this._selectResult(n,null==t?void 0:t.decorations,null==t?void 0:t.noScroll)},e.prototype._initLinesCache=function(){var e=this,t=this._terminal;this._linesCache||(this._linesCache=new Array(t.buffer.active.length),this._cursorMoveListener=t.onCursorMove((function(){return e._destroyLinesCache()})),this._resizeListener=t.onResize((function(){return e._destroyLinesCache()}))),window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=window.setTimeout((function(){return e._destroyLinesCache()}),15e3)},e.prototype._destroyLinesCache=function(){this._linesCache=void 0,this._cursorMoveListener&&(this._cursorMoveListener.dispose(),this._cursorMoveListener=void 0),this._resizeListener&&(this._resizeListener.dispose(),this._resizeListener=void 0),this._linesCacheTimeoutId&&(window.clearTimeout(this._linesCacheTimeoutId),this._linesCacheTimeoutId=0)},e.prototype._isWholeWord=function(e,t,i){return(0===e||n.includes(t[e-1]))&&(e+i.length===t.length||n.includes(t[e+i.length]))},e.prototype._findInLine=function(e,t,i,r){var s;void 0===i&&(i={}),void 0===r&&(r=!1);var n=this._terminal,o=t.startRow,l=t.startCol,a=n.buffer.active.getLine(o);if(null==a?void 0:a.isWrapped)return r?void(t.startCol+=n.cols):(t.startRow--,t.startCol+=n.cols,this._findInLine(e,t,i));var h=null===(s=this._linesCache)||void 0===s?void 0:s[o];h||(h=this._translateBufferLineToStringWithWrap(o,!0),this._linesCache&&(this._linesCache[o]=h));var c=h[0],u=h[1],d=this._bufferColsToStringOffset(o,l),_=i.caseSensitive?e:e.toLowerCase(),f=i.caseSensitive?c:c.toLowerCase(),v=-1;if(i.regex){var p=RegExp(_,"g"),g=void 0;if(r)for(;g=p.exec(f.slice(0,d));)v=p.lastIndex-g[0].length,e=g[0],p.lastIndex-=e.length-1;else(g=p.exec(f.slice(d)))&&g[0].length>0&&(v=d+(p.lastIndex-g[0].length),e=g[0])}else r?d-_.length>=0&&(v=f.lastIndexOf(_,d-_.length)):v=f.indexOf(_,d);if(v>=0){if(i.wholeWord&&!this._isWholeWord(v,f,e))return;for(var m=0;m<u.length-1&&v>=u[m+1];)m++;for(var w=m;w<u.length-1&&v+e.length>=u[w+1];)w++;var C=v-u[m],R=v+e.length-u[w],x=this._stringLengthToBufferSize(o+m,C);return{term:e,col:x,row:o+m,size:this._stringLengthToBufferSize(o+w,R)-x+n.cols*(w-m)}}},e.prototype._stringLengthToBufferSize=function(e,t){var i=this._terminal.buffer.active.getLine(e);if(!i)return 0;for(var r=0;r<t;r++){var s=i.getCell(r);if(!s)break;var n=s.getChars();n.length>1&&(t-=n.length-1);var o=i.getCell(r+1);o&&0===o.getWidth()&&t++}return t},e.prototype._bufferColsToStringOffset=function(e,t){for(var i=this._terminal,r=e,s=0,n=i.buffer.active.getLine(r);t>0&&n;){for(var o=0;o<t&&o<i.cols;o++){var l=n.getCell(o);if(!l)break;l.getWidth()&&(s+=l.getChars().length)}if(r++,(n=i.buffer.active.getLine(r))&&!n.isWrapped)break;t-=i.cols}return s},e.prototype._translateBufferLineToStringWithWrap=function(e,t){for(var i,r=this._terminal,s=[],n=[0],o=r.buffer.active.getLine(e);o;){var l=r.buffer.active.getLine(e+1),a=!!l&&l.isWrapped,h=o.translateToString(!a&&t);if(a&&l){var c=o.getCell(o.length-1);c&&0===c.getCode()&&1===c.getWidth()&&2===(null===(i=l.getCell(0))||void 0===i?void 0:i.getWidth())&&(h=h.slice(0,-1))}if(s.push(h),!a)break;n.push(n[n.length-1]+h.length),e++,o=l}return[s.join(""),n]},e.prototype._selectResult=function(e,t,i){var r,s,n=this,o=this._terminal;if(this.clearActiveDecoration(),!e)return o.clearSelection(),!1;if(o.select(e.col,e.row,e.size),t){var l=o.registerMarker(-o.buffer.active.baseY-o.buffer.active.cursorY+e.row);l&&(this._selectedDecoration=o.registerDecoration({marker:l,x:e.col,width:e.size,backgroundColor:t.activeMatchBackground,layer:"top",overviewRulerOptions:{color:t.activeMatchColorOverviewRuler}}),null===(r=this._selectedDecoration)||void 0===r||r.onRender((function(e){return n._applyStyles(e,t.activeMatchBorder,!0)})),null===(s=this._selectedDecoration)||void 0===s||s.onDispose((function(){return l.dispose()})))}if(!i&&(e.row>=o.buffer.active.viewportY+o.rows||e.row<o.buffer.active.viewportY)){var a=e.row-o.buffer.active.viewportY;a-=Math.floor(o.rows/2),o.scrollLines(a)}return!0},e.prototype._applyStyles=function(e,t,i){e.clientWidth<=0||(e.classList.contains("xterm-find-result-decoration")||(e.classList.add("xterm-find-result-decoration"),t&&(e.style.outline="1px solid "+t)),i&&e.classList.add("xterm-find-active-result-decoration"))},e.prototype._createResultDecoration=function(e,t){var i,r=this,s=this._terminal,n=s.registerMarker(-s.buffer.active.baseY-s.buffer.active.cursorY+e.row);if(n){var o=s.registerDecoration({marker:n,x:e.col,width:e.size,backgroundColor:t.matchBackground,overviewRulerOptions:(null===(i=this._resultDecorations)||void 0===i?void 0:i.get(n.line))?void 0:{color:t.matchOverviewRuler,position:"center"}});return null==o||o.onRender((function(e){return r._applyStyles(e,t.matchBorder,!1)})),null==o||o.onDispose((function(){return n.dispose()})),o}},e}();t.SearchAddon=o},345:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0;var i=function(){function e(){this._listeners=[],this._disposed=!1}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){return e._listeners.push(t),{dispose:function(){if(!e._disposed)for(var i=0;i<e._listeners.length;i++)if(e._listeners[i]===t)return void e._listeners.splice(i,1)}}}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e,t){for(var i=[],r=0;r<this._listeners.length;r++)i.push(this._listeners[r]);for(r=0;r<i.length;r++)i[r].call(void 0,e,t)},e.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},e}();t.EventEmitter=i,t.forwardEvent=function(e,t){return e((function(e){return t.fire(e)}))}}},t={};return function i(r){var s=t[r];if(void 0!==s)return s.exports;var n=t[r]={exports:{}};return e[r].call(n.exports,n,n.exports,i),n.exports}(258)})()}));


/***/ }),

/***/ 5548:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-serialize/lib/xterm-addon-serialize.js ***!
  \*************************************************************************/
/***/ (function(module) {

!function(t,e){ true?module.exports=e():0}(this,(function(){return(()=>{"use strict";var t={};return{44:function(t,e){var r,i=this&&this.__extends||(r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},r(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});function o(t,e,r){return Math.max(e,Math.min(t,r))}Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLSerializeHandler=e.SerializeAddon=void 0;var s=function(){function t(t){this._buffer=t}return t.prototype.serialize=function(t){var e=this._buffer.getNullCell(),r=this._buffer.getNullCell(),i=e,o=t.start.x,s=t.end.x,n=t.start.y,l=t.end.y;this._beforeSerialize(s-o,o,s);for(var u=o;u<=s;u++){var a=this._buffer.getLine(u);if(a)for(var h=u!==t.start.x?0:n,_=u!==t.end.x?a.length:l,f=h;f<_;f++){var c=a.getCell(f,i===e?r:e);c?(this._nextCell(c,i,u,f),i=c):console.warn("Can't get cell at row="+u+", col="+f)}this._rowEnd(u,u===s)}return this._afterSerialize(),this._serializeString()},t.prototype._nextCell=function(t,e,r,i){},t.prototype._rowEnd=function(t,e){},t.prototype._beforeSerialize=function(t,e,r){},t.prototype._afterSerialize=function(){},t.prototype._serializeString=function(){return""},t}();function n(t,e){return t.getFgColorMode()===e.getFgColorMode()&&t.getFgColor()===e.getFgColor()}function l(t,e){return t.getBgColorMode()===e.getBgColorMode()&&t.getBgColor()===e.getBgColor()}function u(t,e){return t.isInverse()===e.isInverse()&&t.isBold()===e.isBold()&&t.isUnderline()===e.isUnderline()&&t.isBlink()===e.isBlink()&&t.isInvisible()===e.isInvisible()&&t.isItalic()===e.isItalic()&&t.isDim()===e.isDim()&&t.isStrikethrough()===e.isStrikethrough()}var a=function(t){function e(e,r){var i=t.call(this,e)||this;return i._terminal=r,i._rowIndex=0,i._allRows=new Array,i._allRowSeparators=new Array,i._currentRow="",i._nullCellCount=0,i._cursorStyle=i._buffer.getNullCell(),i._cursorStyleRow=0,i._cursorStyleCol=0,i._backgroundCell=i._buffer.getNullCell(),i._firstRow=0,i._lastCursorRow=0,i._lastCursorCol=0,i._lastContentCursorRow=0,i._lastContentCursorCol=0,i._thisRowLastChar=i._buffer.getNullCell(),i._thisRowLastSecondChar=i._buffer.getNullCell(),i._nextRowFirstChar=i._buffer.getNullCell(),i}return i(e,t),e.prototype._beforeSerialize=function(t,e,r){this._allRows=new Array(t),this._lastContentCursorRow=e,this._lastCursorRow=e,this._firstRow=e},e.prototype._rowEnd=function(t,e){var r;this._nullCellCount>0&&!l(this._cursorStyle,this._backgroundCell)&&(this._currentRow+="["+this._nullCellCount+"X");var i="";if(!e){t-this._firstRow>=this._terminal.rows&&(null===(r=this._buffer.getLine(this._cursorStyleRow))||void 0===r||r.getCell(this._cursorStyleCol,this._backgroundCell));var o=this._buffer.getLine(t),s=this._buffer.getLine(t+1);if(s.isWrapped){i="";var n=o.getCell(o.length-1,this._thisRowLastChar),u=o.getCell(o.length-2,this._thisRowLastSecondChar),a=s.getCell(0,this._nextRowFirstChar),h=a.getWidth()>1,_=!1;(a.getChars()&&h?this._nullCellCount<=1:this._nullCellCount<=0)&&((n.getChars()||0===n.getWidth())&&l(n,a)&&(_=!0),h&&(u.getChars()||0===u.getWidth())&&l(n,a)&&l(u,a)&&(_=!0)),_||(i="-".repeat(this._nullCellCount+1),i+="[1D[1X",this._nullCellCount>0&&(i+="[A",i+="["+(o.length-this._nullCellCount)+"C",i+="["+this._nullCellCount+"X",i+="["+(o.length-this._nullCellCount)+"D",i+="[B"),this._lastContentCursorRow=t+1,this._lastContentCursorCol=0,this._lastCursorRow=t+1,this._lastCursorCol=0)}else i="\r\n",this._lastCursorRow=t+1,this._lastCursorCol=0}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=i,this._currentRow="",this._nullCellCount=0},e.prototype._diffStyle=function(t,e){var r=[],i=!n(t,e),o=!l(t,e),s=!u(t,e);if(i||o||s)if(t.isAttributeDefault())e.isAttributeDefault()||r.push(0);else{if(i){var a=t.getFgColor();t.isFgRGB()?r.push(38,2,a>>>16&255,a>>>8&255,255&a):t.isFgPalette()?a>=16?r.push(38,5,a):r.push(8&a?90+(7&a):30+(7&a)):r.push(39)}o&&(a=t.getBgColor(),t.isBgRGB()?r.push(48,2,a>>>16&255,a>>>8&255,255&a):t.isBgPalette()?a>=16?r.push(48,5,a):r.push(8&a?100+(7&a):40+(7&a)):r.push(49)),s&&(t.isInverse()!==e.isInverse()&&r.push(t.isInverse()?7:27),t.isBold()!==e.isBold()&&r.push(t.isBold()?1:22),t.isUnderline()!==e.isUnderline()&&r.push(t.isUnderline()?4:24),t.isBlink()!==e.isBlink()&&r.push(t.isBlink()?5:25),t.isInvisible()!==e.isInvisible()&&r.push(t.isInvisible()?8:28),t.isItalic()!==e.isItalic()&&r.push(t.isItalic()?3:23),t.isDim()!==e.isDim()&&r.push(t.isDim()?2:22),t.isStrikethrough()!==e.isStrikethrough()&&r.push(t.isStrikethrough()?9:29))}return r},e.prototype._nextCell=function(t,e,r,i){if(0!==t.getWidth()){var o=""===t.getChars(),s=this._diffStyle(t,this._cursorStyle);if(o?!l(this._cursorStyle,t):s.length>0){this._nullCellCount>0&&(l(this._cursorStyle,this._backgroundCell)||(this._currentRow+="["+this._nullCellCount+"X"),this._currentRow+="["+this._nullCellCount+"C",this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=r,this._lastContentCursorCol=this._lastCursorCol=i,this._currentRow+="["+s.join(";")+"m";var n=this._buffer.getLine(r);void 0!==n&&(n.getCell(i,this._cursorStyle),this._cursorStyleRow=r,this._cursorStyleCol=i)}o?this._nullCellCount+=t.getWidth():(this._nullCellCount>0&&(l(this._cursorStyle,this._backgroundCell)||(this._currentRow+="["+this._nullCellCount+"X"),this._currentRow+="["+this._nullCellCount+"C",this._nullCellCount=0),this._currentRow+=t.getChars(),this._lastContentCursorRow=this._lastCursorRow=r,this._lastContentCursorCol=this._lastCursorCol=i+t.getWidth())}},e.prototype._serializeString=function(){var t=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(t=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);for(var e="",r=0;r<t;r++)e+=this._allRows[r],r+1<t&&(e+=this._allRowSeparators[r]);var i,o=this._buffer.baseY+this._buffer.cursorY,s=this._buffer.cursorX;(o!==this._lastCursorRow||s!==this._lastCursorCol)&&((i=o-this._lastCursorRow)>0?e+="["+i+"B":i<0&&(e+="["+-i+"A"),function(t){t>0?e+="["+t+"C":t<0&&(e+="["+-t+"D")}(s-this._lastCursorCol));var n=this._terminal._core._inputHandler._curAttrData,l=this._diffStyle(n,this._cursorStyle);return l.length>0&&(e+="["+l.join(";")+"m"),e},e}(s),h=function(){function t(){}return t.prototype.activate=function(t){this._terminal=t},t.prototype._serializeBuffer=function(t,e,r){var i=e.length,s=new a(e,t),n=void 0===r?i:o(r+t.rows,0,i);return s.serialize({start:{x:i-n,y:0},end:{x:i-1,y:t.cols}})},t.prototype._serializeBufferAsHTML=function(t,e){var r,i,s=t.buffer.active,n=new _(s,t,e);if(null===(r=e.onlySelection)||void 0===r||!r){var l=s.length,u=e.scrollback,a=void 0===u?l:o(u+t.rows,0,l);return n.serialize({start:{x:l-a,y:0},end:{x:l-1,y:t.cols}})}var h=null===(i=this._terminal)||void 0===i?void 0:i.getSelectionPosition();return void 0!==h?n.serialize({start:{x:h.startRow,y:h.startColumn},end:{x:h.endRow,y:h.endColumn}}):""},t.prototype._serializeModes=function(t){var e="",r=t.modes;if(r.applicationCursorKeysMode&&(e+="[?1h"),r.applicationKeypadMode&&(e+="[?66h"),r.bracketedPasteMode&&(e+="[?2004h"),r.insertMode&&(e+="[4h"),r.originMode&&(e+="[?6h"),r.reverseWraparoundMode&&(e+="[?45h"),r.sendFocusMode&&(e+="[?1004h"),!1===r.wraparoundMode&&(e+="[?7l"),"none"!==r.mouseTrackingMode)switch(r.mouseTrackingMode){case"x10":e+="[?9h";break;case"vt200":e+="[?1000h";break;case"drag":e+="[?1002h";break;case"any":e+="[?1003h"}return e},t.prototype.serialize=function(t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");var e=this._serializeBuffer(this._terminal,this._terminal.buffer.normal,null==t?void 0:t.scrollback);return(null==t?void 0:t.excludeAltBuffer)||"alternate"===this._terminal.buffer.active.type&&(e+="[?1049h[H"+this._serializeBuffer(this._terminal,this._terminal.buffer.alternate,void 0)),(null==t?void 0:t.excludeModes)||(e+=this._serializeModes(this._terminal)),e},t.prototype.serializeAsHTML=function(t){if(!this._terminal)throw new Error("Cannot use addon until it has been loaded");return this._serializeBufferAsHTML(this._terminal,t||{})},t.prototype.dispose=function(){},t}();e.SerializeAddon=h;var _=function(t){function e(e,r,i){var o=t.call(this,e)||this;return o._terminal=r,o._options=i,o._currentRow="",o._htmlContent="",o._colors=r._core._colorManager.colors,o}return i(e,t),e.prototype._padStart=function(t,e,r){return e>>=0,r=null!=r?r:" ",t.length>e?t:((e-=t.length)>r.length&&(r+=r.repeat(e/r.length)),r.slice(0,e)+t)},e.prototype._beforeSerialize=function(t,e,r){var i,o,s,n,l;this._htmlContent+="<html><body>\x3c!--StartFragment--\x3e<pre>";var u="#000000",a="#ffffff";null!==(i=this._options.includeGlobalBackground)&&void 0!==i&&i&&(u=null!==(s=null===(o=this._terminal.options.theme)||void 0===o?void 0:o.foreground)&&void 0!==s?s:"#ffffff",a=null!==(l=null===(n=this._terminal.options.theme)||void 0===n?void 0:n.background)&&void 0!==l?l:"#000000");var h=[];h.push("color: "+u+";"),h.push("background-color: "+a+";"),h.push("font-family: "+this._terminal.options.fontFamily+";"),h.push("font-size: "+this._terminal.options.fontSize+"px;"),this._htmlContent+="<div style='"+h.join(" ")+"'>"},e.prototype._afterSerialize=function(){this._htmlContent+="</div>",this._htmlContent+="</pre>\x3c!--EndFragment--\x3e</body></html>"},e.prototype._rowEnd=function(t,e){this._htmlContent+="<div><span>"+this._currentRow+"</span></div>",this._currentRow=""},e.prototype._getHexColor=function(t,e){var r=this,i=e?t.getFgColor():t.getBgColor();return(e?t.isFgRGB():t.isBgRGB())?[i>>16&255,i>>8&255,255&i].map((function(t){return r._padStart(t.toString(16),2,"0")})).join(""):(e?t.isFgPalette():t.isBgPalette())?this._colors.ansi[i].css:void 0},e.prototype._diffStyle=function(t,e){var r=[],i=!n(t,e),o=!l(t,e),s=!u(t,e);if(i||o||s){var a=this._getHexColor(t,!0);a&&r.push("color: "+a+";");var h=this._getHexColor(t,!1);return h&&r.push("background-color: "+h+";"),t.isInverse()&&r.push("color: #000000; background-color: #BFBFBF;"),t.isBold()&&r.push("font-weight: bold;"),t.isUnderline()&&r.push("text-decoration: underline;"),t.isBlink()&&r.push("text-decoration: blink;"),t.isInvisible()&&r.push("visibility: hidden;"),t.isItalic()&&r.push("font-style: italic;"),t.isDim()&&r.push("opacity: 0.5;"),t.isStrikethrough()&&r.push("text-decoration: line-through;"),r}},e.prototype._nextCell=function(t,e,r,i){if(0!==t.getWidth()){var o=""===t.getChars(),s=this._diffStyle(t,e);s&&(this._currentRow+=0===s.length?"</span><span>":"</span><span style='"+s.join(" ")+"'>"),this._currentRow+=o?" ":t.getChars()}},e.prototype._serializeString=function(){return this._htmlContent},e}(s);e.HTMLSerializeHandler=_}}[44](0,t),t})()}));


/***/ }),

/***/ 1940:
/*!*************************************************************************!*\
  !*** ./node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js ***!
  \*************************************************************************/
/***/ (function(module) {

!function(e,t){ true?module.exports=t():0}(this,(function(){return(()=>{"use strict";var e={433:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV11=void 0;const o=n(455),r=[[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1541],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1757],[1759,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2306],[2362,2362],[2364,2364],[2369,2376],[2381,2381],[2385,2391],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2558,2558],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2641,2641],[2672,2673],[2677,2677],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2810,2815],[2817,2817],[2876,2876],[2879,2879],[2881,2884],[2893,2893],[2902,2902],[2914,2915],[2946,2946],[3008,3008],[3021,3021],[3072,3072],[3076,3076],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3201,3201],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3405,3405],[3426,3427],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4226,4226],[4229,4230],[4237,4237],[4253,4253],[4448,4607],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6158],[6277,6278],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6683,6683],[6742,6742],[6744,6750],[6752,6752],[6754,6754],[6757,6764],[6771,6780],[6783,6783],[6832,6846],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7142,7142],[7144,7145],[7149,7149],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7405,7405],[7412,7412],[7416,7417],[7616,7673],[7675,7679],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[8400,8432],[11503,11505],[11647,11647],[11744,11775],[12330,12333],[12441,12442],[42607,42610],[42612,42621],[42654,42655],[42736,42737],[43010,43010],[43014,43014],[43019,43019],[43045,43046],[43204,43205],[43232,43249],[43263,43263],[43302,43309],[43335,43345],[43392,43394],[43443,43443],[43446,43449],[43452,43453],[43493,43493],[43561,43566],[43569,43570],[43573,43574],[43587,43587],[43596,43596],[43644,43644],[43696,43696],[43698,43700],[43703,43704],[43710,43711],[43713,43713],[43756,43757],[43766,43766],[44005,44005],[44008,44008],[44013,44013],[64286,64286],[65024,65039],[65056,65071],[65279,65279],[65529,65531]],l=[[66045,66045],[66272,66272],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[68325,68326],[68900,68903],[69446,69456],[69633,69633],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69821,69821],[69837,69837],[69888,69890],[69927,69931],[69933,69940],[70003,70003],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70196,70196],[70198,70199],[70206,70206],[70367,70367],[70371,70378],[70400,70401],[70459,70460],[70464,70464],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70726,70726],[70750,70750],[70835,70840],[70842,70842],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71229,71229],[71231,71232],[71339,71339],[71341,71341],[71344,71349],[71351,71351],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72160,72160],[72193,72202],[72243,72248],[72251,72254],[72263,72263],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72767,72767],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73018,73018],[73020,73021],[73023,73029],[73031,73031],[73104,73105],[73109,73109],[73111,73111],[73459,73460],[78896,78904],[92912,92916],[92976,92982],[94031,94031],[94095,94098],[113821,113822],[113824,113827],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121461,121461],[121476,121476],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],i=[[4352,4447],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9725,9726],[9748,9749],[9800,9811],[9855,9855],[9875,9875],[9889,9889],[9898,9899],[9917,9918],[9924,9925],[9934,9934],[9940,9940],[9962,9962],[9970,9971],[9973,9973],[9978,9978],[9981,9981],[9989,9989],[9994,9995],[10024,10024],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11093],[11904,11929],[11931,12019],[12032,12245],[12272,12283],[12288,12329],[12334,12350],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12730],[12736,12771],[12784,12830],[12832,12871],[12880,19903],[19968,42124],[42128,42182],[43360,43388],[44032,55203],[63744,64255],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65281,65376],[65504,65510]],c=[[94176,94179],[94208,100343],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[126980,126980],[127183,127183],[127374,127374],[127377,127386],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127776],[127789,127797],[127799,127868],[127870,127891],[127904,127946],[127951,127955],[127968,127984],[127988,127988],[127992,128062],[128064,128064],[128066,128252],[128255,128317],[128331,128334],[128336,128359],[128378,128378],[128405,128406],[128420,128420],[128507,128591],[128640,128709],[128716,128716],[128720,128722],[128725,128725],[128747,128748],[128756,128762],[128992,129003],[129293,129393],[129395,129398],[129402,129442],[129445,129450],[129454,129482],[129485,129535],[129648,129651],[129656,129658],[129664,129666],[129680,129685],[131072,196605],[196608,262141]];let f;function d(e,t){let n,o=0,r=t.length-1;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=o;)if(n=o+r>>1,e>t[n][1])o=n+1;else{if(!(e<t[n][0]))return!0;r=n-1}return!1}t.UnicodeV11=class{constructor(){if(this.version="11",!f){f=new Uint8Array(65536),(0,o.fill)(f,1),f[0]=0,(0,o.fill)(f,0,1,32),(0,o.fill)(f,0,127,160);for(let e=0;e<r.length;++e)(0,o.fill)(f,0,r[e][0],r[e][1]+1);for(let e=0;e<i.length;++e)(0,o.fill)(f,2,i[e][0],i[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?f[e]:d(e,l)?0:d(e,c)?2:1}}},455:(e,t)=>{function n(e,t,n,o){if(void 0===n&&(n=0),void 0===o&&(o=e.length),n>=e.length)return e;n=(e.length+n)%e.length,o=o>=e.length?e.length:(e.length+o)%e.length;for(var r=n;r<o;++r)e[r]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.fillFallback=t.fill=void 0,t.fill=function(e,t,o,r){return e.fill?e.fill(t,o,r):n(e,t,o,r)},t.fillFallback=n,t.concat=function(e,t){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,n),l.exports}var o={};return(()=>{var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.Unicode11Addon=void 0;const t=n(433);e.Unicode11Addon=class{activate(e){e.unicode.register(new t.UnicodeV11)}dispose(){}}})(),o})()}));


/***/ }),

/***/ 7270:
/*!*****************************************************************!*\
  !*** ./node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js ***!
  \*****************************************************************/
/***/ ((module) => {

!function(t,e){ true?module.exports=e():0}(self,(function(){return(()=>{"use strict";var t={965:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphRenderer=void 0;var i=r(381),o=r(455),n=r(855),s=10,a=s*Float32Array.BYTES_PER_ELEMENT,l=function(){function t(t,e,r,o){this._terminal=t,this._colors=e,this._gl=r,this._dimensions=o,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};var n=this._gl,s=(0,i.throwIfFalsy)((0,i.createProgram)(n,"#version 300 es\nlayout (location = 0) in vec2 a_unitquad;\nlayout (location = 1) in vec2 a_cellpos;\nlayout (location = 2) in vec2 a_offset;\nlayout (location = 3) in vec2 a_size;\nlayout (location = 4) in vec2 a_texcoord;\nlayout (location = 5) in vec2 a_texsize;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec2 v_texcoord;\n\nvoid main() {\n  vec2 zeroToOne = (a_offset / u_resolution) + a_cellpos + (a_unitquad * a_size);\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_texcoord = a_texcoord + a_unitquad * a_texsize;\n}","#version 300 es\nprecision lowp float;\n\nin vec2 v_texcoord;\n\nuniform sampler2D u_texture;\n\nout vec4 outColor;\n\nvoid main() {\n  outColor = texture(u_texture, v_texcoord);\n}"));this._program=s,this._projectionLocation=(0,i.throwIfFalsy)(n.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,i.throwIfFalsy)(n.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,i.throwIfFalsy)(n.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=n.createVertexArray(),n.bindVertexArray(this._vertexArrayObject);var l=new Float32Array([0,0,1,0,0,1,1,1]),h=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,h),n.bufferData(n.ARRAY_BUFFER,l,n.STATIC_DRAW),n.enableVertexAttribArray(0),n.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);var c=new Uint8Array([0,1,3,0,2,3]),u=n.createBuffer();n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,u),n.bufferData(n.ELEMENT_ARRAY_BUFFER,c,n.STATIC_DRAW),this._attributesBuffer=(0,i.throwIfFalsy)(n.createBuffer()),n.bindBuffer(n.ARRAY_BUFFER,this._attributesBuffer),n.enableVertexAttribArray(2),n.vertexAttribPointer(2,2,n.FLOAT,!1,a,0),n.vertexAttribDivisor(2,1),n.enableVertexAttribArray(3),n.vertexAttribPointer(3,2,n.FLOAT,!1,a,2*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(3,1),n.enableVertexAttribArray(4),n.vertexAttribPointer(4,2,n.FLOAT,!1,a,4*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(4,1),n.enableVertexAttribArray(5),n.vertexAttribPointer(5,2,n.FLOAT,!1,a,6*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(5,1),n.enableVertexAttribArray(1),n.vertexAttribPointer(1,2,n.FLOAT,!1,a,8*Float32Array.BYTES_PER_ELEMENT),n.vertexAttribDivisor(1,1),this._atlasTexture=(0,i.throwIfFalsy)(n.createTexture()),n.bindTexture(n.TEXTURE_2D,this._atlasTexture),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,1,1,0,n.RGBA,n.UNSIGNED_BYTE,new Uint8Array([0,0,255,255])),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.enable(n.BLEND),n.blendFunc(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA),this.onResize()}return t.prototype.beginFrame=function(){return!this._atlas||this._atlas.beginFrame()},t.prototype.updateCell=function(t,e,r,i,o,n){this._updateCell(this._vertices.attributes,t,e,r,i,o,n)},t.prototype._updateCell=function(t,e,r,i,a,l,h){var c,u=(r*this._terminal.cols+e)*s;i!==n.NULL_CELL_CODE&&void 0!==i?this._atlas&&((c=h&&h.length>1?this._atlas.getRasterizedGlyphCombinedChar(h,a,l):this._atlas.getRasterizedGlyph(i,a,l))?(t[u]=-c.offset.x+this._dimensions.scaledCharLeft,t[u+1]=-c.offset.y+this._dimensions.scaledCharTop,t[u+2]=c.size.x/this._dimensions.scaledCanvasWidth,t[u+3]=c.size.y/this._dimensions.scaledCanvasHeight,t[u+4]=c.texturePositionClipSpace.x,t[u+5]=c.texturePositionClipSpace.y,t[u+6]=c.sizeClipSpace.x,t[u+7]=c.sizeClipSpace.y):(0,o.fill)(t,0,u,u+s-1-2)):(0,o.fill)(t,0,u,u+s-1-2)},t.prototype.clear=function(t){var e=this._terminal,r=e.cols*e.rows*s;if(t||this._vertices.count!==r){this._vertices.count=r,this._vertices.attributes=new Float32Array(r);for(var i=0;i<this._vertices.attributesBuffers.length;i++)this._vertices.attributesBuffers[i]=new Float32Array(r);for(var o=0,n=0;n<e.rows;n++)for(var a=0;a<e.cols;a++)this._vertices.attributes[o+8]=a/e.cols,this._vertices.attributes[o+9]=n/e.rows,o+=s}},t.prototype.onResize=function(){var t=this._gl;t.viewport(0,0,t.canvas.width,t.canvas.height),this.clear()},t.prototype.setColors=function(){},t.prototype.render=function(t){if(this._atlas){var e=this._gl;e.useProgram(this._program),e.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;for(var r=this._vertices.attributesBuffers[this._activeBuffer],o=0,n=0;n<t.lineLengths.length;n++){var a=n*this._terminal.cols*s,l=this._vertices.attributes.subarray(a,a+t.lineLengths[n]*s);r.set(l,o),o+=l.length}e.bindBuffer(e.ARRAY_BUFFER,this._attributesBuffer),e.bufferData(e.ARRAY_BUFFER,r.subarray(0,o),e.STREAM_DRAW),this._atlas.hasCanvasChanged&&(this._atlas.hasCanvasChanged=!1,e.uniform1i(this._textureLocation,0),e.activeTexture(e.TEXTURE0+0),e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._atlas.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)),e.uniformMatrix4fv(this._projectionLocation,!1,i.PROJECTION_MATRIX),e.uniform2f(this._resolutionLocation,e.canvas.width,e.canvas.height),e.drawElementsInstanced(e.TRIANGLES,6,e.UNSIGNED_BYTE,0,o/s)}},t.prototype.setAtlas=function(t){var e=this._gl;this._atlas=t,e.bindTexture(e.TEXTURE_2D,this._atlasTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t.cacheCanvas),e.generateMipmap(e.TEXTURE_2D)},t.prototype.setDimensions=function(t){this._dimensions=t},t}();e.GlyphRenderer=l},742:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RectangleRenderer=void 0;var i=r(381),o=r(310),n=8*Float32Array.BYTES_PER_ELEMENT,s=function(){function t(t,e,r,o){this._terminal=t,this._colors=e,this._gl=r,this._dimensions=o,this._vertices={count:0,attributes:new Float32Array(160)};var s=this._gl;this._program=(0,i.throwIfFalsy)((0,i.createProgram)(s,"#version 300 es\nlayout (location = 0) in vec2 a_position;\nlayout (location = 1) in vec2 a_size;\nlayout (location = 2) in vec4 a_color;\nlayout (location = 3) in vec2 a_unitquad;\n\nuniform mat4 u_projection;\nuniform vec2 u_resolution;\n\nout vec4 v_color;\n\nvoid main() {\n  vec2 zeroToOne = (a_position + (a_unitquad * a_size)) / u_resolution;\n  gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);\n  v_color = a_color;\n}","#version 300 es\nprecision lowp float;\n\nin vec4 v_color;\n\nout vec4 outColor;\n\nvoid main() {\n  outColor = v_color;\n}")),this._resolutionLocation=(0,i.throwIfFalsy)(s.getUniformLocation(this._program,"u_resolution")),this._projectionLocation=(0,i.throwIfFalsy)(s.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=s.createVertexArray(),s.bindVertexArray(this._vertexArrayObject);var a=new Float32Array([0,0,1,0,0,1,1,1]),l=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,l),s.bufferData(s.ARRAY_BUFFER,a,s.STATIC_DRAW),s.enableVertexAttribArray(3),s.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);var h=new Uint8Array([0,1,3,0,2,3]),c=s.createBuffer();s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,c),s.bufferData(s.ELEMENT_ARRAY_BUFFER,h,s.STATIC_DRAW),this._attributesBuffer=(0,i.throwIfFalsy)(s.createBuffer()),s.bindBuffer(s.ARRAY_BUFFER,this._attributesBuffer),s.enableVertexAttribArray(0),s.vertexAttribPointer(0,2,s.FLOAT,!1,n,0),s.vertexAttribDivisor(0,1),s.enableVertexAttribArray(1),s.vertexAttribPointer(1,2,s.FLOAT,!1,n,2*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(1,1),s.enableVertexAttribArray(2),s.vertexAttribPointer(2,4,s.FLOAT,!1,n,4*Float32Array.BYTES_PER_ELEMENT),s.vertexAttribDivisor(2,1),this._updateCachedColors()}return t.prototype.render=function(){var t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,i.PROJECTION_MATRIX),t.uniform2f(this._resolutionLocation,t.canvas.width,t.canvas.height),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,this._vertices.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLES,6,t.UNSIGNED_BYTE,0,this._vertices.count)},t.prototype.onResize=function(){this._updateViewportRectangle()},t.prototype.setColors=function(){this._updateCachedColors(),this._updateViewportRectangle()},t.prototype._updateCachedColors=function(){this._bgFloat=this._colorToFloat32Array(this._colors.background)},t.prototype._updateViewportRectangle=function(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.scaledCellWidth,this._terminal.rows*this._dimensions.scaledCellHeight,this._bgFloat)},t.prototype.updateBackgrounds=function(t){for(var e=this._terminal,r=this._vertices,i=1,n=0;n<e.rows;n++){for(var s=-1,a=0,l=0,h=!1,c=0;c<e.cols;c++){var u=(n*e.cols+c)*o.RENDER_MODEL_INDICIES_PER_CELL,_=t.cells[u+o.RENDER_MODEL_BG_OFFSET],d=t.cells[u+o.RENDER_MODEL_FG_OFFSET],f=!!(67108864&d);if(_!==a||d!==l&&(h||f)){if(0!==a||h&&0!==l){var p=8*i++;this._updateRectangle(r,p,l,a,s,c,n)}s=c,a=_,l=d,h=f}}(0!==a||h&&0!==l)&&(p=8*i++,this._updateRectangle(r,p,l,a,s,e.cols,n))}r.count=i},t.prototype._updateRectangle=function(t,e,r,o,n,s,a){var l;if(67108864&r)switch(50331648&r){case 16777216:case 33554432:l=this._colors.ansi[255&r].rgba;break;case 50331648:l=(16777215&r)<<8;break;default:l=this._colors.foreground.rgba}else switch(50331648&o){case 16777216:case 33554432:l=this._colors.ansi[255&o].rgba;break;case 50331648:l=(16777215&o)<<8;break;default:l=this._colors.background.rgba}t.attributes.length<e+4&&(t.attributes=(0,i.expandFloat32Array)(t.attributes,this._terminal.rows*this._terminal.cols*8));var h=n*this._dimensions.scaledCellWidth,c=a*this._dimensions.scaledCellHeight,u=(l>>24&255)/255,_=(l>>16&255)/255,d=(l>>8&255)/255;this._addRectangle(t.attributes,e,h,c,(s-n)*this._dimensions.scaledCellWidth,this._dimensions.scaledCellHeight,u,_,d,1)},t.prototype._addRectangle=function(t,e,r,i,o,n,s,a,l,h){t[e]=r,t[e+1]=i,t[e+2]=o,t[e+3]=n,t[e+4]=s,t[e+5]=a,t[e+6]=l,t[e+7]=h},t.prototype._addRectangleFloat=function(t,e,r,i,o,n,s){t[e]=r,t[e+1]=i,t[e+2]=o,t[e+3]=n,t[e+4]=s[0],t[e+5]=s[1],t[e+6]=s[2],t[e+7]=s[3]},t.prototype._colorToFloat32Array=function(t){return new Float32Array([(t.rgba>>24&255)/255,(t.rgba>>16&255)/255,(t.rgba>>8&255)/255,(255&t.rgba)/255])},t}();e.RectangleRenderer=s},310:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RenderModel=e.COMBINED_CHAR_BIT_MASK=e.RENDER_MODEL_FG_OFFSET=e.RENDER_MODEL_BG_OFFSET=e.RENDER_MODEL_INDICIES_PER_CELL=void 0;var i=r(455);e.RENDER_MODEL_INDICIES_PER_CELL=3,e.RENDER_MODEL_BG_OFFSET=1,e.RENDER_MODEL_FG_OFFSET=2,e.COMBINED_CHAR_BIT_MASK=2147483648;var o=function(){function t(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection={hasSelection:!1,columnSelectMode:!1,viewportStartRow:0,viewportEndRow:0,viewportCappedStartRow:0,viewportCappedEndRow:0,startCol:0,endCol:0}}return t.prototype.resize=function(t,r){var i=t*r*e.RENDER_MODEL_INDICIES_PER_CELL;i!==this.cells.length&&(this.cells=new Uint32Array(i),this.lineLengths=new Uint32Array(r))},t.prototype.clear=function(){(0,i.fill)(this.cells,0,0),(0,i.fill)(this.lineLengths,0,0)},t.prototype.clearSelection=function(){this.selection.hasSelection=!1,this.selection.viewportStartRow=0,this.selection.viewportEndRow=0,this.selection.viewportCappedStartRow=0,this.selection.viewportCappedEndRow=0,this.selection.startCol=0,this.selection.endCol=0},t}();e.RenderModel=o},666:function(t,e,r){var i,o=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),n=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.JoinedCellData=e.WebglRenderer=void 0;var s=r(965),a=r(733),l=r(461),h=r(713),c=r(742),u=r(310),_=r(859),d=r(855),f=r(345),p=r(782),g=r(820),v=r(147),C=function(t){function e(e,r,i,o,n){var h=t.call(this)||this;h._terminal=e,h._colors=r,h._characterJoinerService=i,h._decorationService=o,h._model=new u.RenderModel,h._workCell=new p.CellData,h._workColors={fg:0,bg:0},h._onRequestRedraw=new f.EventEmitter,h._onContextLoss=new f.EventEmitter,h._core=h._terminal._core,h._renderLayers=[new a.LinkRenderLayer(h._core.screenElement,2,h._colors,h._core),new l.CursorRenderLayer(e,h._core.screenElement,3,h._colors,h._core,h._onRequestRedraw)],h.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},h._devicePixelRatio=window.devicePixelRatio,h._updateDimensions(),h._canvas=document.createElement("canvas");var _={antialias:!1,depth:!1,preserveDrawingBuffer:n};if(h._gl=h._canvas.getContext("webgl2",_),!h._gl)throw new Error("WebGL2 not supported "+h._gl);return h.register((0,g.addDisposableDomListener)(h._canvas,"webglcontextlost",(function(t){h._onContextLoss.fire(t)}))),h._core.screenElement.appendChild(h._canvas),h._rectangleRenderer=new c.RectangleRenderer(h._terminal,h._colors,h._gl,h.dimensions),h._glyphRenderer=new s.GlyphRenderer(h._terminal,h._colors,h._gl,h.dimensions),h.onCharSizeChanged(),h._isAttached=document.body.contains(h._core.screenElement),h}return o(e,t),Object.defineProperty(e.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onContextLoss",{get:function(){return this._onContextLoss.event},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){var e,r,i;try{for(var o=n(this._renderLayers),s=o.next();!s.done;s=o.next())s.value.dispose()}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}null===(i=this._canvas.parentElement)||void 0===i||i.removeChild(this._canvas),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"textureAtlas",{get:function(){var t;return null===(t=this._charAtlas)||void 0===t?void 0:t.cacheCanvas},enumerable:!1,configurable:!0}),e.prototype.setColors=function(t){var e,r;this._colors=t;try{for(var i=n(this._renderLayers),o=i.next();!o.done;o=i.next()){var s=o.value;s.setColors(this._terminal,this._colors),s.reset(this._terminal)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}this._rectangleRenderer.setColors(),this._glyphRenderer.setColors(),this._refreshCharAtlas(),this._model.clear()},e.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._terminal.cols,this._terminal.rows))},e.prototype.onResize=function(t,e){var r,i;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);try{for(var o=n(this._renderLayers),s=o.next();!s.done;s=o.next())s.value.resize(this._terminal,this.dimensions)}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this._canvas.width=this.dimensions.scaledCanvasWidth,this._canvas.height=this.dimensions.scaledCanvasHeight,this._canvas.style.width=this.dimensions.canvasWidth+"px",this._canvas.style.height=this.dimensions.canvasHeight+"px",this._core.screenElement.style.width=this.dimensions.canvasWidth+"px",this._core.screenElement.style.height=this.dimensions.canvasHeight+"px",this._rectangleRenderer.onResize(),this._glyphRenderer.setDimensions(this.dimensions),this._glyphRenderer.onResize(),this._refreshCharAtlas(),this._model.clear()},e.prototype.onCharSizeChanged=function(){this.onResize(this._terminal.cols,this._terminal.rows)},e.prototype.onBlur=function(){var t,e;try{for(var r=n(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.onBlur(this._terminal)}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.onFocus=function(){var t,e;try{for(var r=n(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.onFocus(this._terminal)}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.onSelectionChanged=function(t,e,r){var i,o;try{for(var s=n(this._renderLayers),a=s.next();!a.done;a=s.next())a.value.onSelectionChanged(this._terminal,t,e,r)}catch(t){i={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}this._updateSelectionModel(t,e,r),this._requestRedrawViewport()},e.prototype.onCursorMove=function(){var t,e;try{for(var r=n(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.onCursorMove(this._terminal)}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.onOptionsChanged=function(){var t,e;try{for(var r=n(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.onOptionsChanged(this._terminal)}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}this._updateDimensions(),this._refreshCharAtlas()},e.prototype._refreshCharAtlas=function(){if(this.dimensions.scaledCharWidth<=0&&this.dimensions.scaledCharHeight<=0)this._isAttached=!1;else{var t=(0,h.acquireCharAtlas)(this._terminal,this._colors,this.dimensions.scaledCellWidth,this.dimensions.scaledCellHeight,this.dimensions.scaledCharWidth,this.dimensions.scaledCharHeight);if(!("getRasterizedGlyph"in t))throw new Error("The webgl renderer only works with the webgl char atlas");this._charAtlas=t,this._charAtlas.warmUp(),this._glyphRenderer.setAtlas(this._charAtlas)}},e.prototype.clearCharAtlas=function(){var t;null===(t=this._charAtlas)||void 0===t||t.clearTexture(),this._model.clear(),this._updateModel(0,this._terminal.rows-1),this._requestRedrawViewport()},e.prototype.clear=function(){var t,e;this._model.clear(),this._glyphRenderer.clear(!0);try{for(var r=n(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.reset(this._terminal)}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.registerCharacterJoiner=function(t){return-1},e.prototype.deregisterCharacterJoiner=function(t){return!1},e.prototype.renderRows=function(t,e){var r,i;if(!this._isAttached){if(!(document.body.contains(this._core.screenElement)&&this._core._charSizeService.width&&this._core._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}try{for(var o=n(this._renderLayers),s=o.next();!s.done;s=o.next())s.value.onGridChanged(this._terminal,t,e)}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this._glyphRenderer.beginFrame()&&(this._model.clear(),this._updateSelectionModel(void 0,void 0)),this._updateModel(t,e),this._rectangleRenderer.render(),this._glyphRenderer.render(this._model)},e.prototype._updateModel=function(t,e){for(var r=this._core,i=this._workCell,o=t;o<=e;o++){var n=o+r.buffer.ydisp,s=r.buffer.lines.get(n);this._model.lineLengths[o]=0;for(var a=this._characterJoinerService.getJoinedCharacters(n),l=0;l<r.cols;l++){s.loadCell(l,i);var h=!1,c=l;if(a.length>0&&l===a[0][0]){h=!0;var _=a.shift();i=new y(i,s.translateToString(!0,_[0],_[1]),_[1]-_[0]),c=_[1]-1}var f=i.getChars(),p=i.getCode(),g=(o*r.cols+l)*u.RENDER_MODEL_INDICIES_PER_CELL;if(this._loadColorsForCell(l,n),p!==d.NULL_CELL_CODE&&(this._model.lineLengths[o]=l+1),(this._model.cells[g]!==p||this._model.cells[g+u.RENDER_MODEL_BG_OFFSET]!==this._workColors.bg||this._model.cells[g+u.RENDER_MODEL_FG_OFFSET]!==this._workColors.fg)&&(f.length>1&&(p|=u.COMBINED_CHAR_BIT_MASK),this._model.cells[g]=p,this._model.cells[g+u.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[g+u.RENDER_MODEL_FG_OFFSET]=this._workColors.fg,this._glyphRenderer.updateCell(l,o,p,this._workColors.bg,this._workColors.fg,f),h))for(i=this._workCell,l++;l<c;l++){var v=(o*r.cols+l)*u.RENDER_MODEL_INDICIES_PER_CELL;this._glyphRenderer.updateCell(l,o,d.NULL_CELL_CODE,0,0,d.NULL_CELL_CHAR),this._model.cells[v]=d.NULL_CELL_CODE,this._model.cells[v+u.RENDER_MODEL_BG_OFFSET]=this._workColors.bg,this._model.cells[v+u.RENDER_MODEL_FG_OFFSET]=this._workColors.fg}}}this._rectangleRenderer.updateBackgrounds(this._model)},e.prototype._loadColorsForCell=function(t,e){var r,i,o,s,a,l;this._workColors.bg=this._workCell.bg,this._workColors.fg=this._workCell.fg;try{for(var h=n(this._decorationService.getDecorationsAtCell(t,e,"bottom")),c=h.next();!c.done;c=h.next())(d=c.value).backgroundColorRGB&&(a=d.backgroundColorRGB.rgba>>8&16777215),d.foregroundColorRGB&&(l=d.foregroundColorRGB.rgba>>8&16777215)}catch(t){r={error:t}}finally{try{c&&!c.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}this._isCellSelected(t,e)&&(a=this._colors.selectionOpaque.rgba>>8&16777215,this._colors.selectionForeground&&(l=this._colors.selectionForeground.rgba>>8&16777215));try{for(var u=n(this._decorationService.getDecorationsAtCell(t,e,"top")),_=u.next();!_.done;_=u.next()){var d;(d=_.value).backgroundColorRGB&&(a=d.backgroundColorRGB.rgba>>8&16777215),d.foregroundColorRGB&&(l=d.foregroundColorRGB.rgba>>8&16777215)}}catch(t){o={error:t}}finally{try{_&&!_.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}void 0!==a&&(a=-16777216&this._workCell.bg|a|50331648),void 0!==l&&(l=-16777216&this._workCell.fg&-67108865|l|50331648),67108864&this._workColors.fg&&(void 0!==a&&void 0===l&&(l=0==(50331648&this._workColors.bg)?-134217728&this._workColors.fg|16777215&this._colors.background.rgba>>8|50331648:-134217728&this._workColors.fg|67108863&this._workColors.bg),void 0===a&&void 0!==l&&(a=0==(50331648&this._workColors.fg)?-67108864&this._workColors.bg|16777215&this._colors.foreground.rgba>>8|50331648:-67108864&this._workColors.bg|67108863&this._workColors.fg)),this._workColors.bg=null!=a?a:this._workColors.bg,this._workColors.fg=null!=l?l:this._workColors.fg},e.prototype._isCellSelected=function(t,e){return!!this._model.selection.hasSelection&&(e-=this._terminal.buffer.active.viewportY,this._model.selection.columnSelectMode?t>=this._model.selection.startCol&&e>=this._model.selection.viewportCappedStartRow&&t<this._model.selection.endCol&&e<this._model.selection.viewportCappedEndRow:e>this._model.selection.viewportStartRow&&e<this._model.selection.viewportEndRow||this._model.selection.viewportStartRow===this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportEndRow&&t<this._model.selection.endCol||this._model.selection.viewportStartRow<this._model.selection.viewportEndRow&&e===this._model.selection.viewportStartRow&&t>=this._model.selection.startCol)},e.prototype._updateSelectionModel=function(t,e,r){void 0===r&&(r=!1);var i=this._terminal;if(t&&e&&(t[0]!==e[0]||t[1]!==e[1])){var o=t[1]-i.buffer.active.viewportY,n=e[1]-i.buffer.active.viewportY,s=Math.max(o,0),a=Math.min(n,i.rows-1);s>=i.rows||a<0?this._model.clearSelection():(this._model.selection.hasSelection=!0,this._model.selection.columnSelectMode=r,this._model.selection.viewportStartRow=o,this._model.selection.viewportEndRow=n,this._model.selection.viewportCappedStartRow=s,this._model.selection.viewportCappedEndRow=a,this._model.selection.startCol=t[0],this._model.selection.endCol=e[0])}else this._model.clearSelection()},e.prototype._updateDimensions=function(){this._core._charSizeService.width&&this._core._charSizeService.height&&(this.dimensions.scaledCharWidth=Math.floor(this._core._charSizeService.width*this._devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._core._charSizeService.height*this._devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._terminal.options.lineHeight),this.dimensions.scaledCharTop=1===this._terminal.options.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._terminal.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._terminal.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._terminal.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._terminal.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/this._devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/this._devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.scaledCellHeight/this._devicePixelRatio,this.dimensions.actualCellWidth=this.dimensions.scaledCellWidth/this._devicePixelRatio)},e.prototype._requestRedrawViewport=function(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})},e}(_.Disposable);e.WebglRenderer=C;var y=function(t){function e(e,r,i){var o=t.call(this)||this;return o.content=0,o.combinedData="",o.fg=e.fg,o.bg=e.bg,o.combinedData=r,o._width=i,o}return o(e,t),e.prototype.isCombined=function(){return 2097152},e.prototype.getWidth=function(){return this._width},e.prototype.getChars=function(){return this.combinedData},e.prototype.getCode=function(){return 2097151},e.prototype.setFromCharData=function(t){throw new Error("not implemented")},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(v.AttributeData);e.JoinedCellData=y},381:(t,e)=>{function r(t,e,r){var o=i(t.createShader(e));if(t.shaderSource(o,r),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS))return o;console.error(t.getShaderInfoLog(o)),t.deleteShader(o)}function i(t){if(!t)throw new Error("value must not be falsy");return t}Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfFalsy=e.expandFloat32Array=e.createShader=e.createProgram=e.PROJECTION_MATRIX=void 0,e.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),e.createProgram=function(t,e,o){var n=i(t.createProgram());if(t.attachShader(n,i(r(t,t.VERTEX_SHADER,e))),t.attachShader(n,i(r(t,t.FRAGMENT_SHADER,o))),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS))return n;console.error(t.getProgramInfoLog(n)),t.deleteProgram(n)},e.createShader=r,e.expandFloat32Array=function(t,e){for(var r=Math.min(2*t.length,e),i=new Float32Array(r),o=0;o<t.length;o++)i[o]=t[o];return i},e.throwIfFalsy=i},713:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.removeTerminalFromCache=e.acquireCharAtlas=void 0;var i=r(433),o=r(167),n=[];e.acquireCharAtlas=function(t,e,r,s,a,l){for(var h=(0,i.generateConfig)(r,s,a,l,t,e),c=0;c<n.length;c++){var u=(_=n[c]).ownedBy.indexOf(t);if(u>=0){if((0,i.configEquals)(_.config,h))return _.atlas;1===_.ownedBy.length?(_.atlas.dispose(),n.splice(c,1)):_.ownedBy.splice(u,1);break}}for(c=0;c<n.length;c++){var _=n[c];if((0,i.configEquals)(_.config,h))return _.ownedBy.push(t),_.atlas}var d={atlas:new o.WebglCharAtlas(document,h),config:h,ownedBy:[t]};return n.push(d),d.atlas},e.removeTerminalFromCache=function(t){for(var e=0;e<n.length;e++){var r=n[e].ownedBy.indexOf(t);if(-1!==r){1===n[e].ownedBy.length?(n[e].atlas.dispose(),n.splice(e,1)):n[e].ownedBy.splice(r,1);break}}}},433:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.is256Color=e.configEquals=e.generateConfig=void 0;var r={css:"",rgba:0};e.generateConfig=function(t,e,i,o,n,s){var a={foreground:s.foreground,background:s.background,cursor:r,cursorAccent:r,selectionTransparent:r,selectionOpaque:r,selectionForeground:r,ansi:s.ansi.slice(),contrastCache:s.contrastCache};return{customGlyphs:n.options.customGlyphs,devicePixelRatio:window.devicePixelRatio,letterSpacing:n.options.letterSpacing,lineHeight:n.options.lineHeight,scaledCellWidth:t,scaledCellHeight:e,scaledCharWidth:i,scaledCharHeight:o,fontFamily:n.options.fontFamily,fontSize:n.options.fontSize,fontWeight:n.options.fontWeight,fontWeightBold:n.options.fontWeightBold,allowTransparency:n.options.allowTransparency,drawBoldTextInBrightColors:n.options.drawBoldTextInBrightColors,minimumContrastRatio:n.options.minimumContrastRatio,colors:a}},e.configEquals=function(t,e){for(var r=0;r<t.colors.ansi.length;r++)if(t.colors.ansi[r].rgba!==e.colors.ansi[r].rgba)return!1;return t.devicePixelRatio===e.devicePixelRatio&&t.customGlyphs===e.customGlyphs&&t.lineHeight===e.lineHeight&&t.letterSpacing===e.letterSpacing&&t.fontFamily===e.fontFamily&&t.fontSize===e.fontSize&&t.fontWeight===e.fontWeight&&t.fontWeightBold===e.fontWeightBold&&t.allowTransparency===e.allowTransparency&&t.scaledCharWidth===e.scaledCharWidth&&t.scaledCharHeight===e.scaledCharHeight&&t.drawBoldTextInBrightColors===e.drawBoldTextInBrightColors&&t.minimumContrastRatio===e.minimumContrastRatio&&t.colors.foreground===e.colors.foreground&&t.colors.background===e.colors.background},e.is256Color=function(t){return 16777216==(50331648&t)||33554432==(50331648&t)}},167:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebglCharAtlas=void 0;var i=r(499),o=r(855),n=r(381),s=r(147),a=r(160),l=r(14),h=r(634),c=1024,u=1024,_=Math.floor(819.2),d={css:"rgba(0, 0, 0, 0)",rgba:0},f={offset:{x:0,y:0},texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}},p=function(){function t(t,e){this._config=e,this._didWarmUp=!1,this._cacheMap={},this._cacheMapCombined={},this._currentRowY=0,this._currentRowX=0,this._currentRowHeight=0,this.hasCanvasChanged=!1,this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new s.AttributeData,this.cacheCanvas=t.createElement("canvas"),this.cacheCanvas.width=c,this.cacheCanvas.height=u,this._cacheCtx=(0,n.throwIfFalsy)(this.cacheCanvas.getContext("2d",{alpha:!0})),this._tmpCanvas=t.createElement("canvas"),this._tmpCanvas.width=4*this._config.scaledCellWidth+4,this._tmpCanvas.height=this._config.scaledCellHeight+4,this._tmpCtx=(0,n.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency}))}return t.prototype.dispose=function(){this.cacheCanvas.parentElement&&this.cacheCanvas.parentElement.removeChild(this.cacheCanvas)},t.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},t.prototype._doWarmUp=function(){for(var t,e,r=33;r<126;r++){var i=this._drawToCache(r,o.DEFAULT_COLOR,o.DEFAULT_COLOR);this._cacheMap[r]=((t={})[o.DEFAULT_COLOR]=((e={})[o.DEFAULT_COLOR]=i,e),t)}},t.prototype.beginFrame=function(){return this._currentRowY>_&&(this.clearTexture(),this.warmUp(),!0)},t.prototype.clearTexture=function(){0===this._currentRowX&&0===this._currentRowY||(this._cacheCtx.clearRect(0,0,c,u),this._cacheMap={},this._cacheMapCombined={},this._currentRowHeight=0,this._currentRowX=0,this._currentRowY=0,this._didWarmUp=!1)},t.prototype.getRasterizedGlyphCombinedChar=function(t,e,r){var i,o=this._cacheMapCombined[t];o||(o={},this._cacheMapCombined[t]=o);var n=o[e];return n&&(i=n[r]),i||(i=this._drawToCache(t,e,r),o[e]||(o[e]={}),o[e][r]=i),i},t.prototype.getRasterizedGlyph=function(t,e,r){var i,o=this._cacheMap[t];o||(o={},this._cacheMap[t]=o);var n=o[e];return n&&(i=n[r]),i||(i=this._drawToCache(t,e,r),o[e]||(o[e]={}),o[e][r]=i),i},t.prototype._getColorFromAnsiIndex=function(t){if(t>=this._config.colors.ansi.length)throw new Error("No color found for idx "+t);return this._config.colors.ansi[t]},t.prototype._getBackgroundColor=function(t,e,r){if(this._config.allowTransparency)return d;switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(e);case 50331648:var i=s.AttributeData.toColorRGB(e);return{rgba:e<<8,css:"#"+v(i[0])+v(i[1])+v(i[2])};default:return r?this._config.colors.foreground:this._config.colors.background}},t.prototype._getForegroundCss=function(t,e,r,i,o,n,l,h,c){var u=this._getMinimumContrastCss(t,e,r,i,o,n,l,h,c);if(u)return u;switch(o){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&h&&n<8&&(n+=8),this._getColorFromAnsiIndex(n).css;case 50331648:var _=s.AttributeData.toColorRGB(n);return a.channels.toCss(_[0],_[1],_[2]);default:if(l){var d=this._config.colors.background.css;return 9===d.length?d.slice(0,7):d}return this._config.colors.foreground.css}},t.prototype._resolveBackgroundRgba=function(t,e,r){switch(t){case 16777216:case 33554432:return this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return r?this._config.colors.foreground.rgba:this._config.colors.background.rgba}},t.prototype._resolveForegroundRgba=function(t,e,r,i){switch(t){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&i&&e<8&&(e+=8),this._getColorFromAnsiIndex(e).rgba;case 50331648:return e<<8;default:return r?this._config.colors.background.rgba:this._config.colors.foreground.rgba}},t.prototype._getMinimumContrastCss=function(t,e,r,i,o,n,s,l,h){if(1!==this._config.minimumContrastRatio&&!h){var c=this._config.colors.contrastCache.getCss(t,i);if(void 0!==c)return c||void 0;var u=this._resolveBackgroundRgba(e,r,s),_=this._resolveForegroundRgba(o,n,s,l),d=a.rgba.ensureContrastRatio(u,_,this._config.minimumContrastRatio);if(d){var f=a.channels.toCss(d>>24&255,d>>16&255,d>>8&255);return this._config.colors.contrastCache.setCss(t,i,f),f}this._config.colors.contrastCache.setCss(t,i,null)}},t.prototype._drawToCache=function(t,e,r){var o="number"==typeof t?String.fromCharCode(t):t;this.hasCanvasChanged=!0;var n=this._config.scaledCharWidth*Math.max(o.length,2)+4;if(this._tmpCanvas.width<n&&(this._tmpCanvas.width=n),this._tmpCtx.save(),this._workAttributeData.fg=r,this._workAttributeData.bg=e,this._workAttributeData.isInvisible())return f;var s=!!this._workAttributeData.isBold(),a=!!this._workAttributeData.isInverse(),_=!!this._workAttributeData.isDim(),d=!!this._workAttributeData.isItalic(),p=!!this._workAttributeData.isUnderline(),v=!!this._workAttributeData.isStrikethrough(),C=this._workAttributeData.getFgColor(),y=this._workAttributeData.getFgColorMode(),m=this._workAttributeData.getBgColor(),L=this._workAttributeData.getBgColorMode();if(a){var w=C;C=m,m=w;var b=y;y=L,L=b}var x=this._getBackgroundColor(L,m,a);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=x.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";var M=s?this._config.fontWeightBold:this._config.fontWeight,R=d?"italic":"";this._tmpCtx.font=R+" "+M+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=i.TEXT_BASELINE;var A=1===o.length&&(0,h.isPowerlineGlyph)(o.charCodeAt(0));this._tmpCtx.fillStyle=this._getForegroundCss(e,L,m,r,y,C,a,s,A),_&&(this._tmpCtx.globalAlpha=i.DIM_OPACITY);var E=A?0:2,T=!1;if(!1!==this._config.customGlyphs&&(T=(0,l.tryDrawCustomChar)(this._tmpCtx,o,E,E,this._config.scaledCellWidth,this._config.scaledCellHeight)),T||this._tmpCtx.fillText(o,E,E+this._config.scaledCharHeight),"_"===o&&!this._config.allowTransparency){var D=g(this._tmpCtx.getImageData(E,E,this._config.scaledCellWidth,this._config.scaledCellHeight),x);if(D)for(var S=1;S<=5&&(this._tmpCtx.clearRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.fillText(o,E,E+this._config.scaledCharHeight-S),D=g(this._tmpCtx.getImageData(E,E,this._config.scaledCellWidth,this._config.scaledCellHeight),x));S++);}if(p||v){var F=Math.max(1,Math.floor(this._config.fontSize/10)),B=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=F,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),p&&(this._tmpCtx.moveTo(E,E+this._config.scaledCharHeight-B),this._tmpCtx.lineTo(E+this._config.scaledCharWidth,E+this._config.scaledCharHeight-B)),v&&(this._tmpCtx.moveTo(E,E+Math.floor(this._config.scaledCharHeight/2)-B),this._tmpCtx.lineTo(E+this._config.scaledCharWidth,E+Math.floor(this._config.scaledCharHeight/2)-B)),this._tmpCtx.stroke(),this._tmpCtx.closePath()}this._tmpCtx.restore();var I=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);if(g(I,x))return f;var k=this._findGlyphBoundingBox(I,this._workBoundingBox,n,A,T),O=this._clipImageData(I,this._workBoundingBox);return this._currentRowX+k.size.x>c&&(this._currentRowX=0,this._currentRowY+=this._currentRowHeight,this._currentRowHeight=0),k.texturePosition.x=this._currentRowX,k.texturePosition.y=this._currentRowY,k.texturePositionClipSpace.x=this._currentRowX/c,k.texturePositionClipSpace.y=this._currentRowY/u,this._currentRowHeight=Math.max(this._currentRowHeight,k.size.y),this._currentRowX+=k.size.x,this._cacheCtx.putImageData(O,k.texturePosition.x,k.texturePosition.y),k},t.prototype._findGlyphBoundingBox=function(t,e,r,i,o){e.top=0;for(var n=i?this._config.scaledCharHeight:this._tmpCanvas.height,s=i?this._config.scaledCharWidth:r,a=!1,l=0;l<n;l++){for(var h=0;h<s;h++){var _=l*this._tmpCanvas.width*4+4*h+3;if(0!==t.data[_]){e.top=l,a=!0;break}}if(a)break}for(e.left=0,a=!1,h=0;h<s;h++){for(l=0;l<n;l++)if(_=l*this._tmpCanvas.width*4+4*h+3,0!==t.data[_]){e.left=h,a=!0;break}if(a)break}for(e.right=s,a=!1,h=s-1;h>=0;h--){for(l=0;l<n;l++)if(_=l*this._tmpCanvas.width*4+4*h+3,0!==t.data[_]){e.right=h,a=!0;break}if(a)break}for(e.bottom=n,a=!1,l=n-1;l>=0;l--){for(h=0;h<s;h++)if(_=l*this._tmpCanvas.width*4+4*h+3,0!==t.data[_]){e.bottom=l,a=!0;break}if(a)break}return{texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:e.right-e.left+1,y:e.bottom-e.top+1},sizeClipSpace:{x:(e.right-e.left+1)/c,y:(e.bottom-e.top+1)/u},offset:{x:-e.left+(i?0:2)+(o?Math.floor(this._config.letterSpacing/2):0),y:-e.top+(i?0:2)+(o?1===this._config.lineHeight?0:Math.round((this._config.scaledCellHeight-this._config.scaledCharHeight)/2):0)}}},t.prototype._clipImageData=function(t,e){for(var r=e.right-e.left+1,i=e.bottom-e.top+1,o=new Uint8ClampedArray(r*i*4),n=e.top;n<=e.bottom;n++)for(var s=e.left;s<=e.right;s++){var a=n*this._tmpCanvas.width*4+4*s,l=(n-e.top)*r*4+4*(s-e.left);o[l]=t.data[a],o[l+1]=t.data[a+1],o[l+2]=t.data[a+2],o[l+3]=t.data[a+3]}return new ImageData(o,r,i)},t}();function g(t,e){for(var r=!0,i=e.rgba>>>24,o=e.rgba>>>16&255,n=e.rgba>>>8&255,s=0;s<t.data.length;s+=4)t.data[s]===i&&t.data[s+1]===o&&t.data[s+2]===n?t.data[s+3]=0:r=!1;return r}function v(t){var e=t.toString(16);return e.length<2?"0"+e:e}e.WebglCharAtlas=p},592:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BaseRenderLayer=void 0;var i=r(713),o=r(499),n=r(381),s=function(){function t(t,e,r,i,o){this._container=t,this._alpha=i,this._colors=o,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+e+"-layer"),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return t.prototype.dispose=function(){this._container.removeChild(this._canvas),this._charAtlas&&this._charAtlas.dispose()},t.prototype._initCanvas=function(){this._ctx=(0,n.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},t.prototype.onOptionsChanged=function(t){},t.prototype.onBlur=function(t){},t.prototype.onFocus=function(t){},t.prototype.onCursorMove=function(t){},t.prototype.onGridChanged=function(t,e,r){},t.prototype.onSelectionChanged=function(t,e,r,i){void 0===i&&(i=!1)},t.prototype.setColors=function(t,e){this._refreshCharAtlas(t,e)},t.prototype._setTransparency=function(t,e){if(e!==this._alpha){var r=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,r),this._refreshCharAtlas(t,this._colors),this.onGridChanged(t,0,t.rows-1)}},t.prototype._refreshCharAtlas=function(t,e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,i.acquireCharAtlas)(t,e,this._scaledCellWidth,this._scaledCellHeight,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},t.prototype.resize=function(t,e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(t,this._colors)},t.prototype._fillCells=function(t,e,r,i){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight)},t.prototype._fillBottomLineAtCells=function(t,e,r){void 0===r&&(r=1),this._ctx.fillRect(t*this._scaledCellWidth,(e+1)*this._scaledCellHeight-window.devicePixelRatio-1,r*this._scaledCellWidth,window.devicePixelRatio)},t.prototype._fillLeftLineAtCell=function(t,e,r){this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,window.devicePixelRatio*r,this._scaledCellHeight)},t.prototype._strokeRectAtCell=function(t,e,r,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(t*this._scaledCellWidth+window.devicePixelRatio/2,e*this._scaledCellHeight+window.devicePixelRatio/2,r*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},t.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},t.prototype._clearCells=function(t,e,r,i){this._alpha?this._ctx.clearRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(t*this._scaledCellWidth,e*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight))},t.prototype._fillCharTrueColor=function(t,e,r,i){this._ctx.font=this._getFont(t,!1,!1),this._ctx.textBaseline=o.TEXT_BASELINE,this._clipRow(t,i),this._ctx.fillText(e.getChars(),r*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},t.prototype._clipRow=function(t,e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,t.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},t.prototype._getFont=function(t,e,r){return(r?"italic":"")+" "+(e?t.options.fontWeightBold:t.options.fontWeight)+" "+t.options.fontSize*window.devicePixelRatio+"px "+t.options.fontFamily},t}();e.BaseRenderLayer=s},461:function(t,e,r){var i,o=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRenderLayer=void 0;var n=r(592),s=r(782),a=600,l=function(t){function e(e,r,i,o,n,a){var l=t.call(this,r,"cursor",i,!0,o)||this;return l._terminal=n,l._onRequestRefreshRowsEvent=a,l._cell=new s.CellData,l._state={x:0,y:0,isFocused:!1,style:"",width:0},l._cursorRenderers={bar:l._renderBarCursor.bind(l),block:l._renderBlockCursor.bind(l),underline:l._renderUnderlineCursor.bind(l)},l.onOptionsChanged(e),l}return o(e,t),e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},e.prototype.reset=function(t){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t),this.onOptionsChanged(t)},e.prototype.onBlur=function(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})},e.prototype.onFocus=function(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(t),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})},e.prototype.onOptionsChanged=function(t){var e,r=this;t.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new h(t,(function(){r._render(t,!0)}))):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:t.buffer.active.cursorY,end:t.buffer.active.cursorY})},e.prototype.onCursorMove=function(t){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(t)},e.prototype.onGridChanged=function(t,e,r){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(t,!1):this._cursorBlinkStateManager.restartBlinkAnimation(t)},e.prototype._render=function(t,e){if(this._terminal.coreService.isCursorInitialized&&!this._terminal.coreService.isCursorHidden){var r=t.buffer.active.baseY+t.buffer.active.cursorY,i=r-t.buffer.active.viewportY,o=Math.min(t.buffer.active.cursorX,t.cols-1);if(i<0||i>=t.rows)this._clearCursor();else if(t._core.buffer.lines.get(r).loadCell(o,this._cell),void 0!==this._cell.content){if(!c(t)){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var n=t.options.cursorStyle;return n&&"block"!==n?this._cursorRenderers[n](t,o,i,this._cell):this._renderBlurCursor(t,o,i,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=i,this._state.isFocused=!1,this._state.style=n,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===o&&this._state.y===i&&this._state.isFocused===c(t)&&this._state.style===t.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[t.options.cursorStyle||"block"](t,o,i,this._cell),this._ctx.restore(),this._state.x=o,this._state.y=i,this._state.isFocused=!1,this._state.style=t.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},e.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},e.prototype._renderBarCursor=function(t,e,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,r,t.options.cursorWidth),this._ctx.restore()},e.prototype._renderBlockCursor=function(t,e,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,r,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(t,i,e,r),this._ctx.restore()},e.prototype._renderUnderlineCursor=function(t,e,r,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,r),this._ctx.restore()},e.prototype._renderBlurCursor=function(t,e,r,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,r,i.getWidth(),1),this._ctx.restore()},e}(n.BaseRenderLayer);e.CursorRenderLayer=l;var h=function(){function t(t,e){this._renderCallback=e,this.isCursorVisible=!0,c(t)&&this._restartInterval()}return Object.defineProperty(t.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},t.prototype.restartBlinkAnimation=function(t){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))))},t.prototype._restartInterval=function(t){var e=this;void 0===t&&(t=a),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout((function(){if(e._animationTimeRestarted){var t=a-(Date.now()-e._animationTimeRestarted);if(e._animationTimeRestarted=void 0,t>0)return void e._restartInterval(t)}e.isCursorVisible=!1,e._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0})),e._blinkInterval=window.setInterval((function(){if(e._animationTimeRestarted){var t=a-(Date.now()-e._animationTimeRestarted);return e._animationTimeRestarted=void 0,void e._restartInterval(t)}e.isCursorVisible=!e.isCursorVisible,e._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))}),a)}),t)},t.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},t.prototype.resume=function(t){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation(t)},t}();function c(t){return document.activeElement===t.textarea&&document.hasFocus()}},733:function(t,e,r){var i,o=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.LinkRenderLayer=void 0;var n=r(592),s=r(499),a=r(433),l=function(t){function e(e,r,i,o){var n=t.call(this,e,"link",r,!0,i)||this;return o.linkifier.onShowLinkUnderline((function(t){return n._onShowLinkUnderline(t)})),o.linkifier.onHideLinkUnderline((function(t){return n._onHideLinkUnderline(t)})),o.linkifier2.onShowLinkUnderline((function(t){return n._onShowLinkUnderline(t)})),o.linkifier2.onHideLinkUnderline((function(t){return n._onHideLinkUnderline(t)})),n}return o(e,t),e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this._state=void 0},e.prototype.reset=function(t){this._clearCurrentLink()},e.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var t=this._state.y2-this._state.y1-1;t>0&&this._clearCells(0,this._state.y1+1,this._state.cols,t),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},e.prototype._onShowLinkUnderline=function(t){if(t.fg===s.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:void 0!==t.fg&&(0,a.is256Color)(t.fg)?this._ctx.fillStyle=this._colors.ansi[t.fg].css:this._ctx.fillStyle=this._colors.foreground.css,t.y1===t.y2)this._fillBottomLineAtCells(t.x1,t.y1,t.x2-t.x1);else{this._fillBottomLineAtCells(t.x1,t.y1,t.cols-t.x1);for(var e=t.y1+1;e<t.y2;e++)this._fillBottomLineAtCells(0,e,t.cols);this._fillBottomLineAtCells(0,t.y2,t.x2)}this._state=t},e.prototype._onHideLinkUnderline=function(t){this._clearCurrentLink()},e}(n.BaseRenderLayer);e.LinkRenderLayer=l},820:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addDisposableDomListener=void 0,e.addDisposableDomListener=function(t,e,r,i){t.addEventListener(e,r,i);var o=!1;return{dispose:function(){o||(o=!0,t.removeEventListener(e,r,i))}}}},14:function(t,e,r){var i,o,n,s,a,l,h,c,u,_,d,f,p,g,v,C,y,m,L,w,b,x,M,R,A,E,T,D,S,F,B,I,k,O,P,H,W,U,N,G,j,z,Y,X,V,q,J,K,Q,Z,$,tt,et,rt,it,ot,nt,st,at,lt,ht,ct,ut,_t,dt,ft,pt,gt,vt,Ct,yt,mt,Lt,wt,bt,xt,Mt,Rt,At,Et,Tt,Dt,St,Ft,Bt,It,kt,Ot,Pt,Ht,Wt,Ut,Nt,Gt,jt,zt,Yt,Xt,Vt,qt,Jt,Kt,Qt,Zt,$t,te,ee,re,ie,oe,ne,se,ae,le,he,ce,ue,_e,de,fe,pe,ge,ve,Ce,ye,me,Le,we,be=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,o,n=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},xe=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.tryDrawCustomChar=e.boxDrawingDefinitions=e.blockElementDefinitions=void 0;var Me=r(634);e.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var Re={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};e.boxDrawingDefinitions={"─":(i={},i[1]="M0,.5 L1,.5",i),"━":(o={},o[3]="M0,.5 L1,.5",o),"│":(n={},n[1]="M.5,0 L.5,1",n),"┃":(s={},s[3]="M.5,0 L.5,1",s),"┌":(a={},a[1]="M0.5,1 L.5,.5 L1,.5",a),"┏":(l={},l[3]="M0.5,1 L.5,.5 L1,.5",l),"┐":(h={},h[1]="M0,.5 L.5,.5 L.5,1",h),"┓":(c={},c[3]="M0,.5 L.5,.5 L.5,1",c),"└":(u={},u[1]="M.5,0 L.5,.5 L1,.5",u),"┗":(_={},_[3]="M.5,0 L.5,.5 L1,.5",_),"┘":(d={},d[1]="M.5,0 L.5,.5 L0,.5",d),"┛":(f={},f[3]="M.5,0 L.5,.5 L0,.5",f),"├":(p={},p[1]="M.5,0 L.5,1 M.5,.5 L1,.5",p),"┣":(g={},g[3]="M.5,0 L.5,1 M.5,.5 L1,.5",g),"┤":(v={},v[1]="M.5,0 L.5,1 M.5,.5 L0,.5",v),"┫":(C={},C[3]="M.5,0 L.5,1 M.5,.5 L0,.5",C),"┬":(y={},y[1]="M0,.5 L1,.5 M.5,.5 L.5,1",y),"┳":(m={},m[3]="M0,.5 L1,.5 M.5,.5 L.5,1",m),"┴":(L={},L[1]="M0,.5 L1,.5 M.5,.5 L.5,0",L),"┻":(w={},w[3]="M0,.5 L1,.5 M.5,.5 L.5,0",w),"┼":(b={},b[1]="M0,.5 L1,.5 M.5,0 L.5,1",b),"╋":(x={},x[3]="M0,.5 L1,.5 M.5,0 L.5,1",x),"╴":(M={},M[1]="M.5,.5 L0,.5",M),"╸":(R={},R[3]="M.5,.5 L0,.5",R),"╵":(A={},A[1]="M.5,.5 L.5,0",A),"╹":(E={},E[3]="M.5,.5 L.5,0",E),"╶":(T={},T[1]="M.5,.5 L1,.5",T),"╺":(D={},D[3]="M.5,.5 L1,.5",D),"╷":(S={},S[1]="M.5,.5 L.5,1",S),"╻":(F={},F[3]="M.5,.5 L.5,1",F),"═":(B={},B[1]=function(t,e){return"M0,"+(.5-e)+" L1,"+(.5-e)+" M0,"+(.5+e)+" L1,"+(.5+e)},B),"║":(I={},I[1]=function(t,e){return"M"+(.5-t)+",0 L"+(.5-t)+",1 M"+(.5+t)+",0 L"+(.5+t)+",1"},I),"╒":(k={},k[1]=function(t,e){return"M.5,1 L.5,"+(.5-e)+" L1,"+(.5-e)+" M.5,"+(.5+e)+" L1,"+(.5+e)},k),"╓":(O={},O[1]=function(t,e){return"M"+(.5-t)+",1 L"+(.5-t)+",.5 L1,.5 M"+(.5+t)+",.5 L"+(.5+t)+",1"},O),"╔":(P={},P[1]=function(t,e){return"M1,"+(.5-e)+" L"+(.5-t)+","+(.5-e)+" L"+(.5-t)+",1 M1,"+(.5+e)+" L"+(.5+t)+","+(.5+e)+" L"+(.5+t)+",1"},P),"╕":(H={},H[1]=function(t,e){return"M0,"+(.5-e)+" L.5,"+(.5-e)+" L.5,1 M0,"+(.5+e)+" L.5,"+(.5+e)},H),"╖":(W={},W[1]=function(t,e){return"M"+(.5+t)+",1 L"+(.5+t)+",.5 L0,.5 M"+(.5-t)+",.5 L"+(.5-t)+",1"},W),"╗":(U={},U[1]=function(t,e){return"M0,"+(.5+e)+" L"+(.5-t)+","+(.5+e)+" L"+(.5-t)+",1 M0,"+(.5-e)+" L"+(.5+t)+","+(.5-e)+" L"+(.5+t)+",1"},U),"╘":(N={},N[1]=function(t,e){return"M.5,0 L.5,"+(.5+e)+" L1,"+(.5+e)+" M.5,"+(.5-e)+" L1,"+(.5-e)},N),"╙":(G={},G[1]=function(t,e){return"M1,.5 L"+(.5-t)+",.5 L"+(.5-t)+",0 M"+(.5+t)+",.5 L"+(.5+t)+",0"},G),"╚":(j={},j[1]=function(t,e){return"M1,"+(.5-e)+" L"+(.5+t)+","+(.5-e)+" L"+(.5+t)+",0 M1,"+(.5+e)+" L"+(.5-t)+","+(.5+e)+" L"+(.5-t)+",0"},j),"╛":(z={},z[1]=function(t,e){return"M0,"+(.5+e)+" L.5,"+(.5+e)+" L.5,0 M0,"+(.5-e)+" L.5,"+(.5-e)},z),"╜":(Y={},Y[1]=function(t,e){return"M0,.5 L"+(.5+t)+",.5 L"+(.5+t)+",0 M"+(.5-t)+",.5 L"+(.5-t)+",0"},Y),"╝":(X={},X[1]=function(t,e){return"M0,"+(.5-e)+" L"+(.5-t)+","+(.5-e)+" L"+(.5-t)+",0 M0,"+(.5+e)+" L"+(.5+t)+","+(.5+e)+" L"+(.5+t)+",0"},X),"╞":(V={},V[1]=function(t,e){return"M.5,0 L.5,1 M.5,"+(.5-e)+" L1,"+(.5-e)+" M.5,"+(.5+e)+" L1,"+(.5+e)},V),"╟":(q={},q[1]=function(t,e){return"M"+(.5-t)+",0 L"+(.5-t)+",1 M"+(.5+t)+",0 L"+(.5+t)+",1 M"+(.5+t)+",.5 L1,.5"},q),"╠":(J={},J[1]=function(t,e){return"M"+(.5-t)+",0 L"+(.5-t)+",1 M1,"+(.5+e)+" L"+(.5+t)+","+(.5+e)+" L"+(.5+t)+",1 M1,"+(.5-e)+" L"+(.5+t)+","+(.5-e)+" L"+(.5+t)+",0"},J),"╡":(K={},K[1]=function(t,e){return"M.5,0 L.5,1 M0,"+(.5-e)+" L.5,"+(.5-e)+" M0,"+(.5+e)+" L.5,"+(.5+e)},K),"╢":(Q={},Q[1]=function(t,e){return"M0,.5 L"+(.5-t)+",.5 M"+(.5-t)+",0 L"+(.5-t)+",1 M"+(.5+t)+",0 L"+(.5+t)+",1"},Q),"╣":(Z={},Z[1]=function(t,e){return"M"+(.5+t)+",0 L"+(.5+t)+",1 M0,"+(.5+e)+" L"+(.5-t)+","+(.5+e)+" L"+(.5-t)+",1 M0,"+(.5-e)+" L"+(.5-t)+","+(.5-e)+" L"+(.5-t)+",0"},Z),"╤":($={},$[1]=function(t,e){return"M0,"+(.5-e)+" L1,"+(.5-e)+" M0,"+(.5+e)+" L1,"+(.5+e)+" M.5,"+(.5+e)+" L.5,1"},$),"╥":(tt={},tt[1]=function(t,e){return"M0,.5 L1,.5 M"+(.5-t)+",.5 L"+(.5-t)+",1 M"+(.5+t)+",.5 L"+(.5+t)+",1"},tt),"╦":(et={},et[1]=function(t,e){return"M0,"+(.5-e)+" L1,"+(.5-e)+" M0,"+(.5+e)+" L"+(.5-t)+","+(.5+e)+" L"+(.5-t)+",1 M1,"+(.5+e)+" L"+(.5+t)+","+(.5+e)+" L"+(.5+t)+",1"},et),"╧":(rt={},rt[1]=function(t,e){return"M.5,0 L.5,"+(.5-e)+" M0,"+(.5-e)+" L1,"+(.5-e)+" M0,"+(.5+e)+" L1,"+(.5+e)},rt),"╨":(it={},it[1]=function(t,e){return"M0,.5 L1,.5 M"+(.5-t)+",.5 L"+(.5-t)+",0 M"+(.5+t)+",.5 L"+(.5+t)+",0"},it),"╩":(ot={},ot[1]=function(t,e){return"M0,"+(.5+e)+" L1,"+(.5+e)+" M0,"+(.5-e)+" L"+(.5-t)+","+(.5-e)+" L"+(.5-t)+",0 M1,"+(.5-e)+" L"+(.5+t)+","+(.5-e)+" L"+(.5+t)+",0"},ot),"╪":(nt={},nt[1]=function(t,e){return"M.5,0 L.5,1 M0,"+(.5-e)+" L1,"+(.5-e)+" M0,"+(.5+e)+" L1,"+(.5+e)},nt),"╫":(st={},st[1]=function(t,e){return"M0,.5 L1,.5 M"+(.5-t)+",0 L"+(.5-t)+",1 M"+(.5+t)+",0 L"+(.5+t)+",1"},st),"╬":(at={},at[1]=function(t,e){return"M0,"+(.5+e)+" L"+(.5-t)+","+(.5+e)+" L"+(.5-t)+",1 M1,"+(.5+e)+" L"+(.5+t)+","+(.5+e)+" L"+(.5+t)+",1 M0,"+(.5-e)+" L"+(.5-t)+","+(.5-e)+" L"+(.5-t)+",0 M1,"+(.5-e)+" L"+(.5+t)+","+(.5-e)+" L"+(.5+t)+",0"},at),"╱":(lt={},lt[1]="M1,0 L0,1",lt),"╲":(ht={},ht[1]="M0,0 L1,1",ht),"╳":(ct={},ct[1]="M1,0 L0,1 M0,0 L1,1",ct),"╼":(ut={},ut[1]="M.5,.5 L0,.5",ut[3]="M.5,.5 L1,.5",ut),"╽":(_t={},_t[1]="M.5,.5 L.5,0",_t[3]="M.5,.5 L.5,1",_t),"╾":(dt={},dt[1]="M.5,.5 L1,.5",dt[3]="M.5,.5 L0,.5",dt),"╿":(ft={},ft[1]="M.5,.5 L.5,1",ft[3]="M.5,.5 L.5,0",ft),"┍":(pt={},pt[1]="M.5,.5 L.5,1",pt[3]="M.5,.5 L1,.5",pt),"┎":(gt={},gt[1]="M.5,.5 L1,.5",gt[3]="M.5,.5 L.5,1",gt),"┑":(vt={},vt[1]="M.5,.5 L.5,1",vt[3]="M.5,.5 L0,.5",vt),"┒":(Ct={},Ct[1]="M.5,.5 L0,.5",Ct[3]="M.5,.5 L.5,1",Ct),"┕":(yt={},yt[1]="M.5,.5 L.5,0",yt[3]="M.5,.5 L1,.5",yt),"┖":(mt={},mt[1]="M.5,.5 L1,.5",mt[3]="M.5,.5 L.5,0",mt),"┙":(Lt={},Lt[1]="M.5,.5 L.5,0",Lt[3]="M.5,.5 L0,.5",Lt),"┚":(wt={},wt[1]="M.5,.5 L0,.5",wt[3]="M.5,.5 L.5,0",wt),"┝":(bt={},bt[1]="M.5,0 L.5,1",bt[3]="M.5,.5 L1,.5",bt),"┞":(xt={},xt[1]="M0.5,1 L.5,.5 L1,.5",xt[3]="M.5,.5 L.5,0",xt),"┟":(Mt={},Mt[1]="M.5,0 L.5,.5 L1,.5",Mt[3]="M.5,.5 L.5,1",Mt),"┠":(Rt={},Rt[1]="M.5,.5 L1,.5",Rt[3]="M.5,0 L.5,1",Rt),"┡":(At={},At[1]="M.5,.5 L.5,1",At[3]="M.5,0 L.5,.5 L1,.5",At),"┢":(Et={},Et[1]="M.5,.5 L.5,0",Et[3]="M0.5,1 L.5,.5 L1,.5",Et),"┥":(Tt={},Tt[1]="M.5,0 L.5,1",Tt[3]="M.5,.5 L0,.5",Tt),"┦":(Dt={},Dt[1]="M0,.5 L.5,.5 L.5,1",Dt[3]="M.5,.5 L.5,0",Dt),"┧":(St={},St[1]="M.5,0 L.5,.5 L0,.5",St[3]="M.5,.5 L.5,1",St),"┨":(Ft={},Ft[1]="M.5,.5 L0,.5",Ft[3]="M.5,0 L.5,1",Ft),"┩":(Bt={},Bt[1]="M.5,.5 L.5,1",Bt[3]="M.5,0 L.5,.5 L0,.5",Bt),"┪":(It={},It[1]="M.5,.5 L.5,0",It[3]="M0,.5 L.5,.5 L.5,1",It),"┭":(kt={},kt[1]="M0.5,1 L.5,.5 L1,.5",kt[3]="M.5,.5 L0,.5",kt),"┮":(Ot={},Ot[1]="M0,.5 L.5,.5 L.5,1",Ot[3]="M.5,.5 L1,.5",Ot),"┯":(Pt={},Pt[1]="M.5,.5 L.5,1",Pt[3]="M0,.5 L1,.5",Pt),"┰":(Ht={},Ht[1]="M0,.5 L1,.5",Ht[3]="M.5,.5 L.5,1",Ht),"┱":(Wt={},Wt[1]="M.5,.5 L1,.5",Wt[3]="M0,.5 L.5,.5 L.5,1",Wt),"┲":(Ut={},Ut[1]="M.5,.5 L0,.5",Ut[3]="M0.5,1 L.5,.5 L1,.5",Ut),"┵":(Nt={},Nt[1]="M.5,0 L.5,.5 L1,.5",Nt[3]="M.5,.5 L0,.5",Nt),"┶":(Gt={},Gt[1]="M.5,0 L.5,.5 L0,.5",Gt[3]="M.5,.5 L1,.5",Gt),"┷":(jt={},jt[1]="M.5,.5 L.5,0",jt[3]="M0,.5 L1,.5",jt),"┸":(zt={},zt[1]="M0,.5 L1,.5",zt[3]="M.5,.5 L.5,0",zt),"┹":(Yt={},Yt[1]="M.5,.5 L1,.5",Yt[3]="M.5,0 L.5,.5 L0,.5",Yt),"┺":(Xt={},Xt[1]="M.5,.5 L0,.5",Xt[3]="M.5,0 L.5,.5 L1,.5",Xt),"┽":(Vt={},Vt[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Vt[3]="M.5,.5 L0,.5",Vt),"┾":(qt={},qt[1]="M.5,0 L.5,1 M.5,.5 L0,.5",qt[3]="M.5,.5 L1,.5",qt),"┿":(Jt={},Jt[1]="M.5,0 L.5,1",Jt[3]="M0,.5 L1,.5",Jt),"╀":(Kt={},Kt[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Kt[3]="M.5,.5 L.5,0",Kt),"╁":(Qt={},Qt[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Qt[3]="M.5,.5 L.5,1",Qt),"╂":(Zt={},Zt[1]="M0,.5 L1,.5",Zt[3]="M.5,0 L.5,1",Zt),"╃":($t={},$t[1]="M0.5,1 L.5,.5 L1,.5",$t[3]="M.5,0 L.5,.5 L0,.5",$t),"╄":(te={},te[1]="M0,.5 L.5,.5 L.5,1",te[3]="M.5,0 L.5,.5 L1,.5",te),"╅":(ee={},ee[1]="M.5,0 L.5,.5 L1,.5",ee[3]="M0,.5 L.5,.5 L.5,1",ee),"╆":(re={},re[1]="M.5,0 L.5,.5 L0,.5",re[3]="M0.5,1 L.5,.5 L1,.5",re),"╇":(ie={},ie[1]="M.5,.5 L.5,1",ie[3]="M.5,.5 L.5,0 M0,.5 L1,.5",ie),"╈":(oe={},oe[1]="M.5,.5 L.5,0",oe[3]="M0,.5 L1,.5 M.5,.5 L.5,1",oe),"╉":(ne={},ne[1]="M.5,.5 L1,.5",ne[3]="M.5,0 L.5,1 M.5,.5 L0,.5",ne),"╊":(se={},se[1]="M.5,.5 L0,.5",se[3]="M.5,0 L.5,1 M.5,.5 L1,.5",se),"╌":(ae={},ae[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",ae),"╍":(le={},le[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",le),"┄":(he={},he[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",he),"┅":(ce={},ce[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",ce),"┈":(ue={},ue[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",ue),"┉":(_e={},_e[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",_e),"╎":(de={},de[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",de),"╏":(fe={},fe[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",fe),"┆":(pe={},pe[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",pe),"┇":(ge={},ge[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",ge),"┊":(ve={},ve[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",ve),"┋":(Ce={},Ce[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",Ce),"╭":(ye={},ye[1]="C.5,1,.5,.5,1,.5",ye),"╮":(me={},me[1]="C.5,1,.5,.5,0,.5",me),"╯":(Le={},Le[1]="C.5,0,.5,.5,0,.5",Le),"╰":(we={},we[1]="C.5,0,.5,.5,1,.5",we)},e.tryDrawCustomChar=function(t,r,i,o,n,s){var a=e.blockElementDefinitions[r];if(a)return function(t,e,r,i,o,n){for(var s=0;s<e.length;s++){var a=e[s],l=o/8,h=n/8;t.fillRect(r+a.x*l,i+a.y*h,a.w*l,a.h*h)}}(t,a,i,o,n,s),!0;var l=Re[r];if(l)return function(t,e,r,i,o,n){var s,a=Ae.get(e);a||(a=new Map,Ae.set(e,a));var l=t.fillStyle;if("string"!=typeof l)throw new Error('Unexpected fillStyle type "'+l+'"');var h=a.get(l);if(!h){var c=e[0].length,u=e.length,_=document.createElement("canvas");_.width=c,_.height=u;var d=(0,Me.throwIfFalsy)(_.getContext("2d")),f=new ImageData(c,u),p=void 0,g=void 0,v=void 0,C=void 0;if(l.startsWith("#"))p=parseInt(l.slice(1,3),16),g=parseInt(l.slice(3,5),16),v=parseInt(l.slice(5,7),16),C=l.length>7&&parseInt(l.slice(7,9),16)||1;else{if(!l.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+l+'" when drawing pattern glyph');p=(s=be(l.substring(5,l.length-1).split(",").map((function(t){return parseFloat(t)})),4))[0],g=s[1],v=s[2],C=s[3]}for(var y=0;y<u;y++)for(var m=0;m<c;m++)f.data[4*(y*c+m)]=p,f.data[4*(y*c+m)+1]=g,f.data[4*(y*c+m)+2]=v,f.data[4*(y*c+m)+3]=e[y][m]*(255*C);d.putImageData(f,0,0),h=(0,Me.throwIfFalsy)(t.createPattern(_,null)),a.set(l,h)}t.fillStyle=h,t.fillRect(r,i,o,n)}(t,l,i,o,n,s),!0;var h=e.boxDrawingDefinitions[r];return!!h&&(function(t,e,r,i,o,n){var s,a,l,h;t.strokeStyle=t.fillStyle;try{for(var c=xe(Object.entries(e)),u=c.next();!u.done;u=c.next()){var _=be(u.value,2),d=_[0],f=_[1];t.beginPath(),t.lineWidth=window.devicePixelRatio*Number.parseInt(d);var p=void 0;p="function"==typeof f?f(.15,.15/n*o):f;try{for(var g=(l=void 0,xe(p.split(" "))),v=g.next();!v.done;v=g.next()){var C=v.value,y=C[0],m=Te[y];if(m){var L=C.substring(1).split(",");L[0]&&L[1]&&m(t,De(L,o,n,r,i))}else console.error('Could not find drawing instructions for "'+y+'"')}}catch(t){l={error:t}}finally{try{v&&!v.done&&(h=g.return)&&h.call(g)}finally{if(l)throw l.error}}t.stroke(),t.closePath()}}catch(t){s={error:t}}finally{try{u&&!u.done&&(a=c.return)&&a.call(c)}finally{if(s)throw s.error}}}(t,h,i,o,n,s),!0)};var Ae=new Map;function Ee(t,e,r){return void 0===r&&(r=0),Math.max(Math.min(t,e),r)}var Te={C:function(t,e){return t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5])},L:function(t,e){return t.lineTo(e[0],e[1])},M:function(t,e){return t.moveTo(e[0],e[1])}};function De(t,e,r,i,o){var n=t.map((function(t){return parseFloat(t)||parseInt(t)}));if(n.length<2)throw new Error("Too few arguments for instruction");for(var s=0;s<n.length;s+=2)n[s]*=e,0!==n[s]&&(n[s]=Ee(Math.round(n[s]+.5)-.5,e,0)),n[s]+=i;for(var a=1;a<n.length;a+=2)n[a]*=r,0!==n[a]&&(n[a]=Ee(Math.round(n[a]+.5)-.5,r,0)),n[a]+=o;return n}},634:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isPowerlineGlyph=e.throwIfFalsy=void 0,e.throwIfFalsy=function(t){if(!t)throw new Error("value must not be falsy");return t},e.isPowerlineGlyph=function(t){return 57504<=t&&t<=57558}},499:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR_ATLAS_CELL_SPACING=e.TEXT_BASELINE=e.DIM_OPACITY=e.INVERTED_DEFAULT_COLOR=void 0;var i=r(399);e.INVERTED_DEFAULT_COLOR=257,e.DIM_OPACITY=.5,e.TEXT_BASELINE=i.isFirefox||i.isLegacyEdge?"bottom":"ideographic",e.CHAR_ATLAS_CELL_SPACING=1},160:function(t,e){var r,i,o,n,s=this&&this.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,o,n=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function a(t){var e=t.toString(16);return e.length<2?"0"+e:e}function l(t,e){return t<e?(e+.05)/(t+.05):(t+.05)/(e+.05)}Object.defineProperty(e,"__esModule",{value:!0}),e.contrastRatio=e.toPaddedHex=e.rgba=e.rgb=e.css=e.color=e.channels=void 0,function(t){t.toCss=function(t,e,r,i){return void 0!==i?"#"+a(t)+a(e)+a(r)+a(i):"#"+a(t)+a(e)+a(r)},t.toRgba=function(t,e,r,i){return void 0===i&&(i=255),(t<<24|e<<16|r<<8|i)>>>0}}(r=e.channels||(e.channels={})),(i=e.color||(e.color={})).blend=function(t,e){var i=(255&e.rgba)/255;if(1===i)return{css:e.css,rgba:e.rgba};var o=e.rgba>>24&255,n=e.rgba>>16&255,s=e.rgba>>8&255,a=t.rgba>>24&255,l=t.rgba>>16&255,h=t.rgba>>8&255,c=a+Math.round((o-a)*i),u=l+Math.round((n-l)*i),_=h+Math.round((s-h)*i);return{css:r.toCss(c,u,_),rgba:r.toRgba(c,u,_)}},i.isOpaque=function(t){return 255==(255&t.rgba)},i.ensureContrastRatio=function(t,e,r){var i=n.ensureContrastRatio(t.rgba,e.rgba,r);if(i)return n.toColor(i>>24&255,i>>16&255,i>>8&255)},i.opaque=function(t){var e=(255|t.rgba)>>>0,i=s(n.toChannels(e),3),o=i[0],a=i[1],l=i[2];return{css:r.toCss(o,a,l),rgba:e}},i.opacity=function(t,e){var i=Math.round(255*e),o=s(n.toChannels(t.rgba),3),a=o[0],l=o[1],h=o[2];return{css:r.toCss(a,l,h,i),rgba:r.toRgba(a,l,h,i)}},i.toColorRGB=function(t){return[t.rgba>>24&255,t.rgba>>16&255,t.rgba>>8&255]},(e.css||(e.css={})).toColor=function(t){switch(t.length){case 7:return{css:t,rgba:(parseInt(t.slice(1),16)<<8|255)>>>0};case 9:return{css:t,rgba:parseInt(t.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(t){function e(t,e,r){var i=t/255,o=e/255,n=r/255;return.2126*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.7152*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))}t.relativeLuminance=function(t){return e(t>>16&255,t>>8&255,255&t)},t.relativeLuminance2=e}(o=e.rgb||(e.rgb={})),function(t){function e(t,e,r){for(var i=t>>24&255,n=t>>16&255,s=t>>8&255,a=e>>24&255,h=e>>16&255,c=e>>8&255,u=l(o.relativeLuminance2(a,h,c),o.relativeLuminance2(i,n,s));u<r&&(a>0||h>0||c>0);)a-=Math.max(0,Math.ceil(.1*a)),h-=Math.max(0,Math.ceil(.1*h)),c-=Math.max(0,Math.ceil(.1*c)),u=l(o.relativeLuminance2(a,h,c),o.relativeLuminance2(i,n,s));return(a<<24|h<<16|c<<8|255)>>>0}function i(t,e,r){for(var i=t>>24&255,n=t>>16&255,s=t>>8&255,a=e>>24&255,h=e>>16&255,c=e>>8&255,u=l(o.relativeLuminance2(a,h,c),o.relativeLuminance2(i,n,s));u<r&&(a<255||h<255||c<255);)a=Math.min(255,a+Math.ceil(.1*(255-a))),h=Math.min(255,h+Math.ceil(.1*(255-h))),c=Math.min(255,c+Math.ceil(.1*(255-c))),u=l(o.relativeLuminance2(a,h,c),o.relativeLuminance2(i,n,s));return(a<<24|h<<16|c<<8|255)>>>0}t.ensureContrastRatio=function(t,r,n){var s=o.relativeLuminance(t>>8),a=o.relativeLuminance(r>>8);if(l(s,a)<n){if(a<s){var h=e(t,r,n),c=l(s,o.relativeLuminance(h>>8));if(c<n){var u=i(t,t,n);return c>l(s,o.relativeLuminance(u>>8))?h:u}return h}var _=i(t,r,n),d=l(s,o.relativeLuminance(_>>8));return d<n?(u=e(t,t,n),d>l(s,o.relativeLuminance(u>>8))?_:u):_}},t.reduceLuminance=e,t.increaseLuminance=i,t.toChannels=function(t){return[t>>24&255,t>>16&255,t>>8&255,255&t]},t.toColor=function(t,e,i){return{css:r.toCss(t,e,i),rgba:r.toRgba(t,e,i)}}}(n=e.rgba||(e.rgba={})),e.toPaddedHex=a,e.contrastRatio=l},345:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.forwardEvent=e.EventEmitter=void 0;var r=function(){function t(){this._listeners=[],this._disposed=!1}return Object.defineProperty(t.prototype,"event",{get:function(){var t=this;return this._event||(this._event=function(e){return t._listeners.push(e),{dispose:function(){if(!t._disposed)for(var r=0;r<t._listeners.length;r++)if(t._listeners[r]===e)return void t._listeners.splice(r,1)}}}),this._event},enumerable:!1,configurable:!0}),t.prototype.fire=function(t,e){for(var r=[],i=0;i<this._listeners.length;i++)r.push(this._listeners[i]);for(i=0;i<r.length;i++)r[i].call(void 0,t,e)},t.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},t}();e.EventEmitter=r,e.forwardEvent=function(t,e){return t((function(t){return e.fire(t)}))}},859:function(t,e){var r=this&&this.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(e,"__esModule",{value:!0}),e.getDisposeArrayDisposable=e.disposeArray=e.Disposable=void 0;var i=function(){function t(){this._disposables=[],this._isDisposed=!1}return t.prototype.dispose=function(){var t,e;this._isDisposed=!0;try{for(var i=r(this._disposables),o=i.next();!o.done;o=i.next())o.value.dispose()}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this._disposables.length=0},t.prototype.register=function(t){return this._disposables.push(t),t},t.prototype.unregister=function(t){var e=this._disposables.indexOf(t);-1!==e&&this._disposables.splice(e,1)},t}();function o(t){var e,i;try{for(var o=r(t),n=o.next();!n.done;n=o.next())n.value.dispose()}catch(t){e={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}t.length=0}e.Disposable=i,e.disposeArray=o,e.getDisposeArrayDisposable=function(t){return{dispose:function(){return o(t)}}}},399:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isLinux=e.isWindows=e.isIphone=e.isIpad=e.isMac=e.isSafari=e.isLegacyEdge=e.isFirefox=void 0;var r="undefined"==typeof navigator,i=r?"node":navigator.userAgent,o=r?"node":navigator.platform;e.isFirefox=i.includes("Firefox"),e.isLegacyEdge=i.includes("Edge"),e.isSafari=/^((?!chrome|android).)*safari/i.test(i),e.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(o),e.isIpad="iPad"===o,e.isIphone="iPhone"===o,e.isWindows=["Windows","Win16","Win32","WinCE"].includes(o),e.isLinux=o.indexOf("Linux")>=0},455:(t,e)=>{function r(t,e,r,i){if(void 0===r&&(r=0),void 0===i&&(i=t.length),r>=t.length)return t;r=(t.length+r)%t.length,i=i>=t.length?t.length:(t.length+i)%t.length;for(var o=r;o<i;++o)t[o]=e;return t}Object.defineProperty(e,"__esModule",{value:!0}),e.concat=e.fillFallback=e.fill=void 0,e.fill=function(t,e,i,o){return t.fill?t.fill(e,i,o):r(t,e,i,o)},e.fillFallback=r,e.concat=function(t,e){var r=new t.constructor(t.length+e.length);return r.set(t),r.set(e,t.length),r}},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExtendedAttrs=e.AttributeData=void 0;var r=function(){function t(){this.fg=0,this.bg=0,this.extended=new i}return t.toColorRGB=function(t){return[t>>>16&255,t>>>8&255,255&t]},t.fromColorRGB=function(t){return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},t.prototype.clone=function(){var e=new t;return e.fg=this.fg,e.bg=this.bg,e.extended=this.extended.clone(),e},t.prototype.isInverse=function(){return 67108864&this.fg},t.prototype.isBold=function(){return 134217728&this.fg},t.prototype.isUnderline=function(){return 268435456&this.fg},t.prototype.isBlink=function(){return 536870912&this.fg},t.prototype.isInvisible=function(){return 1073741824&this.fg},t.prototype.isItalic=function(){return 67108864&this.bg},t.prototype.isDim=function(){return 134217728&this.bg},t.prototype.isStrikethrough=function(){return 2147483648&this.fg},t.prototype.getFgColorMode=function(){return 50331648&this.fg},t.prototype.getBgColorMode=function(){return 50331648&this.bg},t.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},t.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},t.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},t.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},t.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},t.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},t.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},t.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},t.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},t.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},t.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},t.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},t.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},t.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()},t.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()},t.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()},t.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},t}();e.AttributeData=r;var i=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=-1),this.underlineStyle=t,this.underlineColor=e}return t.prototype.clone=function(){return new t(this.underlineStyle,this.underlineColor)},t.prototype.isEmpty=function(){return 0===this.underlineStyle},t}();e.ExtendedAttrs=i},782:function(t,e,r){var i,o=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(e,"__esModule",{value:!0}),e.CellData=void 0;var n=r(133),s=r(855),a=r(147),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.content=0,e.fg=0,e.bg=0,e.extended=new a.ExtendedAttrs,e.combinedData="",e}return o(e,t),e.fromCharData=function(t){var r=new e;return r.setFromCharData(t),r},e.prototype.isCombined=function(){return 2097152&this.content},e.prototype.getWidth=function(){return this.content>>22},e.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,n.stringFromCodePoint)(2097151&this.content):""},e.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},e.prototype.setFromCharData=function(t){this.fg=t[s.CHAR_DATA_ATTR_INDEX],this.bg=0;var e=!1;if(t[s.CHAR_DATA_CHAR_INDEX].length>2)e=!0;else if(2===t[s.CHAR_DATA_CHAR_INDEX].length){var r=t[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var i=t[s.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=i&&i<=57343?this.content=1024*(r-55296)+i-56320+65536|t[s.CHAR_DATA_WIDTH_INDEX]<<22:e=!0}else e=!0}else this.content=t[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[s.CHAR_DATA_WIDTH_INDEX]<<22;e&&(this.combinedData=t[s.CHAR_DATA_CHAR_INDEX],this.content=2097152|t[s.CHAR_DATA_WIDTH_INDEX]<<22)},e.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},e}(a.AttributeData);e.CellData=l},855:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHITESPACE_CELL_CODE=e.WHITESPACE_CELL_WIDTH=e.WHITESPACE_CELL_CHAR=e.NULL_CELL_CODE=e.NULL_CELL_WIDTH=e.NULL_CELL_CHAR=e.CHAR_DATA_CODE_INDEX=e.CHAR_DATA_WIDTH_INDEX=e.CHAR_DATA_CHAR_INDEX=e.CHAR_DATA_ATTR_INDEX=e.DEFAULT_ATTR=e.DEFAULT_COLOR=void 0,e.DEFAULT_COLOR=256,e.DEFAULT_ATTR=256|e.DEFAULT_COLOR<<9,e.CHAR_DATA_ATTR_INDEX=0,e.CHAR_DATA_CHAR_INDEX=1,e.CHAR_DATA_WIDTH_INDEX=2,e.CHAR_DATA_CODE_INDEX=3,e.NULL_CELL_CHAR="",e.NULL_CELL_WIDTH=1,e.NULL_CELL_CODE=0,e.WHITESPACE_CELL_CHAR=" ",e.WHITESPACE_CELL_WIDTH=1,e.WHITESPACE_CELL_CODE=32},133:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Utf8ToUtf32=e.StringToUtf32=e.utf32ToString=e.stringFromCodePoint=void 0,e.stringFromCodePoint=function(t){return t>65535?(t-=65536,String.fromCharCode(55296+(t>>10))+String.fromCharCode(t%1024+56320)):String.fromCharCode(t)},e.utf32ToString=function(t,e,r){void 0===e&&(e=0),void 0===r&&(r=t.length);for(var i="",o=e;o<r;++o){var n=t[o];n>65535?(n-=65536,i+=String.fromCharCode(55296+(n>>10))+String.fromCharCode(n%1024+56320)):i+=String.fromCharCode(n)}return i};var r=function(){function t(){this._interim=0}return t.prototype.clear=function(){this._interim=0},t.prototype.decode=function(t,e){var r=t.length;if(!r)return 0;var i=0,o=0;this._interim&&(56320<=(a=t.charCodeAt(o++))&&a<=57343?e[i++]=1024*(this._interim-55296)+a-56320+65536:(e[i++]=this._interim,e[i++]=a),this._interim=0);for(var n=o;n<r;++n){var s=t.charCodeAt(n);if(55296<=s&&s<=56319){if(++n>=r)return this._interim=s,i;var a;56320<=(a=t.charCodeAt(n))&&a<=57343?e[i++]=1024*(s-55296)+a-56320+65536:(e[i++]=s,e[i++]=a)}else 65279!==s&&(e[i++]=s)}return i},t}();e.StringToUtf32=r;var i=function(){function t(){this.interim=new Uint8Array(3)}return t.prototype.clear=function(){this.interim.fill(0)},t.prototype.decode=function(t,e){var r=t.length;if(!r)return 0;var i,o,n,s,a=0,l=0,h=0;if(this.interim[0]){var c=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var _=0,d=void 0;(d=63&this.interim[++_])&&_<4;)u<<=6,u|=d;for(var f=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=f-_;h<p;){if(h>=r)return 0;if(128!=(192&(d=t[h++]))){h--,c=!0;break}this.interim[_++]=d,u<<=6,u|=63&d}c||(2===f?u<128?h--:e[a++]=u:3===f?u<2048||u>=55296&&u<=57343||65279===u||(e[a++]=u):u<65536||u>1114111||(e[a++]=u)),this.interim.fill(0)}for(var g=r-4,v=h;v<r;){for(;!(!(v<g)||128&(i=t[v])||128&(o=t[v+1])||128&(n=t[v+2])||128&(s=t[v+3]));)e[a++]=i,e[a++]=o,e[a++]=n,e[a++]=s,v+=4;if((i=t[v++])<128)e[a++]=i;else if(192==(224&i)){if(v>=r)return this.interim[0]=i,a;if(128!=(192&(o=t[v++]))){v--;continue}if((l=(31&i)<<6|63&o)<128){v--;continue}e[a++]=l}else if(224==(240&i)){if(v>=r)return this.interim[0]=i,a;if(128!=(192&(o=t[v++]))){v--;continue}if(v>=r)return this.interim[0]=i,this.interim[1]=o,a;if(128!=(192&(n=t[v++]))){v--;continue}if((l=(15&i)<<12|(63&o)<<6|63&n)<2048||l>=55296&&l<=57343||65279===l)continue;e[a++]=l}else if(240==(248&i)){if(v>=r)return this.interim[0]=i,a;if(128!=(192&(o=t[v++]))){v--;continue}if(v>=r)return this.interim[0]=i,this.interim[1]=o,a;if(128!=(192&(n=t[v++]))){v--;continue}if(v>=r)return this.interim[0]=i,this.interim[1]=o,this.interim[2]=n,a;if(128!=(192&(s=t[v++]))){v--;continue}if((l=(7&i)<<18|(63&o)<<12|(63&n)<<6|63&s)<65536||l>1114111)continue;e[a++]=l}}return a},t}();e.Utf8ToUtf32=i}},e={};function r(i){var o=e[i];if(void 0!==o)return o.exports;var n=e[i]={exports:{}};return t[i].call(n.exports,n,n.exports,r),n.exports}var i={};return(()=>{var t=i;Object.defineProperty(t,"__esModule",{value:!0}),t.WebglAddon=void 0;var e=r(666),o=r(345),n=r(399),s=function(){function t(t){this._preserveDrawingBuffer=t,this._onContextLoss=new o.EventEmitter}return Object.defineProperty(t.prototype,"onContextLoss",{get:function(){return this._onContextLoss.event},enumerable:!1,configurable:!0}),t.prototype.activate=function(t){var r=this;if(!t.element)throw new Error("Cannot activate WebglAddon before Terminal.open");if(n.isSafari)throw new Error("Webgl is not currently supported on Safari");this._terminal=t;var i=t._core._renderService,o=t._core._characterJoinerService,s=t._core._decorationService,a=t._core._colorManager.colors;this._renderer=new e.WebglRenderer(t,a,o,s,this._preserveDrawingBuffer),this._renderer.onContextLoss((function(){return r._onContextLoss.fire()})),i.setRenderer(this._renderer)},t.prototype.dispose=function(){if(!this._terminal)throw new Error("Cannot dispose WebglAddon because it is activated");var t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.onResize(this._terminal.cols,this._terminal.rows),this._renderer=void 0},Object.defineProperty(t.prototype,"textureAtlas",{get:function(){var t;return null===(t=this._renderer)||void 0===t?void 0:t.textureAtlas},enumerable:!1,configurable:!0}),t.prototype.clearTextureAtlas=function(){var t;null===(t=this._renderer)||void 0===t||t.clearCharAtlas()},t}();t.WebglAddon=s})(),i})()}));


/***/ }),

/***/ 8152:
/*!*****************************************!*\
  !*** ./node_modules/xterm/lib/xterm.js ***!
  \*****************************************/
/***/ ((module) => {

!function(e,t){if(true)module.exports=t();else { var i, r; }}(self,(function(){return(()=>{"use strict";var e={4567:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;var o=r(9042),s=r(6114),a=r(9924),c=r(3656),l=r(844),h=r(5596),u=r(9631),f=function(e){function t(t,r){var i=e.call(this)||this;i._terminal=t,i._renderService=r,i._liveRegionLineCount=0,i._charsToConsume=[],i._charsToAnnounce="",i._accessibilityTreeRoot=document.createElement("div"),i._accessibilityTreeRoot.classList.add("xterm-accessibility"),i._accessibilityTreeRoot.tabIndex=0,i._rowContainer=document.createElement("div"),i._rowContainer.setAttribute("role","list"),i._rowContainer.classList.add("xterm-accessibility-tree"),i._rowElements=[];for(var n=0;n<i._terminal.rows;n++)i._rowElements[n]=i._createAccessibilityTreeNode(),i._rowContainer.appendChild(i._rowElements[n]);if(i._topBoundaryFocusListener=function(e){return i._onBoundaryFocus(e,0)},i._bottomBoundaryFocusListener=function(e){return i._onBoundaryFocus(e,1)},i._rowElements[0].addEventListener("focus",i._topBoundaryFocusListener),i._rowElements[i._rowElements.length-1].addEventListener("focus",i._bottomBoundaryFocusListener),i._refreshRowsDimensions(),i._accessibilityTreeRoot.appendChild(i._rowContainer),i._renderRowsDebouncer=new a.TimeBasedDebouncer(i._renderRows.bind(i)),i._refreshRows(),i._liveRegion=document.createElement("div"),i._liveRegion.classList.add("live-region"),i._liveRegion.setAttribute("aria-live","assertive"),i._accessibilityTreeRoot.appendChild(i._liveRegion),!i._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return i._terminal.element.insertAdjacentElement("afterbegin",i._accessibilityTreeRoot),i.register(i._renderRowsDebouncer),i.register(i._terminal.onResize((function(e){return i._onResize(e.rows)}))),i.register(i._terminal.onRender((function(e){return i._refreshRows(e.start,e.end)}))),i.register(i._terminal.onScroll((function(){return i._refreshRows()}))),i.register(i._terminal.onA11yChar((function(e){return i._onChar(e)}))),i.register(i._terminal.onLineFeed((function(){return i._onChar("\n")}))),i.register(i._terminal.onA11yTab((function(e){return i._onTab(e)}))),i.register(i._terminal.onKey((function(e){return i._onKey(e.key)}))),i.register(i._terminal.onBlur((function(){return i._clearLiveRegion()}))),i.register(i._renderService.onDimensionsChange((function(){return i._refreshRowsDimensions()}))),i._screenDprMonitor=new h.ScreenDprMonitor,i.register(i._screenDprMonitor),i._screenDprMonitor.setListener((function(){return i._refreshRowsDimensions()})),i.register((0,c.addDisposableDomListener)(window,"resize",(function(){return i._refreshRowsDimensions()}))),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),(0,u.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(e,t){var r=e.target,i=this._rowElements[0===t?1:this._rowElements.length-2];if(r.getAttribute("aria-posinset")!==(0===t?"1":""+this._terminal.buffer.lines.length)&&e.relatedTarget===i){var n,o;if(0===t?(n=r,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(n=this._rowElements.shift(),o=r,this._rowContainer.removeChild(n)),n.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){var s=this._createAccessibilityTreeNode();this._rowElements.unshift(s),this._rowContainer.insertAdjacentElement("afterbegin",s)}else s=this._createAccessibilityTreeNode(),this._rowElements.push(s),this._rowContainer.appendChild(s);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}},t.prototype._onResize=function(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},t.prototype._onTab=function(e){for(var t=0;t<e;t++)this._onChar(" ")},t.prototype._onChar=function(e){var t=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)),s.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((function(){t._accessibilityTreeRoot.appendChild(t._liveRegion)}),0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,s.isMac&&(0,u.removeElementFromParent)(this._liveRegion)},t.prototype._onKey=function(e){this._clearLiveRegion(),this._charsToConsume.push(e)},t.prototype._refreshRows=function(e,t){this._renderRowsDebouncer.refresh(e,t,this._terminal.rows)},t.prototype._renderRows=function(e,t){for(var r=this._terminal.buffer,i=r.lines.length.toString(),n=e;n<=t;n++){var o=r.translateBufferLineToString(r.ydisp+n,!0),s=(r.ydisp+n+1).toString(),a=this._rowElements[n];a&&(0===o.length?a.innerText=" ":a.textContent=o,a.setAttribute("aria-posinset",s),a.setAttribute("aria-setsize",i))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}},t.prototype._refreshRowDimensions=function(e){e.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(l.Disposable);t.AccessibilityManager=f},3614:(e,t)=>{function r(e){return e.replace(/\r?\n/g,"\r")}function i(e,t){return t?"[200~"+e+"[201~":e}function n(e,t,n){e=i(e=r(e),n.decPrivateModes.bracketedPasteMode),n.triggerDataEvent(e,!0),t.value=""}function o(e,t,r){var i=r.getBoundingClientRect(),n=e.clientX-i.left-10,o=e.clientY-i.top-10;t.style.width="20px",t.style.height="20px",t.style.left=n+"px",t.style.top=o+"px",t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=r,t.bracketTextForPaste=i,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,r){e.stopPropagation(),e.clipboardData&&n(e.clipboardData.getData("text/plain"),t,r)},t.paste=n,t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,r,i,n){o(e,t,r),n&&i.rightClickSelect(e),t.value=i.selectionText,t.select()}},7239:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;var r=function(){function e(){this._color={},this._rgba={}}return e.prototype.clear=function(){this._color={},this._rgba={}},e.prototype.setCss=function(e,t,r){this._rgba[e]||(this._rgba[e]={}),this._rgba[e][t]=r},e.prototype.getCss=function(e,t){return this._rgba[e]?this._rgba[e][t]:void 0},e.prototype.setColor=function(e,t,r){this._color[e]||(this._color[e]={}),this._color[e][t]=r},e.prototype.getColor=function(e,t){return this._color[e]?this._color[e][t]:void 0},e}();t.ColorContrastCache=r},5680:function(e,t,r){var i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.ColorManager=t.DEFAULT_ANSI_COLORS=void 0;var n=r(8055),o=r(7239),s=n.css.toColor("#ffffff"),a=n.css.toColor("#000000"),c=n.css.toColor("#ffffff"),l=n.css.toColor("#000000"),h={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var e=[n.css.toColor("#2e3436"),n.css.toColor("#cc0000"),n.css.toColor("#4e9a06"),n.css.toColor("#c4a000"),n.css.toColor("#3465a4"),n.css.toColor("#75507b"),n.css.toColor("#06989a"),n.css.toColor("#d3d7cf"),n.css.toColor("#555753"),n.css.toColor("#ef2929"),n.css.toColor("#8ae234"),n.css.toColor("#fce94f"),n.css.toColor("#729fcf"),n.css.toColor("#ad7fa8"),n.css.toColor("#34e2e2"),n.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],r=0;r<216;r++){var i=t[r/36%6|0],o=t[r/6%6|0],s=t[r%6];e.push({css:n.channels.toCss(i,o,s),rgba:n.channels.toRgba(i,o,s)})}for(r=0;r<24;r++){var a=8+10*r;e.push({css:n.channels.toCss(a,a,a),rgba:n.channels.toRgba(a,a,a)})}return e}());var u=function(){function e(e,r){this.allowTransparency=r;var i=e.createElement("canvas");i.width=1,i.height=1;var u=i.getContext("2d");if(!u)throw new Error("Could not get rendering context");this._ctx=u,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new o.ColorContrastCache,this.colors={foreground:s,background:a,cursor:c,cursorAccent:l,selectionTransparent:h,selectionOpaque:n.color.blend(a,h),selectionForeground:void 0,ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return e.prototype.onOptionsChange=function(e){"minimumContrastRatio"===e&&this._contrastCache.clear()},e.prototype.setTheme=function(e){void 0===e&&(e={}),this.colors.foreground=this._parseColor(e.foreground,s),this.colors.background=this._parseColor(e.background,a),this.colors.cursor=this._parseColor(e.cursor,c,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selectionTransparent=this._parseColor(e.selection,h,!0),this.colors.selectionOpaque=n.color.blend(this.colors.background,this.colors.selectionTransparent);var r={css:"",rgba:0};this.colors.selectionForeground=e.selectionForeground?this._parseColor(e.selectionForeground,r):void 0,this.colors.selectionForeground===r&&(this.colors.selectionForeground=void 0),n.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=n.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,t.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,t.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,t.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,t.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,t.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,t.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,t.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,t.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},e.prototype.restoreColor=function(e){if(void 0!==e)switch(e){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[e]=this._restoreColors.ansi[e]}else for(var t=0;t<this._restoreColors.ansi.length;++t)this.colors.ansi[t]=this._restoreColors.ansi[t]},e.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:this.colors.ansi.slice()}},e.prototype._parseColor=function(e,t,r){if(void 0===r&&(r=this.allowTransparency),void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+e+" is invalid using fallback "+t.css),t;this._ctx.fillRect(0,0,1,1);var o=this._ctx.getImageData(0,0,1,1).data;if(255!==o[3]){if(!r)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t;var s=i(this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map((function(e){return Number(e)})),4),a=s[0],c=s[1],l=s[2],h=s[3],u=Math.round(255*h);return{rgba:n.channels.toRgba(a,c,l,u),css:e}}return{css:this._ctx.fillStyle,rgba:n.channels.toRgba(o[0],o[1],o[2],o[3])}},e}();t.ColorManager=u},9631:function(e,t){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementFromParent=void 0,t.removeElementFromParent=function(){for(var e,t,i,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];try{for(var s=r(n),a=s.next();!a.done;a=s.next()){var c=a.value;null===(i=null==c?void 0:c.parentElement)||void 0===i||i.removeChild(c)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,r,i){e.addEventListener(t,r,i);var n=!1;return{dispose:function(){n||(n=!0,e.removeEventListener(t,r,i))}}}},3551:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZone=t.Linkifier=void 0;var o=r(8460),s=r(2585),a=function(){function e(e,t,r){this._bufferService=e,this._logService=t,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new o.EventEmitter,this._onHideLinkUnderline=new o.EventEmitter,this._onLinkTooltip=new o.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(e.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),e.prototype.attachToDom=function(e,t){this._element=e,this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,r){var i=this;this._mouseZoneManager&&(void 0===this._rowsToLinkify.start||void 0===this._rowsToLinkify.end?(this._rowsToLinkify.start=t,this._rowsToLinkify.end=r):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,t),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,r)),this._mouseZoneManager.clearAll(t,r),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout((function(){return i._linkifyRows()}),e._timeBeforeLatency))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var e=this._bufferService.buffer;if(void 0!==this._rowsToLinkify.start&&void 0!==this._rowsToLinkify.end){var t=e.ydisp+this._rowsToLinkify.start;if(!(t>=e.lines.length)){for(var r=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),n=this._bufferService.buffer.iterator(!1,t,r,i,i);n.hasNext();)for(var o=n.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(o.range.first,o.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},e.prototype.registerLinkMatcher=function(e,t,r){if(void 0===r&&(r={}),!t)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:e,handler:t,matchIndex:r.matchIndex,validationCallback:r.validationCallback,hoverTooltipCallback:r.tooltipCallback,hoverLeaveCallback:r.leaveCallback,willLinkActivate:r.willLinkActivate,priority:r.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(e){if(0!==this._linkMatchers.length){for(var t=this._linkMatchers.length-1;t>=0;t--)if(e.priority<=this._linkMatchers[t].priority)return void this._linkMatchers.splice(t+1,0,e);this._linkMatchers.splice(0,0,e)}else this._linkMatchers.push(e)},e.prototype.deregisterLinkMatcher=function(e){for(var t=0;t<this._linkMatchers.length;t++)if(this._linkMatchers[t].id===e)return this._linkMatchers.splice(t,1),!0;return!1},e.prototype._doLinkifyRow=function(e,t,r){for(var i,n=this,o=new RegExp(r.regex.source,(r.regex.flags||"")+"g"),s=-1,a=function(){var a=i["number"!=typeof r.matchIndex?0:r.matchIndex];if(!a)return c._logService.debug("match found without corresponding matchIndex",i,r),"break";if(s=t.indexOf(a,s+1),o.lastIndex=s+a.length,s<0)return"break";var l=c._bufferService.buffer.stringIndexToBufferIndex(e,s);if(l[0]<0)return"break";var h=c._bufferService.buffer.lines.get(l[0]);if(!h)return"break";var u=h.getFg(l[1]),f=u?u>>9&511:void 0;r.validationCallback?r.validationCallback(a,(function(e){n._rowsTimeoutId||e&&n._addLink(l[1],l[0]-n._bufferService.buffer.ydisp,a,r,f)})):c._addLink(l[1],l[0]-c._bufferService.buffer.ydisp,a,r,f)},c=this;null!==(i=o.exec(t))&&"break"!==a(););},e.prototype._addLink=function(e,t,r,i,n){var o=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(r),a=e%this._bufferService.cols,l=t+Math.floor(e/this._bufferService.cols),h=(a+s)%this._bufferService.cols,u=l+Math.floor((a+s)/this._bufferService.cols);0===h&&(h=this._bufferService.cols,u--),this._mouseZoneManager.add(new c(a+1,l+1,h+1,u+1,(function(e){if(i.handler)return i.handler(e,r);var t=window.open();t?(t.opener=null,t.location.href=r):console.warn("Opening link blocked as opener could not be cleared")}),(function(){o._onShowLinkUnderline.fire(o._createLinkHoverEvent(a,l,h,u,n)),o._element.classList.add("xterm-cursor-pointer")}),(function(e){o._onLinkTooltip.fire(o._createLinkHoverEvent(a,l,h,u,n)),i.hoverTooltipCallback&&i.hoverTooltipCallback(e,r,{start:{x:a,y:l},end:{x:h,y:u}})}),(function(){o._onHideLinkUnderline.fire(o._createLinkHoverEvent(a,l,h,u,n)),o._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()}),(function(e){return!i.willLinkActivate||i.willLinkActivate(e,r)})))}},e.prototype._createLinkHoverEvent=function(e,t,r,i,n){return{x1:e,y1:t,x2:r,y2:i,cols:this._bufferService.cols,fg:n}},e._timeBeforeLatency=200,e=i([n(0,s.IBufferService),n(1,s.ILogService),n(2,s.IUnicodeService)],e)}();t.Linkifier=a;var c=function(e,t,r,i,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=r,this.y2=i,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=c},6465:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},c=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier2=void 0;var l=r(2585),h=r(8460),u=r(844),f=r(3656),_=function(e){function t(t){var r=e.call(this)||this;return r._bufferService=t,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new h.EventEmitter),r._onHideLinkUnderline=r.register(new h.EventEmitter),r.register((0,u.getDisposeArrayDisposable)(r._linkCacheDisposables)),r}return n(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(e){var t=this;return this._linkProviders.push(e),{dispose:function(){var r=t._linkProviders.indexOf(e);-1!==r&&t._linkProviders.splice(r,1)}}},t.prototype.attachToDom=function(e,t,r){var i=this;this._element=e,this._mouseService=t,this._renderService=r,this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(function(){i._isMouseOut=!0,i._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))},t.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(t){this._isMouseOut=!1;for(var r=e.composedPath(),i=0;i<r.length;i++){var n=r[i];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._onHover(t),this._lastBufferCell=t)}}},t.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},t.prototype._askForLink=function(e,t){var r,i,n,o,s=this;this._activeProviderReplies&&t||(null===(n=this._activeProviderReplies)||void 0===n||n.forEach((function(e){null==e||e.forEach((function(e){e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);var l=!1,h=function(r,i){t?(null===(o=u._activeProviderReplies)||void 0===o?void 0:o.get(r))&&(l=u._checkLinkProviderResult(r,e,l)):i.provideLinks(e.y,(function(t){var i,n;if(!s._isMouseOut){var o=null==t?void 0:t.map((function(e){return{link:e}}));null===(i=s._activeProviderReplies)||void 0===i||i.set(r,o),l=s._checkLinkProviderResult(r,e,l),(null===(n=s._activeProviderReplies)||void 0===n?void 0:n.size)===s._linkProviders.length&&s._removeIntersectingLinks(e.y,s._activeProviderReplies)}}))},u=this;try{for(var f=a(this._linkProviders.entries()),_=f.next();!_.done;_=f.next()){var d=c(_.value,2);h(d[0],d[1])}}catch(e){r={error:e}}finally{try{_&&!_.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}},t.prototype._removeIntersectingLinks=function(e,t){for(var r=new Set,i=0;i<t.size;i++){var n=t.get(i);if(n)for(var o=0;o<n.length;o++)for(var s=n[o],a=s.link.range.start.y<e?0:s.link.range.start.x,c=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x,l=a;l<=c;l++){if(r.has(l)){n.splice(o--,1);break}r.add(l)}}},t.prototype._checkLinkProviderResult=function(e,t,r){var i,n=this;if(!this._activeProviderReplies)return r;for(var o=this._activeProviderReplies.get(e),s=!1,a=0;a<e;a++)this._activeProviderReplies.has(a)&&!this._activeProviderReplies.get(a)||(s=!0);if(!s&&o){var c=o.find((function(e){return n._linkAtPosition(e.link,t)}));c&&(r=!0,this._handleNewLink(c))}if(this._activeProviderReplies.size===this._linkProviders.length&&!r)for(a=0;a<this._activeProviderReplies.size;a++){var l=null===(i=this._activeProviderReplies.get(a))||void 0===i?void 0:i.find((function(e){return n._linkAtPosition(e.link,t)}));if(l){r=!0,this._handleNewLink(l);break}}return r},t.prototype._handleMouseDown=function(){this._mouseDownLink=this._currentLink},t.prototype._handleMouseUp=function(e){if(this._element&&this._mouseService&&this._currentLink){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(e,t){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,u.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(e){var t=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(e.link,r)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var e,r;return null===(r=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===r?void 0:r.decorations.pointerCursor},set:function(e){var r,i;(null===(r=t._currentLink)||void 0===r?void 0:r.state)&&t._currentLink.state.decorations.pointerCursor!==e&&(t._currentLink.state.decorations.pointerCursor=e,t._currentLink.state.isHovered&&(null===(i=t._element)||void 0===i||i.classList.toggle("xterm-cursor-pointer",e)))}},underline:{get:function(){var e,r;return null===(r=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===r?void 0:r.decorations.underline},set:function(r){var i,n,o;(null===(i=t._currentLink)||void 0===i?void 0:i.state)&&(null===(o=null===(n=t._currentLink)||void 0===n?void 0:n.state)||void 0===o?void 0:o.decorations.underline)!==r&&(t._currentLink.state.decorations.underline=r,t._currentLink.state.isHovered&&t._fireUnderlineEvent(e.link,r))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((function(e){var r=0===e.start?0:e.start+1+t._bufferService.buffer.ydisp;t._clearCurrentLink(r,e.end+1+t._bufferService.buffer.ydisp)}))))}},t.prototype._linkHover=function(e,t,r){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)},t.prototype._fireUnderlineEvent=function(e,t){var r=e.range,i=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-i-1,r.end.x,r.end.y-i-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)},t.prototype._linkLeave=function(e,t,r){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)},t.prototype._linkAtPosition=function(e,t){var r=e.range.start.y===e.range.end.y,i=e.range.start.y<t.y,n=e.range.end.y>t.y;return(r&&e.range.start.x<=t.x&&e.range.end.x>=t.x||i&&e.range.end.x>=t.x||n&&e.range.start.x<=t.x||i&&n)&&e.range.start.y<=t.y&&e.range.end.y>=t.y},t.prototype._positionFromMouseEvent=function(e,t,r){var i=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(e,t,r,i,n){return{x1:e,y1:t,x2:r,y2:i,cols:this._bufferService.cols,fg:n}},o([s(0,l.IBufferService)],t)}(u.Disposable);t.Linkifier2=_},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZoneManager=void 0;var a=r(844),c=r(3656),l=r(4725),h=r(2585),u=function(e){function t(t,r,i,n,o,s){var a=e.call(this)||this;return a._element=t,a._screenElement=r,a._bufferService=i,a._mouseService=n,a._selectionService=o,a._optionsService=s,a._zones=[],a._areZonesActive=!1,a._lastHoverCoords=[void 0,void 0],a._initialSelectionLength=0,a.register((0,c.addDisposableDomListener)(a._element,"mousedown",(function(e){return a._onMouseDown(e)}))),a._mouseMoveListener=function(e){return a._onMouseMove(e)},a._mouseLeaveListener=function(e){return a._onMouseLeave(e)},a._clickListener=function(e){return a._onClick(e)},a}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},t.prototype.add=function(e){this._zones.push(e),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(e,t){if(0!==this._zones.length){e&&t||(e=0,t=this._bufferService.rows-1);for(var r=0;r<this._zones.length;r++){var i=this._zones[r];(i.y1>e&&i.y1<=t+1||i.y2>e&&i.y2<=t+1||i.y1<e&&i.y2>t+1)&&(this._currentZone&&this._currentZone===i&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(r--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},t.prototype._onHover=function(e){var t=this,r=this._findZoneEventAt(e);r!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),r&&(this._currentZone=r,r.hoverCallback&&r.hoverCallback(e),this._tooltipTimeout=window.setTimeout((function(){return t._onTooltip(e)}),this._optionsService.rawOptions.linkTooltipHoverDuration)))},t.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);null==t||t.tooltipCallback(e)},t.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);(null==t?void 0:t.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())}},t.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},t.prototype._onClick=function(e){var t=this._findZoneEventAt(e),r=this._getSelectionLength();t&&r===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},t.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},t.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var r=t[0],i=t[1],n=0;n<this._zones.length;n++){var o=this._zones[n];if(o.y1===o.y2){if(i===o.y1&&r>=o.x1&&r<o.x2)return o}else if(i===o.y1&&r>=o.x1||i===o.y2&&r<o.x2||i>o.y1&&i<o.y2)return o}},o([s(2,h.IBufferService),s(3,l.IMouseService),s(4,l.ISelectionService),s(5,h.IOptionsService)],t)}(a.Disposable);t.MouseZoneManager=u},6193:function(e,t){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0;var i=function(){function e(e){this._renderCallback=e,this._refreshCallbacks=[]}return e.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.addRefreshCallback=function(e){var t=this;return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){return t._innerRefresh()}))),this._animationFrame},e.prototype.refresh=function(e,t,r){var i=this;this._rowCount=r,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){return i._innerRefresh()})))},e.prototype._innerRefresh=function(){if(this._animationFrame=void 0,void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}else this._runRefreshCallbacks()},e.prototype._runRefreshCallbacks=function(){var e,t;try{for(var i=r(this._refreshCallbacks),n=i.next();!n.done;n=i.next())(0,n.value)(0)}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this._refreshCallbacks=[]},e}();t.RenderDebouncer=i},5596:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenDprMonitor=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentDevicePixelRatio=window.devicePixelRatio,t}return n(t,e),t.prototype.setListener=function(e){var t=this;this._listener&&this.clearListener(),this._listener=e,this._outerListener=function(){t._listener&&(t._listener(window.devicePixelRatio,t._currentDevicePixelRatio),t._updateDpr())},this._updateDpr()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.clearListener()},t.prototype._updateDpr=function(){var e;this._outerListener&&(null===(e=this._resolutionMediaMatchList)||void 0===e||e.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},t.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},t}(r(844).Disposable);t.ScreenDprMonitor=o},3236:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},a=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var c=r(2950),l=r(1680),h=r(3614),u=r(2584),f=r(5435),_=r(3525),d=r(3551),p=r(9312),v=r(6114),y=r(3656),g=r(9042),m=r(357),b=r(6954),S=r(4567),C=r(1296),w=r(7399),L=r(8460),E=r(8437),x=r(5680),R=r(3230),k=r(4725),M=r(428),A=r(8934),O=r(6465),D=r(5114),T=r(8969),B=r(8055),P=r(4269),I=r(5941),H=r(3107),j=r(5744),F=r(9074),W=r(2585),U="undefined"!=typeof window?window.document:null,q=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r.browser=v,r._keyDownHandled=!1,r._keyDownSeen=!1,r._keyPressHandled=!1,r._unprocessedDeadKey=!1,r._onCursorMove=new L.EventEmitter,r._onKey=new L.EventEmitter,r._onRender=new L.EventEmitter,r._onSelectionChange=new L.EventEmitter,r._onTitleChange=new L.EventEmitter,r._onBell=new L.EventEmitter,r._onFocus=new L.EventEmitter,r._onBlur=new L.EventEmitter,r._onA11yCharEmitter=new L.EventEmitter,r._onA11yTabEmitter=new L.EventEmitter,r._setup(),r.linkifier=r._instantiationService.createInstance(d.Linkifier),r.linkifier2=r.register(r._instantiationService.createInstance(O.Linkifier2)),r._decorationService=r._instantiationService.createInstance(F.DecorationService),r._instantiationService.setService(W.IDecorationService,r._decorationService),r.register(r._inputHandler.onRequestBell((function(){return r.bell()}))),r.register(r._inputHandler.onRequestRefreshRows((function(e,t){return r.refresh(e,t)}))),r.register(r._inputHandler.onRequestSendFocus((function(){return r._reportFocus()}))),r.register(r._inputHandler.onRequestReset((function(){return r.reset()}))),r.register(r._inputHandler.onRequestWindowsOptionsReport((function(e){return r._reportWindowsOptions(e)}))),r.register(r._inputHandler.onColor((function(e){return r._handleColorEvent(e)}))),r.register((0,L.forwardEvent)(r._inputHandler.onCursorMove,r._onCursorMove)),r.register((0,L.forwardEvent)(r._inputHandler.onTitleChange,r._onTitleChange)),r.register((0,L.forwardEvent)(r._inputHandler.onA11yChar,r._onA11yCharEmitter)),r.register((0,L.forwardEvent)(r._inputHandler.onA11yTab,r._onA11yTabEmitter)),r.register(r._bufferService.onResize((function(e){return r._afterResize(e.cols,e.rows)}))),r}return n(t,e),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),t.prototype._handleColorEvent=function(e){var t,r,i,n;if(this._colorManager){try{for(var c=o(e),l=c.next();!l.done;l=c.next()){var h=l.value,f=void 0,_="";switch(h.index){case 256:f="foreground",_="10";break;case 257:f="background",_="11";break;case 258:f="cursor",_="12";break;default:f="ansi",_="4;"+h.index}if(f)switch(h.type){case 0:var d=B.color.toColorRGB("ansi"===f?this._colorManager.colors.ansi[h.index]:this._colorManager.colors[f]);this.coreService.triggerDataEvent(u.C0.ESC+"]"+_+";"+(0,I.toRgbString)(d)+u.C1_ESCAPED.ST);break;case 1:"ansi"===f?this._colorManager.colors.ansi[h.index]=B.rgba.toColor.apply(B.rgba,a([],s(h.color),!1)):this._colorManager.colors[f]=B.rgba.toColor.apply(B.rgba,a([],s(h.color),!1));break;case 2:this._colorManager.restoreColor(h.index)}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}null===(i=this._renderService)||void 0===i||i.setColors(this._colorManager.colors),null===(n=this.viewport)||void 0===n||n.onThemeChange(this._colorManager.colors)}},t.prototype.dispose=function(){var t,r,i;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._renderService)||void 0===t||t.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},null===(i=null===(r=this.element)||void 0===r?void 0:r.parentNode)||void 0===i||i.removeChild(this.element))},t.prototype._setup=function(){e.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(t.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),t.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},t.prototype._updateOptions=function(t){var r,i,n,o;switch(e.prototype._updateOptions.call(this,t),t){case"fontFamily":case"fontSize":null===(r=this._renderService)||void 0===r||r.clear(),null===(i=this._charSizeService)||void 0===i||i.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":null===(n=this.viewport)||void 0===n||n.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new S.AccessibilityManager(this,this._renderService)):(null===(o=this._accessibilityManager)||void 0===o||o.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},t.prototype._onTextAreaFocus=function(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(u.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},t.prototype.blur=function(){var e;return null===(e=this.textarea)||void 0===e?void 0:e.blur()},t.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(u.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},t.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(t){var r=Math.min(this.buffer.x,this.cols-1),i=this._renderService.dimensions.actualCellHeight,n=t.getWidth(r),o=this._renderService.dimensions.actualCellWidth*n,s=this.buffer.y*this._renderService.dimensions.actualCellHeight,a=r*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=a+"px",this.textarea.style.top=s+"px",this.textarea.style.width=o+"px",this.textarea.style.height=i+"px",this.textarea.style.lineHeight=i+"px",this.textarea.style.zIndex="-5"}}},t.prototype._initGlobal=function(){var e=this;this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",(function(t){e.hasSelection()&&(0,h.copyHandler)(t,e._selectionService)})));var t=function(t){return(0,h.handlePasteEvent)(t,e.textarea,e.coreService)};this.register((0,y.addDisposableDomListener)(this.textarea,"paste",t)),this.register((0,y.addDisposableDomListener)(this.element,"paste",t)),v.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(function(t){2===t.button&&(0,h.rightClickHandler)(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",(function(t){(0,h.rightClickHandler)(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))),v.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",(function(t){1===t.button&&(0,h.moveTextAreaUnderMouseCursor)(t,e.textarea,e.screenElement)})))},t.prototype._bindKeys=function(){var e=this;this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",(function(t){return e._keyUp(t)}),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(function(t){return e._keyDown(t)}),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(function(t){return e._keyPress(t)}),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(function(){return e._compositionHelper.compositionstart()}))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(function(t){return e._compositionHelper.compositionupdate(t)}))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(function(){return e._compositionHelper.compositionend()}))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(function(t){return e._inputEvent(t)}),!0)),this.register(this.onRender((function(){return e._compositionHelper.updateCompositionElements()}))),this.register(this.onRender((function(t){return e._queueLinkification(t.start,t.end)})))},t.prototype.open=function(e){var t=this;if(!e)throw new Error("Terminal requires a parent element.");e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var r=U.createDocumentFragment();this._viewportElement=U.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),r.appendChild(this._viewportElement),this._viewportScrollArea=U.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=U.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=U.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),r.appendChild(this.screenElement),this.textarea=U.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,y.addDisposableDomListener)(this.textarea,"focus",(function(e){return t._onTextAreaFocus(e)}))),this.register((0,y.addDisposableDomListener)(this.textarea,"blur",(function(){return t._onTextAreaBlur()}))),this._helperContainer.appendChild(this.textarea);var i=this._instantiationService.createInstance(D.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,i),this._charSizeService=this._instantiationService.createInstance(M.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new x.ColorManager(U,this.options.allowTransparency),this.register(this.optionsService.onOptionChange((function(e){return t._colorManager.onOptionsChange(e)}))),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(P.CharacterJoinerService),this._instantiationService.setService(k.ICharacterJoinerService,this._characterJoinerService);var n=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(R.RenderService,n,this.rows,this.screenElement)),this._instantiationService.setService(k.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((function(e){return t._onRender.fire(e)}))),this.onResize((function(e){return t._renderService.resize(e.cols,e.rows)})),this._compositionView=U.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(r),this._soundService=this._instantiationService.createInstance(m.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(A.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(l.Viewport,(function(e){return t.scrollLines(e,!0,1)}),this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar((function(){return t.viewport.syncScrollArea()}))),this.register(this.viewport),this.register(this.onCursorMove((function(){t._renderService.onCursorMove(),t._syncTextArea()}))),this.register(this.onResize((function(){return t._renderService.onResize(t.cols,t.rows)}))),this.register(this.onBlur((function(){return t._renderService.onBlur()}))),this.register(this.onFocus((function(){return t._renderService.onFocus()}))),this.register(this._renderService.onDimensionsChange((function(){return t.viewport.syncScrollArea()}))),this._selectionService=this.register(this._instantiationService.createInstance(p.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((function(e){return t.scrollLines(e.amount,e.suppressScrollEvent)}))),this.register(this._selectionService.onSelectionChange((function(){return t._onSelectionChange.fire()}))),this.register(this._selectionService.onRequestRedraw((function(e){return t._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)}))),this.register(this._selectionService.onLinuxMouseSelection((function(e){t.textarea.value=e,t.textarea.focus(),t.textarea.select()}))),this.register(this._onScroll.event((function(e){t.viewport.syncScrollArea(),t._selectionService.refresh()}))),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",(function(){return t._selectionService.refresh()}))),this._mouseZoneManager=this._instantiationService.createInstance(b.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll((function(){return t._mouseZoneManager.clearAll()}))),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(H.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(function(e){return t._selectionService.onMouseDown(e)}))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new S.AccessibilityManager(this,this._renderService)),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this._instantiationService.createInstance(j.OverviewRulerRenderer,this._viewportElement,this.screenElement)),this.optionsService.onOptionChange((function(){!t._overviewRulerRenderer&&t.options.overviewRulerWidth&&t._viewportElement&&t.screenElement&&(t._overviewRulerRenderer=t._instantiationService.createInstance(j.OverviewRulerRenderer,t._viewportElement,t.screenElement))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},t.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(_.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(C.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},t.prototype._setTheme=function(e){var t,r,i;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(r=this._renderService)||void 0===r||r.setColors(this._colorManager.colors),null===(i=this.viewport)||void 0===i||i.onThemeChange(this._colorManager.colors)},t.prototype.bindMouse=function(){var e=this,t=this,r=this.element;function i(e){var r,i,n=t._mouseService.getRawByteCoords(e,t.screenElement,t.cols,t.rows);if(!n)return!1;switch(e.overrideType||e.type){case"mousemove":i=32,void 0===e.buttons?(r=3,void 0!==e.button&&(r=e.button<3?e.button:3)):r=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":i=0,r=e.button<3?e.button:3;break;case"mousedown":i=1,r=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(i=e.deltaY<0?0:1),r=4;break;default:return!1}return!(void 0===i||void 0===r||r>4)&&t.coreMouseService.triggerMouseEvent({col:n.x-33,row:n.y-33,button:r,action:i,ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey})}var n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o=function(t){return i(t),t.buttons||(e._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&e._document.removeEventListener("mousemove",n.mousedrag)),e.cancel(t)},s=function(t){return i(t),e.cancel(t,!0)},a=function(e){e.buttons&&i(e)},c=function(e){e.buttons||i(e)};this.register(this.coreMouseService.onProtocolChange((function(t){t?("debug"===e.optionsService.rawOptions.logLevel&&e._logService.debug("Binding to mouse events:",e.coreMouseService.explainEvents(t)),e.element.classList.add("enable-mouse-events"),e._selectionService.disable()):(e._logService.debug("Unbinding from mouse events."),e.element.classList.remove("enable-mouse-events"),e._selectionService.enable()),8&t?n.mousemove||(r.addEventListener("mousemove",c),n.mousemove=c):(r.removeEventListener("mousemove",n.mousemove),n.mousemove=null),16&t?n.wheel||(r.addEventListener("wheel",s,{passive:!1}),n.wheel=s):(r.removeEventListener("wheel",n.wheel),n.wheel=null),2&t?n.mouseup||(n.mouseup=o):(e._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),4&t?n.mousedrag||(n.mousedrag=a):(e._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(r,"mousedown",(function(t){if(t.preventDefault(),e.focus(),e.coreMouseService.areMouseEventsActive&&!e._selectionService.shouldForceSelection(t))return i(t),n.mouseup&&e._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&e._document.addEventListener("mousemove",n.mousedrag),e.cancel(t)}))),this.register((0,y.addDisposableDomListener)(r,"wheel",(function(t){if(!n.wheel){if(!e.buffer.hasScrollback){var r=e.viewport.getLinesScrolled(t);if(0===r)return;for(var i=u.C0.ESC+(e.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(t.deltaY<0?"A":"B"),o="",s=0;s<Math.abs(r);s++)o+=i;return e.coreService.triggerDataEvent(o,!0),e.cancel(t,!0)}return e.viewport.onWheel(t)?e.cancel(t):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(r,"touchstart",(function(t){if(!e.coreMouseService.areMouseEventsActive)return e.viewport.onTouchStart(t),e.cancel(t)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(r,"touchmove",(function(t){if(!e.coreMouseService.areMouseEventsActive)return e.viewport.onTouchMove(t)?void 0:e.cancel(t)}),{passive:!1}))},t.prototype.refresh=function(e,t){var r;null===(r=this._renderService)||void 0===r||r.refreshRows(e,t)},t.prototype._queueLinkification=function(e,t){var r;null===(r=this.linkifier)||void 0===r||r.linkifyRows(e,t)},t.prototype.updateCursorStyle=function(e){var t;(null===(t=this._selectionService)||void 0===t?void 0:t.shouldColumnSelect(e))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},t.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},t.prototype.scrollLines=function(t,r,i){void 0===i&&(i=0),e.prototype.scrollLines.call(this,t,r,i),this.refresh(0,this.rows-1)},t.prototype.paste=function(e){(0,h.paste)(e,this.textarea,this.coreService)},t.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},t.prototype.registerLinkMatcher=function(e,t,r){var i=this.linkifier.registerLinkMatcher(e,t,r);return this.refresh(0,this.rows-1),i},t.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},t.prototype.registerLinkProvider=function(e){return this.linkifier2.registerLinkProvider(e)},t.prototype.registerCharacterJoiner=function(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t},t.prototype.deregisterCharacterJoiner=function(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(t.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),t.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},t.prototype.registerDecoration=function(e){return this._decorationService.registerDecoration(e)},t.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},t.prototype.select=function(e,t,r){this._selectionService.setSelection(e,t,r)},t.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},t.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},t.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},t.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},t.prototype.selectLines=function(e,t){var r;null===(r=this._selectionService)||void 0===r||r.selectLines(e,t)},t.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;var t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;t||"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);var r=(0,w.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===r.type||2===r.type){var i=this.rows-1;return this.scrollLines(2===r.type?-i:i),this.cancel(e,!0)}return 1===r.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(r.cancel&&this.cancel(e,!0),!r.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(r.key!==u.C0.ETX&&r.key!==u.C0.CR||(this.textarea.value=""),this._onKey.fire({key:r.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(r.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0))))},t.prototype._isThirdLevelShift=function(e,t){var r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return"keypress"===t.type?r:r&&(!t.keyCode||t.keyCode>47)},t.prototype._keyUp=function(e){this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)},t.prototype._keyPress=function(e){var t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},t.prototype._inputEvent=function(e){if(e.data&&"insertText"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1},t.prototype.bell=function(){var e;this._soundBell()&&(null===(e=this._soundService)||void 0===e||e.playBellSound()),this._onBell.fire()},t.prototype.resize=function(t,r){t!==this.cols||r!==this.rows?e.prototype.resize.call(this,t,r):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},t.prototype._afterResize=function(e,t){var r,i;null===(r=this._charSizeService)||void 0===r||r.measure(),null===(i=this.viewport)||void 0===i||i.syncScrollArea(!0)},t.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(0),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(E.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},t.prototype.reset=function(){var t,r;this.options.rows=this.rows,this.options.cols=this.cols;var i=this._customKeyEventHandler;this._setup(),e.prototype.reset.call(this),null===(t=this._selectionService)||void 0===t||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=i,this.refresh(0,this.rows-1),null===(r=this.viewport)||void 0===r||r.syncScrollArea()},t.prototype.clearTextureAtlas=function(){var e;null===(e=this._renderService)||void 0===e||e.clearTextureAtlas()},t.prototype._reportFocus=function(){var e;(null===(e=this.element)||void 0===e?void 0:e.classList.contains("focus"))?this.coreService.triggerDataEvent(u.C0.ESC+"[I"):this.coreService.triggerDataEvent(u.C0.ESC+"[O")},t.prototype._reportWindowsOptions=function(e){if(this._renderService)switch(e){case f.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var t=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),r=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(u.C0.ESC+"[4;"+r+";"+t+"t");break;case f.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var i=this._renderService.dimensions.scaledCellWidth.toFixed(0),n=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(u.C0.ESC+"[6;"+n+";"+i+"t")}},t.prototype.cancel=function(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1},t.prototype._visualBell=function(){return!1},t.prototype._soundBell=function(){return"sound"===this.options.bellStyle},t}(T.CoreTerminal);t.Terminal=q},9924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0;var r=function(){function e(e,t){void 0===t&&(t=1e3),this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return e.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},e.prototype.refresh=function(e,t,r){var i=this;this._rowCount=r,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;var n=Date.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){var o=n-this._lastRefreshMs,s=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((function(){i._lastRefreshMs=Date.now(),i._innerRefresh(),i._additionalRefreshRequested=!1,i._refreshTimeoutID=void 0}),s)}},e.prototype._innerRefresh=function(){if(void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},e}();t.TimeBasedDebouncer=r},1680:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;var a=r(844),c=r(3656),l=r(4725),h=r(2585),u=function(e){function t(t,r,i,n,o,s,a,l){var h=e.call(this)||this;return h._scrollLines=t,h._viewportElement=r,h._scrollArea=i,h._element=n,h._bufferService=o,h._optionsService=s,h._charSizeService=a,h._renderService=l,h.scrollBarWidth=0,h._currentRowHeight=0,h._currentScaledCellHeight=0,h._lastRecordedBufferLength=0,h._lastRecordedViewportHeight=0,h._lastRecordedBufferHeight=0,h._lastTouchY=0,h._lastScrollTop=0,h._wheelPartialScroll=0,h._refreshAnimationFrame=null,h._ignoreNextScrollEvent=!1,h.scrollBarWidth=h._viewportElement.offsetWidth-h._scrollArea.offsetWidth||15,h.register((0,c.addDisposableDomListener)(h._viewportElement,"scroll",h._onScroll.bind(h))),h._activeBuffer=h._bufferService.buffer,h.register(h._bufferService.buffers.onBufferActivate((function(e){return h._activeBuffer=e.activeBuffer}))),h._renderDimensions=h._renderService.dimensions,h.register(h._renderService.onDimensionsChange((function(e){return h._renderDimensions=e}))),setTimeout((function(){return h.syncScrollArea()}),0),h}return n(t,e),t.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},t.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=requestAnimationFrame((function(){return t._innerRefresh()})))},t.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),this._refreshAnimationFrame=null},t.prototype.syncScrollArea=function(e){if(void 0===e&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight||this._refresh(e)},t.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},t.prototype._bubbleScroll=function(e,t){var r=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&r<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},t.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return 0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},t.prototype._getPixelsScrolled=function(e){if(0===e.deltaY||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},t.prototype.getLinesScrolled=function(e){if(0===e.deltaY||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},t.prototype._applyScrollModifier=function(e,t){var r=this._optionsService.rawOptions.fastScrollModifier;return"alt"===r&&t.altKey||"ctrl"===r&&t.ctrlKey||"shift"===r&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},t.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},t.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},o([s(4,h.IBufferService),s(5,h.IOptionsService),s(6,l.ICharSizeService),s(7,l.IRenderService)],t)}(a.Disposable);t.Viewport=u},3107:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferDecorationRenderer=void 0;var c=r(3656),l=r(4725),h=r(844),u=r(2585),f=function(e){function t(t,r,i,n){var o=e.call(this)||this;return o._screenElement=t,o._bufferService=r,o._decorationService=i,o._renderService=n,o._decorationElements=new Map,o._altBufferIsActive=!1,o._dimensionsChanged=!1,o._container=document.createElement("div"),o._container.classList.add("xterm-decoration-container"),o._screenElement.appendChild(o._container),o.register(o._renderService.onRenderedViewportChange((function(){return o._queueRefresh()}))),o.register(o._renderService.onDimensionsChange((function(){o._dimensionsChanged=!0,o._queueRefresh()}))),o.register((0,c.addDisposableDomListener)(window,"resize",(function(){return o._queueRefresh()}))),o.register(o._bufferService.buffers.onBufferActivate((function(){o._altBufferIsActive=o._bufferService.buffer===o._bufferService.buffers.alt}))),o.register(o._decorationService.onDecorationRegistered((function(){return o._queueRefresh()}))),o.register(o._decorationService.onDecorationRemoved((function(e){return o._removeDecoration(e)}))),o}return n(t,e),t.prototype.dispose=function(){this._container.remove(),this._decorationElements.clear(),e.prototype.dispose.call(this)},t.prototype._queueRefresh=function(){var e=this;void 0===this._animationFrame&&(this._animationFrame=this._renderService.addRefreshCallback((function(){e.refreshDecorations(),e._animationFrame=void 0})))},t.prototype.refreshDecorations=function(){var e,t;try{for(var r=a(this._decorationService.decorations),i=r.next();!i.done;i=r.next()){var n=i.value;this._renderDecoration(n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this._dimensionsChanged=!1},t.prototype._renderDecoration=function(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)},t.prototype._createElement=function(e){var t,r=document.createElement("div");r.classList.add("xterm-decoration"),r.style.width=Math.round((e.options.width||1)*this._renderService.dimensions.actualCellWidth)+"px",r.style.height=(e.options.height||1)*this._renderService.dimensions.actualCellHeight+"px",r.style.top=(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.actualCellHeight+"px",r.style.lineHeight=this._renderService.dimensions.actualCellHeight+"px";var i=null!==(t=e.options.x)&&void 0!==t?t:0;return i&&i>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(e,r),r},t.prototype._refreshStyle=function(e){var t=this,r=e.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{var i=this._decorationElements.get(e);i||(e.onDispose((function(){return t._removeDecoration(e)})),i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i)),i.style.top=r*this._renderService.dimensions.actualCellHeight+"px",i.style.display=this._altBufferIsActive?"none":"block",e.onRenderEmitter.fire(i)}},t.prototype._refreshXPosition=function(e,t){var r;if(void 0===t&&(t=e.element),t){var i=null!==(r=e.options.x)&&void 0!==r?r:0;"right"===(e.options.anchor||"left")?t.style.right=i?i*this._renderService.dimensions.actualCellWidth+"px":"":t.style.left=i?i*this._renderService.dimensions.actualCellWidth+"px":""}},t.prototype._removeDecoration=function(e){var t;null===(t=this._decorationElements.get(e))||void 0===t||t.remove(),this._decorationElements.delete(e)},o([s(1,u.IBufferService),s(2,u.IDecorationService),s(3,l.IRenderService)],t)}(h.Disposable);t.BufferDecorationRenderer=f},5871:function(e,t){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.ColorZoneStore=void 0;var i=function(){function e(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}return Object.defineProperty(e.prototype,"zones",{get:function(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones},enumerable:!1,configurable:!0}),e.prototype.clear=function(){this._zones.length=0,this._zonePoolIndex=0},e.prototype.addDecoration=function(e){var t,i;if(e.options.overviewRulerOptions){try{for(var n=r(this._zones),o=n.next();!o.done;o=n.next()){var s=o.value;if(s.color===e.options.overviewRulerOptions.color&&s.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(s,e.marker.line))return;if(this._lineAdjacentToZone(s,e.marker.line,e.options.overviewRulerOptions.position))return void this._addLineToZone(s,e.marker.line)}}}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}},e.prototype.setPadding=function(e){this._linePadding=e},e.prototype._lineIntersectsZone=function(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine},e.prototype._lineAdjacentToZone=function(e,t,r){return t>=e.startBufferLine-this._linePadding[r||"full"]&&t<=e.endBufferLine+this._linePadding[r||"full"]},e.prototype._addLineToZone=function(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)},e}();t.ColorZoneStore=i},5744:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.OverviewRulerRenderer=void 0;var c=r(5871),l=r(3656),h=r(4725),u=r(844),f=r(2585),_={full:0,left:0,center:0,right:0},d={full:0,left:0,center:0,right:0},p={full:0,left:0,center:0,right:0},v=function(e){function t(t,r,i,n,o,s){var a,l=e.call(this)||this;l._viewportElement=t,l._screenElement=r,l._bufferService=i,l._decorationService=n,l._renderService=o,l._optionsService=s,l._colorZoneStore=new c.ColorZoneStore,l._shouldUpdateDimensions=!0,l._shouldUpdateAnchor=!0,l._lastKnownBufferLength=0,l._canvas=document.createElement("canvas"),l._canvas.classList.add("xterm-decoration-overview-ruler"),l._refreshCanvasDimensions(),null===(a=l._viewportElement.parentElement)||void 0===a||a.insertBefore(l._canvas,l._viewportElement);var h=l._canvas.getContext("2d");if(!h)throw new Error("Ctx cannot be null");return l._ctx=h,l._registerDecorationListeners(),l._registerBufferChangeListeners(),l._registerDimensionChangeListeners(),l}return n(t,e),Object.defineProperty(t.prototype,"_width",{get:function(){return this._optionsService.options.overviewRulerWidth||0},enumerable:!1,configurable:!0}),t.prototype._registerDecorationListeners=function(){var e=this;this.register(this._decorationService.onDecorationRegistered((function(){return e._queueRefresh(void 0,!0)}))),this.register(this._decorationService.onDecorationRemoved((function(){return e._queueRefresh(void 0,!0)})))},t.prototype._registerBufferChangeListeners=function(){var e=this;this.register(this._renderService.onRenderedViewportChange((function(){return e._queueRefresh()}))),this.register(this._bufferService.buffers.onBufferActivate((function(){e._canvas.style.display=e._bufferService.buffer===e._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((function(){e._lastKnownBufferLength!==e._bufferService.buffers.normal.lines.length&&e._refreshColorZonePadding()})))},t.prototype._registerDimensionChangeListeners=function(){var e=this;this.register(this._renderService.onRender((function(){e._containerHeight&&e._containerHeight===e._screenElement.clientHeight||(e._queueRefresh(!0),e._containerHeight=e._screenElement.clientHeight)}))),this.register(this._optionsService.onOptionChange((function(t){"overviewRulerWidth"===t&&e._queueRefresh(!0)}))),this.register((0,l.addDisposableDomListener)(window,"resize",(function(){e._queueRefresh(!0)}))),this._queueRefresh(!0)},t.prototype.dispose=function(){var t;null===(t=this._canvas)||void 0===t||t.remove(),e.prototype.dispose.call(this)},t.prototype._refreshDrawConstants=function(){var e=Math.floor(this._canvas.width/3),t=Math.ceil(this._canvas.width/3);d.full=this._canvas.width,d.left=e,d.center=t,d.right=e,_.full=Math.round(2*window.devicePixelRatio),_.left=Math.round(6*window.devicePixelRatio),_.center=Math.round(6*window.devicePixelRatio),_.right=Math.round(6*window.devicePixelRatio),p.full=0,p.left=0,p.center=d.left,p.right=d.left+d.center},t.prototype._refreshColorZonePadding=function(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*_.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length},t.prototype._refreshCanvasDimensions=function(){this._canvas.style.width=this._width+"px",this._canvas.width=Math.round(this._width*window.devicePixelRatio),this._canvas.style.height=this._screenElement.clientHeight+"px",this._canvas.height=Math.round(this._screenElement.clientHeight*window.devicePixelRatio),this._refreshDrawConstants(),this._refreshColorZonePadding()},t.prototype._refreshDecorations=function(){var e,t,r,i,n,o;this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();try{for(var s=a(this._decorationService.decorations),c=s.next();!c.done;c=s.next()){var l=c.value;this._colorZoneStore.addDecoration(l)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}this._ctx.lineWidth=1;var h=this._colorZoneStore.zones;try{for(var u=a(h),f=u.next();!f.done;f=u.next())"full"!==(p=f.value).position&&this._renderColorZone(p)}catch(e){r={error:e}}finally{try{f&&!f.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}try{for(var _=a(h),d=_.next();!d.done;d=_.next()){var p;"full"===(p=d.value).position&&this._renderColorZone(p)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(o=_.return)&&o.call(_)}finally{if(n)throw n.error}}this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1},t.prototype._renderColorZone=function(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(p[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-_[e.position||"full"]/2),d[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+_[e.position||"full"]))},t.prototype._queueRefresh=function(e,t){var r=this;this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,void 0===this._animationFrame&&(this._animationFrame=window.requestAnimationFrame((function(){r._refreshDecorations(),r._animationFrame=void 0})))},o([s(2,f.IBufferService),s(3,f.IDecorationService),s(4,h.IRenderService),s(5,f.IOptionsService)],t)}(u.Disposable);t.OverviewRulerRenderer=v},2950:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;var o=r(4725),s=r(2585),a=function(){function e(e,t,r,i,n,o){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=i,this._coreService=n,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(e.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),e.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},e.prototype.compositionupdate=function(e){var t=this;this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((function(){t._compositionPosition.end=t._textarea.value.length}),0)},e.prototype.compositionend=function(){this._finalizeComposition(!0)},e.prototype.keydown=function(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)},e.prototype._finalizeComposition=function(e){var t=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){var r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((function(){if(t._isSendingComposition){t._isSendingComposition=!1;var e;r.start+=t._dataAlreadySent.length,(e=t._isComposing?t._textarea.value.substring(r.start,r.end):t._textarea.value.substring(r.start)).length>0&&t._coreService.triggerDataEvent(e,!0)}}),0)}else{this._isSendingComposition=!1;var i=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(i,!0)}},e.prototype._handleAnyTextareaChanges=function(){var e=this,t=this._textarea.value;setTimeout((function(){if(!e._isComposing){var r=e._textarea.value.replace(t,"");r.length>0&&(e._dataAlreadySent=r,e._coreService.triggerDataEvent(r,!0))}}),0)},e.prototype.updateCompositionElements=function(e){var t=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.actualCellHeight,n=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,o=r*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var s=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(s.width,1)+"px",this._textarea.style.height=Math.max(s.height,1)+"px",this._textarea.style.lineHeight=s.height+"px"}e||setTimeout((function(){return t.updateCompositionElements(!0)}),0)}},i([n(2,s.IBufferService),n(3,s.IOptionsService),n(4,s.ICoreService),n(5,o.IRenderService)],e)}();t.CompositionHelper=a},9806:(e,t)=>{function r(e,t){var r=t.getBoundingClientRect();return[e.clientX-r.left,e.clientY-r.top]}Object.defineProperty(t,"__esModule",{value:!0}),t.getRawByteCoords=t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=r,t.getCoords=function(e,t,i,n,o,s,a,c){if(o){var l=r(e,t);if(l)return l[0]=Math.ceil((l[0]+(c?s/2:0))/s),l[1]=Math.ceil(l[1]/a),l[0]=Math.min(Math.max(l[0],1),i+(c?1:0)),l[1]=Math.min(Math.max(l[1],1),n),l}},t.getRawByteCoords=function(e){if(e)return{x:e[0]+32,y:e[1]+32}}},9504:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;var i=r(2584);function n(e,t,r,i){var n=e-o(r,e),a=t-o(r,t),h=Math.abs(n-a)-function(e,t,r){for(var i=0,n=e-o(r,e),a=t-o(r,t),c=0;c<Math.abs(n-a);c++){var l="A"===s(e,t)?-1:1,h=r.buffer.lines.get(n+l*c);(null==h?void 0:h.isWrapped)&&i++}return i}(e,t,r);return l(h,c(s(e,t),i))}function o(e,t){for(var r=0,i=e.buffer.lines.get(t),n=null==i?void 0:i.isWrapped;n&&t>=0&&t<e.rows;)r++,n=null==(i=e.buffer.lines.get(--t))?void 0:i.isWrapped;return r}function s(e,t){return e>t?"A":"B"}function a(e,t,r,i,n,o){for(var s=e,a=t,c="";s!==r||a!==i;)s+=n?1:-1,n&&s>o.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),s=0,e=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function c(e,t){var r=t?"O":"[";return i.C0.ESC+r+e}function l(e,t){e=Math.floor(e);for(var r="",i=0;i<e;i++)r+=t;return r}t.moveToCellSequence=function(e,t,r,i){var s,h=r.buffer.x,u=r.buffer.y;if(!r.buffer.hasScrollback)return function(e,t,r,i,s,h){return 0===n(t,i,s,h).length?"":l(a(e,t,e,t-o(s,t),!1,s).length,c("D",h))}(h,u,0,t,r,i)+n(u,t,r,i)+function(e,t,r,i,s,h){var u;u=n(t,i,s,h).length>0?i-o(s,i):t;var f=i,_=function(e,t,r,i,s,a){var c;return c=n(r,i,s,a).length>0?i-o(s,i):t,e<r&&c<=i||e>=r&&c<i?"C":"D"}(e,t,r,i,s,h);return l(a(e,u,r,f,"C"===_,s).length,c(_,h))}(h,u,e,t,r,i);if(u===t)return s=h>e?"D":"C",l(Math.abs(h-e),c(s,i));s=u>t?"D":"C";var f=Math.abs(u-t);return l(function(e,t){return t.cols-e}(u>t?e:h,r)+(f-1)*r.cols+1+((u>t?h:e)-1),c(s,i))}},4389:function(e,t,r){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)},n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var o=r(3236),s=r(9042),a=r(7975),c=r(7090),l=r(5741),h=r(8285),u=["cols","rows"],f=function(){function e(e){var t=this;this._core=new o.Terminal(e),this._addonManager=new l.AddonManager,this._publicOptions=i({},this._core.options);var r=function(e){return t._core.options[e]},n=function(e,r){t._checkReadonlyOptions(e),t._core.options[e]=r};for(var s in this._core.options){var a={get:r.bind(this,s),set:n.bind(this,s)};Object.defineProperty(this._publicOptions,s,a)}}return e.prototype._checkReadonlyOptions=function(e){if(u.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},e.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(e.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onWriteParsed",{get:function(){return this._core.onWriteParsed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new a.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new c.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new h.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},e.prototype.open=function(e){this._core.open(e)},e.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},e.prototype.registerLinkMatcher=function(e,t,r){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,r)},e.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},e.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},e.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},e.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},e.prototype.registerMarker=function(e){return void 0===e&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},e.prototype.registerDecoration=function(e){var t,r,i;return this._checkProposedApi(),this._verifyPositiveIntegers(null!==(t=e.x)&&void 0!==t?t:0,null!==(r=e.width)&&void 0!==r?r:0,null!==(i=e.height)&&void 0!==i?i:0),this._core.registerDecoration(e)},e.prototype.addMarker=function(e){return this.registerMarker(e)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},e.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(e,t){this._core.write(e,t)},e.prototype.writeUtf8=function(e,t){this._core.write(e,t)},e.prototype.writeln=function(e,t){this._core.write(e),this._core.write("\r\n",t)},e.prototype.paste=function(e){this._core.paste(e)},e.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},e.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},e.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},e.prototype.reset=function(){this._core.reset()},e.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},e.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(e,"strings",{get:function(){return s},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var e,t,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];try{for(var o=n(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e.prototype._verifyPositiveIntegers=function(){for(var e,t,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];try{for(var o=n(r),s=o.next();!s.done;s=o.next()){var a=s.value;if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},e}();t.Terminal=f},1546:function(e,t,r){var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;var n=r(643),o=r(8803),s=r(1420),a=r(3734),c=r(1752),l=r(8055),h=r(9631),u=r(8978),f=function(){function e(e,t,r,i,n,o,s,a,c){this._container=e,this._alpha=i,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._decorationService=c,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._columnSelectMode=!1,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return e.prototype.dispose=function(){var e;(0,h.removeElementFromParent)(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},e.prototype._initCanvas=function(){this._ctx=(0,c.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},e.prototype.onOptionsChanged=function(){},e.prototype.onBlur=function(){},e.prototype.onFocus=function(){},e.prototype.onCursorMove=function(){},e.prototype.onGridChanged=function(e,t){},e.prototype.onSelectionChanged=function(e,t,r){void 0===r&&(r=!1),this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r},e.prototype.setColors=function(e){this._refreshCharAtlas(e)},e.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},e.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,s.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},e.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},e.prototype.clearTextureAtlas=function(){var e;null===(e=this._charAtlas)||void 0===e||e.clear()},e.prototype._fillCells=function(e,t,r,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight)},e.prototype._fillMiddleLineAtCells=function(e,t,r){void 0===r&&(r=1);var i=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-i-window.devicePixelRatio,r*this._scaledCellWidth,window.devicePixelRatio)},e.prototype._fillBottomLineAtCells=function(e,t,r){void 0===r&&(r=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,r*this._scaledCellWidth,window.devicePixelRatio)},e.prototype._fillLeftLineAtCell=function(e,t,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*r,this._scaledCellHeight)},e.prototype._strokeRectAtCell=function(e,t,r,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,r*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},e.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},e.prototype._clearCells=function(e,t,r,i){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight))},e.prototype._fillCharTrueColor=function(e,t,r){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=o.TEXT_BASELINE,this._clipRow(r);var i=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(i=(0,u.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),i||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},e.prototype._drawChars=function(e,t,r){var s,a,c,l=this._getContrastColor(e,t,r);if(l||e.isFgRGB()||e.isBgRGB())this._drawUncachedChars(e,t,r,l);else{var h,u;e.isInverse()?(h=e.isBgDefault()?o.INVERTED_DEFAULT_COLOR:e.getBgColor(),u=e.isFgDefault()?o.INVERTED_DEFAULT_COLOR:e.getFgColor()):(u=e.isBgDefault()?n.DEFAULT_COLOR:e.getBgColor(),h=e.isFgDefault()?n.DEFAULT_COLOR:e.getFgColor()),h+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&h<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||n.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||n.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=u,this._currentGlyphIdentifier.fg=h,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic();var f=!1;try{for(var _=i(this._decorationService.getDecorationsAtCell(t,r)),d=_.next();!d.done;d=_.next()){var p=d.value;if(p.backgroundColorRGB||p.foregroundColorRGB){f=!0;break}}}catch(e){s={error:e}}finally{try{d&&!d.done&&(a=_.return)&&a.call(_)}finally{if(s)throw s.error}}!f&&(null===(c=this._charAtlas)||void 0===c?void 0:c.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,r)}},e.prototype._drawUncachedChars=function(e,t,r,i){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=o.TEXT_BASELINE,e.isInverse())if(i)this._ctx.fillStyle=i.css;else if(e.isBgDefault())this._ctx.fillStyle=l.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var n=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css}else if(i)this._ctx.fillStyle=i.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+a.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var s=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&s<8&&(s+=8),this._ctx.fillStyle=this._colors.ansi[s].css}this._clipRow(r),e.isDim()&&(this._ctx.globalAlpha=o.DIM_OPACITY);var c=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(c=(0,u.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),c||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},e.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},e.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},e.prototype._getContrastColor=function(e,t,r){var n,o,s,a,h=!1;try{for(var u=i(this._decorationService.getDecorationsAtCell(t,r)),f=u.next();!f.done;f=u.next()){var _=f.value;"top"!==_.options.layer&&h||(_.backgroundColorRGB&&(s=_.backgroundColorRGB.rgba),_.foregroundColorRGB&&(a=_.foregroundColorRGB.rgba),h="top"===_.options.layer)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}if(h||this._colors.selectionForeground&&this._isCellInSelection(t,r)&&(a=this._colors.selectionForeground.rgba),s||a||1!==this._optionsService.rawOptions.minimumContrastRatio&&!(0,c.isPowerlineGlyph)(e.getCode())){if(!s&&!a){var d=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==d)return d||void 0}var p=e.getFgColor(),v=e.getFgColorMode(),y=e.getBgColor(),g=e.getBgColorMode(),m=!!e.isInverse(),b=!!e.isInverse();if(m){var S=p;p=y,y=S;var C=v;v=g,g=C}var w=this._resolveBackgroundRgba(void 0!==s?50331648:g,null!=s?s:y,m),L=this._resolveForegroundRgba(v,p,m,b),E=l.rgba.ensureContrastRatio(null!=s?s:w,null!=a?a:L,this._optionsService.rawOptions.minimumContrastRatio);if(!E){if(!a)return void this._colors.contrastCache.setColor(e.bg,e.fg,null);E=a}var x={css:l.channels.toCss(E>>24&255,E>>16&255,E>>8&255),rgba:E};return s||a||this._colors.contrastCache.setColor(e.bg,e.fg,x),x}},e.prototype._resolveBackgroundRgba=function(e,t,r){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.foreground.rgba:this._colors.background.rgba}},e.prototype._resolveForegroundRgba=function(e,t,r,i){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&i&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.background.rgba:this._colors.foreground.rgba}},e.prototype._isCellInSelection=function(e,t){var r=this._selectionStart,i=this._selectionEnd;return!(!r||!i)&&(this._columnSelectMode?e>=r[0]&&t>=r[1]&&e<i[0]&&t<i[1]:t>r[1]&&t<i[1]||r[1]===i[1]&&t===r[1]&&e>=r[0]&&e<i[0]||r[1]<i[1]&&t===i[1]&&e<i[0]||r[1]<i[1]&&t===r[1]&&e>=r[0])},e}();t.BaseRenderLayer=f},2512:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;var a=r(1546),c=r(511),l=r(2585),h=r(4725),u=600,f=function(e){function t(t,r,i,n,o,s,a,l,h,u){var f=e.call(this,t,"cursor",r,!0,i,n,s,a,u)||this;return f._onRequestRedraw=o,f._coreService=l,f._coreBrowserService=h,f._cell=new c.CellData,f._state={x:0,y:0,isFocused:!1,style:"",width:0},f._cursorRenderers={bar:f._renderBarCursor.bind(f),block:f._renderBlockCursor.bind(f),underline:f._renderUnderlineCursor.bind(f)},f}return n(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new _(this._coreBrowserService.isFocused,(function(){t._render(!0)}))):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation()},t.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=t-this._bufferService.buffer.ydisp;if(r<0||r>=this._bufferService.rows)this._clearCursor();else{var i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(i,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var n=this._optionsService.rawOptions.cursorStyle;return n&&"block"!==n?this._cursorRenderers[n](i,r,this._cell):this._renderBlurCursor(i,r,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=r,this._state.isFocused=!1,this._state.style=n,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===i&&this._state.y===r&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](i,r,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=r,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},t.prototype._renderBarCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,r.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(r,e,t),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},t.prototype._renderBlurCursor=function(e,t,r){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,r.getWidth(),1),this._ctx.restore()},o([s(5,l.IBufferService),s(6,l.IOptionsService),s(7,l.ICoreService),s(8,h.ICoreBrowserService),s(9,l.IDecorationService)],t)}(a.BaseRenderLayer);t.CursorRenderLayer=f;var _=function(){function e(e,t){this._renderCallback=t,this.isCursorVisible=!0,e&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))))},e.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=u),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout((function(){if(t._animationTimeRestarted){var e=u-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,e>0)return void t._restartInterval(e)}t.isCursorVisible=!1,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0})),t._blinkInterval=window.setInterval((function(){if(t._animationTimeRestarted){var e=u-(Date.now()-t._animationTimeRestarted);return t._animationTimeRestarted=void 0,void t._restartInterval(e)}t.isCursorVisible=!t.isCursorVisible,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0}))}),u)}),e)},e.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:function(e,t,r){var i,n,o,s,a,c,l,h,u,f,_,d,p,v,y,g,m,b,S,C,w,L,E,x,R,k,M,A,O,D,T,B,P,I,H,j,F,W,U,q,N,z,K,G,V,X,Z,Y,J,$,Q,ee,te,re,ie,ne,oe,se,ae,ce,le,he,ue,fe,_e,de,pe,ve,ye,ge,me,be,Se,Ce,we,Le,Ee,xe,Re,ke,Me,Ae,Oe,De,Te,Be,Pe,Ie,He,je,Fe,We,Ue,qe,Ne,ze,Ke,Ge,Ve,Xe,Ze,Ye,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,_t,dt,pt,vt,yt,gt,mt,bt,St,Ct,wt=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},Lt=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;var Et=r(1752);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var xt={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":(i={},i[1]="M0,.5 L1,.5",i),"━":(n={},n[3]="M0,.5 L1,.5",n),"│":(o={},o[1]="M.5,0 L.5,1",o),"┃":(s={},s[3]="M.5,0 L.5,1",s),"┌":(a={},a[1]="M0.5,1 L.5,.5 L1,.5",a),"┏":(c={},c[3]="M0.5,1 L.5,.5 L1,.5",c),"┐":(l={},l[1]="M0,.5 L.5,.5 L.5,1",l),"┓":(h={},h[3]="M0,.5 L.5,.5 L.5,1",h),"└":(u={},u[1]="M.5,0 L.5,.5 L1,.5",u),"┗":(f={},f[3]="M.5,0 L.5,.5 L1,.5",f),"┘":(_={},_[1]="M.5,0 L.5,.5 L0,.5",_),"┛":(d={},d[3]="M.5,0 L.5,.5 L0,.5",d),"├":(p={},p[1]="M.5,0 L.5,1 M.5,.5 L1,.5",p),"┣":(v={},v[3]="M.5,0 L.5,1 M.5,.5 L1,.5",v),"┤":(y={},y[1]="M.5,0 L.5,1 M.5,.5 L0,.5",y),"┫":(g={},g[3]="M.5,0 L.5,1 M.5,.5 L0,.5",g),"┬":(m={},m[1]="M0,.5 L1,.5 M.5,.5 L.5,1",m),"┳":(b={},b[3]="M0,.5 L1,.5 M.5,.5 L.5,1",b),"┴":(S={},S[1]="M0,.5 L1,.5 M.5,.5 L.5,0",S),"┻":(C={},C[3]="M0,.5 L1,.5 M.5,.5 L.5,0",C),"┼":(w={},w[1]="M0,.5 L1,.5 M.5,0 L.5,1",w),"╋":(L={},L[3]="M0,.5 L1,.5 M.5,0 L.5,1",L),"╴":(E={},E[1]="M.5,.5 L0,.5",E),"╸":(x={},x[3]="M.5,.5 L0,.5",x),"╵":(R={},R[1]="M.5,.5 L.5,0",R),"╹":(k={},k[3]="M.5,.5 L.5,0",k),"╶":(M={},M[1]="M.5,.5 L1,.5",M),"╺":(A={},A[3]="M.5,.5 L1,.5",A),"╷":(O={},O[1]="M.5,.5 L.5,1",O),"╻":(D={},D[3]="M.5,.5 L.5,1",D),"═":(T={},T[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},T),"║":(B={},B[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},B),"╒":(P={},P[1]=function(e,t){return"M.5,1 L.5,"+(.5-t)+" L1,"+(.5-t)+" M.5,"+(.5+t)+" L1,"+(.5+t)},P),"╓":(I={},I[1]=function(e,t){return"M"+(.5-e)+",1 L"+(.5-e)+",.5 L1,.5 M"+(.5+e)+",.5 L"+(.5+e)+",1"},I),"╔":(H={},H[1]=function(e,t){return"M1,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1"},H),"╕":(j={},j[1]=function(e,t){return"M0,"+(.5-t)+" L.5,"+(.5-t)+" L.5,1 M0,"+(.5+t)+" L.5,"+(.5+t)},j),"╖":(F={},F[1]=function(e,t){return"M"+(.5+e)+",1 L"+(.5+e)+",.5 L0,.5 M"+(.5-e)+",.5 L"+(.5-e)+",1"},F),"╗":(W={},W[1]=function(e,t){return"M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M0,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",1"},W),"╘":(U={},U[1]=function(e,t){return"M.5,0 L.5,"+(.5+t)+" L1,"+(.5+t)+" M.5,"+(.5-t)+" L1,"+(.5-t)},U),"╙":(q={},q[1]=function(e,t){return"M1,.5 L"+(.5-e)+",.5 L"+(.5-e)+",0 M"+(.5+e)+",.5 L"+(.5+e)+",0"},q),"╚":(N={},N[1]=function(e,t){return"M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0 M1,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",0"},N),"╛":(z={},z[1]=function(e,t){return"M0,"+(.5+t)+" L.5,"+(.5+t)+" L.5,0 M0,"+(.5-t)+" L.5,"+(.5-t)},z),"╜":(K={},K[1]=function(e,t){return"M0,.5 L"+(.5+e)+",.5 L"+(.5+e)+",0 M"+(.5-e)+",.5 L"+(.5-e)+",0"},K),"╝":(G={},G[1]=function(e,t){return"M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M0,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",0"},G),"╞":(V={},V[1]=function(e,t){return"M.5,0 L.5,1 M.5,"+(.5-t)+" L1,"+(.5-t)+" M.5,"+(.5+t)+" L1,"+(.5+t)},V),"╟":(X={},X[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1 M"+(.5+e)+",.5 L1,.5"},X),"╠":(Z={},Z[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},Z),"╡":(Y={},Y[1]=function(e,t){return"M.5,0 L.5,1 M0,"+(.5-t)+" L.5,"+(.5-t)+" M0,"+(.5+t)+" L.5,"+(.5+t)},Y),"╢":(J={},J[1]=function(e,t){return"M0,.5 L"+(.5-e)+",.5 M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},J),"╣":($={},$[1]=function(e,t){return"M"+(.5+e)+",0 L"+(.5+e)+",1 M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0"},$),"╤":(Q={},Q[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)+" M.5,"+(.5+t)+" L.5,1"},Q),"╥":(ee={},ee[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",.5 L"+(.5-e)+",1 M"+(.5+e)+",.5 L"+(.5+e)+",1"},ee),"╦":(te={},te[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1"},te),"╧":(re={},re[1]=function(e,t){return"M.5,0 L.5,"+(.5-t)+" M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},re),"╨":(ie={},ie[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",.5 L"+(.5-e)+",0 M"+(.5+e)+",.5 L"+(.5+e)+",0"},ie),"╩":(ne={},ne[1]=function(e,t){return"M0,"+(.5+t)+" L1,"+(.5+t)+" M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},ne),"╪":(oe={},oe[1]=function(e,t){return"M.5,0 L.5,1 M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},oe),"╫":(se={},se[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},se),"╬":(ae={},ae[1]=function(e,t){return"M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1 M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},ae),"╱":(ce={},ce[1]="M1,0 L0,1",ce),"╲":(le={},le[1]="M0,0 L1,1",le),"╳":(he={},he[1]="M1,0 L0,1 M0,0 L1,1",he),"╼":(ue={},ue[1]="M.5,.5 L0,.5",ue[3]="M.5,.5 L1,.5",ue),"╽":(fe={},fe[1]="M.5,.5 L.5,0",fe[3]="M.5,.5 L.5,1",fe),"╾":(_e={},_e[1]="M.5,.5 L1,.5",_e[3]="M.5,.5 L0,.5",_e),"╿":(de={},de[1]="M.5,.5 L.5,1",de[3]="M.5,.5 L.5,0",de),"┍":(pe={},pe[1]="M.5,.5 L.5,1",pe[3]="M.5,.5 L1,.5",pe),"┎":(ve={},ve[1]="M.5,.5 L1,.5",ve[3]="M.5,.5 L.5,1",ve),"┑":(ye={},ye[1]="M.5,.5 L.5,1",ye[3]="M.5,.5 L0,.5",ye),"┒":(ge={},ge[1]="M.5,.5 L0,.5",ge[3]="M.5,.5 L.5,1",ge),"┕":(me={},me[1]="M.5,.5 L.5,0",me[3]="M.5,.5 L1,.5",me),"┖":(be={},be[1]="M.5,.5 L1,.5",be[3]="M.5,.5 L.5,0",be),"┙":(Se={},Se[1]="M.5,.5 L.5,0",Se[3]="M.5,.5 L0,.5",Se),"┚":(Ce={},Ce[1]="M.5,.5 L0,.5",Ce[3]="M.5,.5 L.5,0",Ce),"┝":(we={},we[1]="M.5,0 L.5,1",we[3]="M.5,.5 L1,.5",we),"┞":(Le={},Le[1]="M0.5,1 L.5,.5 L1,.5",Le[3]="M.5,.5 L.5,0",Le),"┟":(Ee={},Ee[1]="M.5,0 L.5,.5 L1,.5",Ee[3]="M.5,.5 L.5,1",Ee),"┠":(xe={},xe[1]="M.5,.5 L1,.5",xe[3]="M.5,0 L.5,1",xe),"┡":(Re={},Re[1]="M.5,.5 L.5,1",Re[3]="M.5,0 L.5,.5 L1,.5",Re),"┢":(ke={},ke[1]="M.5,.5 L.5,0",ke[3]="M0.5,1 L.5,.5 L1,.5",ke),"┥":(Me={},Me[1]="M.5,0 L.5,1",Me[3]="M.5,.5 L0,.5",Me),"┦":(Ae={},Ae[1]="M0,.5 L.5,.5 L.5,1",Ae[3]="M.5,.5 L.5,0",Ae),"┧":(Oe={},Oe[1]="M.5,0 L.5,.5 L0,.5",Oe[3]="M.5,.5 L.5,1",Oe),"┨":(De={},De[1]="M.5,.5 L0,.5",De[3]="M.5,0 L.5,1",De),"┩":(Te={},Te[1]="M.5,.5 L.5,1",Te[3]="M.5,0 L.5,.5 L0,.5",Te),"┪":(Be={},Be[1]="M.5,.5 L.5,0",Be[3]="M0,.5 L.5,.5 L.5,1",Be),"┭":(Pe={},Pe[1]="M0.5,1 L.5,.5 L1,.5",Pe[3]="M.5,.5 L0,.5",Pe),"┮":(Ie={},Ie[1]="M0,.5 L.5,.5 L.5,1",Ie[3]="M.5,.5 L1,.5",Ie),"┯":(He={},He[1]="M.5,.5 L.5,1",He[3]="M0,.5 L1,.5",He),"┰":(je={},je[1]="M0,.5 L1,.5",je[3]="M.5,.5 L.5,1",je),"┱":(Fe={},Fe[1]="M.5,.5 L1,.5",Fe[3]="M0,.5 L.5,.5 L.5,1",Fe),"┲":(We={},We[1]="M.5,.5 L0,.5",We[3]="M0.5,1 L.5,.5 L1,.5",We),"┵":(Ue={},Ue[1]="M.5,0 L.5,.5 L1,.5",Ue[3]="M.5,.5 L0,.5",Ue),"┶":(qe={},qe[1]="M.5,0 L.5,.5 L0,.5",qe[3]="M.5,.5 L1,.5",qe),"┷":(Ne={},Ne[1]="M.5,.5 L.5,0",Ne[3]="M0,.5 L1,.5",Ne),"┸":(ze={},ze[1]="M0,.5 L1,.5",ze[3]="M.5,.5 L.5,0",ze),"┹":(Ke={},Ke[1]="M.5,.5 L1,.5",Ke[3]="M.5,0 L.5,.5 L0,.5",Ke),"┺":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,0 L.5,.5 L1,.5",Ge),"┽":(Ve={},Ve[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Ve[3]="M.5,.5 L0,.5",Ve),"┾":(Xe={},Xe[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Xe[3]="M.5,.5 L1,.5",Xe),"┿":(Ze={},Ze[1]="M.5,0 L.5,1",Ze[3]="M0,.5 L1,.5",Ze),"╀":(Ye={},Ye[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ye[3]="M.5,.5 L.5,0",Ye),"╁":(Je={},Je[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Je[3]="M.5,.5 L.5,1",Je),"╂":($e={},$e[1]="M0,.5 L1,.5",$e[3]="M.5,0 L.5,1",$e),"╃":(Qe={},Qe[1]="M0.5,1 L.5,.5 L1,.5",Qe[3]="M.5,0 L.5,.5 L0,.5",Qe),"╄":(et={},et[1]="M0,.5 L.5,.5 L.5,1",et[3]="M.5,0 L.5,.5 L1,.5",et),"╅":(tt={},tt[1]="M.5,0 L.5,.5 L1,.5",tt[3]="M0,.5 L.5,.5 L.5,1",tt),"╆":(rt={},rt[1]="M.5,0 L.5,.5 L0,.5",rt[3]="M0.5,1 L.5,.5 L1,.5",rt),"╇":(it={},it[1]="M.5,.5 L.5,1",it[3]="M.5,.5 L.5,0 M0,.5 L1,.5",it),"╈":(nt={},nt[1]="M.5,.5 L.5,0",nt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",nt),"╉":(ot={},ot[1]="M.5,.5 L1,.5",ot[3]="M.5,0 L.5,1 M.5,.5 L0,.5",ot),"╊":(st={},st[1]="M.5,.5 L0,.5",st[3]="M.5,0 L.5,1 M.5,.5 L1,.5",st),"╌":(at={},at[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",at),"╍":(ct={},ct[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",ct),"┄":(lt={},lt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",lt),"┅":(ht={},ht[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",ht),"┈":(ut={},ut[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",ut),"┉":(ft={},ft[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",ft),"╎":(_t={},_t[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",_t),"╏":(dt={},dt[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",dt),"┆":(pt={},pt[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",pt),"┇":(vt={},vt[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",vt),"┊":(yt={},yt[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",yt),"┋":(gt={},gt[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",gt),"╭":(mt={},mt[1]="C.5,1,.5,.5,1,.5",mt),"╮":(bt={},bt[1]="C.5,1,.5,.5,0,.5",bt),"╯":(St={},St[1]="C.5,0,.5,.5,0,.5",St),"╰":(Ct={},Ct[1]="C.5,0,.5,.5,1,.5",Ct)},t.tryDrawCustomChar=function(e,r,i,n,o,s){var a=t.blockElementDefinitions[r];if(a)return function(e,t,r,i,n,o){for(var s=0;s<t.length;s++){var a=t[s],c=n/8,l=o/8;e.fillRect(r+a.x*c,i+a.y*l,a.w*c,a.h*l)}}(e,a,i,n,o,s),!0;var c=xt[r];if(c)return function(e,t,r,i,n,o){var s,a=Rt.get(t);a||(a=new Map,Rt.set(t,a));var c=e.fillStyle;if("string"!=typeof c)throw new Error('Unexpected fillStyle type "'+c+'"');var l=a.get(c);if(!l){var h=t[0].length,u=t.length,f=document.createElement("canvas");f.width=h,f.height=u;var _=(0,Et.throwIfFalsy)(f.getContext("2d")),d=new ImageData(h,u),p=void 0,v=void 0,y=void 0,g=void 0;if(c.startsWith("#"))p=parseInt(c.slice(1,3),16),v=parseInt(c.slice(3,5),16),y=parseInt(c.slice(5,7),16),g=c.length>7&&parseInt(c.slice(7,9),16)||1;else{if(!c.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+c+'" when drawing pattern glyph');p=(s=wt(c.substring(5,c.length-1).split(",").map((function(e){return parseFloat(e)})),4))[0],v=s[1],y=s[2],g=s[3]}for(var m=0;m<u;m++)for(var b=0;b<h;b++)d.data[4*(m*h+b)]=p,d.data[4*(m*h+b)+1]=v,d.data[4*(m*h+b)+2]=y,d.data[4*(m*h+b)+3]=t[m][b]*(255*g);_.putImageData(d,0,0),l=(0,Et.throwIfFalsy)(e.createPattern(f,null)),a.set(c,l)}e.fillStyle=l,e.fillRect(r,i,n,o)}(e,c,i,n,o,s),!0;var l=t.boxDrawingDefinitions[r];return!!l&&(function(e,t,r,i,n,o){var s,a,c,l;e.strokeStyle=e.fillStyle;try{for(var h=Lt(Object.entries(t)),u=h.next();!u.done;u=h.next()){var f=wt(u.value,2),_=f[0],d=f[1];e.beginPath(),e.lineWidth=window.devicePixelRatio*Number.parseInt(_);var p=void 0;p="function"==typeof d?d(.15,.15/o*n):d;try{for(var v=(c=void 0,Lt(p.split(" "))),y=v.next();!y.done;y=v.next()){var g=y.value,m=g[0],b=Mt[m];if(b){var S=g.substring(1).split(",");S[0]&&S[1]&&b(e,At(S,n,o,r,i))}else console.error('Could not find drawing instructions for "'+m+'"')}}catch(e){c={error:e}}finally{try{y&&!y.done&&(l=v.return)&&l.call(v)}finally{if(c)throw c.error}}e.stroke(),e.closePath()}}catch(e){s={error:e}}finally{try{u&&!u.done&&(a=h.return)&&a.call(h)}finally{if(s)throw s.error}}}(e,l,i,n,o,s),!0)};var Rt=new Map;function kt(e,t,r){return void 0===r&&(r=0),Math.max(Math.min(e,t),r)}var Mt={C:function(e,t){return e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},L:function(e,t){return e.lineTo(t[0],t[1])},M:function(e,t){return e.moveTo(t[0],t[1])}};function At(e,t,r,i,n){var o=e.map((function(e){return parseFloat(e)||parseInt(e)}));if(o.length<2)throw new Error("Too few arguments for instruction");for(var s=0;s<o.length;s+=2)o[s]*=t,0!==o[s]&&(o[s]=kt(Math.round(o[s]+.5)-.5,t,0)),o[s]+=i;for(var a=1;a<o.length;a+=2)o[a]*=r,0!==o[a]&&(o[a]=kt(Math.round(o[a]+.5)-.5,r,0)),o[a]+=n;return o}},3700:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0;var r=function(){function e(){this.cache=[]}return e.prototype.resize=function(e,t){for(var r=0;r<e;r++){this.cache.length<=r&&this.cache.push([]);for(var i=this.cache[r].length;i<t;i++)this.cache[r].push(void 0);this.cache[r].length=t}this.cache.length=e},e.prototype.clear=function(){for(var e=0;e<this.cache.length;e++)for(var t=0;t<this.cache[e].length;t++)this.cache[e][t]=void 0},e}();t.GridCache=r},5098:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;var a=r(1546),c=r(8803),l=r(2040),h=r(2585),u=function(e){function t(t,r,i,n,o,s,a,c,l){var h=e.call(this,t,"link",r,!0,i,n,a,c,l)||this;return o.onShowLinkUnderline((function(e){return h._onShowLinkUnderline(e)})),o.onHideLinkUnderline((function(e){return h._onHideLinkUnderline(e)})),s.onShowLinkUnderline((function(e){return h._onShowLinkUnderline(e)})),s.onHideLinkUnderline((function(e){return h._onHideLinkUnderline(e)})),h}return n(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state=void 0},t.prototype.reset=function(){this._clearCurrentLink()},t.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},t.prototype._onShowLinkUnderline=function(e){if(e.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,l.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},t.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},o([s(6,h.IBufferService),s(7,h.IOptionsService),s(8,h.IDecorationService)],t)}(a.BaseRenderLayer);t.LinkRenderLayer=u},3525:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var c=r(9596),l=r(4149),h=r(2512),u=r(5098),f=r(844),_=r(4725),d=r(2585),p=r(1420),v=r(8460),y=1,g=function(e){function t(t,r,i,n,o,s,a,f){var _=e.call(this)||this;_._colors=t,_._screenElement=r,_._bufferService=s,_._charSizeService=a,_._optionsService=f,_._id=y++,_._onRequestRedraw=new v.EventEmitter;var d=_._optionsService.rawOptions.allowTransparency;return _._renderLayers=[o.createInstance(c.TextRenderLayer,_._screenElement,0,_._colors,d,_._id),o.createInstance(l.SelectionRenderLayer,_._screenElement,1,_._colors,_._id),o.createInstance(u.LinkRenderLayer,_._screenElement,2,_._colors,_._id,i,n),o.createInstance(h.CursorRenderLayer,_._screenElement,3,_._colors,_._id,_._onRequestRedraw)],_.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},_._devicePixelRatio=window.devicePixelRatio,_._updateDimensions(),_.onOptionsChanged(),_}return n(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t,r;try{for(var i=a(this._renderLayers),n=i.next();!n.done;n=i.next())n.value.dispose()}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}e.prototype.dispose.call(this),(0,p.removeTerminalFromCache)(this._id)},t.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},t.prototype.setColors=function(e){var t,r;this._colors=e;try{for(var i=a(this._renderLayers),n=i.next();!n.done;n=i.next()){var o=n.value;o.setColors(this._colors),o.reset()}}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},t.prototype.onResize=function(e,t){var r,i;this._updateDimensions();try{for(var n=a(this._renderLayers),o=n.next();!o.done;o=n.next())o.value.resize(this.dimensions)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},t.prototype.onBlur=function(){this._runOperation((function(e){return e.onBlur()}))},t.prototype.onFocus=function(){this._runOperation((function(e){return e.onFocus()}))},t.prototype.onSelectionChanged=function(e,t,r){void 0===r&&(r=!1),this._runOperation((function(i){return i.onSelectionChanged(e,t,r)})),this._colors.selectionForeground&&this._onRequestRedraw.fire({start:0,end:this._bufferService.rows-1})},t.prototype.onCursorMove=function(){this._runOperation((function(e){return e.onCursorMove()}))},t.prototype.onOptionsChanged=function(){this._runOperation((function(e){return e.onOptionsChanged()}))},t.prototype.clear=function(){this._runOperation((function(e){return e.reset()}))},t.prototype._runOperation=function(e){var t,r;try{for(var i=a(this._renderLayers),n=i.next();!n.done;n=i.next())e(n.value)}catch(e){t={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}},t.prototype.renderRows=function(e,t){var r,i;try{for(var n=a(this._renderLayers),o=n.next();!o.done;o=n.next())o.value.onGridChanged(e,t)}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(r)throw r.error}}},t.prototype.clearTextureAtlas=function(){var e,t;try{for(var r=a(this._renderLayers),i=r.next();!i.done;i=r.next())i.value.clearTextureAtlas()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},o([s(4,d.IInstantiationService),s(5,d.IBufferService),s(6,_.ICharSizeService),s(7,d.IOptionsService)],t)}(f.Disposable);t.Renderer=g},1752:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isPowerlineGlyph=t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e},t.isPowerlineGlyph=function(e){return 57504<=e&&e<=57558}},4149:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;var a=r(1546),c=r(2585),l=function(e){function t(t,r,i,n,o,s,a){var c=e.call(this,t,"selection",r,!0,i,n,o,s,a)||this;return c._clearState(),c}return n(t,e),t.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._clearState()},t.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},t.prototype.onSelectionChanged=function(t,r,i){if(e.prototype.onSelectionChanged.call(this,t,r,i),this._didStateChange(t,r,i,this._bufferService.buffer.ydisp))if(this._clearAll(),t&&r){var n=t[1]-this._bufferService.buffer.ydisp,o=r[1]-this._bufferService.buffer.ydisp,s=Math.max(n,0),a=Math.min(o,this._bufferService.rows-1);if(s>=this._bufferService.rows||a<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,i){var c=t[0],l=r[0]-c,h=a-s+1;this._fillCells(c,s,l,h)}else{c=n===s?t[0]:0;var u=s===o?r[0]:this._bufferService.cols;this._fillCells(c,s,u-c,1);var f=Math.max(a-s-1,0);if(this._fillCells(0,s+1,this._bufferService.cols,f),s!==a){var _=o===a?r[0]:this._bufferService.cols;this._fillCells(0,a,_,1)}}this._state.start=[t[0],t[1]],this._state.end=[r[0],r[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},t.prototype._didStateChange=function(e,t,r,i){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||r!==this._state.columnSelectMode||i!==this._state.ydisp},t.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},o([s(4,c.IBufferService),s(5,c.IOptionsService),s(6,c.IDecorationService)],t)}(a.BaseRenderLayer);t.SelectionRenderLayer=l},9596:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;var c=r(3700),l=r(1546),h=r(3734),u=r(643),f=r(511),_=r(2585),d=r(4725),p=r(4269),v=function(e){function t(t,r,i,n,o,s,a,l,h){var u=e.call(this,t,"text",r,n,i,o,s,a,h)||this;return u._characterJoinerService=l,u._characterWidth=0,u._characterFont="",u._characterOverlapCache={},u._workCell=new f.CellData,u._state=new c.GridCache,u}return n(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t);var r=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===r||(this._characterWidth=t.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},t.prototype.reset=function(){this._state.clear(),this._clearAll()},t.prototype._forEachCell=function(e,t,r){for(var i=e;i<=t;i++)for(var n=i+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.lines.get(n),s=this._characterJoinerService.getJoinedCharacters(n),a=0;a<this._bufferService.cols;a++){o.loadCell(a,this._workCell);var c=this._workCell,l=!1,h=a;if(0!==c.getWidth()){if(s.length>0&&a===s[0][0]){l=!0;var f=s.shift();c=new p.JoinedCellData(this._workCell,o.translateToString(!0,f[0],f[1]),f[1]-f[0]),h=f[1]-1}!l&&this._isOverlapping(c)&&h<o.length-1&&o.getCodePoint(h+1)===u.NULL_CELL_CODE&&(c.content&=-12582913,c.content|=2<<22),r(c,a,i),a=h}}},t.prototype._drawBackground=function(e,t){var r=this,i=this._ctx,n=this._bufferService.cols,o=0,s=0,c=null;i.save(),this._forEachCell(e,t,(function(e,t,l){var u,f,_=null;e.isInverse()?_=e.isFgDefault()?r._colors.foreground.css:e.isFgRGB()?"rgb("+h.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":r._colors.ansi[e.getFgColor()].css:e.isBgRGB()?_="rgb("+h.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":e.isBgPalette()&&(_=r._colors.ansi[e.getBgColor()].css);var d=!1;try{for(var p=a(r._decorationService.getDecorationsAtCell(t,r._bufferService.buffer.ydisp+l)),v=p.next();!v.done;v=p.next()){var y=v.value;"top"!==y.options.layer&&d||(y.backgroundColorRGB&&(_=y.backgroundColorRGB.css),d="top"===y.options.layer)}}catch(e){u={error:e}}finally{try{v&&!v.done&&(f=p.return)&&f.call(p)}finally{if(u)throw u.error}}null===c&&(o=t,s=l),l!==s?(i.fillStyle=c||"",r._fillCells(o,s,n-o,1),o=t,s=l):c!==_&&(i.fillStyle=c||"",r._fillCells(o,s,t-o,1),o=t,s=l),c=_})),null!==c&&(i.fillStyle=c,this._fillCells(o,s,n-o,1)),i.restore()},t.prototype._drawForeground=function(e,t){var r=this;this._forEachCell(e,t,(function(e,t,i){if(!e.isInvisible()&&(r._drawChars(e,t,i),e.isUnderline()||e.isStrikethrough())){if(r._ctx.save(),e.isInverse())if(e.isBgDefault())r._ctx.fillStyle=r._colors.background.css;else if(e.isBgRGB())r._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var n=e.getBgColor();r._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),r._ctx.fillStyle=r._colors.ansi[n].css}else if(e.isFgDefault())r._ctx.fillStyle=r._colors.foreground.css;else if(e.isFgRGB())r._ctx.fillStyle="rgb("+h.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();r._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),r._ctx.fillStyle=r._colors.ansi[o].css}e.isStrikethrough()&&r._fillMiddleLineAtCells(t,i,e.getWidth()),e.isUnderline()&&r._fillBottomLineAtCells(t,i,e.getWidth()),r._ctx.restore()}}))},t.prototype.onGridChanged=function(e,t){0!==this._state.cache.length&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,t-e+1),this._drawBackground(e,t),this._drawForeground(e,t))},t.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},t.prototype._isOverlapping=function(e){if(1!==e.getWidth())return!1;if(e.getCode()<256)return!1;var t=e.getChars();if(this._characterOverlapCache.hasOwnProperty(t))return this._characterOverlapCache[t];this._ctx.save(),this._ctx.font=this._characterFont;var r=Math.floor(this._ctx.measureText(t).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=r,r},o([s(5,_.IBufferService),s(6,_.IOptionsService),s(7,d.ICharacterJoinerService),s(8,_.IDecorationService)],t)}(l.BaseRenderLayer);t.TextRenderLayer=v},9616:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCharAtlas=void 0;var r=function(){function e(){this._didWarmUp=!1}return e.prototype.dispose=function(){},e.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},e.prototype._doWarmUp=function(){},e.prototype.clear=function(){},e.prototype.beginFrame=function(){},e}();t.BaseCharAtlas=r},1420:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireCharAtlas=void 0;var i=r(2040),n=r(1906),o=[];t.acquireCharAtlas=function(e,t,r,s,a){for(var c=(0,i.generateConfig)(s,a,e,r),l=0;l<o.length;l++){var h=(u=o[l]).ownedBy.indexOf(t);if(h>=0){if((0,i.configEquals)(u.config,c))return u.atlas;1===u.ownedBy.length?(u.atlas.dispose(),o.splice(l,1)):u.ownedBy.splice(h,1);break}}for(l=0;l<o.length;l++){var u=o[l];if((0,i.configEquals)(u.config,c))return u.ownedBy.push(t),u.atlas}var f={atlas:new n.DynamicCharAtlas(document,c),config:c,ownedBy:[t]};return o.push(f),f.atlas},t.removeTerminalFromCache=function(e){for(var t=0;t<o.length;t++){var r=o[t].ownedBy.indexOf(e);if(-1!==r){1===o[t].ownedBy.length?(o[t].atlas.dispose(),o.splice(t,1)):o[t].ownedBy.splice(r,1);break}}}},2040:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;var i=r(643);t.generateConfig=function(e,t,r,i){var n={foreground:i.foreground,background:i.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:i.ansi.slice()};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:e,scaledCharHeight:t,fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontWeightBold:r.fontWeightBold,allowTransparency:r.allowTransparency,colors:n}},t.configEquals=function(e,t){for(var r=0;r<e.colors.ansi.length;r++)if(e.colors.ansi[r].rgba!==t.colors.ansi[r].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.scaledCharWidth===t.scaledCharWidth&&e.scaledCharHeight===t.scaledCharHeight&&e.colors.foreground===t.colors.foreground&&e.colors.background===t.colors.background},t.is256Color=function(e){return e<i.DEFAULT_COLOR}},8803:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR_ATLAS_CELL_SPACING=t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;var i=r(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=i.isFirefox||i.isLegacyEdge?"bottom":"ideographic",t.CHAR_ATLAS_CELL_SPACING=1},1906:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCharAtlas=t.DynamicCharAtlas=t.getGlyphCacheKey=void 0;var o=r(8803),s=r(9616),a=r(5680),c=r(7001),l=r(6114),h=r(1752),u=r(8055),f=1024,_=1024,d={css:"rgba(0, 0, 0, 0)",rgba:0};function p(e){return e.code<<21|e.bg<<12|e.fg<<3|(e.bold?0:4)+(e.dim?0:2)+(e.italic?0:1)}t.getGlyphCacheKey=p;var v=function(e){function t(t,r){var i=e.call(this)||this;i._config=r,i._drawToCacheCount=0,i._glyphsWaitingOnBitmap=[],i._bitmapCommitTimeout=null,i._bitmap=null,i._cacheCanvas=t.createElement("canvas"),i._cacheCanvas.width=f,i._cacheCanvas.height=_,i._cacheCtx=(0,h.throwIfFalsy)(i._cacheCanvas.getContext("2d",{alpha:!0}));var n=t.createElement("canvas");n.width=i._config.scaledCharWidth,n.height=i._config.scaledCharHeight,i._tmpCtx=(0,h.throwIfFalsy)(n.getContext("2d",{alpha:i._config.allowTransparency})),i._width=Math.floor(f/i._config.scaledCharWidth),i._height=Math.floor(_/i._config.scaledCharHeight);var o=i._width*i._height;return i._cacheMap=new c.LRUMap(o),i._cacheMap.prealloc(o),i}return n(t,e),t.prototype.dispose=function(){null!==this._bitmapCommitTimeout&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},t.prototype.beginFrame=function(){this._drawToCacheCount=0},t.prototype.clear=function(){if(this._cacheMap.size>0){var e=this._width*this._height;this._cacheMap=new c.LRUMap(e),this._cacheMap.prealloc(e)}this._cacheCtx.clearRect(0,0,f,_),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},t.prototype.draw=function(e,t,r,i){if(32===t.code)return!0;if(!this._canCache(t))return!1;var n=p(t),o=this._cacheMap.get(n);if(null!=o)return this._drawFromCache(e,o,r,i),!0;if(this._drawToCacheCount<100){var s;s=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var a=this._drawToCache(t,s);return this._cacheMap.set(n,a),this._drawFromCache(e,a,r,i),!0}return!1},t.prototype._canCache=function(e){return e.code<256},t.prototype._toCoordinateX=function(e){return e%this._width*this._config.scaledCharWidth},t.prototype._toCoordinateY=function(e){return Math.floor(e/this._width)*this._config.scaledCharHeight},t.prototype._drawFromCache=function(e,t,r,i){if(!t.isEmpty){var n=this._toCoordinateX(t.index),o=this._toCoordinateY(t.index);e.drawImage(t.inBitmap?this._bitmap:this._cacheCanvas,n,o,this._config.scaledCharWidth,this._config.scaledCharHeight,r,i,this._config.scaledCharWidth,this._config.scaledCharHeight)}},t.prototype._getColorFromAnsiIndex=function(e){return e<this._config.colors.ansi.length?this._config.colors.ansi[e]:a.DEFAULT_ANSI_COLORS[e]},t.prototype._getBackgroundColor=function(e){return this._config.allowTransparency?d:e.bg===o.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:e.bg<256?this._getColorFromAnsiIndex(e.bg):this._config.colors.background},t.prototype._getForegroundColor=function(e){return e.fg===o.INVERTED_DEFAULT_COLOR?u.color.opaque(this._config.colors.background):e.fg<256?this._getColorFromAnsiIndex(e.fg):this._config.colors.foreground},t.prototype._drawToCache=function(e,t){this._drawToCacheCount++,this._tmpCtx.save();var r=this._getBackgroundColor(e);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=r.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var i=e.bold?this._config.fontWeightBold:this._config.fontWeight,n=e.italic?"italic":"";this._tmpCtx.font=n+" "+i+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=o.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(e).css,e.dim&&(this._tmpCtx.globalAlpha=o.DIM_OPACITY),this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight);var s=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),a=!1;if(this._config.allowTransparency||(a=g(s,r)),a&&"_"===e.chars&&!this._config.allowTransparency)for(var c=1;c<=5&&(this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight-c),a=g(s=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),r));c++);this._tmpCtx.restore();var l=this._toCoordinateX(t),h=this._toCoordinateY(t);this._cacheCtx.putImageData(s,l,h);var u={index:t,isEmpty:a,inBitmap:!1};return this._addGlyphToBitmap(u),u},t.prototype._addGlyphToBitmap=function(e){var t=this;!("createImageBitmap"in window)||l.isFirefox||l.isSafari||(this._glyphsWaitingOnBitmap.push(e),null===this._bitmapCommitTimeout&&(this._bitmapCommitTimeout=window.setTimeout((function(){return t._generateBitmap()}),100)))},t.prototype._generateBitmap=function(){var e=this,t=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then((function(r){e._bitmap=r;for(var i=0;i<t.length;i++)t[i].inBitmap=!0})),this._bitmapCommitTimeout=null},t}(s.BaseCharAtlas);t.DynamicCharAtlas=v;var y=function(e){function t(t,r){return e.call(this)||this}return n(t,e),t.prototype.draw=function(e,t,r,i){return!1},t}(s.BaseCharAtlas);function g(e,t){for(var r=!0,i=t.rgba>>>24,n=t.rgba>>>16&255,o=t.rgba>>>8&255,s=0;s<e.data.length;s+=4)e.data[s]===i&&e.data[s+1]===n&&e.data[s+2]===o?e.data[s+3]=0:r=!1;return r}t.NoneCharAtlas=y},7001:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LRUMap=void 0;var r=function(){function e(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return e.prototype._unlinkNode=function(e){var t=e.prev,r=e.next;e===this._head&&(this._head=r),e===this._tail&&(this._tail=t),null!==t&&(t.next=r),null!==r&&(r.prev=t)},e.prototype._appendNode=function(e){var t=this._tail;null!==t&&(t.next=e),e.prev=t,e.next=null,this._tail=e,null===this._head&&(this._head=e)},e.prototype.prealloc=function(e){for(var t=this._nodePool,r=0;r<e;r++)t.push({prev:null,next:null,key:null,value:null})},e.prototype.get=function(e){var t=this._map[e];return void 0!==t?(this._unlinkNode(t),this._appendNode(t),t.value):null},e.prototype.peekValue=function(e){var t=this._map[e];return void 0!==t?t.value:null},e.prototype.peek=function(){var e=this._head;return null===e?null:e.value},e.prototype.set=function(e,t){var r=this._map[e];if(void 0!==r)r=this._map[e],this._unlinkNode(r),r.value=t;else if(this.size>=this.capacity)r=this._head,this._unlinkNode(r),delete this._map[r.key],r.key=e,r.value=t,this._map[e]=r;else{var i=this._nodePool;i.length>0?((r=i.pop()).key=e,r.value=t):r={prev:null,next:null,key:e,value:t},this._map[e]=r,this.size++}this._appendNode(r)},e}();t.LRUMap=r},1296:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;var c=r(3787),l=r(8803),h=r(844),u=r(4725),f=r(2585),_=r(8460),d=r(8055),p=r(9631),v="xterm-dom-renderer-owner-",y="xterm-fg-",g="xterm-bg-",m="xterm-focus",b=1,S=function(e){function t(t,r,i,n,o,s,a,l,h,u){var f=e.call(this)||this;return f._colors=t,f._element=r,f._screenElement=i,f._viewportElement=n,f._linkifier=o,f._linkifier2=s,f._charSizeService=l,f._optionsService=h,f._bufferService=u,f._terminalClass=b++,f._rowElements=[],f._rowContainer=document.createElement("div"),f._rowContainer.classList.add("xterm-rows"),f._rowContainer.style.lineHeight="normal",f._rowContainer.setAttribute("aria-hidden","true"),f._refreshRowElements(f._bufferService.cols,f._bufferService.rows),f._selectionContainer=document.createElement("div"),f._selectionContainer.classList.add("xterm-selection"),f._selectionContainer.setAttribute("aria-hidden","true"),f.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},f._updateDimensions(),f._injectCss(),f._rowFactory=a.createInstance(c.DomRendererRowFactory,document,f._colors),f._element.classList.add(v+f._terminalClass),f._screenElement.appendChild(f._rowContainer),f._screenElement.appendChild(f._selectionContainer),f.register(f._linkifier.onShowLinkUnderline((function(e){return f._onLinkHover(e)}))),f.register(f._linkifier.onHideLinkUnderline((function(e){return f._onLinkLeave(e)}))),f.register(f._linkifier2.onShowLinkUnderline((function(e){return f._onLinkHover(e)}))),f.register(f._linkifier2.onHideLinkUnderline((function(e){return f._onLinkLeave(e)}))),f}return n(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return(new _.EventEmitter).event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._element.classList.remove(v+this._terminalClass),(0,p.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),e.prototype.dispose.call(this)},t.prototype._updateDimensions=function(){var e,t;this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;try{for(var r=a(this._rowElements),i=r.next();!i.done;i=r.next()){var n=i.value;n.style.width=this.dimensions.canvasWidth+"px",n.style.height=this.dimensions.actualCellHeight+"px",n.style.lineHeight=this.dimensions.actualCellHeight+"px",n.style.overflow="hidden"}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var o=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=o,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.setColors=function(e){this._colors=e,this._injectCss()},t.prototype._injectCss=function(){var e=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var t=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";t+=this._terminalSelector+" span:not(."+c.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+c.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+c.ITALIC_CLASS+" { font-style: italic;}",t+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% {  box-shadow: none; }}",t+="@keyframes blink_block_"+this._terminalClass+" { 0% {  background-color: "+this._colors.cursor.css+";  color: "+this._colors.cursorAccent.css+"; } 50% {  background-color: "+this._colors.cursorAccent.css+";  color: "+this._colors.cursor.css+"; }}",t+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+c.CURSOR_CLASS+"."+c.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+c.CURSOR_CLASS+"."+c.CURSOR_BLINK_CLASS+":not(."+c.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+c.CURSOR_CLASS+"."+c.CURSOR_BLINK_CLASS+"."+c.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+c.CURSOR_CLASS+"."+c.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+c.CURSOR_CLASS+"."+c.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+c.CURSOR_CLASS+"."+c.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",t+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach((function(r,i){t+=e._terminalSelector+" ."+y+i+" { color: "+r.css+"; }"+e._terminalSelector+" ."+g+i+" { background-color: "+r.css+"; }"})),t+=this._terminalSelector+" ."+y+l.INVERTED_DEFAULT_COLOR+" { color: "+d.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+g+l.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=t},t.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},t.prototype._refreshRowElements=function(e,t){for(var r=this._rowElements.length;r<=t;r++){var i=document.createElement("div");this._rowContainer.appendChild(i),this._rowElements.push(i)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())},t.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},t.prototype.onCharSizeChanged=function(){this._updateDimensions()},t.prototype.onBlur=function(){this._rowContainer.classList.remove(m)},t.prototype.onFocus=function(){this._rowContainer.classList.add(m)},t.prototype.onSelectionChanged=function(e,t,r){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(this._rowFactory.onSelectionChanged(e,t,r),this.renderRows(0,this._bufferService.rows-1),e&&t){var i=e[1]-this._bufferService.buffer.ydisp,n=t[1]-this._bufferService.buffer.ydisp,o=Math.max(i,0),s=Math.min(n,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||s<0)){var a=document.createDocumentFragment();if(r)a.appendChild(this._createSelectionElement(o,e[0],t[0],s-o+1));else{var c=i===o?e[0]:0,l=o===n?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,c,l));var h=s-o-1;if(a.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,h)),o!==s){var u=n===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(s,0,u))}}this._selectionContainer.appendChild(a)}}},t.prototype._createSelectionElement=function(e,t,r,i){void 0===i&&(i=1);var n=document.createElement("div");return n.style.height=i*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(r-t)+"px",n},t.prototype.onCursorMove=function(){},t.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},t.prototype.clear=function(){var e,t;try{for(var r=a(this._rowElements),i=r.next();!i.done;i=r.next())i.value.innerText=""}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.renderRows=function(e,t){for(var r=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._optionsService.rawOptions.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerText="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.rawOptions.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a,a===r,l,i,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(t.prototype,"_terminalSelector",{get:function(){return"."+v+this._terminalClass},enumerable:!1,configurable:!0}),t.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},t.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},t.prototype._setCellUnderline=function(e,t,r,i,n,o){for(;e!==t||r!==i;){var s=this._rowElements[r];if(!s)return;var a=s.children[e];a&&(a.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,r++)}},o([s(6,f.IInstantiationService),s(7,u.ICharSizeService),s(8,f.IOptionsService),s(9,f.IBufferService)],t)}(h.Disposable);t.DomRenderer=S},3787:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=t.CURSOR_STYLE_UNDERLINE_CLASS=t.CURSOR_STYLE_BAR_CLASS=t.CURSOR_STYLE_BLOCK_CLASS=t.CURSOR_BLINK_CLASS=t.CURSOR_CLASS=t.STRIKETHROUGH_CLASS=t.UNDERLINE_CLASS=t.ITALIC_CLASS=t.DIM_CLASS=t.BOLD_CLASS=void 0;var s=r(8803),a=r(643),c=r(511),l=r(2585),h=r(8055),u=r(4725),f=r(4269),_=r(1752);t.BOLD_CLASS="xterm-bold",t.DIM_CLASS="xterm-dim",t.ITALIC_CLASS="xterm-italic",t.UNDERLINE_CLASS="xterm-underline",t.STRIKETHROUGH_CLASS="xterm-strikethrough",t.CURSOR_CLASS="xterm-cursor",t.CURSOR_BLINK_CLASS="xterm-cursor-blink",t.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",t.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",t.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var d=function(){function e(e,t,r,i,n,o){this._document=e,this._colors=t,this._characterJoinerService=r,this._optionsService=i,this._coreService=n,this._decorationService=o,this._workCell=new c.CellData,this._columnSelectMode=!1}return e.prototype.setColors=function(e){this._colors=e},e.prototype.onSelectionChanged=function(e,t,r){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=r},e.prototype.createRow=function(e,r,i,n,c,l,u,_){for(var d,v,y=this._document.createDocumentFragment(),g=this._characterJoinerService.getJoinedCharacters(r),m=0,b=Math.min(e.length,_)-1;b>=0;b--)if(e.loadCell(b,this._workCell).getCode()!==a.NULL_CELL_CODE||i&&b===c){m=b+1;break}for(b=0;b<m;b++){e.loadCell(b,this._workCell);var S=this._workCell.getWidth();if(0!==S){var C=!1,w=b,L=this._workCell;if(g.length>0&&b===g[0][0]){C=!0;var E=g.shift();L=new f.JoinedCellData(this._workCell,e.translateToString(!0,E[0],E[1]),E[1]-E[0]),w=E[1]-1,S=L.getWidth()}var x=this._document.createElement("span");if(S>1&&(x.style.width=u*S+"px"),C&&(x.style.display="inline",c>=b&&c<=w&&(c=b)),!this._coreService.isCursorHidden&&i&&b===c)switch(x.classList.add(t.CURSOR_CLASS),l&&x.classList.add(t.CURSOR_BLINK_CLASS),n){case"bar":x.classList.add(t.CURSOR_STYLE_BAR_CLASS);break;case"underline":x.classList.add(t.CURSOR_STYLE_UNDERLINE_CLASS);break;default:x.classList.add(t.CURSOR_STYLE_BLOCK_CLASS)}L.isBold()&&x.classList.add(t.BOLD_CLASS),L.isItalic()&&x.classList.add(t.ITALIC_CLASS),L.isDim()&&x.classList.add(t.DIM_CLASS),L.isUnderline()&&x.classList.add(t.UNDERLINE_CLASS),L.isInvisible()?x.textContent=a.WHITESPACE_CELL_CHAR:x.textContent=L.getChars()||a.WHITESPACE_CELL_CHAR,L.isStrikethrough()&&x.classList.add(t.STRIKETHROUGH_CLASS);var R=L.getFgColor(),k=L.getFgColorMode(),M=L.getBgColor(),A=L.getBgColorMode(),O=!!L.isInverse();if(O){var D=R;R=M,M=D;var T=k;k=A,A=T}var B=void 0,P=void 0,I=!1;try{for(var H=(d=void 0,o(this._decorationService.getDecorationsAtCell(b,r))),j=H.next();!j.done;j=H.next()){var F=j.value;"top"!==F.options.layer&&I||(F.backgroundColorRGB&&(A=50331648,M=F.backgroundColorRGB.rgba>>8&16777215,B=F.backgroundColorRGB),F.foregroundColorRGB&&(k=50331648,R=F.foregroundColorRGB.rgba>>8&16777215,P=F.foregroundColorRGB),I="top"===F.options.layer)}}catch(e){d={error:e}}finally{try{j&&!j.done&&(v=H.return)&&v.call(H)}finally{if(d)throw d.error}}switch(I||this._colors.selectionForeground&&this._isCellInSelection(b,r)&&(k=50331648,R=this._colors.selectionForeground.rgba>>8&16777215,P=this._colors.selectionForeground),I&&x.classList.add("xterm-decoration-top"),k){case 16777216:case 33554432:L.isBold()&&R<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(R+=8),this._applyMinimumContrast(x,this._colors.background,this._colors.ansi[R],L,void 0,void 0)||x.classList.add("xterm-fg-"+R);break;case 50331648:var W=h.rgba.toColor(R>>16&255,R>>8&255,255&R);this._applyMinimumContrast(x,this._colors.background,W,L,B,P)||this._addStyle(x,"color:#"+p(R.toString(16),"0",6));break;default:this._applyMinimumContrast(x,this._colors.background,this._colors.foreground,L,void 0,void 0)||O&&x.classList.add("xterm-fg-"+s.INVERTED_DEFAULT_COLOR)}switch(A){case 16777216:case 33554432:x.classList.add("xterm-bg-"+M);break;case 50331648:this._addStyle(x,"background-color:#"+p((M>>>0).toString(16),"0",6));break;default:O&&x.classList.add("xterm-bg-"+s.INVERTED_DEFAULT_COLOR)}y.appendChild(x),b=w}}return y},e.prototype._applyMinimumContrast=function(e,t,r,i,n,o){if(1===this._optionsService.rawOptions.minimumContrastRatio||(0,_.isPowerlineGlyph)(i.getCode()))return!1;var s=void 0;return n&&o||(s=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg)),void 0===s&&(s=h.color.ensureContrastRatio(n||t,o||r,this._optionsService.rawOptions.minimumContrastRatio),n&&o||this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=s?s:null)),!!s&&(this._addStyle(e,"color:"+s.css),!0)},e.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},e.prototype._isCellInSelection=function(e,t){var r=this._selectionStart,i=this._selectionEnd;return!(!r||!i)&&(this._columnSelectMode?e>=r[0]&&t>=r[1]&&e<i[0]&&t<i[1]:t>r[1]&&t<i[1]||r[1]===i[1]&&t===r[1]&&e>=r[0]&&e<i[0]||r[1]<i[1]&&t===i[1]&&e<i[0]||r[1]<i[1]&&t===r[1]&&e>=r[0])},i([n(2,u.ICharacterJoinerService),n(3,l.IOptionsService),n(4,l.ICoreService),n(5,l.IDecorationService)],e)}();function p(e,t,r){for(;e.length<r;)e=t+e;return e}t.DomRendererRowFactory=d},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0;var r=function(){function e(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}return e.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(e.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"finalSelectionEnd",{get:function(){return this.isSelectAllActive?[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1]:this.selectionStart?!this.selectionEnd||this.areSelectionValuesReversed()?(e=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]:this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?(e=this.selectionStart[0]+this.selectionStartLength)>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd:void 0;var e},enumerable:!1,configurable:!0}),e.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},e.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},e}();t.SelectionModel=r},428:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;var o=r(2585),s=r(8460),a=function(){function e(e,t,r){this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=new s.EventEmitter,this._measureStrategy=new c(e,t,this._optionsService)}return Object.defineProperty(e.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),e.prototype.measure=function(){var e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())},i([n(2,o.IOptionsService)],e)}();t.CharSizeService=a;var c=function(){function e(e,t,r){this._document=e,this._parentElement=t,this._optionsService=r,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return e.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var e=this._measureElement.getBoundingClientRect();return 0!==e.width&&0!==e.height&&(this._result.width=e.width,this._result.height=Math.ceil(e.height)),this._result},e}()},4269:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;var a=r(3734),c=r(643),l=r(511),h=r(2585),u=function(e){function t(t,r,i){var n=e.call(this)||this;return n.content=0,n.combinedData="",n.fg=t.fg,n.bg=t.bg,n.combinedData=r,n._width=i,n}return n(t,e),t.prototype.isCombined=function(){return 2097152},t.prototype.getWidth=function(){return this._width},t.prototype.getChars=function(){return this.combinedData},t.prototype.getCode=function(){return 2097151},t.prototype.setFromCharData=function(e){throw new Error("not implemented")},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(a.AttributeData);t.JoinedCellData=u;var f=function(){function e(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new l.CellData}return e.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},e.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},e.prototype.getJoinedCharacters=function(e){if(0===this._characterJoiners.length)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];for(var r=[],i=t.translateToString(!0),n=0,o=0,s=0,a=t.getFg(0),l=t.getBg(0),h=0;h<t.getTrimmedLength();h++)if(t.loadCell(h,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==a||this._workCell.bg!==l){if(h-n>1)for(var u=this._getJoinedRanges(i,s,o,t,n),f=0;f<u.length;f++)r.push(u[f]);n=h,s=o,a=this._workCell.fg,l=this._workCell.bg}o+=this._workCell.getChars().length||c.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-n>1)for(u=this._getJoinedRanges(i,s,o,t,n),f=0;f<u.length;f++)r.push(u[f]);return r},e.prototype._getJoinedRanges=function(t,r,i,n,o){var s=t.substring(r,i),a=[];try{a=this._characterJoiners[0].handler(s)}catch(e){console.error(e)}for(var c=1;c<this._characterJoiners.length;c++)try{for(var l=this._characterJoiners[c].handler(s),h=0;h<l.length;h++)e._mergeRanges(a,l[h])}catch(e){console.error(e)}return this._stringRangesToCellRanges(a,n,o),a},e.prototype._stringRangesToCellRanges=function(e,t,r){var i=0,n=!1,o=0,s=e[i];if(s){for(var a=r;a<this._bufferService.cols;a++){var l=t.getWidth(a),h=t.getString(a).length||c.WHITESPACE_CELL_CHAR.length;if(0!==l){if(!n&&s[0]<=o&&(s[0]=a,n=!0),s[1]<=o){if(s[1]=a,!(s=e[++i]))break;s[0]<=o?(s[0]=a,n=!0):n=!1}o+=h}}s&&(s[1]=this._bufferService.cols)}},e._mergeRanges=function(e,t){for(var r=!1,i=0;i<e.length;i++){var n=e[i];if(r){if(t[1]<=n[0])return e[i-1][1]=t[1],e;if(t[1]<=n[1])return e[i-1][1]=Math.max(t[1],n[1]),e.splice(i,1),e;e.splice(i,1),i--}else{if(t[1]<=n[0])return e.splice(i,0,t),e;if(t[1]<=n[1])return n[0]=Math.min(t[0],n[0]),e;t[0]<n[1]&&(n[0]=Math.min(t[0],n[0]),r=!0)}}return r?e[e.length-1][1]=t[1]:e.push(t),e},e=o([s(0,h.IBufferService)],e)}();t.CharacterJoinerService=f},5114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;var r=function(){function e(e){this._textarea=e}return Object.defineProperty(e.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),e}();t.CoreBrowserService=r},8934:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;var o=r(4725),s=r(9806),a=function(){function e(e,t){this._renderService=e,this._charSizeService=t}return e.prototype.getCoords=function(e,t,r,i,n){return(0,s.getCoords)(e,t,r,i,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,n)},e.prototype.getRawByteCoords=function(e,t,r,i){var n=this.getCoords(e,t,r,i);return(0,s.getRawByteCoords)(n)},i([n(0,o.IRenderService),n(1,o.ICharSizeService)],e)}();t.MouseService=a},3230:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;var a=r(6193),c=r(8460),l=r(844),h=r(5596),u=r(3656),f=r(2585),_=r(4725),d=function(e){function t(t,r,i,n,o,s,l){var f=e.call(this)||this;if(f._renderer=t,f._rowCount=r,f._charSizeService=o,f._isPaused=!1,f._needsFullRefresh=!1,f._isNextRenderRedrawOnly=!0,f._needsSelectionRefresh=!1,f._canvasWidth=0,f._canvasHeight=0,f._selectionState={start:void 0,end:void 0,columnSelectMode:!1},f._onDimensionsChange=new c.EventEmitter,f._onRenderedViewportChange=new c.EventEmitter,f._onRender=new c.EventEmitter,f._onRefreshRequest=new c.EventEmitter,f.register({dispose:function(){return f._renderer.dispose()}}),f._renderDebouncer=new a.RenderDebouncer((function(e,t){return f._renderRows(e,t)})),f.register(f._renderDebouncer),f._screenDprMonitor=new h.ScreenDprMonitor,f._screenDprMonitor.setListener((function(){return f.onDevicePixelRatioChange()})),f.register(f._screenDprMonitor),f.register(l.onResize((function(){return f._fullRefresh()}))),f.register(l.buffers.onBufferActivate((function(){var e;return null===(e=f._renderer)||void 0===e?void 0:e.clear()}))),f.register(n.onOptionChange((function(){return f._handleOptionsChanged()}))),f.register(f._charSizeService.onCharSizeChange((function(){return f.onCharSizeChanged()}))),f.register(s.onDecorationRegistered((function(){return f._fullRefresh()}))),f.register(s.onDecorationRemoved((function(){return f._fullRefresh()}))),f._renderer.onRequestRedraw((function(e){return f.refreshRows(e.start,e.end,!0)})),f.register((0,u.addDisposableDomListener)(window,"resize",(function(){return f.onDevicePixelRatioChange()}))),"IntersectionObserver"in window){var _=new IntersectionObserver((function(e){return f._onIntersectionChange(e[e.length-1])}),{threshold:0});_.observe(i),f.register({dispose:function(){return _.disconnect()}})}return f}return n(t,e),Object.defineProperty(t.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRenderedViewportChange",{get:function(){return this._onRenderedViewportChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),t.prototype._onIntersectionChange=function(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},t.prototype.refreshRows=function(e,t,r){void 0===r&&(r=!1),this._isPaused?this._needsFullRefresh=!0:(r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))},t.prototype._renderRows=function(e,t){this._renderer.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0},t.prototype.resize=function(e,t){this._rowCount=t,this._fireOnCanvasResize()},t.prototype._handleOptionsChanged=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},t.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setRenderer=function(e){var t=this;this._renderer.dispose(),this._renderer=e,this._renderer.onRequestRedraw((function(e){return t.refreshRows(e.start,e.end,!0)})),this._needsSelectionRefresh=!0,this._fullRefresh()},t.prototype.addRefreshCallback=function(e){return this._renderDebouncer.addRefreshCallback(e)},t.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},t.prototype.clearTextureAtlas=function(){var e,t;null===(t=null===(e=this._renderer)||void 0===e?void 0:e.clearTextureAtlas)||void 0===t||t.call(e),this._fullRefresh()},t.prototype.setColors=function(e){this._renderer.setColors(e),this._fullRefresh()},t.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},t.prototype.onResize=function(e,t){this._renderer.onResize(e,t),this._fullRefresh()},t.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},t.prototype.onBlur=function(){this._renderer.onBlur()},t.prototype.onFocus=function(){this._renderer.onFocus()},t.prototype.onSelectionChanged=function(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.onSelectionChanged(e,t,r)},t.prototype.onCursorMove=function(){this._renderer.onCursorMove()},t.prototype.clear=function(){this._renderer.clear()},o([s(3,f.IOptionsService),s(4,_.ICharSizeService),s(5,f.IDecorationService),s(6,f.IBufferService)],t)}(l.Disposable);t.RenderService=d},9312:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;var a=r(6114),c=r(456),l=r(511),h=r(8460),u=r(4725),f=r(2585),_=r(9806),d=r(9504),p=r(844),v=r(4841),y=String.fromCharCode(160),g=new RegExp(y,"g"),m=function(e){function t(t,r,i,n,o,s,a,u){var f=e.call(this)||this;return f._element=t,f._screenElement=r,f._linkifier=i,f._bufferService=n,f._coreService=o,f._mouseService=s,f._optionsService=a,f._renderService=u,f._dragScrollAmount=0,f._enabled=!0,f._workCell=new l.CellData,f._mouseDownTimeStamp=0,f._oldHasSelection=!1,f._oldSelectionStart=void 0,f._oldSelectionEnd=void 0,f._onLinuxMouseSelection=f.register(new h.EventEmitter),f._onRedrawRequest=f.register(new h.EventEmitter),f._onSelectionChange=f.register(new h.EventEmitter),f._onRequestScrollLines=f.register(new h.EventEmitter),f._mouseMoveListener=function(e){return f._onMouseMove(e)},f._mouseUpListener=function(e){return f._onMouseUp(e)},f._coreService.onUserInput((function(){f.hasSelection&&f.clearSelection()})),f._trimListener=f._bufferService.buffer.lines.onTrim((function(e){return f._onTrim(e)})),f.register(f._bufferService.buffers.onBufferActivate((function(e){return f._onBufferActivate(e)}))),f.enable(),f._model=new c.SelectionModel(f._bufferService),f._activeSelectionMode=0,f}return n(t,e),Object.defineProperty(t.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._removeMouseDownListeners()},t.prototype.reset=function(){this.clearSelection()},t.prototype.disable=function(){this.clearSelection(),this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSelection",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionText",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";var r=this._bufferService.buffer,i=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";for(var n=e[1];n<=t[1];n++){var o=r.translateBufferLineToString(n,!0,e[0],t[0]);i.push(o)}}else{var s=e[1]===t[1]?t[0]:void 0;for(i.push(r.translateBufferLineToString(e[1],!0,e[0],s)),n=e[1]+1;n<=t[1]-1;n++){var c=r.lines.get(n);o=r.translateBufferLineToString(n,!0),(null==c?void 0:c.isWrapped)?i[i.length-1]+=o:i.push(o)}e[1]!==t[1]&&(c=r.lines.get(t[1]),o=r.translateBufferLineToString(t[1],!0,0,t[0]),c&&c.isWrapped?i[i.length-1]+=o:i.push(o))}return i.map((function(e){return e.replace(g," ")})).join(a.isWindows?"\r\n":"\n")},enumerable:!1,configurable:!0}),t.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},t.prototype.refresh=function(e){var t=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame((function(){return t._refresh()}))),a.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},t.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})},t.prototype._isClickInSelection=function(e){var t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,i=this._model.finalSelectionEnd;return!!(r&&i&&t)&&this._areCoordsInSelection(t,r,i)},t.prototype.isCellInSelection=function(e,t){var r=this._model.finalSelectionStart,i=this._model.finalSelectionEnd;return!(!r||!i)&&this._areCoordsInSelection([e,t],r,i)},t.prototype._areCoordsInSelection=function(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]},t.prototype._selectWordAtCursor=function(e,t){var r,i,n=null===(i=null===(r=this._linkifier.currentLink)||void 0===r?void 0:r.link)||void 0===i?void 0:i.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=(0,v.getRangeLength)(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var o=this._getMouseBufferCoords(e);return!!o&&(this._selectWordAt(o,t),this._model.selectionEnd=void 0,!0)},t.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},t.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},t.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},t.prototype._getMouseBufferCoords=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t},t.prototype._getMouseEventScrollAmount=function(e){var t=(0,_.getCoordsRelativeToElement)(e,this._screenElement)[1],r=this._renderService.dimensions.canvasHeight;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-50),50),(t/=50)/Math.abs(t)+Math.round(14*t))},t.prototype.shouldForceSelection=function(e){return a.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey},t.prototype.onMouseDown=function(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._onIncrementalClick(e):1===e.detail?this._onSingleClick(e):2===e.detail?this._onDoubleClick(e):3===e.detail&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}},t.prototype._addMouseDownListeners=function(){var e=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval((function(){return e._dragScroll()}),50)},t.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},t.prototype._onIncrementalClick=function(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))},t.prototype._onSingleClick=function(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),this._model.selectionStart){this._model.selectionEnd=void 0;var t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}},t.prototype._onDoubleClick=function(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)},t.prototype._onTripleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))},t.prototype.shouldColumnSelect=function(e){return e.altKey&&!(a.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},t.prototype._onMouseMove=function(e){if(e.stopImmediatePropagation(),this._model.selectionStart){var t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),this._model.selectionEnd){2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){var i=r.lines.get(this._model.selectionEnd[1]);i&&0===i.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},t.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var e=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}},t.prototype._onMouseUp=function(e){var t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&void 0!==r[0]&&void 0!==r[1]){var i=(0,d.moveToCellSequence)(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(i,!0)}}}else this._fireEventIfSelectionChanged()},t.prototype._fireEventIfSelectionChanged=function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);r?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,r)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,r)},t.prototype._fireOnSelectionChange=function(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()},t.prototype._onBufferActivate=function(e){var t=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((function(e){return t._onTrim(e)}))},t.prototype._convertViewportColToCharacterIndex=function(e,t){for(var r=t[0],i=0;t[0]>=i;i++){var n=e.loadCell(i,this._workCell).getChars().length;0===this._workCell.getWidth()?r--:n>1&&t[0]!==i&&(r+=n-1)}return r},t.prototype.setSelection=function(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh(),this._fireEventIfSelectionChanged()},t.prototype.rightClickSelect=function(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},t.prototype._getWordAt=function(e,t,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),!(e[0]>=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;a>0&&" "===s.charAt(a-1);)a--;for(;c<s.length&&" "===s.charAt(c+1);)c++}else{var d=e[0],p=e[0];0===o.getWidth(d)&&(h++,d--),2===o.getWidth(p)&&(u++,p++);var v=o.getString(p).length;for(v>1&&(_+=v-1,c+=v-1);d>0&&a>0&&!this._isCharWordSeparator(o.loadCell(d-1,this._workCell));){o.loadCell(d-1,this._workCell);var y=this._workCell.getChars().length;0===this._workCell.getWidth()?(h++,d--):y>1&&(f+=y-1,a-=y-1),a--,d--}for(;p<o.length&&c+1<s.length&&!this._isCharWordSeparator(o.loadCell(p+1,this._workCell));){o.loadCell(p+1,this._workCell);var g=this._workCell.getChars().length;2===this._workCell.getWidth()?(u++,p++):g>1&&(_+=g-1,c+=g-1),c++,p++}}c++;var m=a+l-h+f,b=Math.min(this._bufferService.cols,c-a+h+u-f-_);if(t||""!==s.slice(a,c).trim()){if(r&&0===m&&32!==o.getCodePoint(0)){var S=n.lines.get(e[1]-1);if(S&&o.isWrapped&&32!==S.getCodePoint(this._bufferService.cols-1)){var C=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(C){var w=this._bufferService.cols-C.start;m-=w,b+=w}}}if(i&&m+b===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){var L=n.lines.get(e[1]+1);if((null==L?void 0:L.isWrapped)&&32!==L.getCodePoint(0)){var E=this._getWordAt([0,e[1]+1],!1,!1,!0);E&&(b+=E.length)}}return{start:m,length:b}}}}},t.prototype._selectWordAt=function(e,t){var r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}},t.prototype._selectToWordAt=function(e){var t=this._getWordAt(e,!0);if(t){for(var r=e[1];t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}},t.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0},t.prototype._selectLineAt=function(e){var t=this._bufferService.buffer.getWrappedRangeForLine(e),r={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,v.getRangeLength)(r,this._bufferService.cols)},o([s(3,f.IBufferService),s(4,f.ICoreService),s(5,u.IMouseService),s(6,f.IOptionsService),s(7,u.IRenderService)],t)}(p.Disposable);t.SelectionService=m},4725:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ICharacterJoinerService=t.ISoundService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;var i=r(8343);t.ICharSizeService=(0,i.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,i.createDecorator)("CoreBrowserService"),t.IMouseService=(0,i.createDecorator)("MouseService"),t.IRenderService=(0,i.createDecorator)("RenderService"),t.ISelectionService=(0,i.createDecorator)("SelectionService"),t.ISoundService=(0,i.createDecorator)("SoundService"),t.ICharacterJoinerService=(0,i.createDecorator)("CharacterJoinerService")},357:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SoundService=void 0;var o=r(2585),s=function(){function e(e){this._optionsService=e}return Object.defineProperty(e,"audioContext",{get:function(){if(!e._audioContext){var t=window.AudioContext||window.webkitAudioContext;if(!t)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;e._audioContext=new t}return e._audioContext},enumerable:!1,configurable:!0}),e.prototype.playBellSound=function(){var t=e.audioContext;if(t){var r=t.createBufferSource();t.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),(function(e){r.buffer=e,r.connect(t.destination),r.start(0)}))}},e.prototype._base64ToArrayBuffer=function(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),n=0;n<r;n++)i[n]=t.charCodeAt(n);return i.buffer},e.prototype._removeMimeType=function(e){return e.split(",")[1]},e=i([n(0,o.IOptionsService)],e)}();t.SoundService=s},6349:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;var i=r(8460),n=function(){function e(e){this._maxLength=e,this.onDeleteEmitter=new i.EventEmitter,this.onInsertEmitter=new i.EventEmitter,this.onTrimEmitter=new i.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(e.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(e){if(e>this._length)for(var t=this._length;t<e;t++)this._array[t]=void 0;this._length=e},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this._array[this._getCyclicIndex(e)]},e.prototype.set=function(e,t){this._array[this._getCyclicIndex(e)]=t},e.prototype.push=function(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},e.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(e.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t){for(var n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){var o=this._length+r.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=r.length},e.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},e.prototype.shiftElements=function(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(var i=t-1;i>=0;i--)this.set(e+i+r,this.get(e+i));var n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<t;i++)this.set(e+i+r,this.get(e+i))}},e.prototype._getCyclicIndex=function(e){return(this._startIndex+e)%this._maxLength},e}();t.CircularList=n},1439:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t,r){if(void 0===r&&(r=5),"object"!=typeof t)return t;var i=Array.isArray(t)?[]:{};for(var n in t)i[n]=r<=1?t[n]:t[n]&&e(t[n],r-1);return i}},8055:function(e,t){var r,i,n,o,s=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s};function a(e){var t=e.toString(16);return t.length<2?"0"+t:t}function c(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=void 0,function(e){e.toCss=function(e,t,r,i){return void 0!==i?"#"+a(e)+a(t)+a(r)+a(i):"#"+a(e)+a(t)+a(r)},e.toRgba=function(e,t,r,i){return void 0===i&&(i=255),(e<<24|t<<16|r<<8|i)>>>0}}(r=t.channels||(t.channels={})),(i=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1===i)return{css:t.css,rgba:t.rgba};var n=t.rgba>>24&255,o=t.rgba>>16&255,s=t.rgba>>8&255,a=e.rgba>>24&255,c=e.rgba>>16&255,l=e.rgba>>8&255,h=a+Math.round((n-a)*i),u=c+Math.round((o-c)*i),f=l+Math.round((s-l)*i);return{css:r.toCss(h,u,f),rgba:r.toRgba(h,u,f)}},i.isOpaque=function(e){return 255==(255&e.rgba)},i.ensureContrastRatio=function(e,t,r){var i=o.ensureContrastRatio(e.rgba,t.rgba,r);if(i)return o.toColor(i>>24&255,i>>16&255,i>>8&255)},i.opaque=function(e){var t=(255|e.rgba)>>>0,i=s(o.toChannels(t),3),n=i[0],a=i[1],c=i[2];return{css:r.toCss(n,a,c),rgba:t}},i.opacity=function(e,t){var i=Math.round(255*t),n=s(o.toChannels(e.rgba),3),a=n[0],c=n[1],l=n[2];return{css:r.toCss(a,c,l,i),rgba:r.toRgba(a,c,l,i)}},i.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]},(t.css||(t.css={})).toColor=function(e){if(e.match(/#[0-9a-f]{3,8}/i))switch(e.length){case 4:var t=parseInt(e.slice(1,2).repeat(2),16),r=parseInt(e.slice(2,3).repeat(2),16),i=parseInt(e.slice(3,4).repeat(2),16);return o.toColor(t,r,i);case 5:t=parseInt(e.slice(1,2).repeat(2),16),r=parseInt(e.slice(2,3).repeat(2),16),i=parseInt(e.slice(3,4).repeat(2),16);var n=parseInt(e.slice(4,5).repeat(2),16);return o.toColor(t,r,i,n);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}var s=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(s)return t=parseInt(s[1]),r=parseInt(s[2]),i=parseInt(s[3]),n=Math.round(255*(void 0===s[5]?1:parseFloat(s[5]))),o.toColor(t,r,i,n);throw new Error("css.toColor: Unsupported css format")},function(e){function t(e,t,r){var i=e/255,n=t/255,o=r/255;return.2126*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(n=t.rgb||(t.rgb={})),function(e){function t(e,t,r){for(var i=e>>24&255,o=e>>16&255,s=e>>8&255,a=t>>24&255,l=t>>16&255,h=t>>8&255,u=c(n.relativeLuminance2(a,l,h),n.relativeLuminance2(i,o,s));u<r&&(a>0||l>0||h>0);)a-=Math.max(0,Math.ceil(.1*a)),l-=Math.max(0,Math.ceil(.1*l)),h-=Math.max(0,Math.ceil(.1*h)),u=c(n.relativeLuminance2(a,l,h),n.relativeLuminance2(i,o,s));return(a<<24|l<<16|h<<8|255)>>>0}function i(e,t,r){for(var i=e>>24&255,o=e>>16&255,s=e>>8&255,a=t>>24&255,l=t>>16&255,h=t>>8&255,u=c(n.relativeLuminance2(a,l,h),n.relativeLuminance2(i,o,s));u<r&&(a<255||l<255||h<255);)a=Math.min(255,a+Math.ceil(.1*(255-a))),l=Math.min(255,l+Math.ceil(.1*(255-l))),h=Math.min(255,h+Math.ceil(.1*(255-h))),u=c(n.relativeLuminance2(a,l,h),n.relativeLuminance2(i,o,s));return(a<<24|l<<16|h<<8|255)>>>0}e.ensureContrastRatio=function(e,r,o){var s=n.relativeLuminance(e>>8),a=n.relativeLuminance(r>>8);if(c(s,a)<o){if(a<s){var l=t(e,r,o),h=c(s,n.relativeLuminance(l>>8));if(h<o){var u=i(e,e,o);return h>c(s,n.relativeLuminance(u>>8))?l:u}return l}var f=i(e,r,o),_=c(s,n.relativeLuminance(f>>8));return _<o?(u=t(e,e,o),_>c(s,n.relativeLuminance(u>>8))?f:u):f}},e.reduceLuminance=t,e.increaseLuminance=i,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},e.toColor=function(e,t,i,n){return{css:r.toCss(e,t,i,n),rgba:r.toRgba(e,t,i,n)}}}(o=t.rgba||(t.rgba={})),t.toPaddedHex=a,t.contrastRatio=c},8969:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;var s=r(844),a=r(2585),c=r(4348),l=r(7866),h=r(744),u=r(7302),f=r(6975),_=r(8460),d=r(1753),p=r(3730),v=r(1480),y=r(7994),g=r(9282),m=r(5435),b=r(5981),S=!1,C=function(e){function t(t){var r=e.call(this)||this;return r._onBinary=new _.EventEmitter,r._onData=new _.EventEmitter,r._onLineFeed=new _.EventEmitter,r._onResize=new _.EventEmitter,r._onScroll=new _.EventEmitter,r._onWriteParsed=new _.EventEmitter,r._instantiationService=new c.InstantiationService,r.optionsService=new u.OptionsService(t),r._instantiationService.setService(a.IOptionsService,r.optionsService),r._bufferService=r.register(r._instantiationService.createInstance(h.BufferService)),r._instantiationService.setService(a.IBufferService,r._bufferService),r._logService=r._instantiationService.createInstance(l.LogService),r._instantiationService.setService(a.ILogService,r._logService),r.coreService=r.register(r._instantiationService.createInstance(f.CoreService,(function(){return r.scrollToBottom()}))),r._instantiationService.setService(a.ICoreService,r.coreService),r.coreMouseService=r._instantiationService.createInstance(d.CoreMouseService),r._instantiationService.setService(a.ICoreMouseService,r.coreMouseService),r._dirtyRowService=r._instantiationService.createInstance(p.DirtyRowService),r._instantiationService.setService(a.IDirtyRowService,r._dirtyRowService),r.unicodeService=r._instantiationService.createInstance(v.UnicodeService),r._instantiationService.setService(a.IUnicodeService,r.unicodeService),r._charsetService=r._instantiationService.createInstance(y.CharsetService),r._instantiationService.setService(a.ICharsetService,r._charsetService),r._inputHandler=new m.InputHandler(r._bufferService,r._charsetService,r.coreService,r._dirtyRowService,r._logService,r.optionsService,r.coreMouseService,r.unicodeService),r.register((0,_.forwardEvent)(r._inputHandler.onLineFeed,r._onLineFeed)),r.register(r._inputHandler),r.register((0,_.forwardEvent)(r._bufferService.onResize,r._onResize)),r.register((0,_.forwardEvent)(r.coreService.onData,r._onData)),r.register((0,_.forwardEvent)(r.coreService.onBinary,r._onBinary)),r.register(r.optionsService.onOptionChange((function(e){return r._updateOptions(e)}))),r.register(r._bufferService.onScroll((function(e){r._onScroll.fire({position:r._bufferService.buffer.ydisp,source:0}),r._dirtyRowService.markRangeDirty(r._bufferService.buffer.scrollTop,r._bufferService.buffer.scrollBottom)}))),r.register(r._inputHandler.onScroll((function(e){r._onScroll.fire({position:r._bufferService.buffer.ydisp,source:0}),r._dirtyRowService.markRangeDirty(r._bufferService.buffer.scrollTop,r._bufferService.buffer.scrollBottom)}))),r._writeBuffer=new b.WriteBuffer((function(e,t){return r._inputHandler.parse(e,t)})),r.register((0,_.forwardEvent)(r._writeBuffer.onWriteParsed,r._onWriteParsed)),r}return n(t,e),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){var e=this;return this._onScrollApi||(this._onScrollApi=new _.EventEmitter,this.register(this._onScroll.event((function(t){var r;null===(r=e._onScrollApi)||void 0===r||r.fire(t.position)})))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.optionsService.options},set:function(e){for(var t in e)this.optionsService.options[t]=e[t]},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)},t.prototype.write=function(e,t){this._writeBuffer.write(e,t)},t.prototype.writeSync=function(e,t){this._logService.logLevel<=a.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(e,t)},t.prototype.resize=function(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,h.MINIMUM_COLS),t=Math.max(t,h.MINIMUM_ROWS),this._bufferService.resize(e,t))},t.prototype.scroll=function(e,t){void 0===t&&(t=!1),this._bufferService.scroll(e,t)},t.prototype.scrollLines=function(e,t,r){this._bufferService.scrollLines(e,t,r)},t.prototype.scrollPages=function(e){this._bufferService.scrollPages(e)},t.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},t.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},t.prototype.scrollToLine=function(e){this._bufferService.scrollToLine(e)},t.prototype.registerEscHandler=function(e,t){return this._inputHandler.registerEscHandler(e,t)},t.prototype.registerDcsHandler=function(e,t){return this._inputHandler.registerDcsHandler(e,t)},t.prototype.registerCsiHandler=function(e,t){return this._inputHandler.registerCsiHandler(e,t)},t.prototype.registerOscHandler=function(e,t){return this._inputHandler.registerOscHandler(e,t)},t.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},t.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},t.prototype._updateOptions=function(e){var t;switch(e){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():(null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)}},t.prototype._enableWindowsMode=function(){var e=this;if(!this._windowsMode){var t=[];t.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),t.push(this.registerCsiHandler({final:"H"},(function(){return(0,g.updateWindowsModeWrappedState)(e._bufferService),!1}))),this._windowsMode={dispose:function(){var e,r;try{for(var i=o(t),n=i.next();!n.done;n=i.next())n.value.dispose()}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}},t}(s.Disposable);t.CoreTerminal=C},8460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0;var r=function(){function e(){this._listeners=[],this._disposed=!1}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){return e._listeners.push(t),{dispose:function(){if(!e._disposed)for(var r=0;r<e._listeners.length;r++)if(e._listeners[r]===t)return void e._listeners.splice(r,1)}}}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e,t){for(var r=[],i=0;i<this._listeners.length;i++)r.push(this._listeners[i]);for(i=0;i<r.length;i++)r[i].call(void 0,e,t)},e.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},e}();t.EventEmitter=r,t.forwardEvent=function(e,t){return e((function(e){return t.fire(e)}))}},5435:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;var o,s=r(2584),a=r(7116),c=r(2015),l=r(844),h=r(8273),u=r(482),f=r(8437),_=r(8460),d=r(643),p=r(511),v=r(3734),y=r(2585),g=r(6242),m=r(6351),b=r(5941),S={"(":0,")":1,"*":2,"+":3,"-":1,".":2},C=131072;function w(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(o=t.WindowsOptionsReportType||(t.WindowsOptionsReportType={}));var L=function(){function e(e,t,r,i){this._bufferService=e,this._coreService=t,this._logService=r,this._optionsService=i,this._data=new Uint32Array(0)}return e.prototype.hook=function(e){this._data=new Uint32Array(0)},e.prototype.put=function(e,t,r){this._data=(0,h.concat)(this._data,e.subarray(t,r))},e.prototype.unhook=function(e){if(!e)return this._data=new Uint32Array(0),!0;var t=(0,u.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),t){case'"q':this._coreService.triggerDataEvent(s.C0.ESC+'P1$r0"q'+s.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(s.C0.ESC+'P1$r61;1"p'+s.C0.ESC+"\\");break;case"r":var r=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+r+s.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(s.C0.ESC+"P1$r0m"+s.C0.ESC+"\\");break;case" q":var i={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];i-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+i+" q"+s.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",t),this._coreService.triggerDataEvent(s.C0.ESC+"P0$r"+s.C0.ESC+"\\")}return!0},e}(),E=function(e){function t(t,r,i,n,o,l,h,d,v){void 0===v&&(v=new c.EscapeSequenceParser);var y=e.call(this)||this;y._bufferService=t,y._charsetService=r,y._coreService=i,y._dirtyRowService=n,y._logService=o,y._optionsService=l,y._coreMouseService=h,y._unicodeService=d,y._parser=v,y._parseBuffer=new Uint32Array(4096),y._stringDecoder=new u.StringToUtf32,y._utf8Decoder=new u.Utf8ToUtf32,y._workCell=new p.CellData,y._windowTitle="",y._iconName="",y._windowTitleStack=[],y._iconNameStack=[],y._curAttrData=f.DEFAULT_ATTR_DATA.clone(),y._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone(),y._onRequestBell=new _.EventEmitter,y._onRequestRefreshRows=new _.EventEmitter,y._onRequestReset=new _.EventEmitter,y._onRequestSendFocus=new _.EventEmitter,y._onRequestSyncScrollBar=new _.EventEmitter,y._onRequestWindowsOptionsReport=new _.EventEmitter,y._onA11yChar=new _.EventEmitter,y._onA11yTab=new _.EventEmitter,y._onCursorMove=new _.EventEmitter,y._onLineFeed=new _.EventEmitter,y._onScroll=new _.EventEmitter,y._onTitleChange=new _.EventEmitter,y._onColor=new _.EventEmitter,y._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},y._specialColors=[256,257,258],y.register(y._parser),y._activeBuffer=y._bufferService.buffer,y.register(y._bufferService.buffers.onBufferActivate((function(e){return y._activeBuffer=e.activeBuffer}))),y._parser.setCsiHandlerFallback((function(e,t){y._logService.debug("Unknown CSI code: ",{identifier:y._parser.identToString(e),params:t.toArray()})})),y._parser.setEscHandlerFallback((function(e){y._logService.debug("Unknown ESC code: ",{identifier:y._parser.identToString(e)})})),y._parser.setExecuteHandlerFallback((function(e){y._logService.debug("Unknown EXECUTE code: ",{code:e})})),y._parser.setOscHandlerFallback((function(e,t,r){y._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:r})})),y._parser.setDcsHandlerFallback((function(e,t,r){"HOOK"===t&&(r=r.toArray()),y._logService.debug("Unknown DCS code: ",{identifier:y._parser.identToString(e),action:t,payload:r})})),y._parser.setPrintHandler((function(e,t,r){return y.print(e,t,r)})),y._parser.registerCsiHandler({final:"@"},(function(e){return y.insertChars(e)})),y._parser.registerCsiHandler({intermediates:" ",final:"@"},(function(e){return y.scrollLeft(e)})),y._parser.registerCsiHandler({final:"A"},(function(e){return y.cursorUp(e)})),y._parser.registerCsiHandler({intermediates:" ",final:"A"},(function(e){return y.scrollRight(e)})),y._parser.registerCsiHandler({final:"B"},(function(e){return y.cursorDown(e)})),y._parser.registerCsiHandler({final:"C"},(function(e){return y.cursorForward(e)})),y._parser.registerCsiHandler({final:"D"},(function(e){return y.cursorBackward(e)})),y._parser.registerCsiHandler({final:"E"},(function(e){return y.cursorNextLine(e)})),y._parser.registerCsiHandler({final:"F"},(function(e){return y.cursorPrecedingLine(e)})),y._parser.registerCsiHandler({final:"G"},(function(e){return y.cursorCharAbsolute(e)})),y._parser.registerCsiHandler({final:"H"},(function(e){return y.cursorPosition(e)})),y._parser.registerCsiHandler({final:"I"},(function(e){return y.cursorForwardTab(e)})),y._parser.registerCsiHandler({final:"J"},(function(e){return y.eraseInDisplay(e)})),y._parser.registerCsiHandler({prefix:"?",final:"J"},(function(e){return y.eraseInDisplay(e)})),y._parser.registerCsiHandler({final:"K"},(function(e){return y.eraseInLine(e)})),y._parser.registerCsiHandler({prefix:"?",final:"K"},(function(e){return y.eraseInLine(e)})),y._parser.registerCsiHandler({final:"L"},(function(e){return y.insertLines(e)})),y._parser.registerCsiHandler({final:"M"},(function(e){return y.deleteLines(e)})),y._parser.registerCsiHandler({final:"P"},(function(e){return y.deleteChars(e)})),y._parser.registerCsiHandler({final:"S"},(function(e){return y.scrollUp(e)})),y._parser.registerCsiHandler({final:"T"},(function(e){return y.scrollDown(e)})),y._parser.registerCsiHandler({final:"X"},(function(e){return y.eraseChars(e)})),y._parser.registerCsiHandler({final:"Z"},(function(e){return y.cursorBackwardTab(e)})),y._parser.registerCsiHandler({final:"`"},(function(e){return y.charPosAbsolute(e)})),y._parser.registerCsiHandler({final:"a"},(function(e){return y.hPositionRelative(e)})),y._parser.registerCsiHandler({final:"b"},(function(e){return y.repeatPrecedingCharacter(e)})),y._parser.registerCsiHandler({final:"c"},(function(e){return y.sendDeviceAttributesPrimary(e)})),y._parser.registerCsiHandler({prefix:">",final:"c"},(function(e){return y.sendDeviceAttributesSecondary(e)})),y._parser.registerCsiHandler({final:"d"},(function(e){return y.linePosAbsolute(e)})),y._parser.registerCsiHandler({final:"e"},(function(e){return y.vPositionRelative(e)})),y._parser.registerCsiHandler({final:"f"},(function(e){return y.hVPosition(e)})),y._parser.registerCsiHandler({final:"g"},(function(e){return y.tabClear(e)})),y._parser.registerCsiHandler({final:"h"},(function(e){return y.setMode(e)})),y._parser.registerCsiHandler({prefix:"?",final:"h"},(function(e){return y.setModePrivate(e)})),y._parser.registerCsiHandler({final:"l"},(function(e){return y.resetMode(e)})),y._parser.registerCsiHandler({prefix:"?",final:"l"},(function(e){return y.resetModePrivate(e)})),y._parser.registerCsiHandler({final:"m"},(function(e){return y.charAttributes(e)})),y._parser.registerCsiHandler({final:"n"},(function(e){return y.deviceStatus(e)})),y._parser.registerCsiHandler({prefix:"?",final:"n"},(function(e){return y.deviceStatusPrivate(e)})),y._parser.registerCsiHandler({intermediates:"!",final:"p"},(function(e){return y.softReset(e)})),y._parser.registerCsiHandler({intermediates:" ",final:"q"},(function(e){return y.setCursorStyle(e)})),y._parser.registerCsiHandler({final:"r"},(function(e){return y.setScrollRegion(e)})),y._parser.registerCsiHandler({final:"s"},(function(e){return y.saveCursor(e)})),y._parser.registerCsiHandler({final:"t"},(function(e){return y.windowOptions(e)})),y._parser.registerCsiHandler({final:"u"},(function(e){return y.restoreCursor(e)})),y._parser.registerCsiHandler({intermediates:"'",final:"}"},(function(e){return y.insertColumns(e)})),y._parser.registerCsiHandler({intermediates:"'",final:"~"},(function(e){return y.deleteColumns(e)})),y._parser.setExecuteHandler(s.C0.BEL,(function(){return y.bell()})),y._parser.setExecuteHandler(s.C0.LF,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.VT,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.FF,(function(){return y.lineFeed()})),y._parser.setExecuteHandler(s.C0.CR,(function(){return y.carriageReturn()})),y._parser.setExecuteHandler(s.C0.BS,(function(){return y.backspace()})),y._parser.setExecuteHandler(s.C0.HT,(function(){return y.tab()})),y._parser.setExecuteHandler(s.C0.SO,(function(){return y.shiftOut()})),y._parser.setExecuteHandler(s.C0.SI,(function(){return y.shiftIn()})),y._parser.setExecuteHandler(s.C1.IND,(function(){return y.index()})),y._parser.setExecuteHandler(s.C1.NEL,(function(){return y.nextLine()})),y._parser.setExecuteHandler(s.C1.HTS,(function(){return y.tabSet()})),y._parser.registerOscHandler(0,new g.OscHandler((function(e){return y.setTitle(e),y.setIconName(e),!0}))),y._parser.registerOscHandler(1,new g.OscHandler((function(e){return y.setIconName(e)}))),y._parser.registerOscHandler(2,new g.OscHandler((function(e){return y.setTitle(e)}))),y._parser.registerOscHandler(4,new g.OscHandler((function(e){return y.setOrReportIndexedColor(e)}))),y._parser.registerOscHandler(10,new g.OscHandler((function(e){return y.setOrReportFgColor(e)}))),y._parser.registerOscHandler(11,new g.OscHandler((function(e){return y.setOrReportBgColor(e)}))),y._parser.registerOscHandler(12,new g.OscHandler((function(e){return y.setOrReportCursorColor(e)}))),y._parser.registerOscHandler(104,new g.OscHandler((function(e){return y.restoreIndexedColor(e)}))),y._parser.registerOscHandler(110,new g.OscHandler((function(e){return y.restoreFgColor(e)}))),y._parser.registerOscHandler(111,new g.OscHandler((function(e){return y.restoreBgColor(e)}))),y._parser.registerOscHandler(112,new g.OscHandler((function(e){return y.restoreCursorColor(e)}))),y._parser.registerEscHandler({final:"7"},(function(){return y.saveCursor()})),y._parser.registerEscHandler({final:"8"},(function(){return y.restoreCursor()})),y._parser.registerEscHandler({final:"D"},(function(){return y.index()})),y._parser.registerEscHandler({final:"E"},(function(){return y.nextLine()})),y._parser.registerEscHandler({final:"H"},(function(){return y.tabSet()})),y._parser.registerEscHandler({final:"M"},(function(){return y.reverseIndex()})),y._parser.registerEscHandler({final:"="},(function(){return y.keypadApplicationMode()})),y._parser.registerEscHandler({final:">"},(function(){return y.keypadNumericMode()})),y._parser.registerEscHandler({final:"c"},(function(){return y.fullReset()})),y._parser.registerEscHandler({final:"n"},(function(){return y.setgLevel(2)})),y._parser.registerEscHandler({final:"o"},(function(){return y.setgLevel(3)})),y._parser.registerEscHandler({final:"|"},(function(){return y.setgLevel(3)})),y._parser.registerEscHandler({final:"}"},(function(){return y.setgLevel(2)})),y._parser.registerEscHandler({final:"~"},(function(){return y.setgLevel(1)})),y._parser.registerEscHandler({intermediates:"%",final:"@"},(function(){return y.selectDefaultCharset()})),y._parser.registerEscHandler({intermediates:"%",final:"G"},(function(){return y.selectDefaultCharset()}));var m=function(e){b._parser.registerEscHandler({intermediates:"(",final:e},(function(){return y.selectCharset("("+e)})),b._parser.registerEscHandler({intermediates:")",final:e},(function(){return y.selectCharset(")"+e)})),b._parser.registerEscHandler({intermediates:"*",final:e},(function(){return y.selectCharset("*"+e)})),b._parser.registerEscHandler({intermediates:"+",final:e},(function(){return y.selectCharset("+"+e)})),b._parser.registerEscHandler({intermediates:"-",final:e},(function(){return y.selectCharset("-"+e)})),b._parser.registerEscHandler({intermediates:".",final:e},(function(){return y.selectCharset("."+e)})),b._parser.registerEscHandler({intermediates:"/",final:e},(function(){return y.selectCharset("/"+e)}))},b=this;for(var S in a.CHARSETS)m(S);return y._parser.registerEscHandler({intermediates:"#",final:"8"},(function(){return y.screenAlignmentPattern()})),y._parser.setErrorHandler((function(e){return y._logService.error("Parsing error: ",e),e})),y._parser.registerDcsHandler({intermediates:"$",final:"q"},new L(y._bufferService,y._coreService,y._logService,y._optionsService)),y}return n(t,e),Object.defineProperty(t.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._preserveStack=function(e,t,r,i){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=i},t.prototype._logSlowResolvingAsync=function(e){this._logService.logLevel<=y.LogLevelEnum.WARN&&Promise.race([e,new Promise((function(e,t){return setTimeout((function(){return t("#SLOW_TIMEOUT")}),5e3)}))]).catch((function(e){if("#SLOW_TIMEOUT"!==e)throw e;console.warn("async parser handler taking longer than 5000 ms")}))},t.prototype.parse=function(e,t){var r,i=this._activeBuffer.x,n=this._activeBuffer.y,o=0,s=this._parseStack.paused;if(s){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;i=this._parseStack.cursorStartX,n=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>C&&(o=this._parseStack.position+C)}if(this._logService.logLevel<=y.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+("string"==typeof e?' "'+e+'"':' "'+Array.prototype.map.call(e,(function(e){return String.fromCharCode(e)})).join("")+'"'),"string"==typeof e?e.split("").map((function(e){return e.charCodeAt(0)})):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<C&&(this._parseBuffer=new Uint32Array(Math.min(e.length,C))),s||this._dirtyRowService.clearRange(),e.length>C)for(var a=o;a<e.length;a+=C){var c=a+C<e.length?a+C:e.length,l="string"==typeof e?this._stringDecoder.decode(e.substring(a,c),this._parseBuffer):this._utf8Decoder.decode(e.subarray(a,c),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,l))return this._preserveStack(i,n,l,a),this._logSlowResolvingAsync(r),r}else if(!s&&(l="string"==typeof e?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer),r=this._parser.parse(this._parseBuffer,l)))return this._preserveStack(i,n,l,0),this._logSlowResolvingAsync(r),r;this._activeBuffer.x===i&&this._activeBuffer.y===n||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},t.prototype.print=function(e,t,r){var i,n,o=this._charsetService.charset,s=this._optionsService.rawOptions.screenReaderMode,a=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,l=this._coreService.modes.insertMode,h=this._curAttrData,f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&2===f.getWidth(this._activeBuffer.x-1)&&f.setCellFromCodePoint(this._activeBuffer.x-1,0,1,h.fg,h.bg,h.extended);for(var _=t;_<r;++_){if(i=e[_],n=this._unicodeService.wcwidth(i),i<127&&o){var p=o[String.fromCharCode(i)];p&&(i=p.charCodeAt(0))}if(s&&this._onA11yChar.fire((0,u.stringFromCodePoint)(i)),n||!this._activeBuffer.x){if(this._activeBuffer.x+n-1>=a)if(c){for(;this._activeBuffer.x<a;)f.setCellFromCodePoint(this._activeBuffer.x++,0,1,h.fg,h.bg,h.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=a-1,2===n)continue;if(l&&(f.insertCells(this._activeBuffer.x,n,this._activeBuffer.getNullCell(h),h),2===f.getWidth(a-1)&&f.setCellFromCodePoint(a-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,h.fg,h.bg,h.extended)),f.setCellFromCodePoint(this._activeBuffer.x++,i,n,h.fg,h.bg,h.extended),n>0)for(;--n;)f.setCellFromCodePoint(this._activeBuffer.x++,0,0,h.fg,h.bg,h.extended)}else f.getWidth(this._activeBuffer.x-1)?f.addCodepointToCell(this._activeBuffer.x-1,i):f.addCodepointToCell(this._activeBuffer.x-2,i)}r-t>0&&(f.loadCell(this._activeBuffer.x-1,this._workCell),2===this._workCell.getWidth()||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<a&&r-t>0&&0===f.getWidth(this._activeBuffer.x)&&!f.hasContent(this._activeBuffer.x)&&f.setCellFromCodePoint(this._activeBuffer.x,0,1,h.fg,h.bg,h.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype.registerCsiHandler=function(e,t){var r=this;return"t"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,(function(e){return!w(e.params[0],r._optionsService.rawOptions.windowOptions)||t(e)}))},t.prototype.registerDcsHandler=function(e,t){return this._parser.registerDcsHandler(e,new m.DcsHandler(t))},t.prototype.registerEscHandler=function(e,t){return this._parser.registerEscHandler(e,t)},t.prototype.registerOscHandler=function(e,t){return this._parser.registerOscHandler(e,new g.OscHandler(t))},t.prototype.bell=function(){return this._onRequestBell.fire(),!0},t.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},t.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},t.prototype.backspace=function(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(null===(e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))||void 0===e?void 0:e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},t.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0},t.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},t.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},t.prototype._restrictCursor=function(e){void 0===e&&(e=this._bufferService.cols-1),this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)},t.prototype.cursorUp=function(e){var t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0},t.prototype.cursorDown=function(e){var t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0},t.prototype.cursorForward=function(e){return this._moveCursor(e.params[0]||1,0),!0},t.prototype.cursorBackward=function(e){return this._moveCursor(-(e.params[0]||1),0),!0},t.prototype.cursorNextLine=function(e){return this.cursorDown(e),this._activeBuffer.x=0,!0},t.prototype.cursorPrecedingLine=function(e){return this.cursorUp(e),this._activeBuffer.x=0,!0},t.prototype.cursorCharAbsolute=function(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0},t.prototype.cursorPosition=function(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0},t.prototype.charPosAbsolute=function(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0},t.prototype.hPositionRelative=function(e){return this._moveCursor(e.params[0]||1,0),!0},t.prototype.linePosAbsolute=function(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0},t.prototype.vPositionRelative=function(e){return this._moveCursor(0,e.params[0]||1),!0},t.prototype.hVPosition=function(e){return this.cursorPosition(e),!0},t.prototype.tabClear=function(e){var t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0},t.prototype.cursorForwardTab=function(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var t=e.params[0]||1;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},t.prototype.cursorBackwardTab=function(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var t=e.params[0]||1;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},t.prototype._eraseInBufferLine=function(e,t,r,i){void 0===i&&(i=!1);var n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i&&(n.isWrapped=!1)},t.prototype._resetBufferLine=function(e){var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);t.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),t.isWrapped=!1},t.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(t=this._activeBuffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x);t<this._bufferService.rows;t++)this._resetBufferLine(t);this._dirtyRowService.markDirty(t);break;case 1:for(t=this._activeBuffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var r=this._activeBuffer.lines.length-this._bufferService.rows;r>0&&(this._activeBuffer.lines.trimStart(r),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-r,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-r,0),this._onScroll.fire(0))}return!0},t.prototype.eraseInLine=function(e){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},t.prototype.insertLines=function(e){this._restrictCursor();var t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var r=this._activeBuffer.ybase+this._activeBuffer.y,i=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-i+1;t--;)this._activeBuffer.lines.splice(n-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},t.prototype.deleteLines=function(e){this._restrictCursor();var t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var r,i=this._activeBuffer.ybase+this._activeBuffer.y;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},t.prototype.insertChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.deleteChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.scrollUp=function(e){for(var t=e.params[0]||1;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollDown=function(e){for(var t=e.params[0]||1;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(f.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollLeft=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollRight=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.insertColumns=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.deleteColumns=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.eraseChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.repeatPrecedingCharacter=function(e){if(!this._parser.precedingCodepoint)return!0;for(var t=e.params[0]||1,r=new Uint32Array(t),i=0;i<t;++i)r[i]=this._parser.precedingCodepoint;return this.print(r,0,r.length),!0},t.prototype.sendDeviceAttributesPrimary=function(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(s.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(s.C0.ESC+"[?6c")),!0},t.prototype.sendDeviceAttributesSecondary=function(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(s.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(s.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(s.C0.ESC+"[>83;40003;0c")),!0},t.prototype._is=function(e){return 0===(this._optionsService.rawOptions.termName+"").indexOf(e)},t.prototype.setMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!0);return!0},t.prototype.setModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),this._charsetService.setgCharset(1,a.DEFAULT_CHARSET),this._charsetService.setgCharset(2,a.DEFAULT_CHARSET),this._charsetService.setgCharset(3,a.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},t.prototype.resetMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!1);return!0},t.prototype.resetModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),1049===e.params[t]&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},t.prototype._updateAttrColor=function(e,t,r,i,n){return 2===t?(e|=50331648,e&=-16777216,e|=v.AttributeData.fromColorRGB([r,i,n])):5===t&&(e&=-50331904,e|=33554432|255&r),e},t.prototype._extractColor=function(e,t,r){var i=[0,0,-1,0,0,0],n=0,o=0;do{if(i[o+n]=e.params[t+o],e.hasSubParams(t+o)){var s=e.getSubParams(t+o),a=0;do{5===i[1]&&(n=1),i[o+a+1+n]=s[a]}while(++a<s.length&&a+o+1+n<i.length);break}if(5===i[1]&&o+n>=2||2===i[1]&&o+n>=5)break;i[1]&&(n=1)}while(++o+t<e.length&&o+n<i.length);for(a=2;a<i.length;++a)-1===i[a]&&(i[a]=0);switch(i[0]){case 38:r.fg=this._updateAttrColor(r.fg,i[1],i[3],i[4],i[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,i[1],i[3],i[4],i[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,i[1],i[3],i[4],i[5])}return o},t.prototype._processUnderline=function(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()},t.prototype.charAttributes=function(e){if(1===e.length&&0===e.params[0])return this._curAttrData.fg=f.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=f.DEFAULT_ATTR_DATA.bg,!0;for(var t,r=e.length,i=this._curAttrData,n=0;n<r;n++)(t=e.params[n])>=30&&t<=37?(i.fg&=-50331904,i.fg|=16777216|t-30):t>=40&&t<=47?(i.bg&=-50331904,i.bg|=16777216|t-40):t>=90&&t<=97?(i.fg&=-50331904,i.fg|=16777224|t-90):t>=100&&t<=107?(i.bg&=-50331904,i.bg|=16777224|t-100):0===t?(i.fg=f.DEFAULT_ATTR_DATA.fg,i.bg=f.DEFAULT_ATTR_DATA.bg):1===t?i.fg|=134217728:3===t?i.bg|=67108864:4===t?(i.fg|=268435456,this._processUnderline(e.hasSubParams(n)?e.getSubParams(n)[0]:1,i)):5===t?i.fg|=536870912:7===t?i.fg|=67108864:8===t?i.fg|=1073741824:9===t?i.fg|=2147483648:2===t?i.bg|=134217728:21===t?this._processUnderline(2,i):22===t?(i.fg&=-134217729,i.bg&=-134217729):23===t?i.bg&=-67108865:24===t?i.fg&=-268435457:25===t?i.fg&=-536870913:27===t?i.fg&=-67108865:28===t?i.fg&=-1073741825:29===t?i.fg&=2147483647:39===t?(i.fg&=-67108864,i.fg|=16777215&f.DEFAULT_ATTR_DATA.fg):49===t?(i.bg&=-67108864,i.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):38===t||48===t||58===t?n+=this._extractColor(e,n,i):59===t?(i.extended=i.extended.clone(),i.extended.underlineColor=-1,i.updateExtended()):100===t?(i.fg&=-67108864,i.fg|=16777215&f.DEFAULT_ATTR_DATA.fg,i.bg&=-67108864,i.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",t);return!0},t.prototype.deviceStatus=function(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(s.C0.ESC+"[0n");break;case 6:var t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"["+t+";"+r+"R")}return!0},t.prototype.deviceStatusPrivate=function(e){if(6===e.params[0]){var t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"[?"+t+";"+r+"R")}return!0},t.prototype.softReset=function(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},t.prototype.setCursorStyle=function(e){var t=e.params[0]||1;switch(t){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var r=t%2==1;return this._optionsService.options.cursorBlink=r,!0},t.prototype.setScrollRegion=function(e){var t,r=e.params[0]||1;return(e.length<2||(t=e.params[1])>this._bufferService.rows||0===t)&&(t=this._bufferService.rows),t>r&&(this._activeBuffer.scrollTop=r-1,this._activeBuffer.scrollBottom=t-1,this._setCursor(0,0)),!0},t.prototype.windowOptions=function(e){if(!w(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;var t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(o.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(o.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(s.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},t.prototype.saveCursor=function(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},t.prototype.restoreCursor=function(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},t.prototype.setTitle=function(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0},t.prototype.setIconName=function(e){return this._iconName=e,!0},t.prototype.setOrReportIndexedColor=function(e){for(var t=[],r=e.split(";");r.length>1;){var i=r.shift(),n=r.shift();if(/^\d+$/.exec(i)){var o=parseInt(i);if(0<=o&&o<256)if("?"===n)t.push({type:0,index:o});else{var s=(0,b.parseColor)(n);s&&t.push({type:1,index:o,color:s})}}}return t.length&&this._onColor.fire(t),!0},t.prototype._setOrReportSpecialColor=function(e,t){for(var r=e.split(";"),i=0;i<r.length&&!(t>=this._specialColors.length);++i,++t)if("?"===r[i])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{var n=(0,b.parseColor)(r[i]);n&&this._onColor.fire([{type:1,index:this._specialColors[t],color:n}])}return!0},t.prototype.setOrReportFgColor=function(e){return this._setOrReportSpecialColor(e,0)},t.prototype.setOrReportBgColor=function(e){return this._setOrReportSpecialColor(e,1)},t.prototype.setOrReportCursorColor=function(e){return this._setOrReportSpecialColor(e,2)},t.prototype.restoreIndexedColor=function(e){if(!e)return this._onColor.fire([{type:2}]),!0;for(var t=[],r=e.split(";"),i=0;i<r.length;++i)if(/^\d+$/.exec(r[i])){var n=parseInt(r[i]);0<=n&&n<256&&t.push({type:2,index:n})}return t.length&&this._onColor.fire(t),!0},t.prototype.restoreFgColor=function(e){return this._onColor.fire([{type:2,index:256}]),!0},t.prototype.restoreBgColor=function(e){return this._onColor.fire([{type:2,index:257}]),!0},t.prototype.restoreCursorColor=function(e){return this._onColor.fire([{type:2,index:258}]),!0},t.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},t.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},t.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},t.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),!0},t.prototype.selectCharset=function(e){return 2!==e.length?(this.selectDefaultCharset(),!0):("/"===e[0]||this._charsetService.setgCharset(S[e[0]],a.CHARSETS[e[1]]||a.DEFAULT_CHARSET),!0)},t.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},t.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},t.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},t.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},t.prototype.reset=function(){this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone()},t.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},t.prototype.setgLevel=function(e){return this._charsetService.setgLevel(e),!0},t.prototype.screenAlignmentPattern=function(){var e=new p.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(var t=0;t<this._bufferService.rows;++t){var r=this._activeBuffer.ybase+this._activeBuffer.y+t,i=this._activeBuffer.lines.get(r);i&&(i.fill(e),i.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},t}(l.Disposable);t.InputHandler=E},844:function(e,t){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.Disposable=void 0;var i=function(){function e(){this._disposables=[],this._isDisposed=!1}return e.prototype.dispose=function(){var e,t;this._isDisposed=!0;try{for(var i=r(this._disposables),n=i.next();!n.done;n=i.next())n.value.dispose()}catch(t){e={error:t}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}this._disposables.length=0},e.prototype.register=function(e){return this._disposables.push(e),e},e.prototype.unregister=function(e){var t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)},e}();function n(e){var t,i;try{for(var n=r(e),o=n.next();!o.done;o=n.next())o.value.dispose()}catch(e){t={error:e}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(t)throw t.error}}e.length=0}t.Disposable=i,t.disposeArray=n,t.getDisposeArrayDisposable=function(e){return{dispose:function(){return n(e)}}}},6114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.isSafari=t.isLegacyEdge=t.isFirefox=void 0;var r="undefined"==typeof navigator,i=r?"node":navigator.userAgent,n=r?"node":navigator.platform;t.isFirefox=i.includes("Firefox"),t.isLegacyEdge=i.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(i),t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(n),t.isIpad="iPad"===n,t.isIphone="iPhone"===n,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(n),t.isLinux=n.indexOf("Linux")>=0},6106:function(e,t){var r=this&&this.__generator||function(e,t){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SortedList=void 0;var i=function(){function e(e){this._getKey=e,this._array=[]}return e.prototype.clear=function(){this._array.length=0},e.prototype.insert=function(e){if(0!==this._array.length){var t=this._search(this._getKey(e),0,this._array.length-1);this._array.splice(t,0,e)}else this._array.push(e)},e.prototype.delete=function(e){if(0===this._array.length)return!1;var t=this._getKey(e),r=this._search(t,0,this._array.length-1);if(this._getKey(this._array[r])!==t)return!1;do{if(this._array[r]===e)return this._array.splice(r,1),!0}while(++r<this._array.length&&this._getKey(this._array[r])===t);return!1},e.prototype.getKeyIterator=function(e){var t;return r(this,(function(r){switch(r.label){case 0:if(0===this._array.length)return[2];if((t=this._search(e,0,this._array.length-1))<0||t>=this._array.length)return[2];if(this._getKey(this._array[t])!==e)return[2];r.label=1;case 1:return[4,this._array[t]];case 2:r.sent(),r.label=3;case 3:if(++t<this._array.length&&this._getKey(this._array[t])===e)return[3,1];r.label=4;case 4:return[2]}}))},e.prototype.values=function(){return this._array.values()},e.prototype._search=function(e,t,r){if(r<t)return t;var i=Math.floor((t+r)/2);if(this._getKey(this._array[i])>e)return this._search(e,t,i-1);if(this._getKey(this._array[i])<e)return this._search(e,i+1,r);for(;i>0&&this._getKey(this._array[i-1])===e;)i--;return i},e}();t.SortedList=i},8273:(e,t)=>{function r(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=e.length),r>=e.length)return e;r=(e.length+r)%e.length,i=i>=e.length?e.length:(e.length+i)%e.length;for(var n=r;n<i;++n)e[n]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.fillFallback=t.fill=void 0,t.fill=function(e,t,i,n){return e.fill?e.fill(t,i,n):r(e,t,i,n)},t.fillFallback=r,t.concat=function(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}},9282:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;var i=r(643);t.updateWindowsModeWrappedState=function(e){var t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),r=null==t?void 0:t.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&r&&(n.isWrapped=r[i.CHAR_DATA_CODE_INDEX]!==i.NULL_CELL_CODE&&r[i.CHAR_DATA_CODE_INDEX]!==i.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;var r=function(){function e(){this.fg=0,this.bg=0,this.extended=new i}return e.toColorRGB=function(e){return[e>>>16&255,e>>>8&255,255&e]},e.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},e.prototype.clone=function(){var t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t},e.prototype.isInverse=function(){return 67108864&this.fg},e.prototype.isBold=function(){return 134217728&this.fg},e.prototype.isUnderline=function(){return 268435456&this.fg},e.prototype.isBlink=function(){return 536870912&this.fg},e.prototype.isInvisible=function(){return 1073741824&this.fg},e.prototype.isItalic=function(){return 67108864&this.bg},e.prototype.isDim=function(){return 134217728&this.bg},e.prototype.isStrikethrough=function(){return 2147483648&this.fg},e.prototype.getFgColorMode=function(){return 50331648&this.fg},e.prototype.getBgColorMode=function(){return 50331648&this.bg},e.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},e.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},e.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},e.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},e.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},e.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},e.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},e.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},e.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},e.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},e.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},e.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},e.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},e.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()},e.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()},e.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()},e.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},e}();t.AttributeData=r;var i=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=-1),this.underlineStyle=e,this.underlineColor=t}return e.prototype.clone=function(){return new e(this.underlineStyle,this.underlineColor)},e.prototype.isEmpty=function(){return 0===this.underlineStyle},e}();t.ExtendedAttrs=i},9092:function(e,t,r){var i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},n=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStringIterator=t.Buffer=t.MAX_BUFFER_SIZE=void 0;var o=r(6349),s=r(8437),a=r(511),c=r(643),l=r(4634),h=r(4863),u=r(7116),f=r(3734);t.MAX_BUFFER_SIZE=4294967295;var _=function(){function e(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=s.DEFAULT_ATTR_DATA.clone(),this.savedCharset=u.DEFAULT_CHARSET,this.markers=[],this._nullCell=a.CellData.fromCharData([0,c.NULL_CELL_CHAR,c.NULL_CELL_WIDTH,c.NULL_CELL_CODE]),this._whitespaceCell=a.CellData.fromCharData([0,c.WHITESPACE_CELL_CHAR,c.WHITESPACE_CELL_WIDTH,c.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new o.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return e.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell},e.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell},e.prototype.getBlankLine=function(e,t){return new s.BufferLine(this._bufferService.cols,this.getNullCell(e),t)},Object.defineProperty(e.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),e.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.rawOptions.scrollback;return r>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:r},e.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=s.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},e.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new o.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},e.prototype.resize=function(e,t){var r=this.getNullCell(s.DEFAULT_ATTR_DATA),i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(var n=0;n<this.lines.length;n++)this.lines.get(n).resize(e,r);var o=0;if(this._rows<t)for(var a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new s.BufferLine(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+o+1?(this.ybase--,o++,this.ydisp>0&&this.ydisp--):this.lines.push(new s.BufferLine(e,r)));else for(a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){var c=this.lines.length-i;c>0&&(this.lines.trimStart(c),this.ybase=Math.max(this.ybase-c,0),this.ydisp=Math.max(this.ydisp-c,0),this.savedY=Math.max(this.savedY-c,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),o&&(this.y+=o),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(n=0;n<this.lines.length;n++)this.lines.get(n).resize(e,r);this._cols=e,this._rows=t},Object.defineProperty(e.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),e.prototype._reflow=function(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},e.prototype._reflowLarger=function(e,t){var r=(0,l.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(s.DEFAULT_ATTR_DATA));if(r.length>0){var i=(0,l.reflowLargerCreateNewLayout)(this.lines,r);(0,l.reflowLargerApplyNewLayout)(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}},e.prototype._reflowLargerAdjustViewport=function(e,t,r){for(var i=this.getNullCell(s.DEFAULT_ATTR_DATA),n=r;n-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new s.BufferLine(e,i))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)},e.prototype._reflowSmaller=function(e,t){for(var r=this.getNullCell(s.DEFAULT_ATTR_DATA),o=[],a=0,c=this.lines.length-1;c>=0;c--){var h=this.lines.get(c);if(!(!h||!h.isWrapped&&h.getTrimmedLength()<=e)){for(var u=[h];h.isWrapped&&c>0;)h=this.lines.get(--c),u.unshift(h);var f=this.ybase+this.y;if(!(f>=c&&f<c+u.length)){var _,d=u[u.length-1].getTrimmedLength(),p=(0,l.reflowSmallerGetNewLineLengths)(u,this._cols,e),v=p.length-u.length;_=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+v):Math.max(0,this.lines.length-this.lines.maxLength+v);for(var y=[],g=0;g<v;g++){var m=this.getBlankLine(s.DEFAULT_ATTR_DATA,!0);y.push(m)}y.length>0&&(o.push({start:c+u.length+a,newLines:y}),a+=y.length),u.push.apply(u,n([],i(y),!1));var b=p.length-1,S=p[b];0===S&&(S=p[--b]);for(var C=u.length-v-1,w=d;C>=0;){var L=Math.min(w,S);if(void 0===u[b])break;if(u[b].copyCellsFrom(u[C],w-L,S-L,L,!0),0==(S-=L)&&(S=p[--b]),0==(w-=L)){C--;var E=Math.max(C,0);w=(0,l.getWrappedLineTrimmedLength)(u,E,this._cols)}}for(g=0;g<u.length;g++)p[g]<e&&u[g].setCell(p[g],r);for(var x=v-_;x-- >0;)0===this.ybase?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+a)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+v,this.ybase+t-1)}}}if(o.length>0){var R=[],k=[];for(g=0;g<this.lines.length;g++)k.push(this.lines.get(g));var M=this.lines.length,A=M-1,O=0,D=o[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+a);var T=0;for(g=Math.min(this.lines.maxLength-1,M+a-1);g>=0;g--)if(D&&D.start>A+T){for(var B=D.newLines.length-1;B>=0;B--)this.lines.set(g--,D.newLines[B]);g++,R.push({index:A+1,amount:D.newLines.length}),T+=D.newLines.length,D=o[++O]}else this.lines.set(g,k[A--]);var P=0;for(g=R.length-1;g>=0;g--)R[g].index+=P,this.lines.onInsertEmitter.fire(R[g]),P+=R[g].amount;var I=Math.max(0,M+a-this.lines.maxLength);I>0&&this.lines.onTrimEmitter.fire(I)}},e.prototype.stringIndexToBufferIndex=function(e,t,r){for(void 0===r&&(r=!1);t;){var i=this.lines.get(e);if(!i)return[-1,-1];for(var n=r?i.getTrimmedLength():i.length,o=0;o<n;++o)if(i.get(o)[c.CHAR_DATA_WIDTH_INDEX]&&(t-=i.get(o)[c.CHAR_DATA_CHAR_INDEX].length||1),t<0)return[e,o];e++}return[e,0]},e.prototype.translateBufferLineToString=function(e,t,r,i){void 0===r&&(r=0);var n=this.lines.get(e);return n?n.translateToString(t,r,i):""},e.prototype.getWrappedRangeForLine=function(e){for(var t=e,r=e;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}},e.prototype.setupTabStops=function(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0},e.prototype.prevStop=function(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.clearMarkers=function(e){this._isClearing=!0;for(var t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1},e.prototype.clearAllMarkers=function(e){this._isClearing=!0;for(var t=0;t<this.markers.length;t++)this.markers[t].line!==e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1},e.prototype.addMarker=function(e){var t=this,r=new h.Marker(e);return this.markers.push(r),r.register(this.lines.onTrim((function(e){r.line-=e,r.line<0&&r.dispose()}))),r.register(this.lines.onInsert((function(e){r.line>=e.index&&(r.line+=e.amount)}))),r.register(this.lines.onDelete((function(e){r.line>=e.index&&r.line<e.index+e.amount&&r.dispose(),r.line>e.index&&(r.line-=e.amount)}))),r.register(r.onDispose((function(){return t._removeMarker(r)}))),r},e.prototype._removeMarker=function(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)},e.prototype.iterator=function(e,t,r,i,n){return new d(this,e,t,r,i,n)},e}();t.Buffer=_;var d=function(){function e(e,t,r,i,n,o){void 0===r&&(r=0),void 0===i&&(i=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=r,this._endIndex=i,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return e.prototype.hasNext=function(){return this._current<this._endIndex},e.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",r=e.first;r<=e.last;++r)t+=this._buffer.translateBufferLineToString(r,this._trimRight);return this._current=e.last+1,{range:e,content:t}},e}();t.BufferStringIterator=d},8437:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;var i=r(482),n=r(643),o=r(511),s=r(3734);t.DEFAULT_ATTR_DATA=Object.freeze(new s.AttributeData);var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);for(var i=t||o.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]),s=0;s<e;++s)this.setCell(s,i);this.length=e}return e.prototype.get=function(e){var t=this._data[3*e+0],r=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:r?(0,i.stringFromCodePoint)(r):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):r]},e.prototype.set=function(e,t){this._data[3*e+1]=t[n.CHAR_DATA_ATTR_INDEX],t[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[n.CHAR_DATA_WIDTH_INDEX]<<22},e.prototype.getWidth=function(e){return this._data[3*e+0]>>22},e.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},e.prototype.getFg=function(e){return this._data[3*e+1]},e.prototype.getBg=function(e){return this._data[3*e+2]},e.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},e.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},e.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},e.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,i.stringFromCodePoint)(2097151&t):""},e.prototype.loadCell=function(e,t){var r=3*e;return t.content=this._data[r+0],t.fg=this._data[r+1],t.bg=this._data[r+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t},e.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},e.prototype.setCellFromCodePoint=function(e,t,r,i,n,o){268435456&n&&(this._extendedAttrs[e]=o),this._data[3*e+0]=t|r<<22,this._data[3*e+1]=i,this._data[3*e+2]=n},e.prototype.addCodepointToCell=function(e,t){var r=this._data[3*e+0];2097152&r?this._combined[e]+=(0,i.stringFromCodePoint)(t):(2097151&r?(this._combined[e]=(0,i.stringFromCodePoint)(2097151&r)+(0,i.stringFromCodePoint)(t),r&=-2097152,r|=2097152):r=t|1<<22,this._data[3*e+0]=r)},e.prototype.insertCells=function(e,t,r,i){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),t<this.length-e){for(var n=new o.CellData,a=this.length-e-t-1;a>=0;--a)this.setCell(e+t+a,this.loadCell(e+a,n));for(a=0;a<t;++a)this.setCell(e+a,r)}else for(a=e;a<this.length;++a)this.setCell(a,r);2===this.getWidth(this.length-1)&&this.setCellFromCodePoint(this.length-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs)},e.prototype.deleteCells=function(e,t,r,i){if(e%=this.length,t<this.length-e){for(var n=new o.CellData,a=0;a<this.length-e-t;++a)this.setCell(e+a,this.loadCell(e+t+a,n));for(a=this.length-t;a<this.length;++a)this.setCell(a,r)}else for(a=e;a<this.length;++a)this.setCell(a,r);e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs)},e.prototype.replaceCells=function(e,t,r,i){for(e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs);e<t&&e<this.length;)this.setCell(e++,r)},e.prototype.resize=function(e,t){if(e!==this.length){if(e>this.length){var r=new Uint32Array(3*e);this.length&&(3*e<this._data.length?r.set(this._data.subarray(0,3*e)):r.set(this._data)),this._data=r;for(var i=this.length;i<e;++i)this.setCell(i,t)}else if(e){(r=new Uint32Array(3*e)).set(this._data.subarray(0,3*e)),this._data=r;var n=Object.keys(this._combined);for(i=0;i<n.length;i++){var o=parseInt(n[i],10);o>=e&&delete this._combined[o]}}else this._data=new Uint32Array(0),this._combined={};this.length=e}},e.prototype.fill=function(e){this._combined={},this._extendedAttrs={};for(var t=0;t<this.length;++t)this.setCell(t,e)},e.prototype.copyFrom=function(e){for(var t in this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={},e._combined)this._combined[t]=e._combined[t];for(var t in this._extendedAttrs={},e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped},e.prototype.clone=function(){var t=new e(0);for(var r in t._data=new Uint32Array(this._data),t.length=this.length,this._combined)t._combined[r]=this._combined[r];for(var r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t},e.prototype.getTrimmedLength=function(){for(var e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0},e.prototype.copyCellsFrom=function(e,t,r,i,n){var o=e._data;if(n)for(var s=i-1;s>=0;s--)for(var a=0;a<3;a++)this._data[3*(r+s)+a]=o[3*(t+s)+a];else for(s=0;s<i;s++)for(a=0;a<3;a++)this._data[3*(r+s)+a]=o[3*(t+s)+a];var c=Object.keys(e._combined);for(a=0;a<c.length;a++){var l=parseInt(c[a],10);l>=t&&(this._combined[l-t+r]=e._combined[l])}},e.prototype.translateToString=function(e,t,r){void 0===e&&(e=!1),void 0===t&&(t=0),void 0===r&&(r=this.length),e&&(r=Math.min(r,this.getTrimmedLength()));for(var o="";t<r;){var s=this._data[3*t+0],a=2097151&s;o+=2097152&s?this._combined[t]:a?(0,i.stringFromCodePoint)(a):n.WHITESPACE_CELL_CHAR,t+=s>>22||1}return o},e}();t.BufferLine=a},4841:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error("Buffer range end ("+e.end.x+", "+e.end.y+") cannot be before start ("+e.start.x+", "+e.start.y+")");return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function r(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();var i=!e[t].hasContent(r-1)&&1===e[t].getWidth(r-1),n=2===e[t+1].getWidth(0);return i&&n?r-1:r}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,i,n,o){for(var s=[],a=0;a<e.length-1;a++){var c=a,l=e.get(++c);if(l.isWrapped){for(var h=[e.get(a)];c<e.length&&l.isWrapped;)h.push(l),l=e.get(++c);if(n>=a&&n<c)a+=h.length-1;else{for(var u=0,f=r(h,u,t),_=1,d=0;_<h.length;){var p=r(h,_,t),v=p-d,y=i-f,g=Math.min(v,y);h[u].copyCellsFrom(h[_],d,f,g,!1),(f+=g)===i&&(u++,f=0),(d+=g)===p&&(_++,d=0),0===f&&0!==u&&2===h[u-1].getWidth(i-1)&&(h[u].copyCellsFrom(h[u-1],i-1,f++,1,!1),h[u-1].setCell(i-1,o))}h[u].replaceCells(f,i,o);for(var m=0,b=h.length-1;b>0&&(b>u||0===h[b].getTrimmedLength());b--)m++;m>0&&(s.push(a+h.length-m),s.push(m)),a+=h.length-1}}}return s},t.reflowLargerCreateNewLayout=function(e,t){for(var r=[],i=0,n=t[i],o=0,s=0;s<e.length;s++)if(n===s){var a=t[++i];e.onDeleteEmitter.fire({index:s-o,amount:a}),s+=a-1,o+=a,n=t[++i]}else r.push(s);return{layout:r,countRemoved:o}},t.reflowLargerApplyNewLayout=function(e,t){for(var r=[],i=0;i<t.length;i++)r.push(e.get(t[i]));for(i=0;i<r.length;i++)e.set(i,r[i]);e.length=t.length},t.reflowSmallerGetNewLineLengths=function(e,t,i){for(var n=[],o=e.map((function(i,n){return r(e,n,t)})).reduce((function(e,t){return e+t})),s=0,a=0,c=0;c<o;){if(o-c<i){n.push(o-c);break}s+=i;var l=r(e,a,t);s>l&&(s-=l,a++);var h=2===e[a].getWidth(s-1);h&&s--;var u=h?i-1:i;n.push(u),c+=u}return n},t.getWrappedLineTrimmedLength=r},5295:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;var o=r(9092),s=r(8460),a=function(e){function t(t,r){var i=e.call(this)||this;return i._optionsService=t,i._bufferService=r,i._onBufferActivate=i.register(new s.EventEmitter),i.reset(),i}return n(t,e),Object.defineProperty(t.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._normal=new o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(t.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),t.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},t.prototype.activateAltBuffer=function(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},t.prototype.resize=function(e,t){this._normal.resize(e,t),this._alt.resize(e,t)},t.prototype.setupTabStops=function(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)},t}(r(844).Disposable);t.BufferSet=a},511:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;var o=r(482),s=r(643),a=r(3734),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.content=0,t.fg=0,t.bg=0,t.extended=new a.ExtendedAttrs,t.combinedData="",t}return n(t,e),t.fromCharData=function(e){var r=new t;return r.setFromCharData(e),r},t.prototype.isCombined=function(){return 2097152&this.content},t.prototype.getWidth=function(){return this.content>>22},t.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,o.stringFromCodePoint)(2097151&this.content):""},t.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},t.prototype.setFromCharData=function(e){this.fg=e[s.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(e[s.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[s.CHAR_DATA_CHAR_INDEX].length){var r=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var i=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=i&&i<=57343?this.content=1024*(r-55296)+i-56320+65536|e[s.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[s.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[s.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[s.CHAR_DATA_WIDTH_INDEX]<<22)},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(a.AttributeData);t.CellData=c},643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;var o=r(8460),s=function(e){function t(r){var i=e.call(this)||this;return i.line=r,i._id=t._nextId++,i.isDisposed=!1,i._onDispose=new o.EventEmitter,i}return n(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),e.prototype.dispose.call(this))},t._nextId=1,t}(r(844).Disposable);t.Marker=s},7116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(e,t)=>{var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.C1_ESCAPED=t.C1=t.C0=void 0,function(e){e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="",e.BS="\b",e.HT="\t",e.LF="\n",e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""}(r=t.C0||(t.C0={})),(i=t.C1||(t.C1={})).PAD="",i.HOP="",i.BPH="",i.NBH="",i.IND="",i.NEL="",i.SSA="",i.ESA="",i.HTS="",i.HTJ="",i.VTS="",i.PLD="",i.PLU="",i.RI="",i.SS2="",i.SS3="",i.DCS="",i.PU1="",i.PU2="",i.STS="",i.CCH="",i.MW="",i.SPA="",i.EPA="",i.SOS="",i.SGCI="",i.SCI="",i.CSI="",i.ST="",i.OSC="",i.PM="",i.APC="",(t.C1_ESCAPED||(t.C1_ESCAPED={})).ST=r.ESC+"\\"},7399:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;var i=r(2584),n={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,r,o){var s={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?s.key=t?i.C0.ESC+"OA":i.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?s.key=t?i.C0.ESC+"OD":i.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?s.key=t?i.C0.ESC+"OC":i.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(s.key=t?i.C0.ESC+"OB":i.C0.ESC+"[B");break;case 8:if(e.shiftKey){s.key=i.C0.BS;break}if(e.altKey){s.key=i.C0.ESC+i.C0.DEL;break}s.key=i.C0.DEL;break;case 9:if(e.shiftKey){s.key=i.C0.ESC+"[Z";break}s.key=i.C0.HT,s.cancel=!0;break;case 13:s.key=e.altKey?i.C0.ESC+i.C0.CR:i.C0.CR,s.cancel=!0;break;case 27:s.key=i.C0.ESC,e.altKey&&(s.key=i.C0.ESC+i.C0.ESC),s.cancel=!0;break;case 37:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"D",s.key===i.C0.ESC+"[1;3D"&&(s.key=i.C0.ESC+(r?"b":"[1;5D"))):s.key=t?i.C0.ESC+"OD":i.C0.ESC+"[D";break;case 39:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"C",s.key===i.C0.ESC+"[1;3C"&&(s.key=i.C0.ESC+(r?"f":"[1;5C"))):s.key=t?i.C0.ESC+"OC":i.C0.ESC+"[C";break;case 38:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"A",r||s.key!==i.C0.ESC+"[1;3A"||(s.key=i.C0.ESC+"[1;5A")):s.key=t?i.C0.ESC+"OA":i.C0.ESC+"[A";break;case 40:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"B",r||s.key!==i.C0.ESC+"[1;3B"||(s.key=i.C0.ESC+"[1;5B")):s.key=t?i.C0.ESC+"OB":i.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(s.key=i.C0.ESC+"[2~");break;case 46:s.key=a?i.C0.ESC+"[3;"+(a+1)+"~":i.C0.ESC+"[3~";break;case 36:s.key=a?i.C0.ESC+"[1;"+(a+1)+"H":t?i.C0.ESC+"OH":i.C0.ESC+"[H";break;case 35:s.key=a?i.C0.ESC+"[1;"+(a+1)+"F":t?i.C0.ESC+"OF":i.C0.ESC+"[F";break;case 33:e.shiftKey?s.type=2:e.ctrlKey?s.key=i.C0.ESC+"[5;"+(a+1)+"~":s.key=i.C0.ESC+"[5~";break;case 34:e.shiftKey?s.type=3:e.ctrlKey?s.key=i.C0.ESC+"[6;"+(a+1)+"~":s.key=i.C0.ESC+"[6~";break;case 112:s.key=a?i.C0.ESC+"[1;"+(a+1)+"P":i.C0.ESC+"OP";break;case 113:s.key=a?i.C0.ESC+"[1;"+(a+1)+"Q":i.C0.ESC+"OQ";break;case 114:s.key=a?i.C0.ESC+"[1;"+(a+1)+"R":i.C0.ESC+"OR";break;case 115:s.key=a?i.C0.ESC+"[1;"+(a+1)+"S":i.C0.ESC+"OS";break;case 116:s.key=a?i.C0.ESC+"[15;"+(a+1)+"~":i.C0.ESC+"[15~";break;case 117:s.key=a?i.C0.ESC+"[17;"+(a+1)+"~":i.C0.ESC+"[17~";break;case 118:s.key=a?i.C0.ESC+"[18;"+(a+1)+"~":i.C0.ESC+"[18~";break;case 119:s.key=a?i.C0.ESC+"[19;"+(a+1)+"~":i.C0.ESC+"[19~";break;case 120:s.key=a?i.C0.ESC+"[20;"+(a+1)+"~":i.C0.ESC+"[20~";break;case 121:s.key=a?i.C0.ESC+"[21;"+(a+1)+"~":i.C0.ESC+"[21~";break;case 122:s.key=a?i.C0.ESC+"[23;"+(a+1)+"~":i.C0.ESC+"[23~";break;case 123:s.key=a?i.C0.ESC+"[24;"+(a+1)+"~":i.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(r&&!o||!e.altKey||e.metaKey)!r||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?s.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(s.key=i.C0.US):65===e.keyCode&&(s.type=1);else{var c=n[e.keyCode],l=null==c?void 0:c[e.shiftKey?1:0];if(l)s.key=i.C0.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){var h=e.ctrlKey?e.keyCode-64:e.keyCode+32,u=String.fromCharCode(h);e.shiftKey&&(u=u.toUpperCase()),s.key=i.C0.ESC+u}else"Dead"===e.key&&e.code.startsWith("Key")&&(u=e.code.slice(3,4),e.shiftKey||(u=u.toLowerCase()),s.key=i.C0.ESC+u,s.cancel=!0)}else e.keyCode>=65&&e.keyCode<=90?s.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?s.key=i.C0.NUL:e.keyCode>=51&&e.keyCode<=55?s.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?s.key=i.C0.DEL:219===e.keyCode?s.key=i.C0.ESC:220===e.keyCode?s.key=i.C0.FS:221===e.keyCode&&(s.key=i.C0.GS)}return s}},482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length);for(var i="",n=t;n<r;++n){var o=e[n];o>65535?(o-=65536,i+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):i+=String.fromCharCode(o)}return i};var r=function(){function e(){this._interim=0}return e.prototype.clear=function(){this._interim=0},e.prototype.decode=function(e,t){var r=e.length;if(!r)return 0;var i=0,n=0;this._interim&&(56320<=(a=e.charCodeAt(n++))&&a<=57343?t[i++]=1024*(this._interim-55296)+a-56320+65536:(t[i++]=this._interim,t[i++]=a),this._interim=0);for(var o=n;o<r;++o){var s=e.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=r)return this._interim=s,i;var a;56320<=(a=e.charCodeAt(o))&&a<=57343?t[i++]=1024*(s-55296)+a-56320+65536:(t[i++]=s,t[i++]=a)}else 65279!==s&&(t[i++]=s)}return i},e}();t.StringToUtf32=r;var i=function(){function e(){this.interim=new Uint8Array(3)}return e.prototype.clear=function(){this.interim.fill(0)},e.prototype.decode=function(e,t){var r=e.length;if(!r)return 0;var i,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l<p;){if(l>=r)return 0;if(128!=(192&(_=e[l++]))){l--,h=!0;break}this.interim[f++]=_,u<<=6,u|=63&_}h||(2===d?u<128?l--:t[a++]=u:3===d?u<2048||u>=55296&&u<=57343||65279===u||(t[a++]=u):u<65536||u>1114111||(t[a++]=u)),this.interim.fill(0)}for(var v=r-4,y=l;y<r;){for(;!(!(y<v)||128&(i=e[y])||128&(n=e[y+1])||128&(o=e[y+2])||128&(s=e[y+3]));)t[a++]=i,t[a++]=n,t[a++]=o,t[a++]=s,y+=4;if((i=e[y++])<128)t[a++]=i;else if(192==(224&i)){if(y>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[y++]))){y--;continue}if((c=(31&i)<<6|63&n)<128){y--;continue}t[a++]=c}else if(224==(240&i)){if(y>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[y++]))){y--;continue}if(y>=r)return this.interim[0]=i,this.interim[1]=n,a;if(128!=(192&(o=e[y++]))){y--;continue}if((c=(15&i)<<12|(63&n)<<6|63&o)<2048||c>=55296&&c<=57343||65279===c)continue;t[a++]=c}else if(240==(248&i)){if(y>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[y++]))){y--;continue}if(y>=r)return this.interim[0]=i,this.interim[1]=n,a;if(128!=(192&(o=e[y++]))){y--;continue}if(y>=r)return this.interim[0]=i,this.interim[1]=n,this.interim[2]=o,a;if(128!=(192&(s=e[y++]))){y--;continue}if((c=(7&i)<<18|(63&n)<<12|(63&o)<<6|63&s)<65536||c>1114111)continue;t[a++]=c}}return a},e}();t.Utf8ToUtf32=i},225:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;var i,n=r(8273),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],a=function(){function e(){if(this.version="6",!i){i=new Uint8Array(65536),(0,n.fill)(i,1),i[0]=0,(0,n.fill)(i,0,1,32),(0,n.fill)(i,0,127,160),(0,n.fill)(i,2,4352,4448),i[9001]=2,i[9002]=2,(0,n.fill)(i,2,11904,42192),i[12351]=1,(0,n.fill)(i,2,44032,55204),(0,n.fill)(i,2,63744,64256),(0,n.fill)(i,2,65040,65050),(0,n.fill)(i,2,65072,65136),(0,n.fill)(i,2,65280,65377),(0,n.fill)(i,2,65504,65511);for(var e=0;e<o.length;++e)(0,n.fill)(i,0,o[e][0],o[e][1]+1)}}return e.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?i[e]:function(e,t){var r,i=0,n=t.length-1;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=i;)if(e>t[r=i+n>>1][1])i=r+1;else{if(!(e<t[r][0]))return!0;n=r-1}return!1}(e,s)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1},e}();t.UnicodeV6=a},5981:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;var i=r(8460),n="undefined"==typeof queueMicrotask?function(e){Promise.resolve().then(e)}:queueMicrotask,o=function(){function e(e){this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._onWriteParsed=new i.EventEmitter}return Object.defineProperty(e.prototype,"onWriteParsed",{get:function(){return this._onWriteParsed.event},enumerable:!1,configurable:!0}),e.prototype.writeSync=function(e,t){if(void 0!==t&&this._syncCalls>t)this._syncCalls=0;else if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var r;for(this._isSyncWriting=!0;r=this._writeBuffer.shift();){this._action(r);var i=this._callbacks.shift();i&&i()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},e.prototype.write=function(e,t){var r=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout((function(){return r._innerWrite()}))),this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)},e.prototype._innerWrite=function(e,t){var r=this;void 0===e&&(e=0),void 0===t&&(t=!0);for(var i=e||Date.now();this._writeBuffer.length>this._bufferOffset;){var o=this._writeBuffer[this._bufferOffset],s=this._action(o,t);if(s)return void s.catch((function(e){return n((function(){throw e})),Promise.resolve(!1)})).then((function(e){return Date.now()-i>=12?setTimeout((function(){return r._innerWrite(0,e)})):r._innerWrite(i,e)}));var a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-i>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((function(){return r._innerWrite()}))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()},e}();t.WriteBuffer=o},5941:function(e,t){var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;var i=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,n=/^[\da-f]+$/;function o(e,t){var r=e.toString(16),i=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return i;case 12:return(i+i).slice(0,3);default:return i+i}}t.parseColor=function(e){if(e){var t=e.toLowerCase();if(0===t.indexOf("rgb:")){t=t.slice(4);var r=i.exec(t);if(r){var o=r[1]?15:r[4]?255:r[7]?4095:65535;return[Math.round(parseInt(r[1]||r[4]||r[7]||r[10],16)/o*255),Math.round(parseInt(r[2]||r[5]||r[8]||r[11],16)/o*255),Math.round(parseInt(r[3]||r[6]||r[9]||r[12],16)/o*255)]}}else if(0===t.indexOf("#")&&(t=t.slice(1),n.exec(t)&&[3,6,9,12].includes(t.length))){for(var s=t.length/3,a=[0,0,0],c=0;c<3;++c){var l=parseInt(t.slice(s*c,s*c+s),16);a[c]=1===s?l<<4:2===s?l:3===s?l>>4:l>>8}return a}}},t.toRgbString=function(e,t){void 0===t&&(t=16);var i=r(e,3),n=i[0],s=i[1],a=i[2];return"rgb:"+o(n,t)+"/"+o(s,t)+"/"+o(a,t)}},5770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;var i=r(482),n=r(8742),o=r(5770),s=[],a=function(){function e(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=s},e.prototype.registerHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var r=this._handlers[e];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.reset=function(){if(this._active.length)for(var e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=s,this._ident=0},e.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(t);else this._handlerFb(this._ident,"HOOK",t)},e.prototype.put=function(e,t,r){if(this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r);else this._handlerFb(this._ident,"PUT",(0,i.utf32ToString)(e,t,r))},e.prototype.unhook=function(e,t){if(void 0===t&&(t=!0),this._active.length){var r=!1,i=this._active.length-1,n=!1;if(this._stack.paused&&(i=this._stack.loopPosition-1,r=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&!1===r){for(;i>=0&&!0!==(r=this._active[i].unhook(e));i--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!1,r;i--}for(;i>=0;i--)if((r=this._active[i].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},e}();t.DcsParser=a;var c=new n.Params;c.addParam(0);var l=function(){function e(e){this._handler=e,this._data="",this._params=c,this._hitLimit=!1}return e.prototype.hook=function(e){this._params=e.length>1||e.params[0]?e.clone():c,this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,r){this._hitLimit||(this._data+=(0,i.utf32ToString)(e,t,r),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.unhook=function(e){var t=this,r=!1;if(this._hitLimit)r=!1;else if(e&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then((function(e){return t._params=c,t._data="",t._hitLimit=!1,e}));return this._params=c,this._data="",this._hitLimit=!1,r},e}();t.DcsHandler=l},2015:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;var o=r(844),s=r(8273),a=r(8742),c=r(6242),l=r(6351),h=function(){function e(e){this.table=new Uint8Array(e)}return e.prototype.setDefault=function(e,t){(0,s.fill)(this.table,e<<4|t)},e.prototype.add=function(e,t,r,i){this.table[t<<8|e]=r<<4|i},e.prototype.addMany=function(e,t,r,i){for(var n=0;n<e.length;n++)this.table[t<<8|e[n]]=r<<4|i},e}();t.TransitionTable=h;var u=160;t.VT500_TRANSITION_TABLE=function(){var e=new h(4095),t=Array.apply(null,Array(256)).map((function(e,t){return t})),r=function(e,r){return t.slice(e,r)},i=r(32,127),n=r(0,24);n.push(25),n.push.apply(n,r(28,32));var o,s=r(0,14);for(o in e.setDefault(1,0),e.addMany(i,0,2,0),s)e.addMany([24,26,153,154],o,3,0),e.addMany(r(128,144),o,3,0),e.addMany(r(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(n,0,3,0),e.addMany(n,1,3,1),e.add(127,1,0,1),e.addMany(n,8,0,8),e.addMany(n,3,3,3),e.add(127,3,0,3),e.addMany(n,4,3,4),e.add(127,4,0,4),e.addMany(n,6,3,6),e.addMany(n,5,3,5),e.add(127,5,0,5),e.addMany(n,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(i,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(i,7,0,7),e.addMany(n,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(n,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(n,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(n,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(n,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(n,13,13,13),e.addMany(i,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(u,0,2,0),e.add(u,8,5,8),e.add(u,6,0,6),e.add(u,11,0,11),e.add(u,13,13,13),e}();var f=function(e){function r(r){void 0===r&&(r=t.VT500_TRANSITION_TABLE);var i=e.call(this)||this;return i._transitions=r,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new a.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(e,t,r){},i._executeHandlerFb=function(e){},i._csiHandlerFb=function(e,t){},i._escHandlerFb=function(e){},i._errorHandlerFb=function(e){return e},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new c.OscParser,i._dcsParser=new l.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},(function(){return!0})),i}return n(r,e),r.prototype._identifier=function(e,t){void 0===t&&(t=[64,126]);var r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((r=e.prefix.charCodeAt(0))&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var i=0;i<e.intermediates.length;++i){var n=e.intermediates.charCodeAt(i);if(32>n||n>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=n}}if(1!==e.final.length)throw new Error("final must be a single byte");var o=e.final.charCodeAt(0);if(t[0]>o||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(r<<=8)|o},r.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},r.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},r.prototype.setPrintHandler=function(e){this._printHandler=e},r.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},r.prototype.registerEscHandler=function(e,t){var r=this._identifier(e,[48,126]);void 0===this._escHandlers[r]&&(this._escHandlers[r]=[]);var i=this._escHandlers[r];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},r.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},r.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},r.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},r.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},r.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},r.prototype.registerCsiHandler=function(e,t){var r=this._identifier(e);void 0===this._csiHandlers[r]&&(this._csiHandlers[r]=[]);var i=this._csiHandlers[r];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},r.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},r.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},r.prototype.registerDcsHandler=function(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)},r.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},r.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},r.prototype.registerOscHandler=function(e,t){return this._oscParser.registerHandler(e,t)},r.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},r.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},r.prototype.setErrorHandler=function(e){this._errorHandler=e},r.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},r.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])},r.prototype._preserveStack=function(e,t,r,i,n){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=i,this._parseStack.chunkPos=n},r.prototype.parse=function(e,t,r){var i,n=0,o=0,s=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,s=this._parseStack.chunkPos+1;else{if(void 0===r||1===this._parseStack.state)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var a=this._parseStack.handlers,c=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===r&&c>-1)for(;c>=0&&!0!==(i=a[c](this._params));c--)if(i instanceof Promise)return this._parseStack.handlerPos=c,i;this._parseStack.handlers=[];break;case 4:if(!1===r&&c>-1)for(;c>=0&&!0!==(i=a[c]());c--)if(i instanceof Promise)return this._parseStack.handlerPos=c,i;this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],i=this._dcsParser.unhook(24!==n&&26!==n,r))return i;27===n&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],i=this._oscParser.end(24!==n&&26!==n,r))return i;27===n&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,s=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var l=s;l<t;++l){switch(n=e[l],(o=this._transitions.table[this.currentState<<8|(n<160?n:u)])>>4){case 2:for(var h=l+1;;++h){if(h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:l,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var f=(a=this._csiHandlers[this._collect<<8|n])?a.length-1:-1;f>=0&&!0!==(i=a[f](this._params));f--)if(i instanceof Promise)return this._preserveStack(3,a,f,o,l),i;f<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingCodepoint=0;break;case 8:do{switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}}while(++l<t&&(n=e[l])>47&&n<60);l--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:for(var _=this._escHandlers[this._collect<<8|n],d=_?_.length-1:-1;d>=0&&!0!==(i=_[d]());d--)if(i instanceof Promise)return this._preserveStack(4,_,d,o,l),i;d<0&&this._escHandlerFb(this._collect<<8|n),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(var p=l+1;;++p)if(p>=t||24===(n=e[p])||26===n||27===n||n>127&&n<u){this._dcsParser.put(e,l,p),l=p-1;break}break;case 14:if(i=this._dcsParser.unhook(24!==n&&26!==n))return this._preserveStack(6,[],0,o,l),i;27===n&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var v=l+1;;v++)if(v>=t||(n=e[v])<32||n>127&&n<u){this._oscParser.put(e,l,v),l=v-1;break}break;case 6:if(i=this._oscParser.end(24!==n&&26!==n))return this._preserveStack(5,[],0,o,l),i;27===n&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&o}},r}(o.Disposable);t.EscapeSequenceParser=f},6242:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;var i=r(5770),n=r(482),o=[],s=function(){function e(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return e.prototype.registerHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var r=this._handlers[e];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=o},e.prototype.reset=function(){if(2===this._state)for(var e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0},e.prototype._start=function(){if(this._active=this._handlers[this._id]||o,this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,"START")},e.prototype._put=function(e,t,r){if(this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].put(e,t,r);else this._handlerFb(this._id,"PUT",(0,n.utf32ToString)(e,t,r))},e.prototype.start=function(){this.reset(),this._state=1},e.prototype.put=function(e,t,r){if(3!==this._state){if(1===this._state)for(;t<r;){var i=e[t++];if(59===i){this._state=2,this._start();break}if(i<48||57<i)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+i-48}2===this._state&&r-t>0&&this._put(e,t,r)}},e.prototype.end=function(e,t){if(void 0===t&&(t=!0),0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){var r=!1,i=this._active.length-1,n=!1;if(this._stack.paused&&(i=this._stack.loopPosition-1,r=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&!1===r){for(;i>=0&&!0!==(r=this._active[i].end(e));i--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!1,r;i--}for(;i>=0;i--)if((r=this._active[i].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!0,r}else this._handlerFb(this._id,"END",e);this._active=o,this._id=-1,this._state=0}},e}();t.OscParser=s;var a=function(){function e(e){this._handler=e,this._data="",this._hitLimit=!1}return e.prototype.start=function(){this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,r){this._hitLimit||(this._data+=(0,n.utf32ToString)(e,t,r),this._data.length>i.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.end=function(e){var t=this,r=!1;if(this._hitLimit)r=!1;else if(e&&(r=this._handler(this._data))instanceof Promise)return r.then((function(e){return t._data="",t._hitLimit=!1,e}));return this._data="",this._hitLimit=!1,r},e}();t.OscHandler=a},8742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;var r=2147483647,i=function(){function e(e,t){if(void 0===e&&(e=32),void 0===t&&(t=32),this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return e.fromArray=function(t){var r=new e;if(!t.length)return r;for(var i=Array.isArray(t[0])?1:0;i<t.length;++i){var n=t[i];if(Array.isArray(n))for(var o=0;o<n.length;++o)r.addSubParam(n[o]);else r.addParam(n)}return r},e.prototype.clone=function(){var t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t},e.prototype.toArray=function(){for(var e=[],t=0;t<this.length;++t){e.push(this.params[t]);var r=this._subParamsIdx[t]>>8,i=255&this._subParamsIdx[t];i-r>0&&e.push(Array.prototype.slice.call(this._subParams,r,i))}return e},e.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},e.prototype.addParam=function(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>r?r:e}},e.prototype.addSubParam=function(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>r?r:e,this._subParamsIdx[this.length-1]++}},e.prototype.hasSubParams=function(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0},e.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,r=255&this._subParamsIdx[e];return r-t>0?this._subParams.subarray(t,r):null},e.prototype.getSubParamsAll=function(){for(var e={},t=0;t<this.length;++t){var r=this._subParamsIdx[t]>>8,i=255&this._subParamsIdx[t];i-r>0&&(e[t]=this._subParams.slice(r,i))}return e},e.prototype.addDigit=function(e){var t;if(!(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var i=this._digitIsSub?this._subParams:this.params,n=i[t-1];i[t-1]=~n?Math.min(10*n+e,r):e}},e}();t.Params=i},5741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0;var r=function(){function e(){this._addons=[]}return e.prototype.dispose=function(){for(var e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()},e.prototype.loadAddon=function(e,t){var r=this,i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=function(){return r._wrappedAddonDispose(i)},t.activate(e)},e.prototype._wrappedAddonDispose=function(e){if(!e.isDisposed){for(var t=-1,r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(-1===t)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},e}();t.AddonManager=r},8771:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;var i=r(3785),n=r(511),o=function(){function e(e,t){this._buffer=e,this.type=t}return e.prototype.init=function(e){return this._buffer=e,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(e){var t=this._buffer.lines.get(e);if(t)return new i.BufferLineApiView(t)},e.prototype.getNullCell=function(){return new n.CellData},e}();t.BufferApiView=o},3785:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;var i=r(511),n=function(){function e(e){this._line=e}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new i.CellData)},e.prototype.translateToString=function(e,t,r){return this._line.translateToString(e,t,r)},e}();t.BufferLineApiView=n},8285:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;var i=r(8771),n=r(8460),o=function(){function e(e){var t=this;this._core=e,this._onBufferChange=new n.EventEmitter,this._normal=new i.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new i.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((function(){return t._onBufferChange.fire(t.active)}))}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),e}();t.BufferNamespaceApi=o},7975:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0;var r=function(){function e(e){this._core=e}return e.prototype.registerCsiHandler=function(e,t){return this._core.registerCsiHandler(e,(function(e){return t(e.toArray())}))},e.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},e.prototype.registerDcsHandler=function(e,t){return this._core.registerDcsHandler(e,(function(e,r){return t(e,r.toArray())}))},e.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},e.prototype.registerEscHandler=function(e,t){return this._core.registerEscHandler(e,t)},e.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},e.prototype.registerOscHandler=function(e,t){return this._core.registerOscHandler(e,t)},e.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},e}();t.ParserApi=r},7090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0;var r=function(){function e(e){this._core=e}return e.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!1,configurable:!0}),e}();t.UnicodeApi=r},744:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;var a=r(2585),c=r(5295),l=r(8460),h=r(844);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;var u=function(e){function r(r){var i=e.call(this)||this;return i._optionsService=r,i.isUserScrolling=!1,i._onResize=new l.EventEmitter,i._onScroll=new l.EventEmitter,i.cols=Math.max(r.rawOptions.cols||0,t.MINIMUM_COLS),i.rows=Math.max(r.rawOptions.rows||0,t.MINIMUM_ROWS),i.buffers=new c.BufferSet(r,i),i}return n(r,e),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){void 0===t&&(t=!1);var r,i=this.buffer;(r=this._cachedBlankLine)&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=i.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;var n=i.ybase+i.scrollTop,o=i.ybase+i.scrollBottom;if(0===i.scrollTop){var s=i.lines.isFull;o===i.lines.length-1?s?i.lines.recycle().copyFrom(r):i.lines.push(r.clone()):i.lines.splice(o+1,0,r.clone()),s?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{var a=o-n+1;i.lines.shiftElements(n+1,a-1,-1),i.lines.set(o,r.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)},r.prototype.scrollLines=function(e,t,r){var i=this.buffer;if(e<0){if(0===i.ydisp)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);var n=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),n!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;0!==t&&this.scrollLines(t)},o([s(0,a.IOptionsService)],r)}(h.Disposable);t.BufferService=u},7994:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0;var r=function(){function e(){this.glevel=0,this._charsets=[]}return e.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},e.prototype.setgLevel=function(e){this.glevel=e,this.charset=this._charsets[e]},e.prototype.setgCharset=function(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)},e}();t.CharsetService=r},1753:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;var s=r(2585),a=r(8460),c={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(e){return 4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)}},VT200:{events:19,restrict:function(e){return 32!==e.action}},DRAG:{events:23,restrict:function(e){return 32!==e.action||3!==e.button}},ANY:{events:31,restrict:function(e){return!0}}};function l(e,t){var r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(r|=64,r|=e.action):(r|=3&e.button,4&e.button&&(r|=64),8&e.button&&(r|=128),32===e.action?r|=32:0!==e.action||t||(r|=3)),r}var h=String.fromCharCode,u={DEFAULT:function(e){var t=[l(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":"[M"+h(t[0])+h(t[1])+h(t[2])},SGR:function(e){var t=0===e.action&&4!==e.button?"m":"M";return"[<"+l(e,!0)+";"+e.col+";"+e.row+t}},f=function(){function e(e,t){var r,i,n,s;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new a.EventEmitter,this._lastEvent=null;try{for(var l=o(Object.keys(c)),h=l.next();!h.done;h=l.next()){var f=h.value;this.addProtocol(f,c[f])}}catch(e){r={error:e}}finally{try{h&&!h.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}try{for(var _=o(Object.keys(u)),d=_.next();!d.done;d=_.next()){var p=d.value;this.addEncoding(p,u[p])}}catch(e){n={error:e}}finally{try{d&&!d.done&&(s=_.return)&&s.call(_)}finally{if(n)throw n.error}}this.reset()}return e.prototype.addProtocol=function(e,t){this._protocols[e]=t},e.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areMouseEventsActive",{get:function(){return 0!==this._protocols[this._activeProtocol].events},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(e.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),e.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},e.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},e.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},i([n(0,s.IBufferService),n(1,s.ICoreService)],e)}();t.CoreMouseService=f},6975:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;var a=r(2585),c=r(8460),l=r(1439),h=r(844),u=Object.freeze({insertMode:!1}),f=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),_=function(e){function t(t,r,i,n){var o=e.call(this)||this;return o._bufferService=r,o._logService=i,o._optionsService=n,o.isCursorInitialized=!1,o.isCursorHidden=!1,o._onData=o.register(new c.EventEmitter),o._onUserInput=o.register(new c.EventEmitter),o._onBinary=o.register(new c.EventEmitter),o._scrollToBottom=t,o.register({dispose:function(){return o._scrollToBottom=void 0}}),o.modes=(0,l.clone)(u),o.decPrivateModes=(0,l.clone)(f),o}return n(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,l.clone)(u),this.decPrivateModes=(0,l.clone)(f)},t.prototype.triggerDataEvent=function(e,t){if(void 0===t&&(t=!1),!this._optionsService.rawOptions.disableStdin){var r=this._bufferService.buffer;r.ybase!==r.ydisp&&this._scrollToBottom(),t&&this._onUserInput.fire(),this._logService.debug('sending data "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onData.fire(e)}},t.prototype.triggerBinaryEvent=function(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onBinary.fire(e))},o([s(1,a.IBufferService),s(2,a.ILogService),s(3,a.IOptionsService)],t)}(h.Disposable);t.CoreService=_},9074:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__generator||function(e,t){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],i=0}finally{r=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.DecorationService=void 0;var a=r(8055),c=r(8460),l=r(844),h=r(6106),u=function(e){function t(){var t=e.call(this)||this;return t._decorations=new h.SortedList((function(e){return e.marker.line})),t._onDecorationRegistered=t.register(new c.EventEmitter),t._onDecorationRemoved=t.register(new c.EventEmitter),t}return n(t,e),Object.defineProperty(t.prototype,"onDecorationRegistered",{get:function(){return this._onDecorationRegistered.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDecorationRemoved",{get:function(){return this._onDecorationRemoved.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"decorations",{get:function(){return this._decorations.values()},enumerable:!1,configurable:!0}),t.prototype.registerDecoration=function(e){var t=this;if(!e.marker.isDisposed){var r=new f(e);if(r){var i=r.marker.onDispose((function(){return r.dispose()}));r.onDispose((function(){r&&(t._decorations.delete(r)&&t._onDecorationRemoved.fire(r),i.dispose())})),this._decorations.insert(r),this._onDecorationRegistered.fire(r)}return r}},t.prototype.reset=function(){var e,t;try{for(var r=s(this._decorations.values()),i=r.next();!i.done;i=r.next())i.value.dispose()}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this._decorations.clear()},t.prototype.getDecorationsAtLine=function(e){return o(this,(function(t){return[2,this._decorations.getKeyIterator(e)]}))},t.prototype.getDecorationsAtCell=function(e,t,r){var i,n,a,c,l,h,u,f,_,d,p;return o(this,(function(o){switch(o.label){case 0:i=0,n=0,o.label=1;case 1:o.trys.push([1,6,7,8]),a=s(this._decorations.getKeyIterator(t)),c=a.next(),o.label=2;case 2:return c.done?[3,5]:(l=c.value,i=null!==(_=l.options.x)&&void 0!==_?_:0,n=i+(null!==(d=l.options.width)&&void 0!==d?d:1),!(e>=i&&e<n)||r&&(null!==(p=l.options.layer)&&void 0!==p?p:"bottom")!==r?[3,4]:[4,l]);case 3:o.sent(),o.label=4;case 4:return c=a.next(),[3,2];case 5:return[3,8];case 6:return h=o.sent(),u={error:h},[3,8];case 7:try{c&&!c.done&&(f=a.return)&&f.call(a)}finally{if(u)throw u.error}return[7];case 8:return[2]}}))},t.prototype.dispose=function(){var e,t;try{for(var r=s(this._decorations.values()),i=r.next();!i.done;i=r.next()){var n=i.value;this._onDecorationRemoved.fire(n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.reset()},t}(l.Disposable);t.DecorationService=u;var f=function(e){function t(t){var r=e.call(this)||this;return r.options=t,r.isDisposed=!1,r.onRenderEmitter=r.register(new c.EventEmitter),r.onRender=r.onRenderEmitter.event,r._onDispose=r.register(new c.EventEmitter),r.onDispose=r._onDispose.event,r._cachedBg=null,r._cachedFg=null,r.marker=t.marker,r.options.overviewRulerOptions&&!r.options.overviewRulerOptions.position&&(r.options.overviewRulerOptions.position="full"),r}return n(t,e),Object.defineProperty(t.prototype,"backgroundColorRGB",{get:function(){return null===this._cachedBg&&(this.options.backgroundColor?this._cachedBg=a.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"foregroundColorRGB",{get:function(){return null===this._cachedFg&&(this.options.foregroundColor?this._cachedFg=a.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._isDisposed||(this._isDisposed=!0,this._onDispose.fire(),e.prototype.dispose.call(this))},t}(l.Disposable)},3730:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DirtyRowService=void 0;var o=r(2585),s=function(){function e(e){this._bufferService=e,this.clearRange()}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),e.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},e.prototype.markDirty=function(e){e<this._start?this._start=e:e>this._end&&(this._end=e)},e.prototype.markRangeDirty=function(e,t){if(e>t){var r=e;e=t,t=r}e<this._start&&(this._start=e),t>this._end&&(this._end=t)},e.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i([n(0,o.IBufferService)],e)}();t.DirtyRowService=s},4348:function(e,t,r){var i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;var s=r(2585),a=r(8343),c=function(){function e(){for(var e,t,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];this._entries=new Map;try{for(var s=i(r),a=s.next();!a.done;a=s.next()){var c=n(a.value,2),l=c[0],h=c[1];this.set(l,h)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}return e.prototype.set=function(e,t){var r=this._entries.get(e);return this._entries.set(e,t),r},e.prototype.forEach=function(e){this._entries.forEach((function(t,r){return e(r,t)}))},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=c;var l=function(){function e(){this._services=new c,this._services.set(s.IInstantiationService,this)}return e.prototype.setService=function(e,t){this._services.set(e,t)},e.prototype.getService=function(e){return this._services.get(e)},e.prototype.createInstance=function(e){for(var t,r,s=[],c=1;c<arguments.length;c++)s[c-1]=arguments[c];var l=(0,a.getServiceDependencies)(e).sort((function(e,t){return e.index-t.index})),h=[];try{for(var u=i(l),f=u.next();!f.done;f=u.next()){var _=f.value,d=this._services.get(_.id);if(!d)throw new Error("[createInstance] "+e.name+" depends on UNKNOWN service "+_.id+".");h.push(d)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}var p=l.length>0?l[0].index:s.length;if(s.length!==p)throw new Error("[createInstance] First service dependency of "+e.name+" at position "+(p+1)+" conflicts with "+s.length+" static arguments");return new(e.bind.apply(e,o([void 0],n(o(o([],n(s),!1),n(h),!1)),!1)))},e}();t.InstantiationService=l},7866:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},o=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},s=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;var a=r(2585),c={debug:a.LogLevelEnum.DEBUG,info:a.LogLevelEnum.INFO,warn:a.LogLevelEnum.WARN,error:a.LogLevelEnum.ERROR,off:a.LogLevelEnum.OFF},l=function(){function e(e){var t=this;this._optionsService=e,this.logLevel=a.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange((function(e){"logLevel"===e&&t._updateLogLevel()}))}return e.prototype._updateLogLevel=function(){this.logLevel=c[this._optionsService.rawOptions.logLevel]},e.prototype._evalLazyOptionalParams=function(e){for(var t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())},e.prototype._log=function(e,t,r){this._evalLazyOptionalParams(r),e.call.apply(e,s([console,"xterm.js: "+t],o(r),!1))},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=a.LogLevelEnum.DEBUG&&this._log(console.log,e,t)},e.prototype.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=a.LogLevelEnum.INFO&&this._log(console.info,e,t)},e.prototype.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=a.LogLevelEnum.WARN&&this._log(console.warn,e,t)},e.prototype.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=a.LogLevelEnum.ERROR&&this._log(console.error,e,t)},i([n(0,a.IOptionsService)],e)}();t.LogService=l},7302:function(e,t,r){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=t.DEFAULT_BELL_SOUND=void 0;var n=r(8460),o=r(6114);t.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:t.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:o.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:void 0};var s=["normal","bold","100","200","300","400","500","600","700","800","900"],a=function(){function e(e){this._onOptionChange=new n.EventEmitter;var r=i({},t.DEFAULT_OPTIONS);for(var o in e)if(o in r)try{var s=e[o];r[o]=this._sanitizeAndValidateOption(o,s)}catch(e){console.error(e)}this.rawOptions=r,this.options=i({},r),this._setupOptions()}return Object.defineProperty(e.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),e.prototype._setupOptions=function(){var e=this,r=function(r){if(!(r in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return e.rawOptions[r]},i=function(r,i){if(!(r in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');i=e._sanitizeAndValidateOption(r,i),e.rawOptions[r]!==i&&(e.rawOptions[r]=i,e._onOptionChange.fire(r))};for(var n in this.rawOptions){var o={get:r.bind(this,n),set:i.bind(this,n)};Object.defineProperty(this.options,n,o)}},e.prototype.setOption=function(e,t){this.options[e]=t},e.prototype._sanitizeAndValidateOption=function(e,r){switch(e){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":r||(r=t.DEFAULT_OPTIONS[e]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof r&&1<=r&&r<=1e3)break;r=s.includes(r)?r:t.DEFAULT_OPTIONS[e];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(e+" cannot be less than 1, value: "+r);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(e+" cannot be less than 0, value: "+r);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(e+" cannot be less than or equal to 0, value: "+r);case"rows":case"cols":if(!r&&0!==r)throw new Error(e+" must be numeric, value: "+r)}return r},e.prototype.getOption=function(e){return this.options[e]},e}();t.OptionsService=a},8343:(e,t)=>{function r(e,t,r){t.di$target===t?t.di$dependencies.push({id:e,index:r}):(t.di$dependencies=[{id:e,index:r}],t.di$target=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0,t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e.di$dependencies||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var i=function(e,t,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(i,e,n)};return i.toString=function(){return e},t.serviceRegistry.set(e,i),i}},2585:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.IUnicodeService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.IDirtyRowService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;var i,n=r(8343);t.IBufferService=(0,n.createDecorator)("BufferService"),t.ICoreMouseService=(0,n.createDecorator)("CoreMouseService"),t.ICoreService=(0,n.createDecorator)("CoreService"),t.ICharsetService=(0,n.createDecorator)("CharsetService"),t.IDirtyRowService=(0,n.createDecorator)("DirtyRowService"),t.IInstantiationService=(0,n.createDecorator)("InstantiationService"),(i=t.LogLevelEnum||(t.LogLevelEnum={}))[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.OFF=4]="OFF",t.ILogService=(0,n.createDecorator)("LogService"),t.IOptionsService=(0,n.createDecorator)("OptionsService"),t.IUnicodeService=(0,n.createDecorator)("UnicodeService"),t.IDecorationService=(0,n.createDecorator)("DecorationService")},1480:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;var i=r(8460),n=r(225),o=function(){function e(){this._providers=Object.create(null),this._active="",this._onChange=new i.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._active},set:function(e){if(!this._providers[e])throw new Error('unknown Unicode version "'+e+'"');this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)},enumerable:!1,configurable:!0}),e.prototype.register=function(e){this._providers[e.version]=e},e.prototype.wcwidth=function(e){return this._activeProvider.wcwidth(e)},e.prototype.getStringCellWidth=function(e){for(var t=0,r=e.length,i=0;i<r;++i){var n=e.charCodeAt(i);if(55296<=n&&n<=56319){if(++i>=r)return t+this.wcwidth(n);var o=e.charCodeAt(i);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},e}();t.UnicodeService=o}},t={};return function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,r),o.exports}(4389)})()}));


/***/ }),

/***/ 3167:
/*!*****************************************!*\
  !*** ./node_modules/zmodem.js/index.js ***!
  \*****************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


Object.assign(
    module.exports,
    __webpack_require__(/*! ./src/zsentry */ 2815)
);


/***/ }),

/***/ 1298:
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/encode.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;

const HEX_DIGITS = [ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102 ];

const HEX_OCTET_VALUE = {};
for (var hd=0; hd<HEX_DIGITS.length; hd++) {
    HEX_OCTET_VALUE[ HEX_DIGITS[hd] ] = hd;
}

/**
 * General, non-ZMODEM-specific encoding logic.
 *
 * @exports ENCODELIB
 */
Zmodem.ENCODELIB = {

    /**
     * Return an array with the given number as 2 big-endian bytes.
     *
     * @param {number} number - The number to encode.
     *
     * @returns {number[]} The octet values.
     */
    pack_u16_be: function pack_u16_be(number) {
        if (number > 0xffff) throw( "Number cannot exceed 16 bits: " + number )

        return [ number >> 8, number & 0xff ];
    },

    /**
     * Return an array with the given number as 4 little-endian bytes.
     *
     * @param {number} number - The number to encode.
     *
     * @returns {number[]} The octet values.
     */
    pack_u32_le: function pack_u32_le(number) {
        //Can’t bit-shift because that runs into JS’s bit-shift problem.
        //(See _updcrc32() for an example.)
        var high_bytes = number / 65536;   //fraction is ok

        //a little-endian 4-byte sequence
        return [
            number & 0xff,
            (number & 65535) >> 8,
            high_bytes & 0xff,
            high_bytes >> 8,
        ];
    },

    /**
     * The inverse of pack_u16_be() - i.e., take in 2 octet values
     * and parse them as an unsigned, 2-byte big-endian number.
     *
     * @param {number[]} octets - The octet values (2 of them).
     *
     * @returns {number} The decoded number.
     */
    unpack_u16_be: function unpack_u16_be(bytes_arr) {
        return (bytes_arr[0] << 8) + bytes_arr[1];
    },

    /**
     * The inverse of pack_u32_le() - i.e., take in a 4-byte sequence
     * and parse it as an unsigned, 4-byte little-endian number.
     *
     * @param {number[]} octets - The octet values (4 of them).
     *
     * @returns {number} The decoded number.
     */
    unpack_u32_le: function unpack_u32_le(octets) {
        //<sigh> … (254 << 24 is -33554432, according to JavaScript)
        return octets[0] + (octets[1] << 8) + (octets[2] << 16) + (octets[3] * 16777216);
    },

    /**
     * Encode a series of octet values to be the octet values that
     * correspond to the ASCII hex characters for each octet. The
     * returned array is suitable for use as binary data.
     *
     * For example:
     *
     *      Original    Hex     Returned
     *      254         fe      102, 101
     *       12         0c      48, 99
     *      129         81      56, 49
     *
     * @param {number[]} octets - The original octet values.
     *
     * @returns {number[]} The octet values that correspond to an ASCII
     *  representation of the given octets.
     */
    octets_to_hex: function octets_to_hex(octets) {
        var hex = [];
        for (var o=0; o<octets.length; o++) {
            hex.push(
                HEX_DIGITS[ octets[o] >> 4 ],
                HEX_DIGITS[ octets[o] & 0x0f ]
            );
        }

        return hex;
    },

    /**
     * The inverse of octets_to_hex(): takes an array
     * of hex octet pairs and returns their octet values.
     *
     * @param {number[]} hex_octets - The hex octet values.
     *
     * @returns {number[]} The parsed octet values.
     */
    parse_hex_octets: function parse_hex_octets(hex_octets) {
        var octets = new Array(hex_octets.length / 2);

        for (var i=0; i<octets.length; i++) {
            octets[i] = (HEX_OCTET_VALUE[ hex_octets[2 * i] ] << 4) + HEX_OCTET_VALUE[ hex_octets[1 + 2 * i] ];
        }

        return octets;
    },
};


/***/ }),

/***/ 485:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/text.js ***!
  \********************************************/
/***/ ((module) => {

class _my_TextEncoder {
    encode(text) {
        text = unescape(encodeURIComponent(text));

        var bytes = new Array( text.length );

        for (var b = 0; b < text.length; b++) {
            bytes[b] = text.charCodeAt(b);
        }

        return new Uint8Array(bytes);
    }
}

class _my_TextDecoder {
    decode(bytes) {
        return decodeURIComponent( escape( String.fromCharCode.apply(String, bytes) ) );
    }
}

var Zmodem = module.exports;

/**
 * A limited-use compatibility shim for TextEncoder and TextDecoder.
 * Useful because both Edge and node.js still lack support for these
 * as of October 2017.
 *
 * @exports Text
 */
Zmodem.Text = {
    Encoder: (typeof TextEncoder !== "undefined") ? TextEncoder : _my_TextEncoder,
    Decoder: (typeof TextDecoder !== "undefined") ? TextDecoder : _my_TextDecoder,
};


/***/ }),

/***/ 7093:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zcrc.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


const CRC32_MOD = __webpack_require__(/*! crc-32 */ 6026);

var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./zerror */ 446),
    __webpack_require__(/*! ./encode */ 1298)
);

//----------------------------------------------------------------------
// BEGIN adapted from crc-js by Johannes Rudolph

var _crctab;

const
    crc_width = 16,
    crc_polynomial = 0x1021,
    crc_castmask = 0xffff,
    crc_msbmask = 1 << (crc_width - 1)
;

function _compute_crctab() {
    _crctab = new Array(256);

    var divident_shift = crc_width - 8;

    for (var divident = 0; divident < 256; divident++) {
        var currByte = (divident << divident_shift) & crc_castmask;

        for (var bit = 0; bit < 8; bit++) {

            if ((currByte & crc_msbmask) !== 0) {
                currByte <<= 1;
                currByte ^= crc_polynomial;
            }
            else {
                currByte <<= 1;
            }
        }

        _crctab[divident] = (currByte & crc_castmask);
    }
}

// END adapted from crc-js by Johannes Rudolph
//----------------------------------------------------------------------

function _updcrc(cp, crc) {
    if (!_crctab) _compute_crctab();

    return(
        _crctab[((crc >> 8) & 255)]
        ^ ((255 & crc) << 8)
        ^ cp
    );
}

function __verify(expect, got) {
    var err;

    if ( expect.join() !== got.join() ) {
        throw new Zmodem.Error("crc", got, expect);
    }
}

//TODO: use external implementation(s)
Zmodem.CRC = {

    //https://www.lammertbies.nl/comm/info/crc-calculation.html
    //CRC-CCITT (XModem)

    /**
     * Deduce a given set of octet values’ CRC16, as per the CRC16
     * variant that ZMODEM uses (CRC-CCITT/XModem).
     *
     * @param {Array} octets - The array of octet values.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *
     * @returns {Array} crc - The CRC, expressed as an array of octet values.
     */
    crc16: function crc16(octet_nums) {
        var crc = octet_nums[0];
        for (var b=1; b<octet_nums.length; b++) {
            crc = _updcrc( octet_nums[b], crc );
        }

        crc = _updcrc( 0, _updcrc(0, crc) );

        //a big-endian 2-byte sequence
        return Zmodem.ENCODELIB.pack_u16_be(crc);
    },

    /**
     * Deduce a given set of octet values’ CRC32.
     *
     * @param {Array} octets - The array of octet values.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *
     * @returns {Array} crc - The CRC, expressed as an array of octet values.
     */
    crc32: function crc32(octet_nums) {
        return Zmodem.ENCODELIB.pack_u32_le(
            CRC32_MOD.buf(octet_nums) >>> 0     //bit-shift to get unsigned
        );
    },

    /**
     * Verify a given set of octet values’ CRC16.
     * An exception is thrown on failure.
     *
     * @param {Array} bytes_arr - The array of octet values.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *
     * @param {Array} crc - The CRC to check against, expressed as
     *      an array of octet values.
     */
    verify16: function verify16(bytes_arr, got) {
        return __verify( this.crc16(bytes_arr), got );
    },

    /**
     * Verify a given set of octet values’ CRC32.
     * An exception is thrown on failure.
     *
     * @param {Array} bytes_arr - The array of octet values.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *
     * @param {Array} crc - The CRC to check against, expressed as
     *      an array of octet values.
     */
    verify32: function verify32(bytes_arr, crc) {
        try {
            __verify( this.crc32(bytes_arr), crc );
        }
        catch(err) {
            err.input = bytes_arr.slice(0);
            throw err;
        }
    },
};


/***/ }),

/***/ 6988:
/*!********************************************!*\
  !*** ./node_modules/zmodem.js/src/zdle.js ***!
  \********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./zmlib */ 7837)
);

//encode() variables - declare them here so we don’t
//create them in the function.
var encode_cur, encode_todo;

const ZDLE = Zmodem.ZMLIB.ZDLE;

/**
 * Class that handles ZDLE encoding and decoding.
 * Encoding is subject to a given configuration--specifically, whether
 * we want to escape all control characters. Decoding is static; however
 * a given string is encoded we can always decode it.
 */
Zmodem.ZDLE = class ZmodemZDLE {
    /**
     * Create a ZDLE encoder.
     *
     * @param {object} [config] - The initial configuration.
     * @param {object} config.escape_ctrl_chars - Whether the ZDLE encoder
     *  should escape control characters.
     */
    constructor(config) {
        this._config = {};
        if (config) {
            this.set_escape_ctrl_chars(!!config.escape_ctrl_chars);
        }
    }

    /**
     * Enable or disable control-character escaping.
     * You should probably enable this for sender sessions.
     *
     * @param {boolean} value - Whether to enable (true) or disable (false).
     */
    set_escape_ctrl_chars(value) {
        if (typeof value !== "boolean") throw "need boolean!";

        if (value !== this._config.escape_ctrl_chars) {
            this._config.escape_ctrl_chars = value;
            this._setup_zdle_table();
        }
    }

    /**
     * Whether or not control-character escaping is enabled.
     *
     * @return {boolean} Whether the escaping is on (true) or off (false).
     */
    escapes_ctrl_chars() {
        return !!this._config.escape_ctrl_chars;
    }

    //I don’t know of any Zmodem implementations that use ZESC8
    //(“escape_8th_bit”)??

    /*
    ZMODEM software escapes ZDLE, 020, 0220, 021, 0221, 023, and 0223.  If
    preceded by 0100 or 0300 (@), 015 and 0215 are also escaped to protect the
    Telenet command escape CR-@-CR.
    */

    /**
     * Encode an array of octet values and return it.
     * This will mutate the given array.
     *
     * @param {number[]} octets - The octet values to transform.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {number[]} The passed-in array, transformed. This is the
     *  same object that is passed in.
     */
    encode(octets) {
        //NB: Performance matters here!

        if (!this._zdle_table) throw "No ZDLE encode table configured!";

        var zdle_table = this._zdle_table;

        var last_code = this._lastcode;

        var arrbuf = new ArrayBuffer( 2 * octets.length );
        var arrbuf_uint8 = new Uint8Array(arrbuf);

        var escctl_yn = this._config.escape_ctrl_chars;

        var arrbuf_i = 0;

        for (encode_cur=0; encode_cur<octets.length; encode_cur++) {

            encode_todo = zdle_table[octets[encode_cur]];
            if (!encode_todo) {
                console.trace();
                console.error("bad encode() call:", JSON.stringify(octets));
                this._lastcode = last_code;
                throw( "Invalid octet: " + octets[encode_cur] );
            }

            last_code = octets[encode_cur];

            if (encode_todo === 1) {
                //Do nothing; we append last_code below.
            }

            //0x40 = '@'; i.e., only escape if the last
            //octet was '@'.
            else if (escctl_yn || (encode_todo === 2) || ((last_code & 0x7f) === 0x40)) {
                arrbuf_uint8[arrbuf_i] = ZDLE;
                arrbuf_i++;

                last_code ^= 0x40;   //0100
            }

            arrbuf_uint8[arrbuf_i] = last_code;

            arrbuf_i++;
        }

        this._lastcode = last_code;

        octets.splice(0);
        octets.push.apply(octets, new Uint8Array( arrbuf, 0, arrbuf_i ));

        return octets;
    }

    /**
     * Decode an array of octet values and return it.
     * This will mutate the given array.
     *
     * @param {number[]} octets - The octet values to transform.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {number[]} The passed-in array.
     *  This is the same object that is passed in.
     */
    static decode(octets) {
        for (var o=octets.length-1; o>=0; o--) {
            if (octets[o] === ZDLE) {
                octets.splice( o, 2, octets[o+1] - 64 );
            }
        }

        return octets;
    }

    /**
     * Remove, ZDLE-decode, and return bytes from the passed-in array.
     * If the requested number of ZDLE-encoded bytes isn’t available,
     * then the passed-in array is unmodified (and the return is undefined).
     *
     * @param {number[]} octets - The octet values to transform.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @param {number} offset - The number of (undecoded) bytes to skip
     *      at the beginning of the “octets” array.
     *
     * @param {number} count - The number of bytes (octet values) to return.
     *
     * @returns {number[]|undefined} An array with the requested number of
     *      decoded octet values, or undefined if that number of decoded
     *      octets isn’t available (given the passed-in offset).
     */
    static splice(octets, offset, count) {
        var so_far = 0;

        if (!offset) offset = 0;

        for (var i = offset; i<octets.length && so_far<count; i++) {
            so_far++;

            if (octets[i] === ZDLE) i++;
        }

        if (so_far === count) {

            //Don’t accept trailing ZDLE. This check works
            //because of the i++ logic above.
            if (octets.length === (i - 1)) return;

            octets.splice(0, offset);
            return ZmodemZDLE.decode( octets.splice(0, i - offset) );
        }

        return;
    }

    _setup_zdle_table() {
        var zsendline_tab = new Array(256);
        for (var i=0; i<zsendline_tab.length; i++) {

            //1 = never escape
            //2 = always escape
            //3 = escape only if the previous byte was '@'

            //Never escape characters from 0x20 (32) to 0x7f (127).
            //This is the range of printable characters, plus DEL.
            //I guess ZMODEM doesn’t consider DEL to be a control character?
            if ( i & 0x60 ) {
                zsendline_tab[i] = 1;
            }
            else {
                switch(i) {
                    case ZDLE:  //NB: no (ZDLE | 0x80)
                    case Zmodem.ZMLIB.XOFF:
                    case Zmodem.ZMLIB.XON:
                    case (Zmodem.ZMLIB.XOFF | 0x80):
                    case (Zmodem.ZMLIB.XON | 0x80):
                        zsendline_tab[i] = 2;
                        break;

                    case 0x10:  // 020
                    case 0x90:  // 0220
                        zsendline_tab[i] = this._config.turbo_escape ? 1 : 2;
                        break;

                    case 0x0d:  // 015
                    case 0x8d:  // 0215
                        zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : !this._config.turbo_escape ? 3 : 1;
                        break;

                    default:
                        zsendline_tab[i] = this._config.escape_ctrl_chars ? 2 : 1;
                }
            }
        }

        this._zdle_table = zsendline_tab;
    }
}


/***/ }),

/***/ 446:
/*!**********************************************!*\
  !*** ./node_modules/zmodem.js/src/zerror.js ***!
  \**********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;

function _crc_message(got, expected) {
    this.got = got.slice(0);
    this.expected = expected.slice(0);
    return "CRC check failed! (got: " + got.join() + "; expected: " + expected.join() + ")";
}

function _pass(val) { return val }

const TYPE_MESSAGE = {
    aborted: "Session aborted",
    peer_aborted: "Peer aborted session",
    already_aborted: "Session already aborted",
    crc: _crc_message,
    validation: _pass,
};

function _generate_message(type) {
    const msg = TYPE_MESSAGE[type];
    switch (typeof msg) {
        case "string":
            return msg;
        case "function":
            var args_after_type = [].slice.call(arguments).slice(1);
            return msg.apply(this, args_after_type);
    }

    return null;
}

Zmodem.Error = class ZmodemError extends Error {
    constructor(msg_or_type) {
        super();

        var generated = _generate_message.apply(this, arguments);
        if (generated) {
            this.type = msg_or_type;
            this.message = generated;
        }
        else {
            this.message = msg_or_type;
        }
    }
};


/***/ }),

/***/ 6561:
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zheader.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./encode */ 1298),
    __webpack_require__(/*! ./zdle */ 6988),
    __webpack_require__(/*! ./zmlib */ 7837),
    __webpack_require__(/*! ./zcrc */ 7093),
    __webpack_require__(/*! ./zerror */ 446)
);

const ZPAD = '*'.charCodeAt(0),
    ZBIN = 'A'.charCodeAt(0),
    ZHEX = 'B'.charCodeAt(0),
    ZBIN32 = 'C'.charCodeAt(0)
;

//NB: lrzsz uses \x8a rather than \x0a where the specs
//say to use LF. For simplicity, we avoid that and just use
//the 7-bit LF character.
const HEX_HEADER_CRLF = [ 0x0d, 0x0a ];
const HEX_HEADER_CRLF_XON = HEX_HEADER_CRLF.slice(0).concat( [Zmodem.ZMLIB.XON] );

//These are more or less duplicated by the logic in trim_leading_garbage().
//
//"**" + ZDLE_CHAR + "B"
const HEX_HEADER_PREFIX = [ ZPAD, ZPAD, Zmodem.ZMLIB.ZDLE, ZHEX ];
const BINARY16_HEADER_PREFIX = [ ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN ];
const BINARY32_HEADER_PREFIX = [ ZPAD, Zmodem.ZMLIB.ZDLE, ZBIN32 ];

/** Class that represents a ZMODEM header. */
Zmodem.Header = class ZmodemHeader {

    //lrzsz’s “sz” command sends a random (?) CR/0x0d byte
    //after ZEOF. Let’s accommodate 0x0a, 0x0d, 0x8a, and 0x8d.
    //
    //Also, when you skip a file, sz outputs a message about it.
    //
    //It appears that we’re supposed to ignore anything until
    //[ ZPAD, ZDLE ] when we’re looking for a header.

    /**
     * Weed out the leading bytes that aren’t valid to start a ZMODEM header.
     *
     * @param {number[]} ibuffer - The octet values to parse.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {number[]} The octet values that were removed from the start
     *      of “ibuffer”. Order is preserved.
     */
    static trim_leading_garbage(ibuffer) {
        //Since there’s no escaping of the output it’s possible
        //that the garbage could trip us up, e.g., by having a filename
        //be a legit ZMODEM header. But that’s pretty unlikely.

        //Everything up to the first ZPAD: garbage
        //If first ZPAD has asterisk + ZDLE

        var garbage = [];

        var discard_all, parser, next_ZPAD_at_least = 0;

      TRIM_LOOP:
        while (ibuffer.length && !parser) {
            var first_ZPAD = ibuffer.indexOf(ZPAD);

            //No ZPAD? Then we purge the input buffer cuz it’s all garbage.
            if (first_ZPAD === -1) {
                discard_all = true;
                break TRIM_LOOP;
            }
            else {
                garbage.push.apply( garbage, ibuffer.splice(0, first_ZPAD) );

                //buffer has only an asterisk … gotta see about more
                if (ibuffer.length < 2) {
                    break TRIM_LOOP;
                }
                else if (ibuffer[1] === ZPAD) {
                    //Two leading ZPADs should be a hex header.

                    //We’re assuming the length of the header is 4 in
                    //this logic … but ZMODEM isn’t likely to change, so.
                    if (ibuffer.length < HEX_HEADER_PREFIX.length) {
                        if (ibuffer.join() === HEX_HEADER_PREFIX.slice(0, ibuffer.length).join()) {
                            //We have an incomplete fragment that matches
                            //HEX_HEADER_PREFIX. So don’t trim any more.
                            break TRIM_LOOP;
                        }

                        //Otherwise, we’ll discard one.
                    }
                    else if ((ibuffer[2] === HEX_HEADER_PREFIX[2]) && (ibuffer[3] === HEX_HEADER_PREFIX[3])) {
                        parser = _parse_hex;
                    }
                }
                else if (ibuffer[1] === Zmodem.ZMLIB.ZDLE) {
                    //ZPAD + ZDLE should be a binary header.
                    if (ibuffer.length < BINARY16_HEADER_PREFIX.length) {
                        break TRIM_LOOP;
                    }

                    if (ibuffer[2] === BINARY16_HEADER_PREFIX[2]) {
                        parser = _parse_binary16;
                    }
                    else if (ibuffer[2] === BINARY32_HEADER_PREFIX[2]) {
                        parser = _parse_binary32;
                    }
                }

                if (!parser) {
                    garbage.push( ibuffer.shift() );
                }
            }
        }

        if (discard_all) {
            garbage.push.apply( garbage, ibuffer.splice(0) );
        }

        //For now we’ll throw away the parser.
        //It’s not hard for parse() to discern anyway.

        return garbage;
    }

    /**
     * Parse out a Header object from a given array of octet values.
     *
     * An exception is thrown if the given bytes are definitively invalid
     * as header values.
     *
     * @param {number[]} octets - The octet values to parse.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {Header|undefined} An instance of the appropriate Header
     *      subclass, or undefined if not enough octet values are given
     *      to determine whether there is a valid header here or not.
     */
    static parse(octets) {
        var hdr;
        if (octets[1] === ZPAD) {
            hdr = _parse_hex(octets);
            return hdr && [ hdr, 16 ];
        }

        else if (octets[2] === ZBIN) {
            hdr = _parse_binary16(octets, 3);
            return hdr && [ hdr, 16 ];
        }

        else if (octets[2] === ZBIN32) {
            hdr = _parse_binary32(octets);
            return hdr && [ hdr, 32 ];
        }

        if (octets.length < 3) return;

        throw( "Unrecognized/unsupported octets: " + octets.join() );
    }

    /**
     * Build a Header subclass given a name and arguments.
     *
     * @param {string} name - The header type name, e.g., “ZRINIT”.
     *
     * @param {...*} args - The arguments to pass to the appropriate
     *      subclass constructor. These aren’t documented currently
     *      but are pretty easy to glean from the code.
     *
     * @returns {Header} An instance of the appropriate Header subclass.
     */
    static build(name /*, args */) {
        var args = (arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments));

        //TODO: make this better
        var Ctr = FRAME_NAME_CREATOR[name];
        if (!Ctr) throw("No frame class “" + name + "” is defined!");

        args.shift();

        //Plegh!
        //https://stackoverflow.com/questions/33193310/constr-applythis-args-in-es6-classes
        var hdr = new (Ctr.bind.apply(Ctr, [null].concat(args)));

        return hdr;
    }

    /**
     * Return the octet values array that represents the object
     * in ZMODEM hex encoding.
     *
     * @returns {number[]} An array of octet values suitable for sending
     *      as binary data.
     */
    to_hex() {
        var to_crc = this._crc_bytes();

        return HEX_HEADER_PREFIX.concat(
            Zmodem.ENCODELIB.octets_to_hex( to_crc.concat( Zmodem.CRC.crc16(to_crc) ) ),
            this._hex_header_ending
        );
    }

    /**
     * Return the octet values array that represents the object
     * in ZMODEM binary encoding with a 16-bit CRC.
     *
     * @param {ZDLE} zencoder - A ZDLE instance to use for
     *      ZDLE encoding.
     *
     * @returns {number[]} An array of octet values suitable for sending
     *      as binary data.
     */
    to_binary16(zencoder) {
        return this._to_binary(zencoder, BINARY16_HEADER_PREFIX, Zmodem.CRC.crc16);
    }

    /**
     * Return the octet values array that represents the object
     * in ZMODEM binary encoding with a 32-bit CRC.
     *
     * @param {ZDLE} zencoder - A ZDLE instance to use for
     *      ZDLE encoding.
     *
     * @returns {number[]} An array of octet values suitable for sending
     *      as binary data.
     */
    to_binary32(zencoder) {
        return this._to_binary(zencoder, BINARY32_HEADER_PREFIX, Zmodem.CRC.crc32);
    }

    //This is never called directly, but only as super().
    constructor() {
        if (!this._bytes4) {
            this._bytes4 = [0, 0, 0, 0];
        }
    }

    _to_binary(zencoder, prefix, crc_func) {
        var to_crc = this._crc_bytes();

        //Both the 4-byte payload and the CRC bytes are ZDLE-encoded.
        var octets = prefix.concat(
            zencoder.encode( to_crc.concat( crc_func(to_crc) ) )
        );

        return octets;
    }

    _crc_bytes() {
        return [ this.TYPENUM ].concat(this._bytes4);
    }
}
Zmodem.Header.prototype._hex_header_ending = HEX_HEADER_CRLF_XON;

class ZRQINIT_HEADER extends Zmodem.Header {};

//----------------------------------------------------------------------

const ZRINIT_FLAG = {

    //----------------------------------------------------------------------
    // Bit Masks for ZRINIT flags byte ZF0
    //----------------------------------------------------------------------
    CANFDX: 0x01,  // Rx can send and receive true FDX
    CANOVIO: 0x02, // Rx can receive data during disk I/O
    CANBRK: 0x04,  // Rx can send a break signal
    CANCRY: 0x08,  // Receiver can decrypt -- nothing does this
    CANLZW: 0x10,  // Receiver can uncompress -- nothing does this
    CANFC32: 0x20, // Receiver can use 32 bit Frame Check
    ESCCTL: 0x40,  // Receiver expects ctl chars to be escaped
    ESC8: 0x80,    // Receiver expects 8th bit to be escaped
};

function _get_ZRINIT_flag_num(fl) {
    if (!ZRINIT_FLAG[fl]) {
        throw new Zmodem.Error("Invalid ZRINIT flag: " + fl);
    }
    return ZRINIT_FLAG[fl];
}

class ZRINIT_HEADER extends Zmodem.Header {
    constructor(flags_arr, bufsize) {
        super();
        var flags_num = 0;
        if (!bufsize) bufsize = 0;

        flags_arr.forEach( function(fl) {
            flags_num |= _get_ZRINIT_flag_num(fl);
        } );

        this._bytes4 = [
            bufsize & 0xff,
            bufsize >> 8,
            0,
            flags_num,
        ];
    }

    //undefined if nonstop I/O is allowed
    get_buffer_size() {
        return Zmodem.ENCODELIB.unpack_u16_be( this._bytes4.slice(0, 2) ) || undefined;
    }

    //Unimplemented:
    //  can_decrypt
    //  can_decompress

    //----------------------------------------------------------------------
    //function names taken from Jacques Mattheij’s implementation,
    //as used in syncterm.

    can_full_duplex() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.CANFDX );
    }

    can_overlap_io() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.CANOVIO );
    }

    can_break() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.CANBRK );
    }

    can_fcs_32() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.CANFC32 );
    }

    escape_ctrl_chars() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.ESCCTL );
    }

    //Is this used? I don’t see it used in lrzsz or syncterm
    //Looks like it was a “foreseen” feature that Forsberg
    //never implemented. (The need for it went away, maybe?)
    escape_8th_bit() {
        return !!( this._bytes4[3] & ZRINIT_FLAG.ESC8 );
    }
};

//----------------------------------------------------------------------

//Since context makes clear what’s going on, we use these
//rather than the T-prefixed constants in the specification.
const ZSINIT_FLAG = {
    ESCCTL: 0x40,  // Transmitter will escape ctl chars
    ESC8: 0x80,    // Transmitter will escape 8th bit
};

function _get_ZSINIT_flag_num(fl) {
    if (!ZSINIT_FLAG[fl]) {
        throw("Invalid ZSINIT flag: " + fl);
    }
    return ZSINIT_FLAG[fl];
}

class ZSINIT_HEADER extends Zmodem.Header {
    constructor( flags_arr, attn_seq_arr ) {
        super();
        var flags_num = 0;

        flags_arr.forEach( function(fl) {
            flags_num |= _get_ZSINIT_flag_num(fl);
        } );

        this._bytes4 = [ 0, 0, 0, flags_num ];

        if (attn_seq_arr) {
            if (attn_seq_arr.length > 31) {
                throw("Attn sequence must be <= 31 bytes");
            }
            if (attn_seq_arr.some( function(num) { return num > 255 } )) {
                throw("Attn sequence (" + attn_seq_arr + ") must be <256");
            }
            this._data = attn_seq_arr.concat([0]);
        }
    }

    escape_ctrl_chars() {
        return !!( this._bytes4[3] & ZSINIT_FLAG.ESCCTL );
    }

    //Is this used? I don’t see it used in lrzsz or syncterm
    escape_8th_bit() {
        return !!( this._bytes4[3] & ZSINIT_FLAG.ESC8 );
    }
}

//Thus far it doesn’t seem we really need this header except to respond
//to ZSINIT, which doesn’t require a payload.
class ZACK_HEADER extends Zmodem.Header {
    constructor(payload4) {
        super();

        if (payload4) {
            this._bytes4 = payload4.slice();
        }
    }
}
ZACK_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;

//----------------------------------------------------------------------

const ZFILE_VALUES = {

    //ZF3 (i.e., first byte)
    extended: {
        sparse: 0x40,   //ZXSPARS
    },

    //ZF2
    transport: [
        undefined,
        "compress",         //ZTLZW
        "encrypt",          //ZTCRYPT
        "rle",              //ZTRLE
    ],

    //ZF1
    management: [
        undefined,
        "newer_or_longer",  //ZF1_ZMNEWL
        "crc",              //ZF1_ZMCRC
        "append",           //ZF1_ZMAPND
        "clobber",          //ZF1_ZMCLOB
        "newer",            //ZF1_ZMNEW
        "mtime_or_length",  //ZF1_ZMNEW
        "protect",          //ZF1_ZMPROT
        "rename",           //ZF1_ZMPROT
    ],

    //ZF0 (i.e., last byte)
    conversion: [
        undefined,
        "binary",           //ZCBIN
        "text",             //ZCNL
        "resume",           //ZCRESUM
    ],
};

const ZFILE_ORDER = ["extended", "transport", "management", "conversion"];

const ZMSKNOLOC = 0x80,
    MANAGEMENT_MASK = 0x1f,
    ZXSPARS = 0x40
;

class ZFILE_HEADER extends Zmodem.Header {

    //TODO: allow options on instantiation
    get_options() {
        var opts = {
            sparse: !!(this._bytes4[0] & ZXSPARS),
        };

        var bytes_copy = this._bytes4.slice(0);

        ZFILE_ORDER.forEach( function(key, i) {
            if (ZFILE_VALUES[key] instanceof Array) {
                if (key === "management") {
                    opts.skip_if_absent = !!(bytes_copy[i] & ZMSKNOLOC);
                    bytes_copy[i] &= MANAGEMENT_MASK;
                }

                opts[key] = ZFILE_VALUES[key][ bytes_copy[i] ];
            }
            else {
                for (var extkey in ZFILE_VALUES[key]) {
                    opts[extkey] = !!(bytes_copy[i] & ZFILE_VALUES[key][extkey]);
                    if (opts[extkey]) {
                        bytes_copy[i] ^= ZFILE_VALUES[key][extkey]
                    }
                }
            }

            if (!opts[key] && bytes_copy[i]) {
                opts[key] = "unknown:" + bytes_copy[i];
            }
        } );

        return opts;
    }
}

//----------------------------------------------------------------------

//Empty headers - in addition to ZRQINIT
class ZSKIP_HEADER extends Zmodem.Header {}
//No need for ZNAK
class ZABORT_HEADER extends Zmodem.Header {}
class ZFIN_HEADER extends Zmodem.Header {}
class ZFERR_HEADER extends Zmodem.Header {}

ZFIN_HEADER.prototype._hex_header_ending = HEX_HEADER_CRLF;

class ZOffsetHeader extends Zmodem.Header {
    constructor(offset) {
        super();
        this._bytes4 = Zmodem.ENCODELIB.pack_u32_le(offset);
    }

    get_offset() {
        return Zmodem.ENCODELIB.unpack_u32_le(this._bytes4);
    }
}

class ZRPOS_HEADER extends ZOffsetHeader {};
class ZDATA_HEADER extends ZOffsetHeader {};
class ZEOF_HEADER extends ZOffsetHeader {};

//As request, receiver creates.
/* UNIMPLEMENTED FOR NOW
class ZCRC_HEADER extends ZHeader {
    constructor(crc_le_bytes) {
        super();
        if (crc_le_bytes) {  //response, sender creates
            this._bytes4 = crc_le_bytes;
        }
    }
}
*/

//No ZCHALLENGE implementation

//class ZCOMPL_HEADER extends ZHeader {}
//class ZCAN_HEADER extends Zmodem.Header {}

//As described, this header represents an information disclosure.
//It could be interpreted, I suppose, merely as “this is how much space
//I have FOR YOU.”
//TODO: implement if needed/requested
//class ZFREECNT_HEADER extends ZmodemHeader {}

//----------------------------------------------------------------------

const FRAME_CLASS_TYPES = [
    [ ZRQINIT_HEADER, "ZRQINIT" ],
    [ ZRINIT_HEADER, "ZRINIT" ],
    [ ZSINIT_HEADER, "ZSINIT" ],
    [ ZACK_HEADER, "ZACK" ],
    [ ZFILE_HEADER, "ZFILE" ],
    [ ZSKIP_HEADER, "ZSKIP" ],
    undefined, // [ ZNAK_HEADER, "ZNAK" ],
    [ ZABORT_HEADER, "ZABORT" ],
    [ ZFIN_HEADER, "ZFIN" ],
    [ ZRPOS_HEADER, "ZRPOS" ],
    [ ZDATA_HEADER, "ZDATA" ],
    [ ZEOF_HEADER, "ZEOF" ],
    [ ZFERR_HEADER, "ZFERR" ],  //see note
    undefined, //[ ZCRC_HEADER, "ZCRC" ],
    undefined, //[ ZCHALLENGE_HEADER, "ZCHALLENGE" ],
    undefined, //[ ZCOMPL_HEADER, "ZCOMPL" ],
    undefined, //[ ZCAN_HEADER, "ZCAN" ],
    undefined, //[ ZFREECNT_HEADER, "ZFREECNT" ],
    undefined, //[ ZCOMMAND_HEADER, "ZCOMMAND" ],
    undefined, //[ ZSTDERR_HEADER, "ZSTDERR" ],
];

/*
ZFERR is described as “error in reading or writing file”. It’s really
not a good idea from a security angle for the endpoint to expose this
information. We should parse this and handle it as ZABORT but never send it.

Likewise with ZFREECNT: the sender shouldn’t ask how much space is left
on the other box; rather, the receiver should decide what to do with the
file size as the sender reports it.
*/

var FRAME_NAME_CREATOR = {};

for (var fc=0; fc<FRAME_CLASS_TYPES.length; fc++) {
    if (!FRAME_CLASS_TYPES[fc]) continue;

    FRAME_NAME_CREATOR[ FRAME_CLASS_TYPES[fc][1] ] = FRAME_CLASS_TYPES[fc][0];

    Object.assign(
        FRAME_CLASS_TYPES[fc][0].prototype,
        {
            TYPENUM: fc,
            NAME: FRAME_CLASS_TYPES[fc][1],
        }
    );
}

//----------------------------------------------------------------------

const CREATORS = [
    ZRQINIT_HEADER,
    ZRINIT_HEADER,
    ZSINIT_HEADER,
    ZACK_HEADER,
    ZFILE_HEADER,
    ZSKIP_HEADER,
    'ZNAK',
    ZABORT_HEADER,
    ZFIN_HEADER,
    ZRPOS_HEADER,
    ZDATA_HEADER,
    ZEOF_HEADER,
    ZFERR_HEADER,
    'ZCRC', //ZCRC_HEADER, -- leaving unimplemented?
    'ZCHALLENGE',
    'ZCOMPL',
    'ZCAN',
    'ZFREECNT', // ZFREECNT_HEADER,
    'ZCOMMAND',
    'ZSTDERR',
];

function _get_blank_header(typenum) {
    var creator = CREATORS[typenum];
    if (typeof(creator) === "string") {
        throw( "Received unsupported header: " + creator );
    }

    /*
    if (creator === ZCRC_HEADER) {
        return new creator([0, 0, 0, 0]);
    }
    */

    return _get_blank_header_from_constructor(creator);
}

//referenced outside TODO
function _get_blank_header_from_constructor(creator) {
    if (creator.prototype instanceof ZOffsetHeader) {
        return new creator(0);
    }

    return new creator([]);
}

function _parse_binary16(bytes_arr) {

    //The max length of a ZDLE-encoded binary header w/ 16-bit CRC is:
    //  3 initial bytes, NOT ZDLE-encoded
    //  2 typenum bytes     (1 decoded)
    //  8 data bytes        (4 decoded)
    //  4 CRC bytes         (2 decoded)

    //A 16-bit payload has 7 ZDLE-encoded octets.
    //The ZDLE-encoded octets follow the initial prefix.
    var zdle_decoded = Zmodem.ZDLE.splice( bytes_arr, BINARY16_HEADER_PREFIX.length, 7 );

    return zdle_decoded && _parse_non_zdle_binary16(zdle_decoded);
}

function _parse_non_zdle_binary16(decoded) {
    Zmodem.CRC.verify16(
        decoded.slice(0, 5),
        decoded.slice(5)
    );

    var typenum = decoded[0];
    var hdr = _get_blank_header(typenum);
    hdr._bytes4 = decoded.slice( 1, 5 );

    return hdr;
}

function _parse_binary32(bytes_arr) {

    //Same deal as with 16-bit CRC except there are two more
    //potentially ZDLE-encoded bytes, for a total of 9.
    var zdle_decoded = Zmodem.ZDLE.splice(
        bytes_arr,     //omit the leading "*", ZDLE, and "C"
        BINARY32_HEADER_PREFIX.length,
        9
    );

    if (!zdle_decoded) return;

    Zmodem.CRC.verify32(
        zdle_decoded.slice(0, 5),
        zdle_decoded.slice(5)
    );

    var typenum = zdle_decoded[0];
    var hdr = _get_blank_header(typenum);
    hdr._bytes4 = zdle_decoded.slice( 1, 5 );

    return hdr;
}

function _parse_hex(bytes_arr) {

    //A hex header always has:
    //  4 bytes for the ** . ZDLE . 'B'
    //  2 hex bytes for the header type
    //  8 hex bytes for the header content
    //  4 hex bytes for the CRC
    //  1-2 bytes for (CR/)LF
    //  (...and at this point the trailing XON is already stripped)
    //
    //----------------------------------------------------------------------
    //A carriage return and line feed are sent with HEX headers.  The
    //receive routine expects to see at least one of these characters, two
    //if the first is CR.
    //----------------------------------------------------------------------
    //
    //^^ I guess it can be either CR/LF or just LF … though those two
    //sentences appear to be saying contradictory things.

    var lf_pos = bytes_arr.indexOf( 0x8a );     //lrzsz sends this

    if (-1 === lf_pos) {
        lf_pos = bytes_arr.indexOf( 0x0a );
    }

    var hdr_err, hex_bytes;

    if (-1 === lf_pos) {
        if (bytes_arr.length > 11) {
            hdr_err = "Invalid hex header - no LF detected within 12 bytes!";
        }

        //incomplete header
        return;
    }
    else {
        hex_bytes = bytes_arr.splice( 0, lf_pos );

        //Trim off the LF
        bytes_arr.shift();

        if ( hex_bytes.length === 19 ) {

            //NB: The spec says CR but seems to treat high-bit variants
            //of control characters the same as the regulars; should we
            //also allow 0x8d?
            var preceding = hex_bytes.pop();
            if ( preceding !== 0x0d && preceding !== 0x8d ) {
                hdr_err = "Invalid hex header: (CR/)LF doesn’t have CR!";
            }
        }
        else if ( hex_bytes.length !== 18 ) {
            hdr_err = "Invalid hex header: invalid number of bytes before LF!";
        }
    }

    if (hdr_err) {
        hdr_err += " (" + hex_bytes.length + " bytes: " + hex_bytes.join() + ")";
        throw hdr_err;
    }

    hex_bytes.splice(0, 4);

    //Should be 7 bytes ultimately:
    //  1 for typenum
    //  4 for header data
    //  2 for CRC
    var octets = Zmodem.ENCODELIB.parse_hex_octets(hex_bytes);

    return _parse_non_zdle_binary16(octets);
}

Zmodem.Header.parse_hex = _parse_hex;


/***/ }),

/***/ 7837:
/*!*********************************************!*\
  !*** ./node_modules/zmodem.js/src/zmlib.js ***!
  \*********************************************/
/***/ ((module) => {

"use strict";


var Zmodem = module.exports;

const
    ZDLE = 0x18,
    XON = 0x11,
    XOFF = 0x13,
    XON_HIGH = 0x80 | XON,
    XOFF_HIGH = 0x80 | XOFF,
    CAN = 0x18     //NB: same character as ZDLE
;

/**
 * Tools and constants that are useful for ZMODEM.
 *
 * @exports ZMLIB
 */
Zmodem.ZMLIB = {

    /**
     * @property {number} The ZDLE constant, which ZMODEM uses for escaping
     */
    ZDLE: ZDLE,

    /**
     * @property {number} XON - ASCII XON
     */
    XON: XON,

    /**
     * @property {number} XOFF - ASCII XOFF
     */
    XOFF: XOFF,

    /**
     * @property {number[]} ABORT_SEQUENCE - ZMODEM’s abort sequence
     */
    ABORT_SEQUENCE: [ CAN, CAN, CAN, CAN, CAN ],

    /**
     * Remove octet values from the given array that ZMODEM always ignores.
     * This will mutate the given array.
     *
     * @param {number[]} octets - The octet values to transform.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {number[]} The passed-in array. This is the same object that is
     *      passed in.
     */
    strip_ignored_bytes: function strip_ignored_bytes(octets) {
        for (var o=octets.length-1; o>=0; o--) {
            switch (octets[o]) {
                case XON:
                case XON_HIGH:
                case XOFF:
                case XOFF_HIGH:
                    octets.splice(o, 1);
                    continue;
            }
        }

        return octets;
    },

    /**
     * Like Array.prototype.indexOf, but searches for a subarray
     * rather than just a particular value.
     *
     * @param {Array} haystack - The array to search, i.e., the bigger.
     *
     * @param {Array} needle - The array whose values to find,
     *      i.e., the smaller.
     *
     * @returns {number} The position in “haystack” where “needle”
     *      first appears—or, -1 if “needle” doesn’t appear anywhere
     *      in “haystack”.
     */
    find_subarray: function find_subarray(haystack, needle) {
        var h=0, n;

        var start = Date.now();

        HAYSTACK:
        while (h !== -1) {
            h = haystack.indexOf( needle[0], h );
            if (h === -1) break HAYSTACK;

            for (n=1; n<needle.length; n++) {
                if (haystack[h + n] !== needle[n]) {
                    h++;
                    continue HAYSTACK;
                }
            }

            return h;
        }

        return -1;
    },
};


/***/ }),

/***/ 2815:
/*!***********************************************!*\
  !*** ./node_modules/zmodem.js/src/zsentry.js ***!
  \***********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./zmlib */ 7837),
    __webpack_require__(/*! ./zsession */ 3304)
);

const
    MIN_ZM_HEX_START_LENGTH = 20,
    MAX_ZM_HEX_START_LENGTH = 21,

    // **, ZDLE, 'B0'
    //ZRQINIT’s next byte will be '0'; ZRINIT’s will be '1'.
    COMMON_ZM_HEX_START = [ 42, 42, 24, 66, 48 ],

    SENTRY_CONSTRUCTOR_REQUIRED_ARGS = [
        "to_terminal",
        "on_detect",
        "on_retract",
        "sender",
    ],

    ASTERISK = 42
;

/**
 * An instance of this object is passed to the Sentry’s on_detect
 * callback each time the Sentry object sees what looks like the
 * start of a ZMODEM session.
 *
 * Note that it is possible for a detection to be “retracted”
 * if the Sentry consumes bytes afterward that are not ZMODEM.
 * When this happens, the Sentry’s `retract` event will fire,
 * after which the Detection object is no longer usable.
 */
class Detection {

    /**
     * Not called directly.
     */
    constructor(session_type, accepter, denier, checker) {

        //confirm() - user confirms that ZMODEM is desired
        this._confirmer = accepter;

        //deny() - user declines ZMODEM; send abort sequence
        //
        //TODO: It might be ideal to forgo the session “peaceably”,
        //i.e., such that the peer doesn’t end in error. That’s
        //possible if we’re the sender, we accept the session,
        //then we just send a close(), but it doesn’t seem to be
        //possible for a receiver. Thus, let’s just leave it so
        //it’s at least consistent (and simpler, too).
        this._denier = denier;

        this._is_valid = checker;

        this._session_type = session_type;
    }

    /**
     * Confirm that the detected ZMODEM sequence indicates the
     * start of a ZMODEM session.
     *
     * @return {Session} The ZMODEM Session object (i.e., either a
     *  Send or Receive instance).
     */
    confirm() {
        return this._confirmer.apply(this, arguments);
    }

    /**
     * Tell the Sentry that the detected bytes sequence is
     * **NOT** intended to be the start of a ZMODEM session.
     */
    deny() {
        return this._denier.apply(this, arguments);
    }

    /**
     * Tells whether the Detection is still valid; i.e., whether
     * the Sentry has `consume()`d bytes that invalidate the
     * Detection.
     *
     * @returns {boolean} Whether the Detection is valid.
     */
    is_valid() {
        return this._is_valid.apply(this, arguments);
    }

    /**
     * Gives the session’s role.
     *
     * @returns {string} One of:
     * - `receive`
     * - `send`
     */
    get_session_role() { return this._session_type }
}

/**
 * Class that parses an input stream for the beginning of a
 * ZMODEM session. We look for the tell-tale signs
 * of a ZMODEM transfer and allow the client to determine whether
 * it’s really ZMODEM or not.
 *
 * This is the “mother” class for zmodem.js;
 * all other class instances are created, directly or indirectly,
 * by an instance of this class.
 *
 * This logic is not unlikely to need tweaking, and it can never
 * be fully bulletproof; if it could be bulletproof it would be
 * simpler since there wouldn’t need to be the .confirm()/.deny()
 * step.
 *
 * One thing you could do to make things a bit simpler *is* just
 * to make that assumption for your users--i.e., to .confirm()
 * Detection objects automatically. That’ll be one less step
 * for the user, but an unaccustomed user might find that a bit
 * confusing. It’s also then possible to have a “false positive”:
 * a text stream that contains a ZMODEM initialization string but
 * isn’t, in fact, meant to start a ZMODEM session.
 *
 * Workflow:
 *  - parse all input with .consume(). As long as nothing looks
 *      like ZMODEM, all the traffic will go to to_terminal().
 *
 *  - when a “tell-tale” sequence of bytes arrives, we create a
 *      Detection object and pass it to the “on_detect” handler.
 *
 *  - Either .confirm() or .deny() with the Detection object.
 *      This is the user’s chance to say, “yeah, I know those
 *      bytes look like ZMODEM, but they’re not. So back off!”
 *
 *      If you .confirm(), the Session object is returned, and
 *      further input that goes to the Sentry’s .consume() will
 *      go to the (now-active) Session object.
 *
 *  - Sometimes additional traffic arrives that makes it apparent
 *      that no ZMODEM session is intended to start; in this case,
 *      the Sentry marks the Detection as “stale” and calls the
 *      `on_retract` handler. Any attempt from here to .confirm()
 *      on the Detection object will prompt an exception.
 *
 *      (This “retraction” behavior will only happen prior to
 *      .confirm() or .deny() being called on the Detection object.
 *      Beyond that point, either the Session has to deal with the
 *      “garbage”, or it’s back to the terminal anyway.
 *
 *  - Once the Session object is done, the Sentry will again send
 *      all traffic to to_terminal().
 */
Zmodem.Sentry = class ZmodemSentry {

    /**
     * Invoked directly. Creates a new Sentry that inspects all
     * traffic before it goes to the terminal.
     *
     * @param {Object} options - The Sentry parameters
     *
     * @param {Function} options.to_terminal - Handler that sends
     * traffic to the terminal object. Receives an iterable object
     * (e.g., an Array) that contains octet numbers.
     *
     * @param {Function} options.on_detect - Handler for new
     * detection events. Receives a new Detection object.
     *
     * @param {Function} options.on_retract - Handler for retraction
     * events. Receives no input.
     *
     * @param {Function} options.sender - Handler that sends traffic to
     * the peer. If, for example, your application uses WebSocket to talk
     * to the peer, use this to send data to the WebSocket instance.
     */
    constructor(options) {
        if (!options) throw "Need options!";

        var sentry = this;
        SENTRY_CONSTRUCTOR_REQUIRED_ARGS.forEach( function(arg) {
            if (!options[arg]) {
                throw "Need “" + arg + "”!";
            }
            sentry["_" + arg] = options[arg];
        } );

        this._cache = [];
    }

    _after_session_end() {
        this._zsession = null;
    }

    /**
     * “Consumes” a piece of input:
     *
     *  - If there is no active or pending ZMODEM session, the text is
     *      all output. (This is regardless of whether we’ve got a new
     *      Detection.)
     *
     *  - If there is no active ZMODEM session and the input **ends** with
     *      a ZRINIT or ZRQINIT, then a new Detection object is created,
     *      and it is passed to the “on_detect” function.
     *      If there was another pending Detection object, it is retracted.
     *
     *  - If there is no active ZMODEM session and the input does NOT end
     *      with a ZRINIT or ZRQINIT, then any pending Detection object is
     *      retracted.
     *
     *  - If there is an active ZMODEM session, the input is passed to it.
     *      Any non-ZMODEM data (i.e., “garbage”) parsed from the input
     *      is sent to output.
     *      If the ZMODEM session ends, any post-ZMODEM part of the input
     *      is sent to output.
     *
     *  @param {number[] | ArrayBuffer} input - Octets to parse as input.
     */
    consume(input) {
        if (!(input instanceof Array)) {
            input = Array.prototype.slice.call( new Uint8Array(input) );
        }

        if (this._zsession) {
            var session_before_consume = this._zsession;

            session_before_consume.consume(input);

            if (session_before_consume.has_ended()) {
                if (session_before_consume.type === "receive") {
                    input = session_before_consume.get_trailing_bytes();
                }
                else {
                    input = [];
                }
            }
            else return;
        }

        var new_session = this._parse(input);
        var to_terminal = input;

        if (new_session) {
            let replacement_detect = !!this._parsed_session;

            if (replacement_detect) {
                //no terminal output if the new session is of the
                //same type as the old
                if (this._parsed_session.type === new_session.type) {
                    to_terminal = [];
                }

                this._on_retract();
            }

            this._parsed_session = new_session;

            var sentry = this;

            function checker() {
                return sentry._parsed_session === new_session;
            }

            //This runs with the Sentry object as the context.
            function accepter() {
                if (!this.is_valid()) {
                    throw "Stale ZMODEM session!";
                }

                new_session.on("garbage", sentry._to_terminal);

                new_session.on(
                    "session_end",
                    sentry._after_session_end.bind(sentry)
                );

                new_session.set_sender(sentry._sender);

                delete sentry._parsed_session;

                return sentry._zsession = new_session;
            };

            function denier() {
                if (!this.is_valid()) return;
            };

            this._on_detect( new Detection(
                new_session.type,
                accepter,
                this._send_abort.bind(this),
                checker
            ) );
        }
        else {
            /*
            if (this._parsed_session) {
                this._session_stale_because = 'Non-ZMODEM output received after ZMODEM initialization.';
            }
            */

            var expired_session = this._parsed_session;

            this._parsed_session = null;

            if (expired_session) {

                //If we got a single “C” after parsing a session,
                //that means our peer is trying to downgrade to YMODEM.
                //That won’t work, so we just send the ABORT_SEQUENCE
                //right away.
                if (to_terminal.length === 1 && to_terminal[0] === 67) {
                    this._send_abort();
                }

                this._on_retract();
            }
        }

        this._to_terminal(to_terminal);
    }

    /**
     * @return {Session|null} The sentry’s current Session object, or
     *      null if there is none.
     */
    get_confirmed_session() {
        return this._zsession || null;
    }

    _send_abort() {
        this._sender( Zmodem.ZMLIB.ABORT_SEQUENCE );
    }

    /**
     * Parse an input stream and decide how much of it goes to the
     * terminal or to a new Session object.
     *
     * This will accommodate input strings that are fragmented
     * across calls to this function; e.g., if you send the first
     * two bytes at the end of one parse() call then send the rest
     * at the beginning of the next, parse() will recognize it as
     * the beginning of a ZMODEM session.
     *
     * In order to keep from blocking any actual useful data to the
     * terminal in real-time, this will send on the initial
     * ZRINIT/ZRQINIT bytes to the terminal. They’re meant to go to the
     * terminal anyway, so that should be fine.
     *
     * @private
     *
     * @param {Array|Uint8Array} array_like - The input bytes.
     *      Each member should be a number between 0 and 255 (inclusive).
     *
     * @return {Array} A two-member list:
     *      0) the bytes that should be printed on the terminal
     *      1) the created Session object (if any)
     */
    _parse(array_like) {
        var cache = this._cache;

        cache.push.apply( cache, array_like );

        while (true) {
            let common_hex_at = Zmodem.ZMLIB.find_subarray( cache, COMMON_ZM_HEX_START );
            if (-1 === common_hex_at) break;

            let before_common_hex = cache.splice(0, common_hex_at);
            let zsession;
            try {
                zsession = Zmodem.Session.parse(cache);
            } catch(err) {     //ignore errors
                //console.log(err);
            }

            if (!zsession) break;

            //Don’t need to parse the trailing XON.
            if ((cache.length === 1) && (cache[0] === Zmodem.ZMLIB.XON)) {
                cache.shift();
            }

            //If there are still bytes in the cache,
            //then we don’t have a ZMODEM session. This logic depends
            //on the sender only sending one initial header.
            return cache.length ? null : zsession;
        }

        cache.splice( MAX_ZM_HEX_START_LENGTH );

        return null;
    }
}


/***/ }),

/***/ 3304:
/*!************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsession.js ***!
  \************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

/**
 * This is where the protocol-level logic lives: the interaction of ZMODEM
 * headers and subpackets. The logic here is not unlikely to need tweaking
 * as little edge cases crop up.
 */

Zmodem.DEBUG = false;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./encode */ 1298),
    __webpack_require__(/*! ./text */ 485),
    __webpack_require__(/*! ./zdle */ 6988),
    __webpack_require__(/*! ./zmlib */ 7837),
    __webpack_require__(/*! ./zheader */ 6561),
    __webpack_require__(/*! ./zsubpacket */ 9983),
    __webpack_require__(/*! ./zvalidation */ 1205),
    __webpack_require__(/*! ./zerror */ 446)
);

const
    //pertinent to this module
    KEEPALIVE_INTERVAL = 5000,

    //We ourselves don’t need ESCCTL, so we don’t send it;
    //however, we always expect to receive it in ZRINIT.
    //See _ensure_receiver_escapes_ctrl_chars() for more details.
    ZRINIT_FLAGS = [
        "CANFDX",   //full duplex
        "CANOVIO",  //overlap I/O

        //lsz has a buffer overflow bug that shows itself when:
        //
        //  - 16-bit CRC is used, and
        //  - lsz receives the abort sequence while sending a file
        //
        //To avoid this, we just tell lsz to use 32-bit CRC
        //even though there is otherwise no reason. This ensures that
        //unfixed lsz versions will avoid the buffer overflow.
        "CANFC32",
    ],

    //We do this because some WebSocket shell servers
    //(e.g., xterm.js’s demo server) enable the IEXTEN termios flag,
    //which bars 0x0f and 0x16 from reaching the shell process,
    //which results in transmission errors.
    FORCE_ESCAPE_CTRL_CHARS = true,

    DEFAULT_RECEIVE_INPUT_MODE = "spool_uint8array",

    //pertinent to ZMODEM
    MAX_CHUNK_LENGTH = 8192,    //1 KiB officially, but lrzsz allows 8192
    BS = 0x8,
    OVER_AND_OUT = [ 79, 79 ],
    ABORT_SEQUENCE = Zmodem.ZMLIB.ABORT_SEQUENCE
;

/**
 * A base class for objects that have events.
 *
 * @private
 */
class _Eventer {

    /**
     * Not called directly.
     */
    constructor() {
        this._on_evt = {};
        this._evt_once_index = {};
    }

    _Add_event(evt_name) {
        this._on_evt[evt_name] = [];
        this._evt_once_index[evt_name] = [];
    }

    _get_evt_queue(evt_name) {
        if (!this._on_evt[evt_name]) {
            throw( "Bad event: " + evt_name );
        }

        return this._on_evt[evt_name];
    }

    /**
     * Register a callback for a given event.
     *
     * @param {string} evt_name - The name of the event.
     *
     * @param {Function} todo - The function to execute when the event happens.
     */
    on(evt_name, todo) {
        var queue = this._get_evt_queue(evt_name);

        queue.push(todo);

        return this;
    }

    /**
     * Unregister a callback for a given event.
     *
     * @param {string} evt_name - The name of the event.
     *
     * @param {Function} [todo] - The function to execute when the event
     *  happens. If not given, the last event registered for the event
     *  is unregistered.
     */
    off(evt_name, todo) {
        var queue = this._get_evt_queue(evt_name);

        if (todo) {
            var at = queue.indexOf(todo);
            if (at === -1) {
                throw("“" + todo + "” is not in the “" + evt_name + "” queue.");
            }
            queue.splice(at, 1);
        }
        else {
            queue.pop();
        }

        return this;
    }

    _Happen(evt_name /*, arg0, arg1, .. */) {
        var queue = this._get_evt_queue(evt_name);   //might as well validate

        //console.info("EVENT", this, arguments);

        var args = Array.apply(null, arguments);
        args.shift();

        var sess = this;

        queue.forEach( function(cb) { cb.apply(sess, args) } );

        return queue.length;
    }
}

/**
 * The Session classes handle the protocol-level logic.
 * These shield the user from dealing with headers and subpackets.
 * This is a base class with functionality common to both Receive
 * and Send subclasses.
 *
 * @extends _Eventer
*/
Zmodem.Session = class ZmodemSession extends _Eventer {

    /**
     * Parse out a hex header from the given array.
     * If there’s a ZRQINIT or ZRINIT at the beginning,
     * we’ll return it. If the input isn’t a header,
     * for whatever reason, we return undefined.
     *
     * @param {number[]} octets - The bytes to parse.
     *
     * @return {Session|undefined} A Session object if the beginning
     *      of a session was parsable in “octets”; otherwise undefined.
     */
    static parse( octets ) {

        //Will need to trap errors.
        var hdr;
        try {
            hdr = Zmodem.Header.parse_hex(octets);
        }
        catch(e) {     //Don’t report since we aren’t in session

            //debug
            //console.warn("No hex header: ", e);

            return;
        }

        if (!hdr) return;

        switch (hdr.NAME) {
            case "ZRQINIT":
                //throw if ZCOMMAND
                return new Zmodem.Session.Receive();
            case "ZRINIT":
                return new Zmodem.Session.Send(hdr);
        }

        //console.warn("Invalid first Zmodem header", hdr);
    }

    /**
     * Sets the sender function that a Session object will use.
     *
     * @param {Function} sender_func - The function to call.
     *      It will receive an Array with the relevant octets.
     *
     * @return {Session} The session object (for chaining).
     */
    set_sender(sender_func) {
        this._sender = sender_func;
        return this;
    }

    /**
     * Whether the current Session has ended.
     *
     * @returns {boolean} The ended state.
     */
    has_ended() { return this._has_ended() }

    /**
     * Consumes an array of octets as ZMODEM session input.
     *
     * @param {number[]} octets - The input octets.
     */
    consume(octets) {
        this._before_consume(octets);

        if (this._aborted) throw new Zmodem.Error('already_aborted');

        if (!octets.length) return;

        this._strip_and_enqueue_input(octets);

        if (!this._check_for_abort_sequence(octets)) {
            this._consume_first();
        }

        return;
    }

    /**
     * Whether the current Session has been `abort()`ed.
     *
     * @returns {boolean} The aborted state.
     */
    aborted() { return !!this._aborted }

    /**
     * Not called directly.
     */
    constructor() {
        super();
        //if (!sender_func) throw "Need sender!";

        //this._first_header = first_header;
        //this._sender = sender_func;
        this._config = {};

        //this._input = new ZInput();

        this._input_buffer = [];

        //This is mostly for debugging.
        this._Add_event("receive");
        this._Add_event("garbage");
        this._Add_event("session_end");
    }

    /**
     * Returns the Session object’s role.
     *
     * @returns {string} One of:
     * - `receive`
     * - `send`
     */
    get_role() { return this.type }

    _trim_leading_garbage_until_header() {
        var garbage = Zmodem.Header.trim_leading_garbage(this._input_buffer);

        if (garbage.length) {
            if (this._Happen("garbage", garbage) === 0) {
                console.debug(
                    "Garbage: ",
                    String.fromCharCode.apply(String, garbage),
                    garbage
                );
            }
        }
    }

    _parse_and_consume_header() {
        this._trim_leading_garbage_until_header();

        var new_header_and_crc = Zmodem.Header.parse(this._input_buffer);
        if (!new_header_and_crc) return;

        if (Zmodem.DEBUG) {
            this._log_header( "RECEIVED HEADER", new_header_and_crc[0] );
        }

        this._consume_header(new_header_and_crc[0]);

        this._last_header_name = new_header_and_crc[0].NAME;
        this._last_header_crc = new_header_and_crc[1];

        return new_header_and_crc[0];
    }

    _log_header(label, header) {
        console.debug(this.type, label, header.NAME, header._bytes4.join());
    }

    _consume_header(new_header) {
        this._on_receive(new_header);

        var handler = this._next_header_handler && this._next_header_handler[ new_header.NAME ];
        if (!handler) {
            console.error("Unhandled header!", new_header, this._next_header_handler);
            throw new Zmodem.Error( "Unhandled header: " + new_header.NAME );
        }

        this._next_header_handler = null;

        handler.call(this, new_header);
    }

    //TODO: strip out the abort sequence
    _check_for_abort_sequence() {
        var abort_at = Zmodem.ZMLIB.find_subarray( this._input_buffer, ABORT_SEQUENCE );

        if (abort_at !== -1) {

            //TODO: expose this to caller
            this._input_buffer.splice( 0, abort_at + ABORT_SEQUENCE.length );

            this._aborted = true;

            //TODO compare response here to lrzsz.
            this._on_session_end();

            //We shouldn’t ever expect to receive an abort. Even if we
            //have sent an abort ourselves, the Sentry should have stopped
            //directing input to this Session object.
            //if (this._expect_abort) {
            //    return true;
            //}

            throw new Zmodem.Error("peer_aborted");
        }
    }

    _send_header(name /*, args */) {
        if (!this._sender) throw "Need sender!";

        var args = Array.apply( null, arguments );

        var bytes_hdr = this._create_header_bytes(args);

        if (Zmodem.DEBUG) {
            this._log_header( "SENDING HEADER", bytes_hdr[1] );
        }

        this._sender(bytes_hdr[0]);

        this._last_sent_header = bytes_hdr[1];
    }

    _create_header_bytes(name_and_args) {

        var hdr = Zmodem.Header.build.apply( Zmodem.Header, name_and_args );

        var formatter = this._get_header_formatter(name_and_args[0]);

        return [
            hdr[formatter](this._zencoder),
            hdr
        ];
    }

    _strip_and_enqueue_input(input) {
        Zmodem.ZMLIB.strip_ignored_bytes(input);

        //It’s possible that “input” is empty at this point.
        //It doesn’t seem to hurt anything to keep processing, though.

        this._input_buffer.push.apply( this._input_buffer, input );
    }

    /**
     * **STOP!** You probably want to `skip()` an Offer rather than
     * `abort()`. See below.
     *
     * Abort the current session by sending the ZMODEM abort sequence.
     * This function will cause the Session object to refuse to send
     * any further data.
     *
     * Zmodem.Sentry is configured to send all output to the terminal
     * after a session’s `abort()`. That could result in lots of
     * ZMODEM garble being sent to the JavaScript terminal, which you
     * probably don’t want.
     *
     * `skip()` on an Offer is better because Session will continue to
     * discard data until we reach either another file or the
     * sender-initiated end of the ZMODEM session. So no ZMODEM garble,
     * and the session will end successfully.
     *
     * The behavior of `abort()` is subject to change since it’s not
     * very useful as currently implemented.
     */
    abort() {

        //this._expect_abort = true;

        //From Forsberg:
        //
        //The Cancel sequence consists of eight CAN characters
        //and ten backspace characters. ZMODEM only requires five
        //Cancel characters; the other three are "insurance".
        //The trailing backspace characters attempt to erase
        //the effects of the CAN characters if they are
        //received by a command interpreter.
        //
        //FG: Since we assume our connection is reliable, there’s
        //no reason to send more than 5 CANs.
        this._sender(
            ABORT_SEQUENCE.concat([ BS, BS, BS, BS, BS ])
        );

        this._aborted = true;
        this._sender = function() {
            throw new Zmodem.Error('already_aborted');
        };

        this._on_session_end();

        return;
    }

    //----------------------------------------------------------------------
    _on_session_end() {
        this._Happen("session_end");
    }

    _on_receive(hdr_or_pkt) {
        this._Happen("receive", hdr_or_pkt);
    }

    _before_consume() {}
}

function _trim_OO(array) {
    if (0 === Zmodem.ZMLIB.find_subarray(array, OVER_AND_OUT)) {
        array.splice(0, OVER_AND_OUT.length);
    }

    //TODO: This assumes OVER_AND_OUT is 2 bytes long. No biggie, but.
    else if ( array[0] === OVER_AND_OUT[ OVER_AND_OUT.length - 1 ] ) {
        array.splice(0, 1);
    }

    return array;
}

/** A class for ZMODEM receive sessions.
 *
 * @extends Session
 */
Zmodem.Session.Receive = class ZmodemReceiveSession extends Zmodem.Session {
    //We only get 1 file at a time, so on each consume() either
    //continue state for the current file or start a new one.

    /**
     * Not called directly.
     */
    constructor() {
        super();

        this._Add_event("offer");
        this._Add_event("data_in");
        this._Add_event("file_end");
    }

    /**
     * Consume input bytes from the sender.
     *
     * @private
     * @param {number[]} octets - The bytes to consume.
     */
    _before_consume(octets) {
        if (this._bytes_after_OO) {
            throw "PROTOCOL: Session is completed!";
        }

        //Put this here so that our logic later on has access to the
        //input string and can populate _bytes_after_OO when the
        //session ends.
        this._bytes_being_consumed = octets;
    }

    /**
     * Return any bytes that have been `consume()`d but
     * came after the end of the ZMODEM session.
     *
     * @returns {number[]} The trailing bytes.
     */
    get_trailing_bytes() {
        if (this._aborted) return [];

        if (!this._bytes_after_OO) {
            throw "PROTOCOL: Session is not completed!";
        }

        return this._bytes_after_OO.slice(0);
    }

    _has_ended() { return this.aborted() || !!this._bytes_after_OO }

    //Receiver always sends hex headers.
    _get_header_formatter() { return "to_hex" }

    _parse_and_consume_subpacket() {
        var parse_func;
        if (this._last_header_crc === 16) {
            parse_func = "parse16";
        }
        else {
            parse_func = "parse32";
        }

        var subpacket = Zmodem.Subpacket[parse_func](this._input_buffer);

        if (subpacket) {
            if (Zmodem.DEBUG) {
                console.debug(this.type, "RECEIVED SUBPACKET", subpacket);
            }

            this._consume_data(subpacket);

            //What state are we in if the subpacket indicates frame end
            //but we haven’t gotten ZEOF yet? Can anything other than ZEOF
            //follow after a ZDATA?
            if (subpacket.frame_end()) {
                this._next_subpacket_handler = null;
            }
        }

        return subpacket;
    }

    _consume_first() {
        if (this._got_ZFIN) {
            if (this._input_buffer.length < 2) return;

            //if it’s OO, then set this._bytes_after_OO
            if (Zmodem.ZMLIB.find_subarray(this._input_buffer, OVER_AND_OUT) === 0) {

                //This doubles as an indication that the session has ended.
                //We need to set this right away so that handlers like
                //"session_end" will have access to it.
                this._bytes_after_OO = _trim_OO(this._bytes_being_consumed.slice(0));
                this._on_session_end();

                return;
            }
            else {
                throw( "PROTOCOL: Only thing after ZFIN should be “OO” (79,79), not: " + this._input_buffer.join() );
            }
        }

        var parsed;
        do {
            if (this._next_subpacket_handler) {
                parsed = this._parse_and_consume_subpacket();
            }
            else {
                parsed = this._parse_and_consume_header();
            }
        } while (parsed && this._input_buffer.length);
    }

    _consume_data(subpacket) {
        this._on_receive(subpacket);

        if (!this._next_subpacket_handler) {
            throw( "PROTOCOL: Received unexpected data packet after " + this._last_header_name + " header: " + subpacket.get_payload().join() );
        }

        this._next_subpacket_handler.call(this, subpacket);
    }

    _octets_to_string(octets) {
        if (!this._textdecoder) {
            this._textdecoder = new Zmodem.Text.Decoder();
        }

        return this._textdecoder.decode( new Uint8Array(octets) );
    }

    _consume_ZFILE_data(hdr, subpacket) {
        if (this._file_info) {
            throw "PROTOCOL: second ZFILE data subpacket received";
        }

        var packet_payload = subpacket.get_payload();
        var nul_at = packet_payload.indexOf(0);

        //
        var fname = this._octets_to_string( packet_payload.slice(0, nul_at) );
        var the_rest = this._octets_to_string( packet_payload.slice( 1 + nul_at ) ).split(" ");

        var mtime = the_rest[1] && parseInt( the_rest[1], 8 ) || undefined;
        if (mtime) {
            mtime = new Date(mtime * 1000);
        }

        this._file_info = {
            name: fname,
            size: the_rest[0] ? parseInt( the_rest[0], 10 ) : null,
            mtime: mtime || null,
            mode: the_rest[2] && parseInt( the_rest[2], 8 ) || null,
            serial: the_rest[3] && parseInt( the_rest[3], 10 ) || null,

            files_remaining: the_rest[4] ? parseInt( the_rest[4], 10 ) : null,
            bytes_remaining: the_rest[5] ? parseInt( the_rest[5], 10 ) : null,
        };

        //console.log("ZFILE", hdr);

        var xfer = new Offer(
            hdr.get_options(),
            this._file_info,
            this._accept.bind(this),
            this._skip.bind(this)
        );
        this._current_transfer = xfer;

        //this._Happen("offer", xfer);
    }

    _consume_ZDATA_data(subpacket) {
        if (!this._accepted_offer) {
            throw "PROTOCOL: Received data without accepting!";
        }

        //TODO: Probably should include some sort of preventive against
        //infinite loop here: if the peer hasn’t sent us what we want after,
        //say, 10 ZRPOS headers then we should send ZABORT and just end.
        if (!this._offset_ok) {
            console.warn("offset not ok!");
            _send_ZRPOS();
            return;
        }

        this._file_offset += subpacket.get_payload().length;
        this._on_data_in(subpacket);

        /*
        console.warn("received error from data_in callback; retrying", e);
        throw "unimplemented";
        */

        if (subpacket.ack_expected() && !subpacket.frame_end()) {
            this._send_header( "ZACK", Zmodem.ENCODELIB.pack_u32_le(this._file_offset) );
        }
    }

    _make_promise_for_between_files() {
        var sess = this;

        return new Promise( function(res) {
            var between_files_handler = {
                ZFILE: function(hdr) {
                    this._next_subpacket_handler = function(subpacket) {
                        this._next_subpacket_handler = null;
                        this._consume_ZFILE_data(hdr, subpacket);
                        this._Happen("offer", this._current_transfer);
                        res(this._current_transfer);
                    };
                },

                //We use this as a keep-alive. Maybe other
                //implementations do, too?
                ZSINIT: function(hdr) {
                    //The content of this header doesn’t affect us
                    //since all it does is tell us details of how
                    //the sender will ZDLE-encode binary data. Our
                    //ZDLE parser doesn’t need to know in advance.

                    sess._next_subpacket_handler = function(spkt) {
                        sess._next_subpacket_handler = null;
                        sess._consume_ZSINIT_data(spkt);
                        sess._send_header('ZACK');
                        sess._next_header_handler = between_files_handler;
                    };
                },

                ZFIN: function() {
                    this._consume_ZFIN();
                    res();
                },
            };

            sess._next_header_handler = between_files_handler;
        } );
    }

    _consume_ZSINIT_data(spkt) {

        //TODO: Should this be used when we signal a cancellation?
        this._attn = spkt.get_payload();
    }

    /**
     * Start the ZMODEM session by signaling to the sender that
     * we are ready for the first file offer.
     *
     * @returns {Promise} A promise that resolves with an Offer object
     * or, if the sender closes the session immediately without offering
     * anything, nothing.
     */
    start() {
        if (this._started) throw "Already started!";
        this._started = true;

        var ret = this._make_promise_for_between_files();

        this._send_ZRINIT();

        return ret;
    }

    //Returns a promise that’s fulfilled when the file
    //transfer is done.
    //
    //  That ZEOF promise return is another promise that’s
    //  fulfilled when we get either ZFIN or another ZFILE.
    _accept(offset) {
        this._accepted_offer = true;
        this._file_offset = offset || 0;

        var sess = this;

        var ret = new Promise( function(resolve_accept) {
            var last_ZDATA;

            sess._next_header_handler = {
                ZDATA: function on_ZDATA(hdr) {
                    this._consume_ZDATA(hdr);

                    this._next_subpacket_handler = this._consume_ZDATA_data;

                    this._next_header_handler = {
                        ZEOF: function on_ZEOF(hdr) {

                            // Do this first to verify the ZEOF.
                            // This also fires the “file_end” event.
                            this._consume_ZEOF(hdr);

                            this._next_subpacket_handler = null;

                            // We don’t care about this promise.
                            // Prior to v0.1.8 we did because we called
                            // resolve_accept() at the resolution of this
                            // promise, but that was a bad idea and was
                            // never documented, so 0.1.8 changed it.
                            this._make_promise_for_between_files();

                            resolve_accept();

                            this._send_ZRINIT();
                        },
                    };
                },
            };
        } );

        this._send_ZRPOS();

        return ret;
    }

    _skip() {
        var ret = this._make_promise_for_between_files();

        if (this._accepted_offer) {
            // There’s a race condition where we might attempt to
            // skip() an in-progress transfer near its end but actually
            // the skip() will fire after the transfer is complete.
            // While there might be ways to prevent this, they likely
            // would require extra work on the part of implementations.
            //
            // It seems far simpler just to make this function a no-op
            // in these cases.
            if (!this._current_transfer) return;

            //For cancel of an in-progress transfer from lsz,
            //it’s necessary to avoid this buffer overflow bug:
            //
            //  https://github.com/gooselinux/lrzsz/blob/master/lrzsz-0.12.20.patch
            //
            //… which we do by asking for CRC32 from lsz.

            //We might or might not have consumed ZDATA.
            //The sender also might or might not send a ZEOF before it
            //parses the ZSKIP. Thus, we want to ignore the following:
            //
            //  - ZDATA
            //  - ZDATA then ZEOF
            //  - ZEOF
            //
            //… and just look for the next between-file header.

            var bound_make_promise_for_between_files = function() {

                //Once this happens we fail on any received data packet.
                //So it needs not to happen until we’ve received a header.
                this._accepted_offer = false;
                this._next_subpacket_handler = null;

                this._make_promise_for_between_files();
            }.bind(this);

            Object.assign(
                this._next_header_handler,
                {
                    ZEOF: bound_make_promise_for_between_files,
                    ZDATA: function() {
                        bound_make_promise_for_between_files();
                        this._next_header_handler.ZEOF = bound_make_promise_for_between_files;
                    }.bind(this),
                }
            );
        }

        //this._accepted_offer = false;

        this._file_info = null;

        this._send_header( "ZSKIP" );

        return ret;
    }

    _send_ZRINIT() {
        this._send_header( "ZRINIT", ZRINIT_FLAGS );
    }

    _consume_ZFIN() {
        this._got_ZFIN = true;
        this._send_header( "ZFIN" );
    }

    _consume_ZEOF(header) {
        if (this._file_offset !== header.get_offset()) {
            throw( "ZEOF offset mismatch; unimplemented (local: " + this._file_offset + "; ZEOF: " + header.get_offset() + ")" );
        }

        this._on_file_end();

        //Preserve these two so that file_end callbacks
        //will have the right information.
        this._file_info = null;
        this._current_transfer = null;
    }

    _consume_ZDATA(header) {
        if ( this._file_offset === header.get_offset() ) {
            this._offset_ok = true;
        }
        else {
            throw "Error correction is unimplemented.";
        }
    }

    _send_ZRPOS() {
        this._send_header( "ZRPOS", this._file_offset );
    }

    //----------------------------------------------------------------------
    //events

    _on_file_end() {
        this._Happen("file_end");

        if (this._current_transfer) {
            this._current_transfer._Happen("complete");
            this._current_transfer = null;
        }
    }

    _on_data_in(subpacket) {
        this._Happen("data_in", subpacket);

        if (this._current_transfer) {
            this._current_transfer._Happen("input", subpacket.get_payload());
        }
    }
}

Object.assign(
    Zmodem.Session.Receive.prototype,
    {
        type: "receive",
    }
);

//----------------------------------------------------------------------

/**
 * @typedef {Object} FileDetails
 *
 * @property {string} name - The name of the file.
 *
 * @property {number} [size] - The file size, in bytes.
 *
 * @property {number} [mode] - The file mode (e.g., 0100644).
 *
 * @property {Date|number} [mtime] - The file’s modification time.
 *  When expressed as a number, the unit is epoch seconds.
 *
 * @property {number} [files_remaining] - Inclusive of the current file,
 *  so this value is never less than 1.
 *
 * @property {number} [bytes_remaining] - Inclusive of the current file.
 */

/**
 * Common methods for Transfer and Offer objects.
 *
 * @mixin
 */
var Transfer_Offer_Mixin = {
    /**
     * Returns the file details object.
     * @returns {FileDetails} `mtime` is a Date.
     */
    get_details: function get_details() {
        return Object.assign( {}, this._file_info );
    },

    /**
     * Returns a parse of the ZFILE header’s payload.
     *
     * @returns {Object} Members are:
     *
     * - `conversion` (string | undefined)
     * - `management` (string | undefined)
     * - `transfer` (string | undefined)
     * - `sparse` (boolean)
     */
    get_options: function get_options() {
        return Object.assign( {}, this._zfile_opts );
    },

    /**
     * Returns the offset based on the last transferred chunk.
     * @returns {number} The file offset (i.e., number of bytes after
     *  the start of the file).
     */
    get_offset: function get_offset() {
        return this._file_offset;
    },
};

/**
 * A class to represent a sender’s interaction with a single file
 * transfer within a batch. When a receiver accepts an offer, the
 * Session instantiates this class and passes the instance as the
 * promise resolution from send_offer().
 *
 * @mixes Transfer_Offer_Mixin
 */
class Transfer {

    /**
     * Not called directly.
     */
    constructor(file_info, offset, send_func, end_func) {
        this._file_info = file_info;
        this._file_offset = offset || 0;

        this._send = send_func;
        this._end = end_func;
    }

    /**
     * Send a (non-terminal) piece of the file.
     *
     * @param { number[] | Uint8Array } array_like - The bytes to send.
     */
    send(array_like) {
        this._send(array_like);
        this._file_offset += array_like.length;
    }

    /**
     * Complete the file transfer.
     *
     * @param { number[] | Uint8Array } [array_like] - The last bytes to send.
     *
     * @return { Promise } Resolves when the receiver has indicated
     *      acceptance of the end of the file transfer.
     */
    end(array_like) {
        var ret = this._end(array_like || []);
        if (array_like) this._file_offset += array_like.length;
        return ret;
    }
}
Object.assign( Transfer.prototype, Transfer_Offer_Mixin );

/**
 * A class to represent a receiver’s interaction with a single file
 * transfer offer within a batch. There is functionality here to
 * skip or accept offered files and either to spool the packet
 * payloads or to handle them yourself.
 *
 * @mixes Transfer_Offer_Mixin
 */
class Offer extends _Eventer {

    /**
     * Not called directly.
     */
    constructor(zfile_opts, file_info, accept_func, skip_func) {
        super();

        this._zfile_opts = zfile_opts;
        this._file_info = file_info;

        this._accept_func = accept_func;
        this._skip_func = skip_func;

        this._Add_event("input");
        this._Add_event("complete");

        //Register this first so that application handlers receive
        //the updated offset.
        this.on("input", this._input_handler);
    }

    _verify_not_skipped() {
        if (this._skipped) {
            throw new Zmodem.Error("Already skipped!");
        }
    }

    /**
     * Tell the sender that you don’t want the offered file.
     *
     * You can send this in lieu of `accept()` or after it, e.g.,
     * if you find that the transfer is taking too long. Note that,
     * if you `skip()` after you `accept()`, you’ll likely have to
     * wait for buffers to clear out.
     *
     */
    skip() {
        this._verify_not_skipped();
        this._skipped = true;

        return this._skip_func.apply(this, arguments);
    }

    /**
     * Tell the sender to send the offered file.
     *
     * @param {Object} [opts] - Can be:
     * @param {string} [opts.oninput=spool_uint8array] - Can be:
     *
     * - `spool_uint8array`: Stores the ZMODEM
     *     packet payloads as Uint8Array instances.
     *     This makes for an easy transition to a Blob,
     *     which JavaScript can use to save the file to disk.
     *
     * - `spool_array`: Stores the ZMODEM packet payloads
     *     as Array instances. Each value is an octet value.
     *
     * - (function): A handler that receives each payload
     *     as it arrives. The Offer object does not store
     *     the payloads internally when thus configured.
     *
     * @return { Promise } Resolves when the file is fully received.
     *      If the Offer has been spooling
     *      the packet payloads, the promise resolves with an Array
     *      that contains those payloads.
     */
    accept(opts) {
        this._verify_not_skipped();

        if (this._accepted) {
            throw new Zmodem.Error("Already accepted!");
        }
        this._accepted = true;

        if (!opts) opts = {};

        this._file_offset = opts.offset || 0;

        switch (opts.on_input) {
            case null:
            case undefined:
            case "spool_array":
            case DEFAULT_RECEIVE_INPUT_MODE:    //default
                this._spool = [];
                break;
            default:
                if (typeof opts.on_input !== "function") {
                    throw "Invalid “on_input”: " + opts.on_input;
                }
        }

        this._input_handler_mode = opts.on_input || DEFAULT_RECEIVE_INPUT_MODE;

        return this._accept_func(this._file_offset).then( this._get_spool.bind(this) );
    }

    _input_handler(payload) {
        this._file_offset += payload.length;

        if (typeof this._input_handler_mode === "function") {
            this._input_handler_mode(payload);
        }
        else {
            if (this._input_handler_mode === DEFAULT_RECEIVE_INPUT_MODE) {
                payload = new Uint8Array(payload);
            }

            //sanity
            else if (this._input_handler_mode !== "spool_array") {
                throw new Zmodem.Error("WTF?? _input_handler_mode = " + this._input_handler_mode);
            }

            this._spool.push(payload);
        }
    }

    _get_spool() {
        return this._spool;
    }
}
Object.assign( Offer.prototype, Transfer_Offer_Mixin );

//Curious that ZSINIT isn’t here … but, lsz sends it as hex.
const SENDER_BINARY_HEADER = {
    ZFILE: true,
    ZDATA: true,
};

/**
 * A class that encapsulates behavior for a ZMODEM sender.
 *
 * @extends Session
 */
Zmodem.Session.Send = class ZmodemSendSession extends Zmodem.Session {

    /**
     * Not called directly.
     */
    constructor(zrinit_hdr) {
        super();

        if (!zrinit_hdr) {
            throw "Need first header!";
        }
        else if (zrinit_hdr.NAME !== "ZRINIT") {
            throw("First header should be ZRINIT, not " + zrinit_hdr.NAME);
        }

        this._last_header_name = 'ZRINIT';

        //We don’t need to send crc32. Even if the other side can grok it,
        //there’s no point to sending it since, for now, we assume we’re
        //on a reliable connection, e.g., TCP. Ideally we’d just forgo
        //CRC checks completely, but ZMODEM doesn’t allow that.
        //
        //If we *were* to start using crc32, we’d update this every time
        //we send a header.
        this._subpacket_encode_func = 'encode16';

        this._zencoder = new Zmodem.ZDLE();

        this._consume_ZRINIT(zrinit_hdr);

        this._file_offset = 0;

        var zrqinit_count = 0;

        this._start_keepalive_on_set_sender = true;

        //lrzsz will send ZRINIT until it gets an offer. (keep-alive?)
        //It sends 4 additional ones after the initial ZRINIT and, if
        //no response is received, starts sending “C” (0x43, 67) as if to
        //try to downgrade to XMODEM or YMODEM.
        //var sess = this;
        //this._prepare_to_receive_ZRINIT( function keep_alive() {
        //    sess._prepare_to_receive_ZRINIT(keep_alive);
        //} );

        //queue up the ZSINIT flag to send -- but seems useless??

        /*
        Object.assign(
            this._on_evt,
            {
                file_received: [],
            },
        };
        */
    }

    /**
     * Sets the sender function. The first time this is called,
     * it will also initiate a keepalive using ZSINIT until the
     * first file is sent.
     *
     * @param {Function} func - The function to call.
     *  It will receive an Array with the relevant octets.
     *
     * @return {Session} The session object (for chaining).
     */
    set_sender(func) {
        super.set_sender(func);

        if (this._start_keepalive_on_set_sender) {
            this._start_keepalive_on_set_sender = false;
            this._start_keepalive();
        }

        return this;
    }

    //7.3.3 .. The sender also uses hex headers when they are
    //not followed by binary data subpackets.
    //
    //FG: … or when the header is ZSINIT? That’s what lrzsz does, anyway.
    //Then it sends a single NUL byte as the payload to an end_ack subpacket.
    _get_header_formatter(name) {
        return SENDER_BINARY_HEADER[name] ? "to_binary16" : "to_hex";
    }

    //In order to keep lrzsz from timing out, we send ZSINIT every 5 seconds.
    //Maybe make this configurable?
    _start_keepalive() {
        //if (this._keepalive_promise) throw "Keep-alive already started!";
        if (!this._keepalive_promise) {
            var sess = this;

            this._keepalive_promise = new Promise(function(resolve) {
                //console.log("SETTING KEEPALIVE TIMEOUT");
                sess._keepalive_timeout = setTimeout(resolve, KEEPALIVE_INTERVAL);
            }).then( function() {
                sess._next_header_handler = {
                    ZACK: function() {

                        //We’re going to need to ensure that the
                        //receiver is ready for all control characters
                        //to be escaped. If we’ve already sent a ZSINIT
                        //and gotten a response, then we know that that
                        //work is already done later on when we actually
                        //send an offer.
                        sess._got_ZSINIT_ZACK = true;
                    },
                };
                sess._send_ZSINIT();

                sess._keepalive_promise = null;
                sess._start_keepalive();
            });
        }
    }

    _stop_keepalive() {
        if (this._keepalive_promise) {
            //console.log("STOPPING KEEPALIVE");
            clearTimeout(this._keepalive_timeout);
            this._keep_alive_promise = null;
        }
    }

    _send_ZSINIT() {
        //See note at _ensure_receiver_escapes_ctrl_chars()
        //for why we have to pass ESCCTL.

        var zsinit_flags = [];
        if (this._zencoder.escapes_ctrl_chars()) {
            zsinit_flags.push("ESCCTL");
        }

        this._send_header_and_data(
            ["ZSINIT", zsinit_flags],
            [0],
            "end_ack"
        );
    }

    _consume_ZRINIT(hdr) {
        this._last_ZRINIT = hdr;

        if (hdr.get_buffer_size()) {
            throw( "Buffer size (" + hdr.get_buffer_size() + ") is unsupported!" );
        }

        if (!hdr.can_full_duplex()) {
            throw( "Half-duplex I/O is unsupported!" );
        }

        if (!hdr.can_overlap_io()) {
            throw( "Non-overlap I/O is unsupported!" );
        }

        if (hdr.escape_8th_bit()) {
            throw( "8-bit escaping is unsupported!" );
        }

        if (FORCE_ESCAPE_CTRL_CHARS) {
            this._zencoder.set_escape_ctrl_chars(true);
            if (!hdr.escape_ctrl_chars()) {
                console.debug("Peer didn’t request escape of all control characters. Will send ZSINIT to force recognition of escaped control characters.");
            }
        }
        else {
            this._zencoder.set_escape_ctrl_chars(hdr.escape_ctrl_chars());
        }
    }

    //https://stackoverflow.com/questions/23155939/missing-0xf-and-0x16-when-binary-data-through-virtual-serial-port-pair-created-b
    //^^ Because of that, we always escape control characters.
    //The alternative would be that lrz would never receive those
    //two bytes from zmodem.js.
    _ensure_receiver_escapes_ctrl_chars() {
        var promise;

        var needs_ZSINIT = !this._last_ZRINIT.escape_ctrl_chars() && !this._got_ZSINIT_ZACK;

        if (needs_ZSINIT) {
            var sess = this;
            promise = new Promise( function(res) {
                sess._next_header_handler = {
                    ZACK: (hdr) => {
                        res();
                    },
                };
                sess._send_ZSINIT();
            } );
        }
        else {
            promise = Promise.resolve();
        }

        return promise;
    }

    _convert_params_to_offer_payload_array(params) {
        params = Zmodem.Validation.offer_parameters(params);

        var subpacket_payload = params.name + "\x00";

        var subpacket_space_pieces = [
            (params.size || 0).toString(10),
            params.mtime ? params.mtime.toString(8) : "0",
            params.mode ? (0x8000 | params.mode).toString(8) : "0",
            "0",    //serial
        ];

        if (params.files_remaining) {
            subpacket_space_pieces.push( params.files_remaining );

            if (params.bytes_remaining) {
                subpacket_space_pieces.push( params.bytes_remaining );
            }
        }

        subpacket_payload += subpacket_space_pieces.join(" ");
        return this._string_to_octets(subpacket_payload);
    }

    /**
     * Send an offer to the receiver.
     *
     * @param {FileDetails} params - All about the file you want to transfer.
     *
     * @returns {Promise} If the receiver accepts the offer, then the
     * resolution is a Transfer object; otherwise the resolution is
     * undefined.
     */
    send_offer(params) {
        if (Zmodem.DEBUG) {
            console.debug("SENDING OFFER", params);
        }

        if (!params) throw "need file params!";

        if (this._sending_file) throw "Already sending file!";

        var payload_array = this._convert_params_to_offer_payload_array(params);

        this._stop_keepalive();

        var sess = this;

        function zrpos_handler_setter_func() {
            sess._next_header_handler = {

                // The receiver may send ZRPOS in at least two cases:
                //
                // 1) A malformed subpacket arrived, so we need to
                // “rewind” a bit and continue from the receiver’s
                // last-successful location in the file.
                //
                // 2) The receiver hasn’t gotten any data for a bit,
                // so it sends ZRPOS as a “ping”.
                //
                // Case #1 shouldn’t happen since zmodem.js requires a
                // reliable transport. Case #2, though, can happen due
                // to either normal network congestion or errors in
                // implementation. In either case, there’s nothing for
                // us to do but to ignore the ZRPOS, with an optional
                // warning.
                //
                ZRPOS: function(hdr) {
                    if (Zmodem.DEBUG) {
                        console.warn("Mid-transfer ZRPOS … implementation error?");
                    }

                    zrpos_handler_setter_func();
                },
            };
        };

        var doer_func = function() {

            //return Promise object that is fulfilled when the ZRPOS or ZSKIP arrives.
            //The promise value is the byte offset, or undefined for ZSKIP.
            //If ZRPOS arrives, then send ZDATA(0) and set this._sending_file.
            var handler_setter_promise = new Promise( function(res) {
                sess._next_header_handler = {
                    ZSKIP: function() {
                        sess._start_keepalive();
                        res();
                    },
                    ZRPOS: function(hdr) {
                        sess._sending_file = true;

                        zrpos_handler_setter_func();

                        res(
                            new Transfer(
                                params,
                                hdr.get_offset(),
                                sess._send_interim_file_piece.bind(sess),
                                sess._end_file.bind(sess)
                            )
                        );
                    },
                };
            } );

            sess._send_header_and_data( ["ZFILE"], payload_array, "end_ack" );

            delete sess._sent_ZDATA;

            return handler_setter_promise;
        };

        if (FORCE_ESCAPE_CTRL_CHARS) {
            return this._ensure_receiver_escapes_ctrl_chars().then(doer_func);
        }

        return doer_func();
    }

    _send_header_and_data( hdr_name_and_args, data_arr, frameend ) {
        var bytes_hdr = this._create_header_bytes(hdr_name_and_args);

        var data_bytes = this._build_subpacket_bytes(data_arr, frameend);

        bytes_hdr[0].push.apply( bytes_hdr[0], data_bytes );

        if (Zmodem.DEBUG) {
            this._log_header( "SENDING HEADER", bytes_hdr[1] );
            console.debug( this.type, "-- HEADER PAYLOAD:", frameend, data_bytes.length );
        }

        this._sender( bytes_hdr[0] );

        this._last_sent_header = bytes_hdr[1];
    }

    _build_subpacket_bytes( bytes_arr, frameend ) {
        var subpacket = Zmodem.Subpacket.build(bytes_arr, frameend);

        return subpacket[this._subpacket_encode_func]( this._zencoder );
    }

    _build_and_send_subpacket( bytes_arr, frameend ) {
        this._sender( this._build_subpacket_bytes(bytes_arr, frameend) );
    }

    _string_to_octets(string) {
        if (!this._textencoder) {
            this._textencoder = new Zmodem.Text.Encoder();
        }

        var uint8arr = this._textencoder.encode(string);
        return Array.prototype.slice.call(uint8arr);
    }

    /*
    Potential future support for responding to ZRPOS:
    send_file_offset(offset) {
    }
    */

    /*
        Sending logic works thus:
            - ASSUME the receiver can overlap I/O (CANOVIO)
                (so fail if !CANFDX || !CANOVIO)
            - Sender opens the firehose … all ZCRCG (!end/!ack)
                until the end, when we send a ZCRCE (end/!ack)
                NB: try 8k/32k/64k chunk sizes? Looks like there’s
                no need to change the packet otherwise.
    */
    //TODO: Put this on a Transfer object similar to what Receive uses?
    _send_interim_file_piece(bytes_obj) {

        //We don’t ask the receiver to confirm because there’s no need.
        this._send_file_part(bytes_obj, "no_end_no_ack");

        //This pattern will allow
        //error-correction without buffering the entire stream in JS.
        //For now the promise is always resolved, but in the future we
        //can make it only resolve once we’ve gotten acknowledgement.
        return Promise.resolve();
    }

    _ensure_we_are_sending() {
        if (!this._sending_file) throw "Not sending a file currently!";
    }

    //This resolves once we receive ZEOF.
    _end_file(bytes_obj) {
        this._ensure_we_are_sending();

        //Is the frame-end-ness of this last packet redundant
        //with the ZEOF packet?? - No. It signals the receiver that
        //the next thing to expect is a header, not a packet.

        //no-ack, following lrzsz’s example
        this._send_file_part(bytes_obj, "end_no_ack");

        var sess = this;

        //Register this before we send ZEOF in case of local round-trip.
        //(Basically just for synchronous testing, but.)
        var ret = new Promise( function(res) {
            //console.log("UNSETTING SENDING FLAG");
            sess._sending_file = false;
            sess._prepare_to_receive_ZRINIT(res);
        } );

        this._send_header( "ZEOF", this._file_offset );

        this._file_offset = 0;

        return ret;
    }

    //Called at the beginning of our session
    //and also when we’re done sending a file.
    _prepare_to_receive_ZRINIT(after_consume) {
        this._next_header_handler = {
            ZRINIT: function(hdr) {
                this._consume_ZRINIT(hdr);
                if (after_consume) after_consume();
            },
        };
    }

    /**
     * Signal to the receiver that the ZMODEM session is wrapping up.
     *
     * @returns {Promise} Resolves when the receiver has responded to
     * our signal that the session is over.
     */
    close() {
        var ok_to_close = (this._last_header_name === "ZRINIT")
        if (!ok_to_close) {
            ok_to_close = (this._last_header_name === "ZSKIP");
        }
        if (!ok_to_close) {
            ok_to_close = (this._last_sent_header.name === "ZSINIT") &&  (this._last_header_name === "ZACK");
        }

        if (!ok_to_close) {
            throw( "Can’t close; last received header was “" + this._last_header_name + "”" );
        }

        var sess = this;

        var ret = new Promise( function(res, rej) {
            sess._next_header_handler = {
                ZFIN: function() {
                    sess._sender( OVER_AND_OUT );
                    sess._sent_OO = true;
                    sess._on_session_end();
                    res();
                },
            };
        } );

        this._send_header("ZFIN");

        return ret;
    }

    _has_ended() {
        return this.aborted() || !!this._sent_OO;
    }

    _send_file_part(bytes_obj, final_packetend) {
        if (!this._sent_ZDATA) {
            this._send_header( "ZDATA", this._file_offset );
            this._sent_ZDATA = true;
        }

        var obj_offset = 0;

        var bytes_count = bytes_obj.length;

        //We have to go through at least once in event of an
        //empty buffer, e.g., an empty end_file.
        while (true) {
            var chunk_size = Math.min(obj_offset + MAX_CHUNK_LENGTH, bytes_count) - obj_offset;

            var at_end = (chunk_size + obj_offset) >= bytes_count;

            var chunk = bytes_obj.slice( obj_offset, obj_offset + chunk_size );
            if (!(chunk instanceof Array)) {
                chunk = Array.prototype.slice.call(chunk);
            }

            this._build_and_send_subpacket(
                chunk,
                at_end ? final_packetend : "no_end_no_ack"
            );

            this._file_offset += chunk_size;
            obj_offset += chunk_size;

            if (obj_offset >= bytes_count) break;
        }
    }

    _consume_first() {
        if (!this._parse_and_consume_header()) {

            //When the ZMODEM receive program starts, it immediately sends
            //a ZRINIT header to initiate ZMODEM file transfers, or a
            //ZCHALLENGE header to verify the sending program. The receive
            //program resends its header at response time (default 10 second)
            //intervals for a suitable period of time (40 seconds total)
            //before falling back to YMODEM protocol.
            if (this._input_buffer.join() === "67") {
                throw "Receiver has fallen back to YMODEM.";
            }
        }
    }

    _on_session_end() {
        this._stop_keepalive();
        super._on_session_end();
    }
}

Object.assign(
    Zmodem.Session.Send.prototype,
    {
        type: "send",
    }
);


/***/ }),

/***/ 9983:
/*!**************************************************!*\
  !*** ./node_modules/zmodem.js/src/zsubpacket.js ***!
  \**************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./zcrc */ 7093),
    __webpack_require__(/*! ./zdle */ 6988),
    __webpack_require__(/*! ./zmlib */ 7837),
    __webpack_require__(/*! ./zerror */ 446)
);

const
    ZCRCE = 0x68,    // 'h', 104, frame ends, header packet follows
    ZCRCG = 0x69,    // 'i', 105, frame continues nonstop
    ZCRCQ = 0x6a,    // 'j', 106, frame continues, ZACK expected
    ZCRCW = 0x6b     // 'k', 107, frame ends, ZACK expected
;

var SUBPACKET_BUILDER;

/** Class that represents a ZMODEM data subpacket. */
Zmodem.Subpacket = class ZmodemSubpacket {

    /**
     * Build a Subpacket subclass given a payload and frame end string.
     *
     * @param {Array} octets - The octet values to parse.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *
     * @param {string} frameend - One of:
     * - `no_end_no_ack`
     * - `end_no_ack`
     * - `no_end_ack` (unused currently)
     * - `end_ack`
     *
     * @returns {Subpacket} An instance of the appropriate Subpacket subclass.
     */
    static build(octets, frameend) {

        //TODO: make this better
        var Ctr = SUBPACKET_BUILDER[frameend];
        if (!Ctr) {
            throw("No subpacket type “" + frameend + "” is defined! Try one of: " + Object.keys(SUBPACKET_BUILDER).join(", "));
        }

        return new Ctr(octets);
    }

    /**
     * Return the octet values array that represents the object
     * encoded with a 16-bit CRC.
     *
     * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
     *
     * @returns {number[]} An array of octet values suitable for sending
     *      as binary data.
     */
    encode16(zencoder) {
        return this._encode( zencoder, Zmodem.CRC.crc16 );
    }

    /**
     * Return the octet values array that represents the object
     * encoded with a 32-bit CRC.
     *
     * @param {ZDLE} zencoder - A ZDLE instance to use for ZDLE encoding.
     *
     * @returns {number[]} An array of octet values suitable for sending
     *      as binary data.
     */
    encode32(zencoder) {
        return this._encode( zencoder, Zmodem.CRC.crc32 );
    }

    /**
     * Return the subpacket payload’s octet values.
     *
     * NOTE: For speed, this returns the actual data in the subpacket;
     * if you mutate this return value, you alter the Subpacket object
     * internals. This is OK if you won’t need the Subpacket anymore, but
     * just be careful.
     *
     * @returns {number[]} The subpacket’s payload, represented as an
     * array of octet values. **DO NOT ALTER THIS ARRAY** unless you
     * no longer need the Subpacket.
     */
    get_payload() { return this._payload }

    /**
     * Parse out a Subpacket object from a given array of octet values,
     * assuming a 16-bit CRC.
     *
     * An exception is thrown if the given bytes are definitively invalid
     * as subpacket values with 16-bit CRC.
     *
     * @param {number[]} octets - The octet values to parse.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
     *      subclass, or undefined if not enough octet values are given
     *      to determine whether there is a valid subpacket here or not.
     */
    static parse16(octets) {
        return ZmodemSubpacket._parse(octets, 2);
    }

    //parse32 test:
    //[102, 105, 108, 101, 110, 97, 109, 101, 119, 105, 116, 104, 115, 112, 97, 99, 101, 115, 0, 49, 55, 49, 51, 49, 52, 50, 52, 51, 50, 49, 55, 50, 49, 48, 48, 54, 52, 52, 48, 49, 49, 55, 0, 43, 8, 63, 115, 23, 17]

    /**
     * Same as parse16(), but assuming a 32-bit CRC.
     *
     * @param {number[]} octets - The octet values to parse.
     *      Each array member should be an 8-bit unsigned integer (0-255).
     *      This object is mutated in the function.
     *
     * @returns {Subpacket|undefined} An instance of the appropriate Subpacket
     *      subclass, or undefined if not enough octet values are given
     *      to determine whether there is a valid subpacket here or not.
     */
    static parse32(octets) {
        return ZmodemSubpacket._parse(octets, 4);
    }

    /**
     * Not used directly.
     */
    constructor(payload) {
        this._payload = payload;
    }

    _encode(zencoder, crc_func) {
        return zencoder.encode( this._payload.slice(0) ).concat(
            [ Zmodem.ZMLIB.ZDLE, this._frameend_num ],
            zencoder.encode( crc_func( this._payload.concat(this._frameend_num) ) )
        );
    }

    //Because of ZDLE encoding, we’ll never see any of the frame-end octets
    //in a stream except as the ends of data payloads.
    static _parse(bytes_arr, crc_len) {

        var end_at;
        var creator;

        //These have to be written in decimal since they’re lookup keys.
        var _frame_ends_lookup = {
            104: ZEndNoAckSubpacket,
            105: ZNoEndNoAckSubpacket,
            106: ZNoEndAckSubpacket,
            107: ZEndAckSubpacket,
        };

        var zdle_at = 0;
        while (zdle_at < bytes_arr.length) {
            zdle_at = bytes_arr.indexOf( Zmodem.ZMLIB.ZDLE, zdle_at );
            if (zdle_at === -1) return;

            var after_zdle = bytes_arr[ zdle_at + 1 ];
            creator = _frame_ends_lookup[ after_zdle ];
            if (creator) {
                end_at = zdle_at + 1;
                break;
            }

            zdle_at++;
        }

        if (!creator) return;

        var frameend_num = bytes_arr[end_at];

        //sanity check
        if (bytes_arr[end_at - 1] !== Zmodem.ZMLIB.ZDLE) {
            throw( "Byte before frame end should be ZDLE, not " + bytes_arr[end_at - 1] );
        }

        var zdle_encoded_payload = bytes_arr.splice( 0, end_at - 1 );

        var got_crc = Zmodem.ZDLE.splice( bytes_arr, 2, crc_len );
        if (!got_crc) {
            //got payload but no CRC yet .. should be rare!

            //We have to put the ZDLE-encoded payload back before returning.
            bytes_arr.unshift.apply(bytes_arr, zdle_encoded_payload);

            return;
        }

        var payload = Zmodem.ZDLE.decode(zdle_encoded_payload);

        //We really shouldn’t need to do this, but just for good measure.
        //I suppose it’s conceivable this may run over UDP or something?
        Zmodem.CRC[ (crc_len === 2) ? "verify16" : "verify32" ](
            payload.concat( [frameend_num] ),
            got_crc
        );

        return new creator(payload, got_crc);
    }
}

class ZEndSubpacketBase extends Zmodem.Subpacket {
    frame_end() { return true }
}
class ZNoEndSubpacketBase extends Zmodem.Subpacket {
    frame_end() { return false }
}

//Used for end-of-file.
class ZEndNoAckSubpacket extends ZEndSubpacketBase {
    ack_expected() { return false }
}
ZEndNoAckSubpacket.prototype._frameend_num = ZCRCE;

//Used for ZFILE and ZSINIT payloads.
class ZEndAckSubpacket extends ZEndSubpacketBase {
    ack_expected() { return true }
}
ZEndAckSubpacket.prototype._frameend_num = ZCRCW;

//Used for ZDATA, prior to end-of-file.
class ZNoEndNoAckSubpacket extends ZNoEndSubpacketBase {
    ack_expected() { return false }
}
ZNoEndNoAckSubpacket.prototype._frameend_num = ZCRCG;

//only used if receiver can full-duplex
class ZNoEndAckSubpacket extends ZNoEndSubpacketBase {
    ack_expected() { return true }
}
ZNoEndAckSubpacket.prototype._frameend_num = ZCRCQ;

SUBPACKET_BUILDER = {
    end_no_ack: ZEndNoAckSubpacket,
    end_ack: ZEndAckSubpacket,
    no_end_no_ack: ZNoEndNoAckSubpacket,
    no_end_ack: ZNoEndAckSubpacket,
};


/***/ }),

/***/ 1205:
/*!***************************************************!*\
  !*** ./node_modules/zmodem.js/src/zvalidation.js ***!
  \***************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var Zmodem = module.exports;

Object.assign(
    Zmodem,
    __webpack_require__(/*! ./zerror */ 446)
);

const LOOKS_LIKE_ZMODEM_HEADER = /\*\x18[AC]|\*\*\x18B/;

function _validate_number(key, value) {
    if (value < 0) {
        throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be nonnegative.");
    }

    if (value !== Math.floor(value)) {
        throw new Zmodem.Error("validation", "“" + key + "” (" + value + ") must be an integer.");
    }
}

/** Validation logic for zmodem.js
 *
 * @exports Validation
 */
Zmodem.Validation = {

    /**
     * Validates and normalizes a set of parameters for an offer to send.
     * NOTE: This returns “mtime” as epoch seconds, not a Date. This is
     * inconsistent with the get_details() method in Session, but it’s
     * more useful for sending over the wire.
     *
     * @param {FileDetails} params - The file details. Some fairly trivial
     * variances from the specification are allowed.
     *
     * @return {FileDetails} The parameters that should be sent. `mtime`
     * will be a Date rather than a number.
     */
    offer_parameters: function offer_parameters(params) {
        if (!params.name) {
            throw new Zmodem.Error("validation", "Need “name”!");
        }

        if (typeof params.name !== "string") {
            throw new Zmodem.Error("validation", "“name” (" + params.name + ") must be a string!");
        }

        //So that we can override values as is useful
        //without affecting the passed-in object.
        params = Object.assign({}, params);

        if (LOOKS_LIKE_ZMODEM_HEADER.test(params.name)) {
            console.warn("The filename " + JSON.stringify(name) + " contains characters that look like a ZMODEM header. This could corrupt the ZMODEM session; consider renaming it so that the filename doesn’t contain control characters.");
        }

        if (params.serial !== null && params.serial !== undefined) {
            throw new Zmodem.Error("validation", "“serial” is meaningless.");
        }

        params.serial = null;

        ["size", "mode", "files_remaining", "bytes_remaining"].forEach(
            function(k) {
                var ok;
                switch (typeof params[k]) {
                    case "object":
                        ok = (params[k] === null);
                        break;
                    case "undefined":
                        params[k] = null;
                        ok = true;
                        break;
                    case "number":
                        _validate_number(k, params[k]);

                        ok = true;
                        break;
                }

                if (!ok) {
                    throw new Zmodem.Error("validation", "“" + k + "” (" + params[k] + ") must be null, undefined, or a number.");
                }
            }
        );

        if (typeof params.mode === "number") {
            params.mode |= 0x8000;
        }

        if (params.files_remaining === 0) {
            throw new Zmodem.Error("validation", "“files_remaining”, if given, must be positive.");
        }

        var mtime_ok;
        switch (typeof params.mtime) {
            case "object":
                mtime_ok = true;

                if (params.mtime instanceof Date) {

                    var date_obj = params.mtime;
                    params.mtime = Math.floor( date_obj.getTime() / 1000 );
                    if (params.mtime < 0) {
                        throw new Zmodem.Error("validation", "“mtime” (" + date_obj + ") must not be earlier than 1970.");
                    }
                }
                else if (params.mtime !== null) {
                    mtime_ok = false;
                }

                break;

            case "undefined":
                params.mtime = null;
                mtime_ok = true;
                break;
            case "number":
                _validate_number("mtime", params.mtime);
                mtime_ok = true;
                break;
        }

        if (!mtime_ok) {
            throw new Zmodem.Error("validation", "“mtime” (" + params.mtime + ") must be null, undefined, a Date, or a number.");
        }

        return params;
    },
};


/***/ }),

/***/ 9517:
/*!**********************************!*\
  !*** ./src/icons/arrow-down.svg ***!
  \**********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-down\" class=\"svg-inline--fa fa-arrow-down\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M378.8 309.8l-176 165.9C199.7 478.6 195.9 480 192 480s-7.719-1.426-10.77-4.31l-176-165.9C-1.297 303.6-1.781 293.1 4.156 286.3c5.953-6.838 16.09-7.259 22.61-1.134L176 425.9V48.59c0-9.171 7.156-16.59 15.1-16.59S208 39.42 208 48.59v377.3l149.2-140.7c6.516-6.125 16.66-5.704 22.61 1.134C385.8 293.1 385.3 303.6 378.8 309.8z\"></path></svg>"

/***/ }),

/***/ 3476:
/*!********************************!*\
  !*** ./src/icons/arrow-up.svg ***!
  \********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"arrow-up\" class=\"svg-inline--fa fa-arrow-up\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 384 512\"><path fill=\"currentColor\" d=\"M379.8 225.7C376.7 229.3 372.3 231.1 368 231.1c-3.844 0-7.703-1.426-10.77-4.31L208 86.12v377.3c0 9.171-7.156 16.59-15.1 16.59S176 472.6 176 463.4V86.12l-149.2 140.7C20.25 232.1 10.14 232.5 4.156 225.7C-1.781 218.9-1.297 208.4 5.234 202.2l176-165.9c6.094-5.768 15.44-5.768 21.53 0l176 165.9C385.3 208.4 385.8 218.9 379.8 225.7z\"></path></svg>"

/***/ }),

/***/ 8247:
/*!****************************!*\
  !*** ./src/icons/case.svg ***!
  \****************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"text-size\" class=\"svg-inline--fa fa-text-size\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M0 48l0 96C0 152.8 7.156 160 16 160S32 152.8 32 144V64h144v384h-64C103.2 448 96 455.2 96 464S103.2 480 112 480h160C280.8 480 288 472.8 288 464S280.8 448 272 448h-64V64H352v80C352 152.8 359.2 160 368 160S384 152.8 384 144v-96C384 39.16 376.8 32 368 32h-352C7.156 32 0 39.16 0 48zM320 240v64c0 8.844 7.156 16 16 16S352 312.8 352 304V256h112v192H416c-8.844 0-16 7.156-16 16S407.2 480 416 480h128c8.844 0 16-7.156 16-16S552.8 448 544 448h-48V256H608v48c0 8.844 7.156 16 16 16S640 312.8 640 304v-64C640 231.2 632.8 224 624 224h-288C327.2 224 320 231.2 320 240z\"></path></svg>"

/***/ }),

/***/ 8834:
/*!*****************************!*\
  !*** ./src/icons/close.svg ***!
  \*****************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"xmark\" class=\"svg-inline--fa fa-xmark\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><path fill=\"currentColor\" d=\"M315.3 411.3c-6.253 6.253-16.37 6.253-22.63 0L160 278.6l-132.7 132.7c-6.253 6.253-16.37 6.253-22.63 0c-6.253-6.253-6.253-16.37 0-22.63L137.4 256L4.69 123.3c-6.253-6.253-6.253-16.37 0-22.63c6.253-6.253 16.37-6.253 22.63 0L160 233.4l132.7-132.7c6.253-6.253 16.37-6.253 22.63 0c6.253 6.253 6.253 16.37 0 22.63L182.6 256l132.7 132.7C321.6 394.9 321.6 405.1 315.3 411.3z\"></path></svg>"

/***/ }),

/***/ 1974:
/*!******************************!*\
  !*** ./src/icons/regexp.svg ***!
  \******************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"asterisk\" class=\"svg-inline--fa fa-asterisk\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path fill=\"currentColor\" d=\"M413.8 368.1C410.8 373.2 405.5 376 399.1 376c-2.766 0-5.562-.7187-8.125-2.219L240 284V464c0 8.844-7.156 16-15.1 16S208 472.8 208 464V284l-151.9 89.73C53.58 375.3 50.79 376 48.02 376c-5.469 0-10.8-2.812-13.8-7.859c-4.484-7.609-1.969-17.42 5.641-21.92L192.5 256L39.86 165.8c-7.609-4.5-10.12-14.31-5.641-21.92c4.531-7.578 14.31-10.06 21.92-5.641L208 227.1V48C208 39.16 215.2 32 224 32S240 39.16 240 48v179.1l151.9-89.73c7.641-4.422 17.42-1.938 21.92 5.641c4.484 7.609 1.969 17.42-5.641 21.92L255.5 256l152.7 90.22C415.7 350.7 418.3 360.5 413.8 368.1z\"></path></svg>"

/***/ }),

/***/ 7990:
/*!**********************************!*\
  !*** ./src/icons/whole-word.svg ***!
  \**********************************/
/***/ ((module) => {

module.exports = "<svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fal\" data-icon=\"input-text\" class=\"svg-inline--fa fa-input-text\" role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><path fill=\"currentColor\" d=\"M576 64H63.1C28.65 64 0 92.65 0 128v256c0 35.35 28.65 64 63.1 64H576C611.3 448 640 419.3 640 384V128C640 92.65 611.3 64 576 64zM608 384c0 17.64-14.35 32-31.1 32H63.1C46.35 416 32 401.6 32 384V128c0-17.64 14.35-32 31.1-32H576C593.6 96 608 110.4 608 128V384zM405.6 248.5C412.2 239.3 416 228.1 416 216C416 185.1 390.9 160 360 160H304C295.2 160 288 167.2 288 176v160C288 344.8 295.2 352 304 352h72c30.88 0 56-25.12 56-56C432 275.1 421.4 258.4 405.6 248.5zM320 192h40C373.2 192 384 202.8 384 216S373.2 240 360 240H320V192zM376 320H320V272h56c13.22 0 24 10.77 24 24C400 309.2 389.2 320 376 320zM190.8 170.1c-4.812-12.16-24.88-12.16-29.69 0l-64 160c-3.281 8.188 .6875 17.5 8.906 20.78c8.219 3.312 17.5-.7187 20.78-8.906l15.33-38.31C142.8 303.7 143.4 304 144 304h64c.6484 0 1.201-.2949 1.83-.3691l15.33 38.31C227.7 348.2 233.7 352 240 352c1.969 0 4-.375 5.938-1.156c8.219-3.281 12.19-12.59 8.906-20.78L190.8 170.1zM154.8 272L176 219.1L197.2 272H154.8z\"></path></svg>"

/***/ }),

/***/ 5351:
/*!*************************************!*\
  !*** ./src/fonts/SourceCodePro.ttf ***!
  \*************************************/
/***/ ((module) => {

"use strict";
module.exports = "data:font/ttf;base64, ";

/***/ }),

/***/ 1612:
/*!************************************************************************!*\
  !*** ./node_modules/xterm-addon-image/lib/xterm-addon-image-worker.js ***!
  \************************************************************************/
/***/ ((module) => {

"use strict";
module.exports = "/*! For license information please see xterm-addon-image-worker.js.LICENSE.txt */\n!function(A,I){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=I();else if(\"function\"==typeof define&&define.amd)define([],I);else{var g=I();for(var Q in g)(\"object\"==typeof exports?exports:A)[Q]=g[Q]}}(self,(function(){return(()=>{\"use strict\";var A={477:(A,I)=>{function g(A){return 255&A}function Q(A){return A>>>8&255}function B(A){return A>>>16&255}function C(A,I,g,Q=255){return((255&Q)<<24|(255&g)<<16|(255&I)<<8|255&A)>>>0}function i(A,I,g){return Math.max(A,Math.min(g,I))}function t(A,I,g){return g<0&&(g+=1),g>1&&(g-=1),6*g<1?I+6*(A-I)*g:2*g<1?A:3*g<2?I+(A-I)*(4-6*g):I}function E(A,I,g){return(4278190080|Math.round(g/100*255)<<16|Math.round(I/100*255)<<8|Math.round(A/100*255))>>>0}Object.defineProperty(I,\"__esModule\",{value:!0}),I.DEFAULT_FOREGROUND=I.DEFAULT_BACKGROUND=I.PALETTE_ANSI_256=I.PALETTE_VT340_GREY=I.PALETTE_VT340_COLOR=I.normalizeHLS=I.normalizeRGB=I.nearestColorIndex=I.fromRGBA8888=I.toRGBA8888=I.alpha=I.blue=I.green=I.red=I.BIG_ENDIAN=void 0,I.BIG_ENDIAN=255===new Uint8Array(new Uint32Array([4278190080]).buffer)[0],I.BIG_ENDIAN&&console.warn(\"BE platform detected. This version of node-sixel works only on LE properly.\"),I.red=g,I.green=Q,I.blue=B,I.alpha=function(A){return A>>>24&255},I.toRGBA8888=C,I.fromRGBA8888=function(A){return[255&A,A>>8&255,A>>16&255,A>>>24]},I.nearestColorIndex=function(A,I){const C=g(A),i=Q(A),t=B(A);let E=Number.MAX_SAFE_INTEGER,e=-1;for(let A=0;A<I.length;++A){const g=C-I[A][0],Q=i-I[A][1],B=t-I[A][2],s=g*g+Q*Q+B*B;if(!s)return A;s<E&&(E=s,e=A)}return e},I.normalizeRGB=E,I.normalizeHLS=function(A,I,g){return function(A,I,g){if(!g){const A=Math.round(255*I);return C(A,A,A)}const Q=I<.5?I*(1+g):I+g-I*g,B=2*I-Q;return C(i(0,255,Math.round(255*t(Q,B,A+1/3))),i(0,255,Math.round(255*t(Q,B,A))),i(0,255,Math.round(255*t(Q,B,A-1/3))))}((A+240)/360,I/100,g/100)},I.PALETTE_VT340_COLOR=new Uint32Array([E(0,0,0),E(20,20,80),E(80,13,13),E(20,80,20),E(80,20,80),E(20,80,80),E(80,80,20),E(53,53,53),E(26,26,26),E(33,33,60),E(60,26,26),E(33,60,33),E(60,33,60),E(33,60,60),E(60,60,33),E(80,80,80)]),I.PALETTE_VT340_GREY=new Uint32Array([E(0,0,0),E(13,13,13),E(26,26,26),E(40,40,40),E(6,6,6),E(20,20,20),E(33,33,33),E(46,46,46),E(0,0,0),E(13,13,13),E(26,26,26),E(40,40,40),E(6,6,6),E(20,20,20),E(33,33,33),E(46,46,46)]),I.PALETTE_ANSI_256=(()=>{const A=[C(0,0,0),C(205,0,0),C(0,205,0),C(205,205,0),C(0,0,238),C(205,0,205),C(0,250,205),C(229,229,229),C(127,127,127),C(255,0,0),C(0,255,0),C(255,255,0),C(92,92,255),C(255,0,255),C(0,255,255),C(255,255,255)],I=[0,95,135,175,215,255];for(let g=0;g<6;++g)for(let Q=0;Q<6;++Q)for(let B=0;B<6;++B)A.push(C(I[g],I[Q],I[B]));for(let I=8;I<=238;I+=10)A.push(C(I,I,I));return new Uint32Array(A)})(),I.DEFAULT_BACKGROUND=C(0,0,0,255),I.DEFAULT_FOREGROUND=C(255,255,255,255)},710:(A,I,g)=>{Object.defineProperty(I,\"__esModule\",{value:!0}),I.decodeAsync=I.decode=I.Decoder=I.DecoderAsync=void 0;const Q=g(477),B=g(343),C=function(A){if(\"undefined\"!=typeof Buffer)return Buffer.from(A,\"base64\");const I=atob(A),g=new Uint8Array(I.length);for(let A=0;A<g.length;++A)g[A]=I.charCodeAt(A);return g}(B.LIMITS.BYTES);let i;const t=new Uint32Array;class E{constructor(){this.bandHandler=A=>1,this.modeHandler=A=>1}handle_band(A){return this.bandHandler(A)}mode_parsed(A){return this.modeHandler(A)}}const e={memoryLimit:134217728,sixelColor:Q.DEFAULT_FOREGROUND,fillColor:Q.DEFAULT_BACKGROUND,palette:Q.PALETTE_VT340_COLOR,paletteLimit:B.LIMITS.PALETTE_SIZE,truncate:!0};function s(A){const I=new E,g={env:{handle_band:I.handle_band.bind(I),mode_parsed:I.mode_parsed.bind(I)}};return WebAssembly.instantiate(i||C,g).then((g=>(i=i||g.module,new D(A,g.instance||g,I))))}I.DecoderAsync=s;class D{constructor(A,I,g){if(this._PIXEL_OFFSET=B.LIMITS.MAX_WIDTH+4,this._canvas=t,this._bandWidths=[],this._maxWidth=0,this._minWidth=B.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0,this._opts=Object.assign({},e,A),this._opts.paletteLimit>B.LIMITS.PALETTE_SIZE)throw new Error(`DecoderOptions.paletteLimit must not exceed ${B.LIMITS.PALETTE_SIZE}`);if(I)g.bandHandler=this._handle_band.bind(this),g.modeHandler=this._initCanvas.bind(this);else{const A=i||(i=new WebAssembly.Module(C));I=new WebAssembly.Instance(A,{env:{handle_band:this._handle_band.bind(this),mode_parsed:this._initCanvas.bind(this)}})}this._instance=I,this._wasm=this._instance.exports,this._chunk=new Uint8Array(this._wasm.memory.buffer,this._wasm.get_chunk_address(),B.LIMITS.CHUNK_SIZE),this._states=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_state_address(),12),this._palette=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_palette_address(),B.LIMITS.PALETTE_SIZE),this._palette.set(this._opts.palette),this._pSrc=new Uint32Array(this._wasm.memory.buffer,this._wasm.get_p0_address()),this._wasm.init(Q.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}get _fillColor(){return this._states[0]}get _truncate(){return this._states[8]}get _rasterWidth(){return this._states[6]}get _rasterHeight(){return this._states[7]}get _width(){return this._states[2]?this._states[2]-4:0}get _height(){return this._states[3]}get _level(){return this._states[9]}get _mode(){return this._states[10]}get _paletteLimit(){return this._states[11]}_initCanvas(A){if(2===A){const A=this.width*this.height;if(A>this._canvas.length){if(this._opts.memoryLimit&&4*A>this._opts.memoryLimit)throw this.release(),new Error(\"image exceeds memory limit\");this._canvas=new Uint32Array(A)}this._maxWidth=this._width}else if(1===A)if(2===this._level){const A=Math.min(this._rasterWidth,B.LIMITS.MAX_WIDTH)*this._rasterHeight;if(A>this._canvas.length){if(this._opts.memoryLimit&&4*A>this._opts.memoryLimit)throw this.release(),new Error(\"image exceeds memory limit\");this._canvas=new Uint32Array(A)}}else this._canvas.length<65536&&(this._canvas=new Uint32Array(65536));return 0}_realloc(A,I){const g=A+I;if(g>this._canvas.length){if(this._opts.memoryLimit&&4*g>this._opts.memoryLimit)throw this.release(),new Error(\"image exceeds memory limit\");const A=new Uint32Array(65536*Math.ceil(g/65536));A.set(this._canvas),this._canvas=A}}_handle_band(A){const I=this._PIXEL_OFFSET;let g=this._lastOffset;if(2===this._mode){let Q=this.height-this._currentHeight,B=0;for(;B<6&&Q>0;)this._canvas.set(this._pSrc.subarray(I*B,I*B+A),g+A*B),B++,Q--;this._lastOffset+=A*B,this._currentHeight+=B}else if(1===this._mode){this._realloc(g,6*A),this._maxWidth=Math.max(this._maxWidth,A),this._minWidth=Math.min(this._minWidth,A);for(let Q=0;Q<6;++Q)this._canvas.set(this._pSrc.subarray(I*Q,I*Q+A),g+A*Q);this._bandWidths.push(A),this._lastOffset+=6*A,this._currentHeight+=6}return 0}get width(){return 1!==this._mode?this._width:Math.max(this._maxWidth,this._wasm.current_width())}get height(){return 1!==this._mode?this._height:this._wasm.current_width()?6*this._bandWidths.length+this._wasm.current_height():6*this._bandWidths.length}get palette(){return this._palette.subarray(0,this._paletteLimit)}get memoryUsage(){return this._canvas.byteLength+this._wasm.memory.buffer.byteLength+8*this._bandWidths.length}get properties(){return{width:this.width,height:this.height,mode:this._mode,level:this._level,truncate:!!this._truncate,paletteLimit:this._paletteLimit,fillColor:this._fillColor,memUsage:this.memoryUsage,rasterAttributes:{numerator:this._states[4],denominator:this._states[5],width:this._rasterWidth,height:this._rasterHeight}}}init(A=this._opts.fillColor,I=this._opts.palette,g=this._opts.paletteLimit,Q=this._opts.truncate){this._wasm.init(this._opts.sixelColor,A,g,Q?1:0),I&&this._palette.set(I.subarray(0,B.LIMITS.PALETTE_SIZE)),this._bandWidths.length=0,this._maxWidth=0,this._minWidth=B.LIMITS.MAX_WIDTH,this._lastOffset=0,this._currentHeight=0}decode(A,I=0,g=A.length){let Q=I;for(;Q<g;){const I=Math.min(g-Q,B.LIMITS.CHUNK_SIZE);this._chunk.set(A.subarray(Q,Q+=I)),this._wasm.decode(0,I)}}decodeString(A,I=0,g=A.length){let Q=I;for(;Q<g;){const I=Math.min(g-Q,B.LIMITS.CHUNK_SIZE);for(let g=0,B=Q;g<I;++g,++B)this._chunk[g]=A.charCodeAt(B);Q+=I,this._wasm.decode(0,I)}}get data32(){if(0===this._mode||!this.width||!this.height)return t;const A=this._wasm.current_width();if(2===this._mode){let I=this.height-this._currentHeight;if(I>0){const g=this._PIXEL_OFFSET;let Q=this._lastOffset,B=0;for(;B<6&&I>0;)this._canvas.set(this._pSrc.subarray(g*B,g*B+A),Q+A*B),B++,I--;I&&this._canvas.fill(this._fillColor,Q+A*B)}return this._canvas.subarray(0,this.width*this.height)}if(1===this._mode){if(this._minWidth===this._maxWidth){let I=!1;if(A)if(A!==this._minWidth)I=!0;else{const I=this._PIXEL_OFFSET;let g=this._lastOffset;this._realloc(g,6*A);for(let Q=0;Q<6;++Q)this._canvas.set(this._pSrc.subarray(I*Q,I*Q+A),g+A*Q)}if(!I)return this._canvas.subarray(0,this.width*this.height)}const I=new Uint32Array(this.width*this.height);I.fill(this._fillColor);let g=0,Q=0;for(let A=0;A<this._bandWidths.length;++A){const B=this._bandWidths[A];for(let A=0;A<6;++A)I.set(this._canvas.subarray(Q,Q+=B),g),g+=this.width}if(A){const Q=this._PIXEL_OFFSET,B=this._wasm.current_height();for(let C=0;C<B;++C)I.set(this._pSrc.subarray(Q*C,Q*C+A),g+this.width*C)}return I}return t}get data8(){return new Uint8ClampedArray(this.data32.buffer,0,this.width*this.height*4)}release(){this._canvas=t,this._bandWidths.length=0,this._maxWidth=0,this._minWidth=B.LIMITS.MAX_WIDTH,this._wasm.init(Q.DEFAULT_FOREGROUND,0,this._opts.paletteLimit,0)}}I.Decoder=D,I.decode=function(A,I){const g=new D(I);return g.init(),\"string\"==typeof A?g.decodeString(A):g.decode(A),{width:g.width,height:g.height,data32:g.data32,data8:g.data8}},I.decodeAsync=async function(A,I){const g=await s(I);return g.init(),\"string\"==typeof A?g.decodeString(A):g.decode(A),{width:g.width,height:g.height,data32:g.data32,data8:g.data8}}},343:(A,I)=>{Object.defineProperty(I,\"__esModule\",{value:!0}),I.LIMITS=void 0,I.LIMITS={CHUNK_SIZE:16384,PALETTE_SIZE:4096,MAX_WIDTH:16384,BYTES:\" \"}}},I={};function g(Q){var B=I[Q];if(void 0!==B)return B.exports;var C=I[Q]={exports:{}};return A[Q](C,C.exports,g),C.exports}var Q={};return(()=>{var A=Q;Object.defineProperty(A,\"__esModule\",{value:!0});const I=g(710),B=g(477),C=B.PALETTE_ANSI_256;let i;C.set(B.PALETTE_VT340_COLOR);let t,E=!1,e=0;self.addEventListener(\"message\",(function(A){var g;const Q=A.data;switch(Q.type){case 3:E||(t.decode(new Uint8Array(Q.payload.buffer,0,Q.payload.length)),t.height*t.width>e&&(E=!0,t.release(),console.warn(\"image worker: pixelLimit exceeded, aborting\"),postMessage({type:7}))),postMessage({type:6,payload:Q.payload.buffer},[Q.payload.buffer]);break;case 4:if(Q.payload)if(t&&t.width&&t.height&&!E){const A=t.width,I=t.height,g=A*I*4;(!i||i.byteLength<g)&&(i=new ArrayBuffer(g)),new Uint32Array(i,0,A*I).set(t.data32),postMessage({type:5,payload:{buffer:i,width:A,height:I}},[i]),i=void 0,t.memoryUsage>4194304&&t.release()}else postMessage({type:5,payload:null});E=!1;break;case 6:i||(i=Q.payload);break;case 2:E=!1;const{fillColor:A,limit:B}=Q.payload;t.init(A,null,B);break;case 1:e=(null===(g=Q.options)||void 0===g?void 0:g.pixelLimit)||0,t=new I.Decoder({memoryLimit:4*e,palette:C}),postMessage({type:1,payload:1,options:null})}}),!1)})(),Q})()}));\n";

/***/ }),

/***/ 1425:
/*!**********************!*\
  !*** ./src/bell.ogg ***!
  \**********************/
/***/ ((module) => {

"use strict";
module.exports = "data:audio/ogg;base64, ";

/***/ }),

/***/ 3837:
/*!***********************!*\
  !*** external "util" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = require("util");

/***/ }),

/***/ 8781:
/*!**************************************!*\
  !*** external "@angular/animations" ***!
  \**************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8781__;

/***/ }),

/***/ 5848:
/*!**********************************!*\
  !*** external "@angular/common" ***!
  \**********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__5848__;

/***/ }),

/***/ 8900:
/*!********************************!*\
  !*** external "@angular/core" ***!
  \********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__8900__;

/***/ }),

/***/ 7161:
/*!*********************************!*\
  !*** external "@angular/forms" ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7161__;

/***/ }),

/***/ 3046:
/*!********************************************!*\
  !*** external "@angular/platform-browser" ***!
  \********************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3046__;

/***/ }),

/***/ 7571:
/*!*********************************************!*\
  !*** external "@ng-bootstrap/ng-bootstrap" ***!
  \*********************************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7571__;

/***/ }),

/***/ 2089:
/*!*********************!*\
  !*** external "fs" ***!
  \*********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2089__;

/***/ }),

/***/ 7170:
/*!*****************************!*\
  !*** external "ngx-toastr" ***!
  \*****************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__7170__;

/***/ }),

/***/ 9044:
/*!*********************!*\
  !*** external "os" ***!
  \*********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__9044__;

/***/ }),

/***/ 3056:
/*!***********************!*\
  !*** external "path" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3056__;

/***/ }),

/***/ 2908:
/*!***************************!*\
  !*** external "readline" ***!
  \***************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__2908__;

/***/ }),

/***/ 3832:
/*!***********************!*\
  !*** external "rxjs" ***!
  \***********************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3832__;

/***/ }),

/***/ 3978:
/*!*************************!*\
  !*** external "stream" ***!
  \*************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__3978__;

/***/ }),

/***/ 315:
/*!*****************************!*\
  !*** external "tabby-core" ***!
  \*****************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__315__;

/***/ }),

/***/ 6663:
/*!*********************************!*\
  !*** external "tabby-settings" ***!
  \*********************************/
/***/ ((module) => {

"use strict";
module.exports = __WEBPACK_EXTERNAL_MODULE__6663__;

/***/ }),

/***/ 8642:
/*!*******************************************************!*\
  !*** ../node_modules/available-typed-arrays/index.js ***!
  \*******************************************************/
/***/ ((module) => {

"use strict";


var possibleNames = [
	'BigInt64Array',
	'BigUint64Array',
	'Float32Array',
	'Float64Array',
	'Int16Array',
	'Int32Array',
	'Int8Array',
	'Uint16Array',
	'Uint32Array',
	'Uint8Array',
	'Uint8ClampedArray'
];

module.exports = function availableTypedArrays() {
	var out = [];
	for (var i = 0; i < possibleNames.length; i++) {
		if (typeof global[possibleNames[i]] === 'function') {
			out[out.length] = possibleNames[i];
		}
	}
	return out;
};


/***/ }),

/***/ 3228:
/*!***********************************************!*\
  !*** ../node_modules/es-get-iterator/node.js ***!
  \***********************************************/
/***/ ((module) => {

"use strict";


// this should only run in node >= 13.2, so it
// does not need any of the intense fallbacks that old node/browsers do

var $iterator = Symbol.iterator;
module.exports = function getIterator(iterable) {
	// alternatively, `iterable[$iterator]?.()`
	if (iterable != null && typeof iterable[$iterator] !== 'undefined') {
		return iterable[$iterator]();
	}
};


/***/ }),

/***/ 9159:
/*!*************************************************!*\
  !*** ../node_modules/which-collection/index.js ***!
  \*************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

"use strict";


var isMap = __webpack_require__(/*! is-map */ 5339);
var isSet = __webpack_require__(/*! is-set */ 2923);
var isWeakMap = __webpack_require__(/*! is-weakmap */ 3342);
var isWeakSet = __webpack_require__(/*! is-weakset */ 4175);

module.exports = function whichCollection(value) {
	if (value && typeof value === 'object') {
		if (isMap(value)) {
			return 'Map';
		}
		if (isSet(value)) {
			return 'Set';
		}
		if (isWeakMap(value)) {
			return 'WeakMap';
		}
		if (isWeakSet(value)) {
			return 'WeakSet';
		}
	}
	return false;
};


/***/ }),

/***/ 3974:
/*!************************************************!*\
  !*** ./node_modules/cli-spinner/spinners.json ***!
  \************************************************/
/***/ ((module) => {

"use strict";
module.exports = JSON.parse('["|/-\\\\","⠂-–—–-","◐◓◑◒","◴◷◶◵","◰◳◲◱","▖▘▝▗","■□▪▫","▌▀▐▄","▉▊▋▌▍▎▏▎▍▌▋▊▉","▁▃▄▅▆▇█▇▆▅▄▃","←↖↑↗→↘↓↙","┤┘┴└├┌┬┐","◢◣◤◥",".oO°Oo.",".oO@*",["🌍","🌎","🌏"],"◡◡ ⊙⊙ ◠◠","☱☲☴","⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏","⠋⠙⠚⠞⠖⠦⠴⠲⠳⠓","⠄⠆⠇⠋⠙⠸⠰⠠⠰⠸⠙⠋⠇⠆","⠋⠙⠚⠒⠂⠂⠒⠲⠴⠦⠖⠒⠐⠐⠒⠓⠋","⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠴⠲⠒⠂⠂⠒⠚⠙⠉⠁","⠈⠉⠋⠓⠒⠐⠐⠒⠖⠦⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈","⠁⠁⠉⠙⠚⠒⠂⠂⠒⠲⠴⠤⠄⠄⠤⠠⠠⠤⠦⠖⠒⠐⠐⠒⠓⠋⠉⠈⠈","⢄⢂⢁⡁⡈⡐⡠","⢹⢺⢼⣸⣇⡧⡗⡏","⣾⣽⣻⢿⡿⣟⣯⣷","⠁⠂⠄⡀⢀⠠⠐⠈",["🌑","🌒","🌓","🌔","🌕","🌝","🌖","🌗","🌘","🌚"],["🕛","🕐","🕑","🕒","🕓","🕔","🕕","🕖","🕗","🕘","🕙","🕚"]]');

/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			id: moduleId,
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = __webpack_modules__;
/******/ 	
/************************************************************************/
/******/ 	/* webpack/runtime/compat get default export */
/******/ 	(() => {
/******/ 		// getDefaultExport function for compatibility with non-harmony modules
/******/ 		__webpack_require__.n = (module) => {
/******/ 			var getter = module && module.__esModule ?
/******/ 				() => (module['default']) :
/******/ 				() => (module);
/******/ 			__webpack_require__.d(getter, { a: getter });
/******/ 			return getter;
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/define property getters */
/******/ 	(() => {
/******/ 		// define getter functions for harmony exports
/******/ 		__webpack_require__.d = (exports, definition) => {
/******/ 			for(var key in definition) {
/******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ 				}
/******/ 			}
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/hasOwnProperty shorthand */
/******/ 	(() => {
/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/make namespace object */
/******/ 	(() => {
/******/ 		// define __esModule on exports
/******/ 		__webpack_require__.r = (exports) => {
/******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 			}
/******/ 			Object.defineProperty(exports, '__esModule', { value: true });
/******/ 		};
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/nonce */
/******/ 	(() => {
/******/ 		__webpack_require__.nc = undefined;
/******/ 	})();
/******/ 	
/******/ 	/* webpack/runtime/require chunk loading */
/******/ 	(() => {
/******/ 		__webpack_require__.b = require("url").pathToFileURL(__filename);
/******/ 		
/******/ 		// object to store loaded chunks
/******/ 		// "1" means "loaded", otherwise not loaded yet
/******/ 		var installedChunks = {
/******/ 			179: 1
/******/ 		};
/******/ 		
/******/ 		// no on chunks loaded
/******/ 		
/******/ 		// no chunk install function needed
/******/ 		
/******/ 		// no chunk loading
/******/ 		
/******/ 		// no external install chunk
/******/ 		
/******/ 		// no HMR
/******/ 		
/******/ 		// no HMR manifest
/******/ 	})();
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";
/*!***********************************!*\
  !*** ./src/index.ts + 52 modules ***!
  \***********************************/
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// EXPORTS
__webpack_require__.d(__webpack_exports__, {
  "BaseSession": () => (/* reexport */ BaseSession),
  "BaseTerminalTabComponent": () => (/* reexport */ BaseTerminalTabComponent),
  "Frontend": () => (/* reexport */ Frontend),
  "LoginScriptProcessor": () => (/* reexport */ LoginScriptProcessor),
  "LoginScriptsSettingsComponent": () => (/* reexport */ LoginScriptsSettingsComponent),
  "OSCProcessor": () => (/* reexport */ OSCProcessor),
  "SessionMiddleware": () => (/* reexport */ SessionMiddleware),
  "SesssionMiddlewareStack": () => (/* reexport */ SesssionMiddlewareStack),
  "StreamProcessingSettingsComponent": () => (/* reexport */ StreamProcessingSettingsComponent),
  "TerminalColorSchemeProvider": () => (/* reexport */ TerminalColorSchemeProvider),
  "TerminalContextMenuItemProvider": () => (/* reexport */ TerminalContextMenuItemProvider),
  "TerminalDecorator": () => (/* reexport */ TerminalDecorator),
  "TerminalStreamProcessor": () => (/* reexport */ TerminalStreamProcessor),
  "XTermFrontend": () => (/* reexport */ XTermFrontend),
  "XTermWebGLFrontend": () => (/* reexport */ XTermWebGLFrontend),
  "default": () => (/* binding */ src)
});

;// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.js
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/* global Reflect, Promise */

var extendStatics = function(d, b) {
    extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
    return extendStatics(d, b);
};

function __extends(d, b) {
    if (typeof b !== "function" && b !== null)
        throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
    extendStatics(d, b);
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
}

var __assign = function() {
    __assign = Object.assign || function __assign(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
        }
        return t;
    }
    return __assign.apply(this, arguments);
}

function __rest(s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
}

function __decorate(decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
}

function __param(paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
}

function __metadata(metadataKey, metadataValue) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
}

function __awaiter(thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
}

function __generator(thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
}

var __createBinding = Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
});

function __exportStar(m, o) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
}

function __values(o) {
    var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
    if (m) return m.call(o);
    if (o && typeof o.length === "number") return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
    throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
}

function __read(o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
}

/** @deprecated */
function __spread() {
    for (var ar = [], i = 0; i < arguments.length; i++)
        ar = ar.concat(__read(arguments[i]));
    return ar;
}

/** @deprecated */
function __spreadArrays() {
    for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
    for (var r = Array(s), k = 0, i = 0; i < il; i++)
        for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
            r[k] = a[j];
    return r;
}

function __spreadArray(to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
}

function __await(v) {
    return this instanceof __await ? (this.v = v, this) : new __await(v);
}

function __asyncGenerator(thisArg, _arguments, generator) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var g = generator.apply(thisArg, _arguments || []), i, q = [];
    return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
    function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
    function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
    function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
    function fulfill(value) { resume("next", value); }
    function reject(value) { resume("throw", value); }
    function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
}

function __asyncDelegator(o) {
    var i, p;
    return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
    function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
}

function __asyncValues(o) {
    if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
    var m = o[Symbol.asyncIterator], i;
    return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
    function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
    function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
}

function __makeTemplateObject(cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};

var __setModuleDefault = Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
};

function __importStar(mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
}

function __importDefault(mod) {
    return (mod && mod.__esModule) ? mod : { default: mod };
}

function __classPrivateFieldGet(receiver, state, kind, f) {
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
    return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
}

function __classPrivateFieldSet(receiver, state, value, kind, f) {
    if (kind === "m") throw new TypeError("Private method is not writable");
    if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
    if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
    return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
}

// EXTERNAL MODULE: external "@angular/core"
var core_ = __webpack_require__(8900);
// EXTERNAL MODULE: external "@angular/platform-browser"
var platform_browser_ = __webpack_require__(3046);
// EXTERNAL MODULE: external "@angular/forms"
var forms_ = __webpack_require__(7161);
// EXTERNAL MODULE: external "@ng-bootstrap/ng-bootstrap"
var ng_bootstrap_ = __webpack_require__(7571);
// EXTERNAL MODULE: external "ngx-toastr"
var external_ngx_toastr_ = __webpack_require__(7170);
// EXTERNAL MODULE: external "@angular/animations"
var animations_ = __webpack_require__(8781);
;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/enums/formats.js
var ColorFormats;
(function (ColorFormats) {
    ColorFormats[ColorFormats["HEX"] = 0] = "HEX";
    ColorFormats[ColorFormats["RGBA"] = 1] = "RGBA";
    ColorFormats[ColorFormats["HSLA"] = 2] = "HSLA";
    ColorFormats[ColorFormats["CMYK"] = 3] = "CMYK";
})(ColorFormats || (ColorFormats = {}));

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/clases/formats.js

class Rgba {
    constructor(r, g, b, a) {
        this.r = r;
        this.g = g;
        this.b = b;
        this.a = a;
    }
    denormalize() {
        this.r = Math.round(this.r * 255);
        this.g = Math.round(this.g * 255);
        this.b = Math.round(this.b * 255);
        return this;
    }
    toString() {
        this.denormalize();
        let output = 'rgb' +
            (this.a != 1 ? 'a(' : '(') +
            this.r + ', ' +
            this.g + ', ' +
            this.b +
            (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
        return output;
    }
}
class Hsva {
    constructor(h, s, v, a) {
        this.h = h;
        this.s = s;
        this.v = v;
        this.a = a;
        this.onChange = new core_.EventEmitter(true);
    }
    onColorChange(value) {
        this.s = value.s / value.rgX;
        this.v = value.v / value.rgY;
    }
    onHueChange(value) {
        this.h = value.v / value.rgX;
        // this.sliderH = this.hsva.h;
    }
    onValueChange(value) {
        this.v = value.v / value.rgX;
    }
    onAlphaChange(value) {
        this.a = value.v / value.rgX;
    }
}
class Hsla {
    constructor(h, s, l, a) {
        this.h = h;
        this.s = s;
        this.l = l;
        this.a = a;
    }
    denormalize() {
        this.h = Math.round(this.h * 360);
        this.s = Math.round(this.s * 100);
        this.l = Math.round(this.l * 100);
        return this;
    }
    toString() {
        let output = 'hsl' +
            (this.a != 1 ? 'a(' : '(') +
            this.h + ', ' +
            this.s + '%, ' +
            this.l + '%' +
            (this.a != 1 ? ', ' + this.a.toPrecision(2) + ')' : ')');
        return output;
    }
}
class Cmyk {
    constructor(c, m, y, k, a = 1) {
        this.c = c;
        this.m = m;
        this.y = y;
        this.k = k;
        this.a = a;
    }
}

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/services/converter.service.js



class ConverterService {
    // private active: ColorPickerComponent | null = null;
    constructor() { }
    // public setActive(active: ColorPickerComponent | null): void {
    //   this.active = active;
    // }
    toFormat(hsva, format) {
        var output = '';
        switch (format) {
            case ColorFormats.HEX:
                var rgba = this.hsvaToRgba(hsva);
                rgba.denormalize();
                var output = this.rgbaToHex(rgba, true);
                break;
            case ColorFormats.HSLA:
                var hsla = this.hsva2hsla(hsva);
                hsla.denormalize();
                var output = hsla.toString();
                break;
            case ColorFormats.RGBA:
                var rgba = this.hsvaToRgba(hsva);
                var output = rgba.toString();
                break;
            case ColorFormats.CMYK:
                var rgba = this.hsvaToRgba(hsva);
                var cmyk = this.rgbaToCmyk(rgba);
                break;
        }
        return output;
    }
    stringToFormat(color, format) {
        var hsva = this.stringToHsva(color, true);
        return this.toFormat(hsva, format);
    }
    hsva2hsla(hsva) {
        const h = hsva.h, s = hsva.s, v = hsva.v, a = hsva.a;
        if (v === 0) {
            return new Hsla(h, 0, 0, a);
        }
        else if (s === 0 && v === 1) {
            return new Hsla(h, 1, 1, a);
        }
        else {
            const l = v * (2 - s) / 2;
            return new Hsla(h, v * s / (1 - Math.abs(2 * l - 1)), l, a);
        }
    }
    hsla2hsva(hsla) {
        const h = Math.min(hsla.h, 1), s = Math.min(hsla.s, 1);
        const l = Math.min(hsla.l, 1), a = Math.min(hsla.a, 1);
        if (l === 0) {
            return new Hsva(h, 0, 0, a);
        }
        else {
            const v = l + s * (1 - Math.abs(2 * l - 1)) / 2;
            return new Hsva(h, 2 * (v - l) / v, v, a);
        }
    }
    hsvaToRgba(hsva) {
        let r, g, b;
        const h = hsva.h, s = hsva.s, v = hsva.v, a = hsva.a;
        const i = Math.floor(h * 6);
        const f = h * 6 - i;
        const p = v * (1 - s);
        const q = v * (1 - f * s);
        const t = v * (1 - (1 - f) * s);
        switch (i % 6) {
            case 0:
                r = v, g = t, b = p;
                break;
            case 1:
                r = q, g = v, b = p;
                break;
            case 2:
                r = p, g = v, b = t;
                break;
            case 3:
                r = p, g = q, b = v;
                break;
            case 4:
                r = t, g = p, b = v;
                break;
            case 5:
                r = v, g = p, b = q;
                break;
            default:
                r = 0, g = 0, b = 0;
        }
        return new Rgba(r, g, b, a);
    }
    cmykToRgb(cmyk) {
        const r = (1 - cmyk.c) * (1 - cmyk.k);
        const g = (1 - cmyk.m) * (1 - cmyk.k);
        const b = (1 - cmyk.y) * (1 - cmyk.k);
        return new Rgba(r, g, b, cmyk.a);
    }
    rgbaToCmyk(rgba) {
        const k = 1 - Math.max(rgba.r, rgba.g, rgba.b);
        if (k === 1) {
            return new Cmyk(0, 0, 0, 1, rgba.a);
        }
        else {
            const c = (1 - rgba.r - k) / (1 - k);
            const m = (1 - rgba.g - k) / (1 - k);
            const y = (1 - rgba.b - k) / (1 - k);
            return new Cmyk(c, m, y, k, rgba.a);
        }
    }
    rgbaToHsva(rgba) {
        let h, s;
        const r = Math.min(rgba.r, 1), g = Math.min(rgba.g, 1);
        const b = Math.min(rgba.b, 1), a = Math.min(rgba.a, 1);
        const max = Math.max(r, g, b), min = Math.min(r, g, b);
        const v = max, d = max - min;
        s = (max === 0) ? 0 : d / max;
        if (max === min) {
            h = 0;
        }
        else {
            switch (max) {
                case r:
                    h = (g - b) / d + (g < b ? 6 : 0);
                    break;
                case g:
                    h = (b - r) / d + 2;
                    break;
                case b:
                    h = (r - g) / d + 4;
                    break;
                default:
                    h = 0;
            }
            h /= 6;
        }
        return new Hsva(h, s, v, a);
    }
    rgbaToHex(rgba, allowHex8) {
        /* tslint:disable:no-bitwise */
        let hex = '#' + ((1 << 24) | (rgba.r << 16) | (rgba.g << 8) | rgba.b).toString(16).substr(1);
        if (rgba.a != 1) {
            hex += ((1 << 8) | Math.round(rgba.a * 255)).toString(16).substr(1);
        }
        /* tslint:enable:no-bitwise */
        return hex;
    }
    normalizeCMYK(cmyk) {
        return new Cmyk(cmyk.c / 100, cmyk.m / 100, cmyk.y / 100, cmyk.k / 100, cmyk.a);
    }
    denormalizeCMYK(cmyk) {
        return new Cmyk(Math.floor(cmyk.c * 100), Math.floor(cmyk.m * 100), Math.floor(cmyk.y * 100), Math.floor(cmyk.k * 100), cmyk.a);
    }
    denormalizeRGBA(rgba) {
        return new Rgba(Math.round(rgba.r * 255), Math.round(rgba.g * 255), Math.round(rgba.b * 255), rgba.a);
    }
    stringToHsva(colorString = '', allowHex8 = true) {
        let hsva = null;
        colorString = (colorString || '').toLowerCase();
        const stringParsers = [
            {
                re: /(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
                parse: function (execResult) {
                    return new Rgba(parseInt(execResult[2], 10) / 255, parseInt(execResult[3], 10) / 255, parseInt(execResult[4], 10) / 255, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
                }
            }, {
                re: /(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
                parse: function (execResult) {
                    return new Hsla(parseInt(execResult[2], 10) / 360, parseInt(execResult[3], 10) / 100, parseInt(execResult[4], 10) / 100, isNaN(parseFloat(execResult[5])) ? 1 : parseFloat(execResult[5]));
                }
            }
        ];
        if (allowHex8) {
            stringParsers.push({
                re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,
                parse: function (execResult) {
                    return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, parseInt(execResult[4] || 'FF', 16) / 255);
                }
            });
        }
        else {
            stringParsers.push({
                re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,
                parse: function (execResult) {
                    return new Rgba(parseInt(execResult[1], 16) / 255, parseInt(execResult[2], 16) / 255, parseInt(execResult[3], 16) / 255, 1);
                }
            });
        }
        stringParsers.push({
            re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,
            parse: function (execResult) {
                return new Rgba(parseInt(execResult[1] + execResult[1], 16) / 255, parseInt(execResult[2] + execResult[2], 16) / 255, parseInt(execResult[3] + execResult[3], 16) / 255, 1);
            }
        });
        for (const key in stringParsers) {
            if (stringParsers.hasOwnProperty(key)) {
                const parser = stringParsers[key];
                const match = parser.re.exec(colorString), color = match && parser.parse(match);
                if (color) {
                    if (color instanceof Rgba) {
                        hsva = this.rgbaToHsva(color);
                    }
                    else if (color instanceof Hsla) {
                        hsva = this.hsla2hsva(color);
                    }
                    return hsva;
                }
            }
        }
        return hsva;
    }
    outputFormat(hsva) {
        return this.hsvaToRgba(hsva).toString();
    }
    getFormatByString(color) {
        if (color) {
            color = color.toLowerCase();
            let regexHex = /(#([\da-f]{3}(?:[\da-f]{3})?(?:[\da-f]{2})?))/;
            let regexRGBA = /(rgba\((\d{1,3},\s?){3}(1|0?\.\d+)\)|rgb\(\d{1,3}(,\s?\d{1,3}){2}\))/;
            let regexHSLA = /(hsla\((\d{1,3}%?,\s?){3}(1|0?\.\d+)\)|hsl\(\d{1,3}%?(,\s?\d{1,3}%?){2}\))/;
            if (regexHex.test(color)) {
                return 'hex';
            }
            else if (regexRGBA.test(color)) {
                return 'rgba';
            }
            else if (regexHSLA.test(color)) {
                return 'hsla';
            }
        }
        return 'hex';
    }
}
ConverterService.decorators = [
    { type: core_.Injectable }
];
ConverterService.ctorParameters = () => [];

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/helpers/default-colors.js
const defaultColors = [
    {
        color: "rojo", preview: "#E57373", variants: ["#FFEBEE", "#FFCDD2", "#EF9A9A", "#E57373", "#EF5350", "#F44336", "#E53935", "#D32F2F", "#C62828"]
    },
    {
        color: "rosa", preview: "#F06292", variants: ["#FCE4EC", "#F8BBD0", "#F48FB1", "#F06292", "#EC407A", "#E91E63", "#D81B60", "#C2185B", "#AD1457"]
    },
    {
        color: "purpura", preview: "#BA68C8", variants: ["#F3E5F5", "#E1BEE7", "#CE93D8", "#BA68C8", "#AB47BC", "#9C27B0", "#8E24AA", "#7B1FA2", "#6A1B9A"]
    },
    {
        color: "purpura oscuro", preview: "#9575CD", variants: ["#EDE7F6", "#D1C4E9", "#B39DDB", "#9575CD", "#7E57C2", "#673AB7", "#5E35B1", "#512DA8", "#4527A0"]
    },
    {
        color: "indigo", preview: "#7986CB", variants: ["#E8EAF6", "#C5CAE9", "#9FA8DA", "#7986CB", "#5C6BC0", "#3F51B5", "#3949AB", "#303F9F", "#283593"]
    },
    {
        color: "azul", preview: "#64B5F6", variants: ["#E3F2FD", "#BBDEFB", "#90CAF9", "#64B5F6", "#42A5F5", "#2196F3", "#1E88E5", "#1976D2", "#1565C0"]
    },
    {
        color: "celeste", preview: "#4FC3F7", variants: ["#E1F5FE", "#B3E5FC", "#81D4FA", "#4FC3F7", "#29B6F6", "#03A9F4", "#039BE5", "#0288D1", "#0277BD"]
    },
    {
        color: "cyan", preview: "#4DD0E1", variants: ["#E0F7FA", "#B2EBF2", "#80DEEA", "#4DD0E1", "#26C6DA", "#00BCD4", "#00ACC1", "#0097A7", "#00838F"]
    },
    {
        color: "color", preview: "#4DB6AC", variants: ["#E0F2F1", "#B2DFDB", "#80CBC4", "#4DB6AC", "#26A69A", "#009688", "#00897B", "#00796B", "#00695C"]
    },
    {
        color: "verde", preview: "#81C784", variants: ["#E8F5E9", "#C8E6C9", "#A5D6A7", "#81C784", "#66BB6A", "#4CAF50", "#43A047", "#388E3C", "#2E7D32"]
    },
    {
        color: "verde claro", preview: "#AED581", variants: ["#F1F8E9", "#DCEDC8", "#C5E1A5", "#AED581", "#9CCC65", "#8BC34A", "#7CB342", "#689F38", "#558B2F"]
    },
    {
        color: "lima", preview: "#DCE775", variants: ["#F9FBE7", "#F0F4C3", "#E6EE9C", "#DCE775", "#D4E157", "#CDDC39", "#C0CA33", "#AFB42B", "#9E9D24"]
    },
    {
        color: "amarillo", preview: "#FFF176", variants: ["#FFFDE7", "#FFF9C4", "#FFF59D", "#FFF176", "#FFEE58", "#FFEB3B", "#FDD835", "#FBC02D", "#F9A825"]
    },
    {
        color: "ambar", preview: "#FFD54F", variants: ["#FFF8E1", "#FFECB3", "#FFE082", "#FFD54F", "#FFCA28", "#FFC107", "#FFB300", "#FFA000", "#FF8F00"]
    },
    {
        color: "naranja", preview: "#FFB74D", variants: ["#FFF3E0", "#FFE0B2", "#FFCC80", "#FFB74D", "#FFA726", "#FF9800", "#FB8C00", "#F57C00", "#EF6C00"]
    },
    {
        color: "naranja oscuro", preview: "#FF8A65", variants: ["#FBE9E7", "#FFCCBC", "#FFAB91", "#FF8A65", "#FF7043", "#FF5722", "#F4511E", "#E64A19", "#D84315"]
    },
    {
        color: "marron", preview: "#A1887F", variants: ["#EFEBE9", "#D7CCC8", "#BCAAA4", "#A1887F", "#8D6E63", "#795548", "#6D4C41", "#5D4037", "#4E342E"]
    },
    {
        color: "escala de grises", preview: "#E0E0E0", variants: ["#FFFFFF", "#FAFAFA", "#F5F5F5", "#EEEEEE", "#E0E0E0", "#BDBDBD", "#9E9E9E", "#757575", "#616161", "#424242", "#000000"]
    },
    {
        color: "azul gris", preview: "#90A4AE", variants: ["#ECEFF1", "#CFD8DC", "#B0BEC5", "#90A4AE", "#78909C", "#607D8B", "#546E7A", "#455A64", "#37474F"]
    }
];

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/helpers/formats.js
const formats = ['hex', 'rgba', 'hsla'];

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/clases/color.js
class NgxColor {
}

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/components/panel/panel.component.js








class PanelComponent {
    constructor(service, cdr) {
        this.service = service;
        this.cdr = cdr;
        this.color = "#000000";
        this.previewColor = "#000000";
        this.hsva = new Hsva(0, 1, 1, 1);
        this.colorsAnimationEffect = "slide-in";
        this.palette = defaultColors;
        this.variants = [];
        this.colorFormats = formats;
        this.format = ColorFormats.HEX;
        this.canChangeFormat = true;
        this.menu = 1;
        this.hideColorPicker = false;
        this.hideTextInput = false;
        this.colorPickerControls = "default";
    }
    click(event) {
        if (this.isOutside(event)) {
            this.emitClose("cancel");
        }
    }
    onScroll() {
        this.onScreenMovement();
    }
    onResize() {
        this.onScreenMovement();
    }
    ngOnInit() {
        this.setPosition();
        this.hsva = this.service.stringToHsva(this.color);
        this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
    }
    ngAfterViewInit() {
        this.setPositionY();
    }
    onScreenMovement() {
        this.setPosition();
        this.setPositionY();
        if (!this.panelRef.nativeElement.style.transition) {
            this.panelRef.nativeElement.style.transition = "transform 0.5s ease-out";
        }
    }
    findIndexSelectedColor(colors) {
        let resultIndex = undefined;
        if (this.color) {
            for (let i = 0; i < colors.length; i++) {
                const color = colors[i];
                if (typeof color == "string") {
                    if (this.service.stringToFormat(this.color, ColorFormats.HEX) ==
                        this.service.stringToFormat(color, ColorFormats.HEX)) {
                        resultIndex = i;
                    }
                }
                else {
                    if (this.findIndexSelectedColor(color.variants) != undefined) {
                        resultIndex = i;
                    }
                }
            }
        }
        return resultIndex;
    }
    iniciate(triggerInstance, triggerElementRef, color, palette, animation, format, hideTextInput, hideColorPicker, acceptLabel, cancelLabel, colorPickerControls, position) {
        this.colorPickerControls = colorPickerControls;
        this.triggerInstance = triggerInstance;
        this.TriggerBBox = triggerElementRef;
        this.color = color;
        this.hideColorPicker = hideColorPicker;
        this.hideTextInput = hideTextInput;
        this.acceptLabel = acceptLabel;
        this.cancelLabel = cancelLabel;
        if (format) {
            if (formats.includes(format)) {
                this.format = formats.indexOf(format.toLowerCase());
                this.canChangeFormat = false;
                if (this.service.getFormatByString(this.color) != format.toLowerCase()) {
                    this.setColor(this.service.stringToHsva(this.color));
                }
            }
            else {
                console.error("Format provided is invalid, using HEX");
                this.format = ColorFormats.HEX;
            }
        }
        else {
            this.format = formats.indexOf(this.service.getFormatByString(this.color));
        }
        this.previewColor = this.color;
        this.palette = palette !== null && palette !== void 0 ? palette : defaultColors;
        this.colorsAnimationEffect = animation;
        if (position == "top") {
            let TriggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
            this.positionString =
                "transform: translateY(calc( -100% - " + TriggerBBox.height + "px ))";
        }
    }
    setPosition() {
        if (this.TriggerBBox) {
            var viewportOffset = this.TriggerBBox.nativeElement.getBoundingClientRect();
            this.top = viewportOffset.top + viewportOffset.height;
            this.left =
                viewportOffset.left + 250 > window.innerWidth
                    ? viewportOffset.right - 250
                    : viewportOffset.left;
        }
    }
    setPositionY() {
        var triggerBBox = this.TriggerBBox.nativeElement.getBoundingClientRect();
        var panelBBox = this.panelRef.nativeElement.getBoundingClientRect();
        var panelHeight = panelBBox.height;
        //Check for space above the trigger
        if (0 > panelBBox.top - 5) {
            this.positionString = "";
        }
        //Check for space below the trigger
        if (panelHeight > window.innerHeight - (panelBBox.top - 5)) {
            //there is no space, move panel over the trigger
            this.positionString =
                "transform: translateY(calc( -100% - " + triggerBBox.height + "px ));";
        }
        this.cdr.detectChanges();
    }
    hasVariant(color) {
        if (!this.previewColor) {
            return false;
        }
        return (typeof color != "string" &&
            color.variants.some((v) => v.toUpperCase() == this.previewColor.toUpperCase()));
    }
    isSelected(color) {
        if (!this.previewColor) {
            return false;
        }
        return (typeof color == "string" &&
            color.toUpperCase() == this.previewColor.toUpperCase());
    }
    getBackgroundColor(color) {
        if (typeof color == "string") {
            return { background: color };
        }
        else {
            return { background: color === null || color === void 0 ? void 0 : color.preview };
        }
    }
    onAlphaChange(event) {
        this.palette = this.ChangeAlphaOnPalette(event, this.palette);
    }
    ChangeAlphaOnPalette(alpha, colors) {
        var result = [];
        for (let i = 0; i < colors.length; i++) {
            const color = colors[i];
            if (typeof color == "string") {
                let newColor = this.service.stringToHsva(color);
                newColor.onAlphaChange(alpha);
                result.push(this.service.toFormat(newColor, this.format));
            }
            else {
                let newColor = new NgxColor();
                let newColorPreview = this.service.stringToHsva(color.preview);
                newColorPreview.onAlphaChange(alpha);
                newColor.preview = this.service.toFormat(newColorPreview, this.format);
                newColor.variants = this.ChangeAlphaOnPalette(alpha, color.variants);
                result.push(newColor);
            }
        }
        return result;
    }
    /**
     * Change color from default colors
     * @param string color
     */
    changeColor(color) {
        this.setColor(this.service.stringToHsva(color));
        // this.triggerInstance.onChange();
        this.emitClose("accept");
    }
    onChangeColorPicker(event) {
        this.temporalColor = event;
        this.color = this.service.toFormat(event, this.format);
        // this.setColor(event);
        this.triggerInstance.sliderChange(this.service.toFormat(event, this.format));
    }
    changeColorManual(color) {
        this.previewColor = color;
        this.color = color;
        this.hsva = this.service.stringToHsva(color);
        this.triggerInstance.setColor(this.color);
        // this.triggerInstance.onChange();
    }
    setColor(value) {
        this.hsva = value;
        this.color = this.service.toFormat(value, this.format);
        this.setPreviewColor(value);
        this.triggerInstance.setColor(this.color);
    }
    setPreviewColor(value) {
        this.previewColor = this.service.hsvaToRgba(value).toString();
    }
    onChange() {
        // this.triggerInstance.onChange();
    }
    onColorClick(color) {
        if (typeof color == "string") {
            this.changeColor(color);
        }
        else {
            this.variants = color.variants;
            this.menu = 2;
        }
    }
    addColor() {
        this.menu = 3;
        this.backupColor = this.color;
        this.color = "#FF0000";
        this.temporalColor = this.service.stringToHsva(this.color);
    }
    nextFormat() {
        if (this.canChangeFormat) {
            this.format = (this.format + 1) % this.colorFormats.length;
            this.setColor(this.hsva);
        }
    }
    emitClose(status) {
        if (this.menu == 3) {
            if (status == "cancel") {
            }
            else if (status == "accept") {
                this.setColor(this.temporalColor);
            }
        }
        this.triggerInstance.close();
    }
    onClickBack() {
        if (this.menu == 3) {
            this.color = this.backupColor;
            this.hsva = this.service.stringToHsva(this.color);
        }
        this.indexSeleccionado = this.findIndexSelectedColor(this.palette);
        this.menu = 1;
    }
    isOutside(event) {
        return event.target.classList.contains("ngx-colors-overlay");
    }
}
PanelComponent.decorators = [
    { type: core_.Component, args: [{
                selector: "ngx-colors-panel",
                template: "<div class=\"opened\" [style]=\"positionString\" #dialog>\n  <ng-container *ngIf=\"menu == 1\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <ng-container *ngFor=\"let color of palette; let i = index\">\n        <div class=\"circle wrapper color\">\n          <div\n            (click)=\"onColorClick(color)\"\n            class=\"circle color circle-border\"\n            [ngStyle]=\"getBackgroundColor(color)\"\n          >\n            <div *ngIf=\"i == this.indexSeleccionado\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n      <div\n        style=\"background: rgb(245 245 245); position: relative\"\n        (click)=\"addColor()\"\n        *ngIf=\"!hideColorPicker && this.colorPickerControls != 'only-alpha'\"\n        class=\"circle button\"\n      >\n        <div\n          *ngIf=\"!this.indexSeleccionado\"\n          style=\"\n            position: absolute;\n            height: 7px;\n            width: 7px;\n            border: 1px solid rgba(0, 0, 0, 0.03);\n            border-radius: 100%;\n            top: 0;\n            right: 0;\n          \"\n          [ngStyle]=\"getBackgroundColor(color)\"\n        ></div>\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          height=\"24px\"\n          viewBox=\"0 0 24 24\"\n          width=\"24px\"\n          fill=\"#222222\"\n        >\n          <path d=\"M24 24H0V0h24v24z\" fill=\"none\" opacity=\".87\" />\n          <path d=\"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z\" />\n        </svg>\n        <!-- <div class=\"add\">\n          <icons icon=\"add\"></icons>\n        </div> -->\n      </div>\n      <color-picker\n        *ngIf=\"!hideColorPicker && this.colorPickerControls == 'only-alpha'\"\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (colorChange)=\"onChangeColorPicker($event)\"\n        (onAlphaChange)=\"onAlphaChange($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 2\">\n    <div class=\"colors\" [@colorsAnimation]=\"colorsAnimationEffect\">\n      <div class=\"circle wrapper\">\n        <div (click)=\"onClickBack()\" class=\"add\">\n          <svg\n            xmlns=\"http://www.w3.org/2000/svg\"\n            width=\"24\"\n            height=\"24\"\n            viewBox=\"0 0 24 24\"\n          >\n            <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n            <path\n              d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n            />\n          </svg>\n        </div>\n      </div>\n\n      <ng-container *ngFor=\"let variant of variants\">\n        <div class=\"circle wrapper color\">\n          <div\n            (click)=\"changeColor(variant)\"\n            class=\"circle circle-border\"\n            [ngStyle]=\"{ background: variant }\"\n          >\n            <div *ngIf=\"isSelected(variant)\" class=\"selected\"></div>\n          </div>\n        </div>\n      </ng-container>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"menu == 3\">\n    <div class=\"nav-wrapper\">\n      <div\n        (click)=\"onClickBack()\"\n        class=\"round-button button\"\n        style=\"float: left\"\n      >\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          width=\"24\"\n          height=\"24\"\n          viewBox=\"0 0 24 24\"\n        >\n          <path d=\"M0 0h24v24H0z\" fill=\"none\" />\n          <path\n            d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n          />\n        </svg>\n      </div>\n      <button (click)=\"emitClose('cancel')\" style=\"float: right\">\n        {{ cancelLabel }}\n      </button>\n      <button (click)=\"emitClose('accept')\" style=\"float: right\">\n        {{ acceptLabel }}\n      </button>\n    </div>\n    <div class=\"color-picker-wrapper\">\n      <!-- <span [(colorPicker)]=\"color\"></span> -->\n      <color-picker\n        [controls]=\"colorPickerControls\"\n        [color]=\"hsva\"\n        (sliderChange)=\"onChangeColorPicker($event)\"\n      ></color-picker>\n    </div>\n  </ng-container>\n  <div class=\"manual-input-wrapper\" *ngIf=\"!hideTextInput\">\n    <p (click)=\"nextFormat()\">{{ colorFormats[format] }}</p>\n    <div class=\"g-input\">\n      <input\n        placeholder=\"#FFFFFF\"\n        type=\"text\"\n        [value]=\"color\"\n        [style.font-size.px]=\"color && color.length > 23 ? 9 : 10\"\n        [style.letter-spacing.px]=\"color && color.length > 16 ? 0 : 1.5\"\n        (keyup)=\"changeColorManual(paintInput.value)\"\n        (keydown.enter)=\"emitClose('accept')\"\n        #paintInput\n      />\n    </div>\n  </div>\n</div>\n",
                animations: [
                    (0,animations_.trigger)("colorsAnimation", [
                        (0,animations_.transition)("void => slide-in", [
                            // Initially all colors are hidden
                            (0,animations_.query)(":enter", (0,animations_.style)({ opacity: 0 }), { optional: true }),
                            //slide-in animation
                            (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [
                                (0,animations_.animate)(".3s ease-in", (0,animations_.keyframes)([
                                    (0,animations_.style)({ opacity: 0, transform: "translatex(-50%)", offset: 0 }),
                                    (0,animations_.style)({
                                        opacity: 0.5,
                                        transform: "translatex(-10px) scale(1.1)",
                                        offset: 0.3,
                                    }),
                                    (0,animations_.style)({ opacity: 1, transform: "translatex(0)", offset: 1 }),
                                ])),
                            ]), { optional: true }),
                        ]),
                        //popup animation
                        (0,animations_.transition)("void => popup", [
                            (0,animations_.query)(":enter", (0,animations_.style)({ opacity: 0, transform: "scale(0)" }), {
                                optional: true,
                            }),
                            (0,animations_.query)(":enter", (0,animations_.stagger)("10ms", [
                                (0,animations_.animate)("500ms ease-out", (0,animations_.keyframes)([
                                    (0,animations_.style)({ opacity: 0.5, transform: "scale(.5)", offset: 0.3 }),
                                    (0,animations_.style)({ opacity: 1, transform: "scale(1.1)", offset: 0.8 }),
                                    (0,animations_.style)({ opacity: 1, transform: "scale(1)", offset: 1 }),
                                ])),
                            ]), { optional: true }),
                        ]),
                    ]),
                ],
                styles: [":host{position:fixed;z-index:2001}.hidden{display:none}.button{display:flex;align-items:center;justify-content:center}.top{transform:translateY(-100%)}.opened{box-sizing:border-box;box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);background:#fff;width:250px;border-radius:5px;position:absolute}.opened button{border:none;font-family:inherit;font-size:12px;background-color:unset;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:10px;letter-spacing:1px;color:#222;border-radius:3px;line-height:20px}.opened .button:hover,.opened button:hover{background-color:rgba(0,0,0,.05);transition:opacity .2s cubic-bezier(.35,0,.25,1),background-color .2s cubic-bezier(.35,0,.25,1);transition-property:opacity,background-color;transition-duration:.2s,.2s;transition-timing-function:cubic-bezier(.35,0,.25,1),cubic-bezier(.35,0,.25,1);transition-delay:0s,0s}.opened button:focus{outline:none}.opened .colors{display:flex;flex-wrap:wrap;align-items:center;margin:15px}.opened .colors .circle{height:34px;width:34px;box-sizing:border-box;border-radius:100%;cursor:pointer}.opened .colors .circle .add{font-size:20px;line-height:45px;text-align:center}.opened .colors .circle .selected{border:2px solid #fff;border-radius:100%;height:28px;width:28px;box-sizing:border-box;margin:2px}.opened .colors .circle.wrapper{margin:0 5px 5px;flex:34px 0 0}.opened .colors .circle.button{margin:0 5px 5px}.opened .colors .circle.wrapper.color{background-image:linear-gradient(45deg,#ccc 25%,transparent 0),linear-gradient(-45deg,#ccc 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ccc 0),linear-gradient(-45deg,transparent 75%,#ccc 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.opened .colors .circle-border{border:1px solid rgba(0,0,0,.03)}.opened .color-picker-wrapper{margin:5px 15px}.opened .nav-wrapper{overflow:hidden;margin:5px}.opened .nav-wrapper .round-button{padding:5px 0;width:40px;height:40px;box-sizing:border-box;border-radius:100%;text-align:center;line-height:45px}.opened .manual-input-wrapper{display:flex;margin:15px;font-family:sans-serif}.opened .manual-input-wrapper p{margin:0;text-align:center;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;line-height:48px;width:145px;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.opened .manual-input-wrapper .g-input{border:1px solid #e8ebed;height:45px;border-radius:5px;width:100%}.opened .manual-input-wrapper .g-input input{font-size:9px;border:none;width:100%;text-transform:uppercase;outline:none;text-align:center;letter-spacing:1px;color:#595b65;height:100%;border-radius:5px;margin:0;padding:0}"]
            },] }
];
PanelComponent.ctorParameters = () => [
    { type: ConverterService },
    { type: core_.ChangeDetectorRef }
];
PanelComponent.propDecorators = {
    click: [{ type: core_.HostListener, args: ["document:mousedown", ["$event"],] }],
    onScroll: [{ type: core_.HostListener, args: ["document:scroll",] }],
    onResize: [{ type: core_.HostListener, args: ["window:resize",] }],
    top: [{ type: core_.HostBinding, args: ["style.top.px",] }],
    left: [{ type: core_.HostBinding, args: ["style.left.px",] }],
    panelRef: [{ type: core_.ViewChild, args: ["dialog",] }]
};

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/services/overlay-styles.js
const OVERLAY_STYLES = {
    position: 'fixed',
    height: '100%',
    width: '100%',
    'z-index': 2000,
    top: 0,
    left: 0,
};

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/services/panel-factory.service.js



class PanelFactoryService {
    constructor(resolver, applicationRef, injector) {
        this.resolver = resolver;
        this.applicationRef = applicationRef;
        this.injector = injector;
    }
    createPanel(attachTo, overlayClassName) {
        if (this.componentRef != undefined) {
            this.removePanel();
        }
        const factory = this.resolver.resolveComponentFactory(PanelComponent);
        this.componentRef = factory.create(this.injector);
        this.applicationRef.attachView(this.componentRef.hostView);
        const domElem = this.componentRef.hostView
            .rootNodes[0];
        this.overlay = document.createElement("div");
        this.overlay.id = "ngx-colors-overlay";
        this.overlay.classList.add("ngx-colors-overlay");
        this.overlay.classList.add(overlayClassName);
        Object.keys(OVERLAY_STYLES).forEach((attr) => {
            this.overlay.style[attr] = OVERLAY_STYLES[attr];
        });
        if (attachTo) {
            document.getElementById(attachTo).appendChild(this.overlay);
        }
        else {
            document.body.appendChild(this.overlay);
        }
        this.overlay.appendChild(domElem);
        return this.componentRef;
    }
    removePanel() {
        this.applicationRef.detachView(this.componentRef.hostView);
        this.componentRef.destroy();
        this.overlay.remove();
    }
}
PanelFactoryService.decorators = [
    { type: core_.Injectable }
];
PanelFactoryService.ctorParameters = () => [
    { type: core_.ComponentFactoryResolver },
    { type: core_.ApplicationRef },
    { type: core_.Injector }
];

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/directives/ngx-colors-trigger.directive.js



class NgxColorsTriggerDirective {
    constructor(triggerRef, panelFactory) {
        this.triggerRef = triggerRef;
        this.panelFactory = panelFactory;
        //Main input/output of the color picker
        // @Input() color = '#000000';
        // @Output() colorChange:EventEmitter<string> = new EventEmitter<string>();
        this.color = "";
        //This defines the type of animation for the palatte.(slide-in | popup)
        this.colorsAnimation = "slide-in";
        this.position = "bottom";
        this.attachTo = undefined;
        this.overlayClassName = undefined;
        this.colorPickerControls = "default";
        this.acceptLabel = "ACCEPT";
        this.cancelLabel = "CANCEL";
        // This event is trigger every time the selected color change
        this.change = new core_.EventEmitter();
        // This event is trigger every time the user change the color using the panel
        this.input = new core_.EventEmitter();
        // This event is trigger every time the user change the color using the panel
        this.slider = new core_.EventEmitter();
        this.isDisabled = false;
        this.onTouchedCallback = () => { };
        this.onChangeCallback = () => { };
    }
    onClick() {
        this.open();
    }
    open() {
        if (!this.isDisabled) {
            this.panelRef = this.panelFactory.createPanel(this.attachTo, this.overlayClassName);
            this.panelRef.instance.iniciate(this, this.triggerRef, this.color, this.palette, this.colorsAnimation, this.format, this.hideTextInput, this.hideColorPicker, this.acceptLabel, this.cancelLabel, this.colorPickerControls, this.position);
        }
    }
    close() {
        this.panelFactory.removePanel();
    }
    onChange() {
        this.onChangeCallback(this.color);
    }
    setDisabledState(isDisabled) {
        this.isDisabled = isDisabled;
        this.triggerRef.nativeElement.style.opacity = isDisabled ? 0.5 : undefined;
    }
    setColor(color) {
        this.writeValue(color);
        this.input.emit(color);
    }
    sliderChange(color) {
        this.slider.emit(color);
    }
    get value() {
        return this.color;
    }
    set value(value) {
        this.setColor(value);
        this.onChangeCallback(value);
    }
    writeValue(value) {
        if (value !== this.color) {
            this.color = value;
            this.onChange();
            this.change.emit(value);
        }
    }
    registerOnChange(fn) {
        this.onChangeCallback = fn;
    }
    registerOnTouched(fn) {
        this.onTouchedCallback = fn;
    }
}
NgxColorsTriggerDirective.decorators = [
    { type: core_.Directive, args: [{
                selector: "[ngx-colors-trigger]",
                providers: [
                    {
                        provide: forms_.NG_VALUE_ACCESSOR,
                        useExisting: (0,core_.forwardRef)(() => NgxColorsTriggerDirective),
                        multi: true,
                    },
                ],
            },] }
];
NgxColorsTriggerDirective.ctorParameters = () => [
    { type: core_.ElementRef },
    { type: PanelFactoryService }
];
NgxColorsTriggerDirective.propDecorators = {
    colorsAnimation: [{ type: core_.Input }],
    palette: [{ type: core_.Input }],
    format: [{ type: core_.Input }],
    position: [{ type: core_.Input }],
    hideTextInput: [{ type: core_.Input }],
    hideColorPicker: [{ type: core_.Input }],
    attachTo: [{ type: core_.Input }],
    overlayClassName: [{ type: core_.Input }],
    colorPickerControls: [{ type: core_.Input }],
    acceptLabel: [{ type: core_.Input }],
    cancelLabel: [{ type: core_.Input }],
    change: [{ type: core_.Output }],
    input: [{ type: core_.Output }],
    slider: [{ type: core_.Output }],
    onClick: [{ type: core_.HostListener, args: ["click",] }]
};

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/ngx-colors.component.js


class NgxColorsComponent {
    constructor(cdRef, triggerDirective) {
        this.cdRef = cdRef;
        this.triggerDirective = triggerDirective;
        this.triggerDirectiveColorChangeSubscription = null;
        //IO color
        this.color = this.triggerDirective.color;
    }
    ngOnInit() {
        this.triggerDirectiveColorChangeSubscription =
            this.triggerDirective.change.subscribe((color) => {
                this.color = color;
                this.cdRef.markForCheck();
            });
    }
    ngOnDestroy() {
        if (this.triggerDirectiveColorChangeSubscription) {
            this.triggerDirectiveColorChangeSubscription.unsubscribe();
        }
    }
}
NgxColorsComponent.decorators = [
    { type: core_.Component, args: [{
                selector: 'ngx-colors',
                template: "<div class=\"app-color-picker\">\n  <div class=\"preview\">\n    <div class=\"preview-background\">\n      <div\n        class=\"circle\"\n        [class.colornull]=\"!color\"\n        [ngStyle]=\"{ background: color }\"\n      ></div>\n    </div>\n  </div>\n</div>\n",
                styles: [":host .app-color-picker{line-height:1px;font-family:sans-serif}:host .app-color-picker .preview{margin:2px;display:inline-block;box-sizing:border-box;border-radius:100%;background:#fff;cursor:pointer;padding:3px;box-shadow:0 1px 1px 0 rgba(0,0,0,.2),0 1px 1px 1px rgba(0,0,0,.14),0 1px 1px 1px rgba(0,0,0,.12)}:host .app-color-picker .preview .preview-background{background-image:linear-gradient(45deg,#ccc 25%,transparent 0),linear-gradient(-45deg,#ccc 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ccc 0),linear-gradient(-45deg,transparent 75%,#ccc 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0;border-radius:100%}:host .app-color-picker .preview .circle{height:20px;width:20px;box-sizing:border-box;border-radius:100%;cursor:pointer}:host .app-color-picker .preview .circle.colornull{background:linear-gradient(135deg,hsla(0,0%,93%,.7),hsla(0,0%,93%,.7) 45%,#de0f00 50%,hsla(0,0%,93%,.7) 55%,hsla(0,0%,93%,.7))}:host .app-color-picker .preview .noselected{background-image:linear-gradient(45deg,#ccc 25%,transparent 0),linear-gradient(-45deg,#ccc 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ccc 0),linear-gradient(-45deg,transparent 75%,#ccc 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}"]
            },] }
];
NgxColorsComponent.ctorParameters = () => [
    { type: core_.ChangeDetectorRef },
    { type: NgxColorsTriggerDirective, decorators: [{ type: core_.Host }] }
];

// EXTERNAL MODULE: external "@angular/common"
var common_ = __webpack_require__(5848);
;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/clases/slider.js
class SliderPosition {
    constructor(h, s, v, a) {
        this.h = h;
        this.s = s;
        this.v = v;
        this.a = a;
    }
}
class SliderDimension {
    constructor(h, s, v, a) {
        this.h = h;
        this.s = s;
        this.v = v;
        this.a = a;
    }
}

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/components/color-picker/color-picker.component.js




class ColorPickerComponent {
    constructor(service, cdr) {
        this.service = service;
        this.cdr = cdr;
        //IO color
        this.color = new Hsva(0, 1, 1, 1);
        this.controls = "default";
        this.sliderChange = new core_.EventEmitter(false);
        this.onAlphaChange = new core_.EventEmitter(false);
        //Event triggered when any slider change
        // @Output() colorSelectedChange:EventEmitter<Hsva> = new EventEmitter<Hsva>(false);
        this.hsva = new Hsva(0, 1, 1, 1);
        this.selectedColor = "#000000";
        this.fallbackColor = "#000000";
    }
    ngOnInit() {
        if (!this.color) {
            this.color = new Hsva(0, 1, 1, 1);
        }
        this.slider = new SliderPosition(0, 0, 0, 0);
        this.update();
    }
    ngOnDestroy() { }
    ngOnChanges(changes) {
        if (changes.color && this.color) {
            this.update();
        }
    }
    ngAfterViewInit() {
        var _a, _b;
        const hueWidth = ((_a = this.hueSlider) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetWidth) || 140;
        const alphaWidth = ((_b = this.alphaSlider) === null || _b === void 0 ? void 0 : _b.nativeElement.offsetWidth) || 140;
        this.sliderDimMax = new SliderDimension(hueWidth, 220, 130, alphaWidth);
        this.update();
    }
    onSliderChange(type, event) {
        switch (type) {
            case "saturation-lightness":
                this.hsva.onColorChange(event);
                break;
            case "hue":
                this.hsva.onHueChange(event);
                break;
            case "alpha":
                this.hsva.onAlphaChange(event);
                this.onAlphaChange.emit(event);
                break;
            case "value":
                this.hsva.onValueChange(event);
                break;
        }
        // this.sHue = this.hsva.h;
        this.update();
        this.setColor(this.outputColor);
    }
    setColor(color) {
        this.color = color;
        this.sliderChange.emit(this.color);
    }
    getBackgroundColor(color) {
        return {
            background: "linear-gradient(90deg, rgba(36,0,0,0) 0%, " + color + " 100%)",
        };
    }
    update() {
        this.hsva = this.color;
        if (this.sliderDimMax) {
            let rgba = this.service.hsvaToRgba(this.hsva).denormalize();
            let hue = this.service
                .hsvaToRgba(new Hsva(this.hsva.h, 1, 1, 1))
                .denormalize();
            this.hueSliderColor = "rgb(" + hue.r + "," + hue.g + "," + hue.b + ")";
            this.alphaSliderColor =
                "rgb(" + rgba.r + "," + rgba.g + "," + rgba.b + ")";
            this.outputColor = this.hsva;
            this.selectedColor = this.service.hsvaToRgba(this.hsva).toString();
            this.slider = new SliderPosition(
            // (this.sHue || this.hsva.h) * this.sliderDimMax.h - 8,
            this.hsva.h * this.sliderDimMax.h - 5, this.hsva.s * this.sliderDimMax.s - 8, (1 - this.hsva.v) * this.sliderDimMax.v - 8, this.hsva.a * this.sliderDimMax.a - 5);
            this.cdr.detectChanges();
        }
    }
}
ColorPickerComponent.decorators = [
    { type: core_.Component, args: [{
                selector: "color-picker",
                template: "<div #dialogPopup class=\"color-picker\" (click)=\"$event.stopPropagation()\">\n  <div\n    class=\"saturation-lightness\"\n    *ngIf=\"this.controls != 'only-alpha'\"\n    [slider]\n    [rgX]=\"1\"\n    [rgY]=\"1\"\n    [style.background-color]=\"hueSliderColor\"\n    (newValue)=\"onSliderChange('saturation-lightness', $event)\"\n  >\n    <div class=\"cursor\" [style.top.px]=\"slider?.v\" [style.left.px]=\"slider?.s\">\n      <div></div>\n    </div>\n  </div>\n\n  <div class=\"hue-alpha box\">\n    <div class=\"left\" *ngIf=\"this.controls != 'only-alpha'\">\n      <div class=\"selected-color-background\"></div>\n      <div\n        class=\"selected-color\"\n        [style.background-color]=\"selectedColor\"\n      ></div>\n    </div>\n\n    <div class=\"right\">\n      <div\n        *ngIf=\"this.controls != 'only-alpha'\"\n        #hueSlider\n        class=\"hue\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('hue', $event)\"\n      >\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.h\">\n          <div><div></div></div>\n        </div>\n      </div>\n\n      <div\n        *ngIf=\"this.controls != 'no-alpha'\"\n        #alphaSlider\n        class=\"alpha\"\n        [slider]\n        [rgX]=\"1\"\n        (newValue)=\"onSliderChange('alpha', $event)\"\n      >\n        <div\n          class=\"alpha-gradient\"\n          [ngStyle]=\"getBackgroundColor(alphaSliderColor)\"\n        ></div>\n        <div class=\"sliderCursor\" [style.left.px]=\"slider?.a\">\n          <div><div></div></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
                encapsulation: core_.ViewEncapsulation.None,
                styles: [".color-picker{position:relative;z-index:1000;width:220px;height:auto;cursor:default;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:none}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:-moz-submit-invalid,.color-picker input:-moz-ui-invalid,.color-picker input:invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .sliderCursor{width:10px;border-radius:5px;position:absolute;margin-top:-3px;border:1px solid #000}.color-picker .sliderCursor>div{border:2px solid #fff;border-radius:5px}.color-picker .sliderCursor>div>div{border-radius:5px;border:1px solid #000;height:24px}.color-picker .cursor{position:absolute;width:21px;border:3px solid #000;border-radius:100%;margin:-2px 0 0 -2px}.color-picker .cursor>div{height:15px;border:3px solid #fff;border-radius:100%}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;display:flex;flex-direction:column;grid-gap:10px;gap:10px;padding:12px 8px}.color-picker .hue-alpha{display:flex;align-items:center;margin-bottom:3px}.color-picker .hue{background-size:100% 100%;background:linear-gradient(90deg,red 0,#ff0 17%,lime 33%,cyan 50%,blue 66%,#f0f 83%,red)}.color-picker .alpha,.color-picker .hue{direction:ltr;width:100%;height:24px;border:none;border-radius:5px;position:relative;cursor:pointer}.color-picker .alpha{background-image:linear-gradient(45deg,#ccc 25%,transparent 0),linear-gradient(-45deg,#ccc 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ccc 0),linear-gradient(-45deg,transparent 75%,#ccc 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.color-picker .alpha-gradient{width:100%;height:100%;border-radius:5px;position:absolute}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;box-shadow:0 1px 1px 1px rgba(0,0,0,.15);border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:linear-gradient(45deg,#ccc 25%,transparent 0),linear-gradient(-45deg,#ccc 25%,transparent 0),linear-gradient(45deg,transparent 75%,#ccc 0),linear-gradient(-45deg,transparent 75%,#ccc 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}.color-picker .saturation-lightness{direction:ltr;cursor:crosshair;width:100%;position:relative;height:130px;border:none;touch-action:manipulation;background-image:linear-gradient(0deg,#000 0,transparent),linear-gradient(90deg,#fff 0,transparent)}"]
            },] }
];
ColorPickerComponent.ctorParameters = () => [
    { type: ConverterService },
    { type: core_.ChangeDetectorRef }
];
ColorPickerComponent.propDecorators = {
    color: [{ type: core_.Input }],
    controls: [{ type: core_.Input }],
    sliderChange: [{ type: core_.Output }],
    onAlphaChange: [{ type: core_.Output }],
    hueSlider: [{ type: core_.ViewChild, args: ["hueSlider", { static: false },] }],
    alphaSlider: [{ type: core_.ViewChild, args: ["alphaSlider", { static: false },] }]
};

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/directives/slider.directive.js

class SliderDirective {
    constructor(elRef) {
        this.elRef = elRef;
        this.dragEnd = new core_.EventEmitter();
        this.dragStart = new core_.EventEmitter();
        this.newValue = new core_.EventEmitter();
        this.listenerMove = (event) => this.move(event);
        this.listenerStop = () => this.stop();
    }
    mouseDown(event) {
        this.start(event);
    }
    touchStart(event) {
        this.start(event);
    }
    move(event) {
        event.preventDefault();
        this.setCursor(event);
    }
    start(event) {
        this.setCursor(event);
        event.stopPropagation();
        document.addEventListener('mouseup', this.listenerStop);
        document.addEventListener('touchend', this.listenerStop);
        document.addEventListener('mousemove', this.listenerMove);
        document.addEventListener('touchmove', this.listenerMove);
        this.dragStart.emit();
    }
    stop() {
        document.removeEventListener('mouseup', this.listenerStop);
        document.removeEventListener('touchend', this.listenerStop);
        document.removeEventListener('mousemove', this.listenerMove);
        document.removeEventListener('touchmove', this.listenerMove);
        this.dragEnd.emit();
    }
    getX(event) {
        const position = this.elRef.nativeElement.getBoundingClientRect();
        const pageX = (event.pageX !== undefined) ? event.pageX : event.touches[0].pageX;
        return pageX - position.left - window.pageXOffset;
    }
    getY(event) {
        const position = this.elRef.nativeElement.getBoundingClientRect();
        const pageY = (event.pageY !== undefined) ? event.pageY : event.touches[0].pageY;
        return pageY - position.top - window.pageYOffset;
    }
    setCursor(event) {
        const width = this.elRef.nativeElement.offsetWidth;
        const height = this.elRef.nativeElement.offsetHeight;
        const x = Math.max(0, Math.min(this.getX(event), width));
        const y = Math.max(0, Math.min(this.getY(event), height));
        if (this.rgX !== undefined && this.rgY !== undefined) {
            this.newValue.emit({ s: x / width, v: (1 - y / height), rgX: this.rgX, rgY: this.rgY });
        }
        else if (this.rgX === undefined && this.rgY !== undefined) {
            this.newValue.emit({ v: y / height, rgY: this.rgY });
        }
        else if (this.rgX !== undefined && this.rgY === undefined) {
            this.newValue.emit({ v: x / width, rgX: this.rgX });
        }
    }
}
SliderDirective.decorators = [
    { type: core_.Directive, args: [{
                selector: '[slider]'
            },] }
];
SliderDirective.ctorParameters = () => [
    { type: core_.ElementRef }
];
SliderDirective.propDecorators = {
    rgX: [{ type: core_.Input }],
    rgY: [{ type: core_.Input }],
    slider: [{ type: core_.Input }],
    dragEnd: [{ type: core_.Output }],
    dragStart: [{ type: core_.Output }],
    newValue: [{ type: core_.Output }],
    mouseDown: [{ type: core_.HostListener, args: ['mousedown', ['$event'],] }],
    touchStart: [{ type: core_.HostListener, args: ['touchstart', ['$event'],] }]
};

;// CONCATENATED MODULE: ./node_modules/ngx-colors/esm2015/lib/ngx-colors.module.js









class NgxColorsModule {
}
NgxColorsModule.decorators = [
    { type: core_.NgModule, args: [{
                declarations: [
                    NgxColorsComponent,
                    ColorPickerComponent,
                    SliderDirective,
                    PanelComponent,
                    NgxColorsTriggerDirective,
                ],
                imports: [common_.CommonModule],
                providers: [ConverterService, PanelFactoryService],
                exports: [NgxColorsComponent, NgxColorsTriggerDirective],
                entryComponents: [PanelComponent, ColorPickerComponent],
            },] }
];

// EXTERNAL MODULE: external "tabby-core"
var external_tabby_core_ = __webpack_require__(315);
var external_tabby_core_default = /*#__PURE__*/__webpack_require__.n(external_tabby_core_);
// EXTERNAL MODULE: external "tabby-settings"
var external_tabby_settings_ = __webpack_require__(6663);
// EXTERNAL MODULE: external "rxjs"
var external_rxjs_ = __webpack_require__(3832);
;// CONCATENATED MODULE: ../node_modules/utils-decorators/dist/esm/debounce/debouncify.js
function debouncify(originalMethod, delayMs) {
    let handler;
    return function (...args) {
        clearTimeout(handler);
        handler = setTimeout(() => {
            originalMethod.apply(this, args);
        }, delayMs);
    };
}

;// CONCATENATED MODULE: ../node_modules/utils-decorators/dist/esm/debounce/debounce.js

function debounce(delayMs) {
    return (target, propertyName, descriptor) => {
        if (descriptor.value) {
            descriptor.value = debouncify(descriptor.value, delayMs);
            return descriptor;
        }
        throw new Error('@debounce is applicable only on a methods.');
    };
}

;// CONCATENATED MODULE: ./src/components/appearanceSettingsTab.component.ts

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */




/** @hidden */
let AppearanceSettingsTabComponent = class AppearanceSettingsTabComponent {
    constructor(config, platform) {
        this.config = config;
        this.platform = platform;
        this.fonts = [];
        this.fontAutocomplete = (text$) => {
            return text$.pipe((0,external_rxjs_.debounceTime)(200), (0,external_rxjs_.distinctUntilChanged)(), (0,external_rxjs_.map)(query => this.fonts.filter(v => new RegExp(query, 'gi').test(v))), (0,external_rxjs_.map)(list => Array.from(new Set(list))));
        };
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.fonts = yield this.platform.listFonts();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
    saveConfiguration(requireRestart) {
        this.config.save();
        if (requireRestart) {
            this.config.requestRestart();
        }
    }
    fixFontSize() {
        this.config.store.terminal.fontSize = Math.min(50, Math.max(5, this.config.store.terminal.fontSize));
    }
};
__decorate([
    debounce(500),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [Boolean]),
    __metadata("design:returntype", void 0)
], AppearanceSettingsTabComponent.prototype, "saveConfiguration", null);
AppearanceSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: __webpack_require__(/*! ./appearanceSettingsTab.component.pug */ 1066),
        styles: [__webpack_require__(/*! ./appearanceSettingsTab.component.scss */ 2045)],
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.PlatformService])
], AppearanceSettingsTabComponent);


// EXTERNAL MODULE: ../node_modules/deep-equal/index.js
var deep_equal = __webpack_require__(2039);
var deep_equal_default = /*#__PURE__*/__webpack_require__.n(deep_equal);
;// CONCATENATED MODULE: ../node_modules/@biesbjerg/ngx-translate-extract-marker/esm2015/lib/ngx-translate-extract-marker.js
/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T
 * @param {?} key
 * @return {?}
 */
function marker(key) {
    return key;
}

;// CONCATENATED MODULE: ./src/api/colorSchemeProvider.ts
/**
 * Extend to add more terminal color schemes
 */
class TerminalColorSchemeProvider {
}

;// CONCATENATED MODULE: ./src/components/colorSchemeSettingsTab.component.ts

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */





marker('Search color schemes');
/** @hidden */
let ColorSchemeSettingsTabComponent = class ColorSchemeSettingsTabComponent {
    constructor(colorSchemeProviders, changeDetector, platform, translate, config) {
        this.colorSchemeProviders = colorSchemeProviders;
        this.changeDetector = changeDetector;
        this.platform = platform;
        this.translate = translate;
        this.config = config;
        this.stockColorSchemes = [];
        this.customColorSchemes = [];
        this.allColorSchemes = [];
        this.filter = '';
        this.editing = false;
        this.colorIndexes = [...new Array(16).keys()];
        this.currentStockScheme = null;
        this.currentCustomScheme = null;
    }
    ngOnInit() {
        return __awaiter(this, void 0, void 0, function* () {
            this.stockColorSchemes = (yield Promise.all(this.config.enabledServices(this.colorSchemeProviders).map(x => x.getSchemes()))).reduce((a, b) => a.concat(b));
            this.stockColorSchemes.sort((a, b) => a.name.localeCompare(b.name));
            this.customColorSchemes = this.config.store.terminal.customColorSchemes;
            this.changeDetector.markForCheck();
            this.update();
        });
    }
    ngOnChanges() {
        this.update();
    }
    selectScheme(scheme) {
        this.config.store.terminal.colorScheme = Object.assign({}, scheme);
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    update() {
        this.currentCustomScheme = this.findMatchingScheme(this.config.store.terminal.colorScheme, this.customColorSchemes);
        this.currentStockScheme = this.findMatchingScheme(this.config.store.terminal.colorScheme, this.stockColorSchemes);
        this.allColorSchemes = this.customColorSchemes.concat(this.stockColorSchemes);
        this.changeDetector.markForCheck();
    }
    editScheme() {
        this.editing = true;
    }
    saveScheme() {
        this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== this.config.store.terminal.colorScheme.name);
        this.customColorSchemes.push(this.config.store.terminal.colorScheme);
        this.config.store.terminal.customColorSchemes = this.customColorSchemes;
        this.config.save();
        this.cancelEditing();
        this.update();
    }
    cancelEditing() {
        this.editing = false;
    }
    deleteScheme(scheme) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete "{name}"?', scheme),
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 1,
                cancelId: 1,
            })).response === 0) {
                this.customColorSchemes = this.customColorSchemes.filter(x => x.name !== scheme.name);
                this.config.store.terminal.customColorSchemes = this.customColorSchemes;
                this.config.save();
                this.update();
            }
        });
    }
    getCurrentSchemeName() {
        var _a, _b, _c;
        return (_c = (_b = ((_a = this.currentCustomScheme) !== null && _a !== void 0 ? _a : this.currentStockScheme)) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : 'Custom';
    }
    findMatchingScheme(scheme, schemes) {
        var _a;
        return (_a = schemes.find(x => deep_equal_default()(x, scheme))) !== null && _a !== void 0 ? _a : null;
    }
    colorsTrackBy(index) {
        return index;
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Array)
], ColorSchemeSettingsTabComponent.prototype, "stockColorSchemes", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Array)
], ColorSchemeSettingsTabComponent.prototype, "customColorSchemes", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Array)
], ColorSchemeSettingsTabComponent.prototype, "allColorSchemes", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], ColorSchemeSettingsTabComponent.prototype, "filter", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], ColorSchemeSettingsTabComponent.prototype, "editing", void 0);
__decorate([
    (0,core_.HostBinding)('class.content-box'),
    __metadata("design:type", Object)
], ColorSchemeSettingsTabComponent.prototype, "true", void 0);
ColorSchemeSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: __webpack_require__(/*! ./colorSchemeSettingsTab.component.pug */ 4855),
        styles: [__webpack_require__(/*! ./colorSchemeSettingsTab.component.scss */ 6468)],
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
    }),
    __param(0, (0,core_.Inject)(TerminalColorSchemeProvider)),
    __metadata("design:paramtypes", [Array, core_.ChangeDetectorRef,
        external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], ColorSchemeSettingsTabComponent);


;// CONCATENATED MODULE: ./src/components/terminalSettingsTab.component.ts



/** @hidden */
let TerminalSettingsTabComponent = class TerminalSettingsTabComponent {
    constructor(config, hostApp, platform) {
        this.config = config;
        this.hostApp = hostApp;
        this.platform = platform;
        this.Platform = external_tabby_core_.Platform;
        this.altKeyName = external_tabby_core_.altKeyName;
        this.metaKeyName = external_tabby_core_.metaKeyName;
    }
    openWSLVolumeMixer() {
        this.platform.openPath('sndvol.exe');
        this.platform.exec('wsl.exe', ['tput', 'bel']);
    }
};
__decorate([
    (0,core_.HostBinding)('class.content-box'),
    __metadata("design:type", Object)
], TerminalSettingsTabComponent.prototype, "true", void 0);
TerminalSettingsTabComponent = __decorate([
    (0,core_.Component)({
        template: __webpack_require__(/*! ./terminalSettingsTab.component.pug */ 8739),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        external_tabby_core_.HostAppService,
        external_tabby_core_.PlatformService])
], TerminalSettingsTabComponent);


;// CONCATENATED MODULE: ./src/components/colorPicker.component.ts


/** @hidden */
let colorPicker_component_ColorPickerComponent = class ColorPickerComponent {
    constructor() {
        this.modelChange = new core_.EventEmitter();
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", String)
], colorPicker_component_ColorPickerComponent.prototype, "model", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", String)
], colorPicker_component_ColorPickerComponent.prototype, "title", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", String)
], colorPicker_component_ColorPickerComponent.prototype, "hint", void 0);
__decorate([
    (0,core_.Output)(),
    __metadata("design:type", Object)
], colorPicker_component_ColorPickerComponent.prototype, "modelChange", void 0);
colorPicker_component_ColorPickerComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-picker',
        template: __webpack_require__(/*! ./colorPicker.component.pug */ 1967),
        styles: [__webpack_require__(/*! ./colorPicker.component.scss */ 1276)],
    })
], colorPicker_component_ColorPickerComponent);


;// CONCATENATED MODULE: ./src/components/colorSchemePreview.component.ts



/** @hidden */
let ColorSchemePreviewComponent = class ColorSchemePreviewComponent extends external_tabby_core_.BaseComponent {
    constructor(config, changeDetector) {
        super();
        this.config = config;
        this.fontPreview = false;
        this.subscribeUntilDestroyed(config.changed$, () => {
            changeDetector.markForCheck();
        });
    }
    getPreviewFontFamily() {
        return (0,external_tabby_core_.getCSSFontFamily)(this.config.store);
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], ColorSchemePreviewComponent.prototype, "scheme", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], ColorSchemePreviewComponent.prototype, "fontPreview", void 0);
ColorSchemePreviewComponent = __decorate([
    (0,core_.Component)({
        selector: 'color-scheme-preview',
        template: __webpack_require__(/*! ./colorSchemePreview.component.pug */ 5421),
        styles: [__webpack_require__(/*! ./colorSchemePreview.component.scss */ 6975)],
        changeDetection: core_.ChangeDetectionStrategy.OnPush,
    }),
    __metadata("design:paramtypes", [external_tabby_core_.ConfigService,
        core_.ChangeDetectorRef])
], ColorSchemePreviewComponent);


;// CONCATENATED MODULE: ./src/frontends/frontend.ts

/**
 * Extend to add support for a different VT frontend implementation
 */
class Frontend {
    constructor(injector) {
        this.injector = injector;
        this.enableResizing = true;
        this.ready = new external_rxjs_.AsyncSubject();
        this.title = new external_rxjs_.ReplaySubject(1);
        this.alternateScreenActive = new external_rxjs_.BehaviorSubject(false);
        this.mouseEvent = new external_rxjs_.Subject();
        this.bell = new external_rxjs_.Subject();
        this.contentUpdated = new external_rxjs_.Subject();
        this.input = new external_rxjs_.Subject();
        this.resize = new external_rxjs_.ReplaySubject(1);
        this.dragOver = new external_rxjs_.Subject();
        this.drop = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
    }
    get ready$() { return this.ready; }
    get title$() { return this.title; }
    get alternateScreenActive$() { return this.alternateScreenActive; }
    get mouseEvent$() { return this.mouseEvent; }
    get bell$() { return this.bell; }
    get contentUpdated$() { return this.contentUpdated; }
    get input$() { return this.input; }
    get resize$() { return this.resize; }
    get dragOver$() { return this.dragOver; }
    get drop$() { return this.drop; }
    get destroyed$() { return this.destroyed; }
    destroy() {
        this.destroyed.next();
        for (const o of [
            this.ready,
            this.title,
            this.alternateScreenActive,
            this.mouseEvent,
            this.bell,
            this.contentUpdated,
            this.input,
            this.resize,
            this.dragOver,
            this.drop,
            this.destroyed,
        ]) {
            o.complete();
        }
    }
    detach(host) { } // eslint-disable-line
}

;// CONCATENATED MODULE: ./src/components/searchPanel.component.ts




let SearchPanelComponent = class SearchPanelComponent {
    constructor(notifications, translate, config) {
        this.notifications = notifications;
        this.translate = translate;
        this.config = config;
        this.state = { resultCount: 0 };
        this.options = Object.assign({ incremental: true }, this.config.store.terminal.searchOptions);
        this.close = new core_.EventEmitter();
        this.icons = {
            'case': __webpack_require__(/*! ../icons/case.svg */ 8247),
            regexp: __webpack_require__(/*! ../icons/regexp.svg */ 1974),
            wholeWord: __webpack_require__(/*! ../icons/whole-word.svg */ 7990),
            arrowUp: __webpack_require__(/*! ../icons/arrow-up.svg */ 3476),
            arrowDown: __webpack_require__(/*! ../icons/arrow-down.svg */ 9517),
            close: __webpack_require__(/*! ../icons/close.svg */ 8834),
        };
    }
    onQueryChange() {
        this.state = { resultCount: 0 };
        this.findPrevious(true);
    }
    findNext(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findNext(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    findPrevious(incremental = false) {
        if (!this.query) {
            return;
        }
        this.state = this.frontend.findPrevious(this.query, Object.assign(Object.assign({}, this.options), { incremental: incremental || undefined }));
        if (!this.state.resultCount) {
            this.notifications.notice(this.translate.instant('Not found'));
        }
    }
    saveSearchOptions() {
        this.config.store.terminal.searchOptions.regex = this.options.regex;
        this.config.store.terminal.searchOptions.caseSensitive = this.options.caseSensitive;
        this.config.store.terminal.searchOptions.wholeWord = this.options.wholeWord;
        this.config.save();
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", String)
], SearchPanelComponent.prototype, "query", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Frontend)
], SearchPanelComponent.prototype, "frontend", void 0);
__decorate([
    (0,core_.Output)(),
    __metadata("design:type", Object)
], SearchPanelComponent.prototype, "close", void 0);
SearchPanelComponent = __decorate([
    (0,core_.Component)({
        selector: 'search-panel',
        template: __webpack_require__(/*! ./searchPanel.component.pug */ 5107),
        styles: [__webpack_require__(/*! ./searchPanel.component.scss */ 6653)],
    }),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService,
        external_tabby_core_.ConfigService])
], SearchPanelComponent);


;// CONCATENATED MODULE: ./src/components/streamProcessingSettings.component.ts

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */


/** @hidden */
let StreamProcessingSettingsComponent = class StreamProcessingSettingsComponent {
    constructor() {
        this.inputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Input is sent as you type'),
            },
            {
                key: 'local-echo',
                name: marker('Local echo'),
                description: marker('Immediately echoes your input locally'),
            },
            {
                key: 'readline',
                name: marker('Line by line'),
                description: marker('Line editor, input is sent after you press Enter'),
            },
            {
                key: 'readline-hex',
                name: marker('Hexadecimal'),
                description: marker('Send bytes by typing in hex values'),
            },
        ];
        this.outputModes = [
            {
                key: null,
                name: marker('Normal'),
                description: marker('Output is shown as it is received'),
            },
            {
                key: 'hex',
                name: marker('Hexadecimal'),
                description: marker('Output is shown as a hexdump'),
            },
        ];
        this.newlineModes = [
            { key: null, name: marker('Keep') },
            { key: 'strip', name: marker('Strip') },
            { key: 'cr', name: marker('Force CR') },
            { key: 'lf', name: marker('Force LF') },
            { key: 'crlf', name: marker('Force CRLF') },
        ];
    }
    getInputModeName(key) {
        var _a;
        return (_a = this.inputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
    getOutputModeName(key) {
        var _a;
        return (_a = this.outputModes.find(x => x.key === key)) === null || _a === void 0 ? void 0 : _a.name;
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], StreamProcessingSettingsComponent.prototype, "options", void 0);
StreamProcessingSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'stream-processing-settings',
        template: __webpack_require__(/*! ./streamProcessingSettings.component.pug */ 650),
    })
], StreamProcessingSettingsComponent);


;// CONCATENATED MODULE: ./src/components/loginScriptsSettings.component.ts

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */


/** @hidden */
let LoginScriptsSettingsComponent = class LoginScriptsSettingsComponent {
    constructor(platform, translate) {
        this.platform = platform;
        this.translate = translate;
    }
    ngOnInit() {
        var _a;
        this.scripts = (_a = this.options.scripts) !== null && _a !== void 0 ? _a : [];
    }
    deleteScript(script) {
        return __awaiter(this, void 0, void 0, function* () {
            if ((yield this.platform.showMessageBox({
                type: 'warning',
                message: this.translate.instant('Delete this script?'),
                detail: script.expect,
                buttons: [
                    this.translate.instant('Delete'),
                    this.translate.instant('Keep'),
                ],
                defaultId: 0,
                cancelId: 1,
            })).response === 0) {
                this.scripts = this.scripts.filter(x => x !== script);
            }
        });
    }
    addScript() {
        this.scripts.push({ expect: '', send: '' });
    }
    save() {
        this.options.scripts = this.scripts;
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], LoginScriptsSettingsComponent.prototype, "options", void 0);
LoginScriptsSettingsComponent = __decorate([
    (0,core_.Component)({
        selector: 'login-scripts-settings',
        template: __webpack_require__(/*! ./loginScriptsSettings.component.pug */ 9848),
    }),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService,
        external_tabby_core_.TranslateService])
], LoginScriptsSettingsComponent);


// EXTERNAL MODULE: ./node_modules/cli-spinner/index.js
var cli_spinner = __webpack_require__(255);
// EXTERNAL MODULE: ./node_modules/ansi-colors/index.js
var ansi_colors = __webpack_require__(1884);
var ansi_colors_default = /*#__PURE__*/__webpack_require__.n(ansi_colors);
// EXTERNAL MODULE: ./node_modules/xterm/lib/xterm.js
var xterm = __webpack_require__(8152);
// EXTERNAL MODULE: ./node_modules/xterm-addon-fit/lib/xterm-addon-fit.js
var xterm_addon_fit = __webpack_require__(447);
// EXTERNAL MODULE: ./node_modules/xterm-addon-ligatures/lib/xterm-addon-ligatures.js
var xterm_addon_ligatures = __webpack_require__(6181);
// EXTERNAL MODULE: ./node_modules/xterm-addon-search/lib/xterm-addon-search.js
var xterm_addon_search = __webpack_require__(9570);
// EXTERNAL MODULE: ./node_modules/xterm-addon-webgl/lib/xterm-addon-webgl.js
var xterm_addon_webgl = __webpack_require__(7270);
// EXTERNAL MODULE: ./node_modules/xterm-addon-unicode11/lib/xterm-addon-unicode11.js
var xterm_addon_unicode11 = __webpack_require__(1940);
// EXTERNAL MODULE: ./node_modules/xterm-addon-serialize/lib/xterm-addon-serialize.js
var xterm_addon_serialize = __webpack_require__(5548);
// EXTERNAL MODULE: ./node_modules/xterm-addon-image/lib/xterm-addon-image.js
var xterm_addon_image = __webpack_require__(5643);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js
var injectStylesIntoStyleTag = __webpack_require__(9806);
var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleDomAPI.js
var styleDomAPI = __webpack_require__(3005);
var styleDomAPI_default = /*#__PURE__*/__webpack_require__.n(styleDomAPI);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertBySelector.js
var insertBySelector = __webpack_require__(8215);
var insertBySelector_default = /*#__PURE__*/__webpack_require__.n(insertBySelector);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js
var setAttributesWithoutAttributes = __webpack_require__(8291);
var setAttributesWithoutAttributes_default = /*#__PURE__*/__webpack_require__.n(setAttributesWithoutAttributes);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/insertStyleElement.js
var insertStyleElement = __webpack_require__(5603);
var insertStyleElement_default = /*#__PURE__*/__webpack_require__.n(insertStyleElement);
// EXTERNAL MODULE: ../node_modules/style-loader/dist/runtime/styleTagTransform.js
var styleTagTransform = __webpack_require__(8592);
var styleTagTransform_default = /*#__PURE__*/__webpack_require__.n(styleTagTransform);
// EXTERNAL MODULE: ../node_modules/css-loader/dist/cjs.js!./src/frontends/xterm.css
var frontends_xterm = __webpack_require__(1637);
;// CONCATENATED MODULE: ./src/frontends/xterm.css

      
      
      
      
      
      
      
      
      

var options = {};

options.styleTagTransform = (styleTagTransform_default());
options.setAttributes = (setAttributesWithoutAttributes_default());

      options.insert = insertBySelector_default().bind(null, "head");
    
options.domAPI = (styleDomAPI_default());
options.insertStyleElement = (insertStyleElement_default());

var update = injectStylesIntoStyleTag_default()(frontends_xterm/* default */.Z, options);




       /* harmony default export */ const src_frontends_xterm = (frontends_xterm/* default */.Z && frontends_xterm/* default.locals */.Z.locals ? frontends_xterm/* default.locals */.Z.locals : undefined);

;// CONCATENATED MODULE: ./node_modules/xterm/src/common/buffer/AttributeData.ts
/**
 * Copyright (c) 2018 The xterm.js authors. All rights reserved.
 * @license MIT
 */
class AttributeData {
    constructor() {
        // data
        this.fg = 0;
        this.bg = 0;
        this.extended = new ExtendedAttrs();
    }
    static toColorRGB(value) {
        return [
            value >>> 16 /* RED_SHIFT */ & 255,
            value >>> 8 /* GREEN_SHIFT */ & 255,
            value & 255
        ];
    }
    static fromColorRGB(value) {
        return (value[0] & 255) << 16 /* RED_SHIFT */ | (value[1] & 255) << 8 /* GREEN_SHIFT */ | value[2] & 255;
    }
    clone() {
        const newObj = new AttributeData();
        newObj.fg = this.fg;
        newObj.bg = this.bg;
        newObj.extended = this.extended.clone();
        return newObj;
    }
    // flags
    isInverse() { return this.fg & 67108864 /* INVERSE */; }
    isBold() { return this.fg & 134217728 /* BOLD */; }
    isUnderline() { return this.fg & 268435456 /* UNDERLINE */; }
    isBlink() { return this.fg & 536870912 /* BLINK */; }
    isInvisible() { return this.fg & 1073741824 /* INVISIBLE */; }
    isItalic() { return this.bg & 67108864 /* ITALIC */; }
    isDim() { return this.bg & 134217728 /* DIM */; }
    isStrikethrough() { return this.fg & 2147483648 /* STRIKETHROUGH */; }
    // color modes
    getFgColorMode() { return this.fg & 50331648 /* CM_MASK */; }
    getBgColorMode() { return this.bg & 50331648 /* CM_MASK */; }
    isFgRGB() { return (this.fg & 50331648 /* CM_MASK */) === 50331648 /* CM_RGB */; }
    isBgRGB() { return (this.bg & 50331648 /* CM_MASK */) === 50331648 /* CM_RGB */; }
    isFgPalette() { return (this.fg & 50331648 /* CM_MASK */) === 16777216 /* CM_P16 */ || (this.fg & 50331648 /* CM_MASK */) === 33554432 /* CM_P256 */; }
    isBgPalette() { return (this.bg & 50331648 /* CM_MASK */) === 16777216 /* CM_P16 */ || (this.bg & 50331648 /* CM_MASK */) === 33554432 /* CM_P256 */; }
    isFgDefault() { return (this.fg & 50331648 /* CM_MASK */) === 0; }
    isBgDefault() { return (this.bg & 50331648 /* CM_MASK */) === 0; }
    isAttributeDefault() { return this.fg === 0 && this.bg === 0; }
    // colors
    getFgColor() {
        switch (this.fg & 50331648 /* CM_MASK */) {
            case 16777216 /* CM_P16 */:
            case 33554432 /* CM_P256 */: return this.fg & 255 /* PCOLOR_MASK */;
            case 50331648 /* CM_RGB */: return this.fg & 16777215 /* RGB_MASK */;
            default: return -1; // CM_DEFAULT defaults to -1
        }
    }
    getBgColor() {
        switch (this.bg & 50331648 /* CM_MASK */) {
            case 16777216 /* CM_P16 */:
            case 33554432 /* CM_P256 */: return this.bg & 255 /* PCOLOR_MASK */;
            case 50331648 /* CM_RGB */: return this.bg & 16777215 /* RGB_MASK */;
            default: return -1; // CM_DEFAULT defaults to -1
        }
    }
    // extended attrs
    hasExtendedAttrs() {
        return this.bg & 268435456 /* HAS_EXTENDED */;
    }
    updateExtended() {
        if (this.extended.isEmpty()) {
            this.bg &= ~268435456 /* HAS_EXTENDED */;
        }
        else {
            this.bg |= 268435456 /* HAS_EXTENDED */;
        }
    }
    getUnderlineColor() {
        if ((this.bg & 268435456 /* HAS_EXTENDED */) && ~this.extended.underlineColor) {
            switch (this.extended.underlineColor & 50331648 /* CM_MASK */) {
                case 16777216 /* CM_P16 */:
                case 33554432 /* CM_P256 */: return this.extended.underlineColor & 255 /* PCOLOR_MASK */;
                case 50331648 /* CM_RGB */: return this.extended.underlineColor & 16777215 /* RGB_MASK */;
                default: return this.getFgColor();
            }
        }
        return this.getFgColor();
    }
    getUnderlineColorMode() {
        return (this.bg & 268435456 /* HAS_EXTENDED */) && ~this.extended.underlineColor
            ? this.extended.underlineColor & 50331648 /* CM_MASK */
            : this.getFgColorMode();
    }
    isUnderlineColorRGB() {
        return (this.bg & 268435456 /* HAS_EXTENDED */) && ~this.extended.underlineColor
            ? (this.extended.underlineColor & 50331648 /* CM_MASK */) === 50331648 /* CM_RGB */
            : this.isFgRGB();
    }
    isUnderlineColorPalette() {
        return (this.bg & 268435456 /* HAS_EXTENDED */) && ~this.extended.underlineColor
            ? (this.extended.underlineColor & 50331648 /* CM_MASK */) === 16777216 /* CM_P16 */
                || (this.extended.underlineColor & 50331648 /* CM_MASK */) === 33554432 /* CM_P256 */
            : this.isFgPalette();
    }
    isUnderlineColorDefault() {
        return (this.bg & 268435456 /* HAS_EXTENDED */) && ~this.extended.underlineColor
            ? (this.extended.underlineColor & 50331648 /* CM_MASK */) === 0
            : this.isFgDefault();
    }
    getUnderlineStyle() {
        return this.fg & 268435456 /* UNDERLINE */
            ? (this.bg & 268435456 /* HAS_EXTENDED */ ? this.extended.underlineStyle : 1 /* SINGLE */)
            : 0 /* NONE */;
    }
}
/**
 * Extended attributes for a cell.
 * Holds information about different underline styles and color.
 */
class ExtendedAttrs {
    constructor(
    // underline style, NONE is empty
    underlineStyle = 0 /* NONE */, 
    // underline color, -1 is empty (same as FG)
    underlineColor = -1) {
        this.underlineStyle = underlineStyle;
        this.underlineColor = underlineColor;
    }
    clone() {
        return new ExtendedAttrs(this.underlineStyle, this.underlineColor);
    }
    /**
     * Convenient method to indicate whether the object holds no additional information,
     * that needs to be persistant in the buffer.
     */
    isEmpty() {
        return this.underlineStyle === 0 /* NONE */;
    }
}

;// CONCATENATED MODULE: ./node_modules/xterm/src/common/input/TextDecoder.ts
/**
 * Copyright (c) 2019 The xterm.js authors. All rights reserved.
 * @license MIT
 */
/**
 * Polyfill - Convert UTF32 codepoint into JS string.
 * Note: The built-in String.fromCodePoint happens to be much slower
 *       due to additional sanity checks. We can avoid them since
 *       we always operate on legal UTF32 (granted by the input decoders)
 *       and use this faster version instead.
 */
function stringFromCodePoint(codePoint) {
    if (codePoint > 0xFFFF) {
        codePoint -= 0x10000;
        return String.fromCharCode((codePoint >> 10) + 0xD800) + String.fromCharCode((codePoint % 0x400) + 0xDC00);
    }
    return String.fromCharCode(codePoint);
}
/**
 * Convert UTF32 char codes into JS string.
 * Basically the same as `stringFromCodePoint` but for multiple codepoints
 * in a loop (which is a lot faster).
 */
function utf32ToString(data, start = 0, end = data.length) {
    let result = '';
    for (let i = start; i < end; ++i) {
        let codepoint = data[i];
        if (codepoint > 0xFFFF) {
            // JS strings are encoded as UTF16, thus a non BMP codepoint gets converted into a surrogate pair
            // conversion rules:
            //  - subtract 0x10000 from code point, leaving a 20 bit number
            //  - add high 10 bits to 0xD800  --> first surrogate
            //  - add low 10 bits to 0xDC00   --> second surrogate
            codepoint -= 0x10000;
            result += String.fromCharCode((codepoint >> 10) + 0xD800) + String.fromCharCode((codepoint % 0x400) + 0xDC00);
        }
        else {
            result += String.fromCharCode(codepoint);
        }
    }
    return result;
}
/**
 * StringToUtf32 - decodes UTF16 sequences into UTF32 codepoints.
 * To keep the decoder in line with JS strings it handles single surrogates as UCS2.
 */
class StringToUtf32 {
    constructor() {
        this._interim = 0;
    }
    /**
     * Clears interim and resets decoder to clean state.
     */
    clear() {
        this._interim = 0;
    }
    /**
     * Decode JS string to UTF32 codepoints.
     * The methods assumes stream input and will store partly transmitted
     * surrogate pairs and decode them with the next data chunk.
     * Note: The method does no bound checks for target, therefore make sure
     * the provided input data does not exceed the size of `target`.
     * Returns the number of written codepoints in `target`.
     */
    decode(input, target) {
        const length = input.length;
        if (!length) {
            return 0;
        }
        let size = 0;
        let startPos = 0;
        // handle leftover surrogate high
        if (this._interim) {
            const second = input.charCodeAt(startPos++);
            if (0xDC00 <= second && second <= 0xDFFF) {
                target[size++] = (this._interim - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
            }
            else {
                // illegal codepoint (USC2 handling)
                target[size++] = this._interim;
                target[size++] = second;
            }
            this._interim = 0;
        }
        for (let i = startPos; i < length; ++i) {
            const code = input.charCodeAt(i);
            // surrogate pair first
            if (0xD800 <= code && code <= 0xDBFF) {
                if (++i >= length) {
                    this._interim = code;
                    return size;
                }
                const second = input.charCodeAt(i);
                if (0xDC00 <= second && second <= 0xDFFF) {
                    target[size++] = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
                }
                else {
                    // illegal codepoint (USC2 handling)
                    target[size++] = code;
                    target[size++] = second;
                }
                continue;
            }
            if (code === 0xFEFF) {
                // BOM
                continue;
            }
            target[size++] = code;
        }
        return size;
    }
}
/**
 * Utf8Decoder - decodes UTF8 byte sequences into UTF32 codepoints.
 */
class Utf8ToUtf32 {
    constructor() {
        this.interim = new Uint8Array(3);
    }
    /**
     * Clears interim bytes and resets decoder to clean state.
     */
    clear() {
        this.interim.fill(0);
    }
    /**
     * Decodes UTF8 byte sequences in `input` to UTF32 codepoints in `target`.
     * The methods assumes stream input and will store partly transmitted bytes
     * and decode them with the next data chunk.
     * Note: The method does no bound checks for target, therefore make sure
     * the provided data chunk does not exceed the size of `target`.
     * Returns the number of written codepoints in `target`.
     */
    decode(input, target) {
        const length = input.length;
        if (!length) {
            return 0;
        }
        let size = 0;
        let byte1;
        let byte2;
        let byte3;
        let byte4;
        let codepoint = 0;
        let startPos = 0;
        // handle leftover bytes
        if (this.interim[0]) {
            let discardInterim = false;
            let cp = this.interim[0];
            cp &= ((((cp & 0xE0) === 0xC0)) ? 0x1F : (((cp & 0xF0) === 0xE0)) ? 0x0F : 0x07);
            let pos = 0;
            let tmp;
            while ((tmp = this.interim[++pos] & 0x3F) && pos < 4) {
                cp <<= 6;
                cp |= tmp;
            }
            // missing bytes - read ahead from input
            const type = (((this.interim[0] & 0xE0) === 0xC0)) ? 2 : (((this.interim[0] & 0xF0) === 0xE0)) ? 3 : 4;
            const missing = type - pos;
            while (startPos < missing) {
                if (startPos >= length) {
                    return 0;
                }
                tmp = input[startPos++];
                if ((tmp & 0xC0) !== 0x80) {
                    // wrong continuation, discard interim bytes completely
                    startPos--;
                    discardInterim = true;
                    break;
                }
                else {
                    // need to save so we can continue short inputs in next call
                    this.interim[pos++] = tmp;
                    cp <<= 6;
                    cp |= tmp & 0x3F;
                }
            }
            if (!discardInterim) {
                // final test is type dependent
                if (type === 2) {
                    if (cp < 0x80) {
                        // wrong starter byte
                        startPos--;
                    }
                    else {
                        target[size++] = cp;
                    }
                }
                else if (type === 3) {
                    if (cp < 0x0800 || (cp >= 0xD800 && cp <= 0xDFFF) || cp === 0xFEFF) {
                        // illegal codepoint or BOM
                    }
                    else {
                        target[size++] = cp;
                    }
                }
                else {
                    if (cp < 0x010000 || cp > 0x10FFFF) {
                        // illegal codepoint
                    }
                    else {
                        target[size++] = cp;
                    }
                }
            }
            this.interim.fill(0);
        }
        // loop through input
        const fourStop = length - 4;
        let i = startPos;
        while (i < length) {
            /**
             * ASCII shortcut with loop unrolled to 4 consecutive ASCII chars.
             * This is a compromise between speed gain for ASCII
             * and penalty for non ASCII:
             * For best ASCII performance the char should be stored directly into target,
             * but even a single attempt to write to target and compare afterwards
             * penalizes non ASCII really bad (-50%), thus we load the char into byteX first,
             * which reduces ASCII performance by ~15%.
             * This trial for ASCII reduces non ASCII performance by ~10% which seems acceptible
             * compared to the gains.
             * Note that this optimization only takes place for 4 consecutive ASCII chars,
             * for any shorter it bails out. Worst case - all 4 bytes being read but
             * thrown away due to the last being a non ASCII char (-10% performance).
             */
            while (i < fourStop
                && !((byte1 = input[i]) & 0x80)
                && !((byte2 = input[i + 1]) & 0x80)
                && !((byte3 = input[i + 2]) & 0x80)
                && !((byte4 = input[i + 3]) & 0x80)) {
                target[size++] = byte1;
                target[size++] = byte2;
                target[size++] = byte3;
                target[size++] = byte4;
                i += 4;
            }
            // reread byte1
            byte1 = input[i++];
            // 1 byte
            if (byte1 < 0x80) {
                target[size++] = byte1;
                // 2 bytes
            }
            else if ((byte1 & 0xE0) === 0xC0) {
                if (i >= length) {
                    this.interim[0] = byte1;
                    return size;
                }
                byte2 = input[i++];
                if ((byte2 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                codepoint = (byte1 & 0x1F) << 6 | (byte2 & 0x3F);
                if (codepoint < 0x80) {
                    // wrong starter byte
                    i--;
                    continue;
                }
                target[size++] = codepoint;
                // 3 bytes
            }
            else if ((byte1 & 0xF0) === 0xE0) {
                if (i >= length) {
                    this.interim[0] = byte1;
                    return size;
                }
                byte2 = input[i++];
                if ((byte2 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                if (i >= length) {
                    this.interim[0] = byte1;
                    this.interim[1] = byte2;
                    return size;
                }
                byte3 = input[i++];
                if ((byte3 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                codepoint = (byte1 & 0x0F) << 12 | (byte2 & 0x3F) << 6 | (byte3 & 0x3F);
                if (codepoint < 0x0800 || (codepoint >= 0xD800 && codepoint <= 0xDFFF) || codepoint === 0xFEFF) {
                    // illegal codepoint or BOM, no i-- here
                    continue;
                }
                target[size++] = codepoint;
                // 4 bytes
            }
            else if ((byte1 & 0xF8) === 0xF0) {
                if (i >= length) {
                    this.interim[0] = byte1;
                    return size;
                }
                byte2 = input[i++];
                if ((byte2 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                if (i >= length) {
                    this.interim[0] = byte1;
                    this.interim[1] = byte2;
                    return size;
                }
                byte3 = input[i++];
                if ((byte3 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                if (i >= length) {
                    this.interim[0] = byte1;
                    this.interim[1] = byte2;
                    this.interim[2] = byte3;
                    return size;
                }
                byte4 = input[i++];
                if ((byte4 & 0xC0) !== 0x80) {
                    // wrong continuation
                    i--;
                    continue;
                }
                codepoint = (byte1 & 0x07) << 18 | (byte2 & 0x3F) << 12 | (byte3 & 0x3F) << 6 | (byte4 & 0x3F);
                if (codepoint < 0x010000 || codepoint > 0x10FFFF) {
                    // illegal codepoint, no i-- here
                    continue;
                }
                target[size++] = codepoint;
            }
            else {
                // illegal byte, just skip
            }
        }
        return size;
    }
}

;// CONCATENATED MODULE: ./node_modules/xterm/src/common/buffer/Constants.ts
/**
 * Copyright (c) 2019 The xterm.js authors. All rights reserved.
 * @license MIT
 */
const DEFAULT_COLOR = 256;
const DEFAULT_ATTR = (0 << 18) | (DEFAULT_COLOR << 9) | (256 << 0);
const CHAR_DATA_ATTR_INDEX = 0;
const CHAR_DATA_CHAR_INDEX = 1;
const CHAR_DATA_WIDTH_INDEX = 2;
const CHAR_DATA_CODE_INDEX = 3;
/**
 * Null cell - a real empty cell (containing nothing).
 * Note that code should always be 0 for a null cell as
 * several test condition of the buffer line rely on this.
 */
const NULL_CELL_CHAR = '';
const NULL_CELL_WIDTH = 1;
const NULL_CELL_CODE = 0;
/**
 * Whitespace cell.
 * This is meant as a replacement for empty cells when needed
 * during rendering lines to preserve correct aligment.
 */
const WHITESPACE_CELL_CHAR = ' ';
const WHITESPACE_CELL_WIDTH = 1;
const WHITESPACE_CELL_CODE = 32;

;// CONCATENATED MODULE: ./node_modules/xterm/src/common/buffer/CellData.ts
/**
 * Copyright (c) 2018 The xterm.js authors. All rights reserved.
 * @license MIT
 */



/**
 * CellData - represents a single Cell in the terminal buffer.
 */
class CellData extends AttributeData {
    constructor() {
        super(...arguments);
        /** Primitives from terminal buffer. */
        this.content = 0;
        this.fg = 0;
        this.bg = 0;
        this.extended = new ExtendedAttrs();
        this.combinedData = '';
    }
    /** Helper to create CellData from CharData. */
    static fromCharData(value) {
        const obj = new CellData();
        obj.setFromCharData(value);
        return obj;
    }
    /** Whether cell contains a combined string. */
    isCombined() {
        return this.content & 2097152 /* IS_COMBINED_MASK */;
    }
    /** Width of the cell. */
    getWidth() {
        return this.content >> 22 /* WIDTH_SHIFT */;
    }
    /** JS string of the content. */
    getChars() {
        if (this.content & 2097152 /* IS_COMBINED_MASK */) {
            return this.combinedData;
        }
        if (this.content & 2097151 /* CODEPOINT_MASK */) {
            return stringFromCodePoint(this.content & 2097151 /* CODEPOINT_MASK */);
        }
        return '';
    }
    /**
     * Codepoint of cell
     * Note this returns the UTF32 codepoint of single chars,
     * if content is a combined string it returns the codepoint
     * of the last char in string to be in line with code in CharData.
     * */
    getCode() {
        return (this.isCombined())
            ? this.combinedData.charCodeAt(this.combinedData.length - 1)
            : this.content & 2097151 /* CODEPOINT_MASK */;
    }
    /** Set data from CharData */
    setFromCharData(value) {
        this.fg = value[CHAR_DATA_ATTR_INDEX];
        this.bg = 0;
        let combined = false;
        // surrogates and combined strings need special treatment
        if (value[CHAR_DATA_CHAR_INDEX].length > 2) {
            combined = true;
        }
        else if (value[CHAR_DATA_CHAR_INDEX].length === 2) {
            const code = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0);
            // if the 2-char string is a surrogate create single codepoint
            // everything else is combined
            if (0xD800 <= code && code <= 0xDBFF) {
                const second = value[CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                if (0xDC00 <= second && second <= 0xDFFF) {
                    this.content = ((code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000) | (value[CHAR_DATA_WIDTH_INDEX] << 22 /* WIDTH_SHIFT */);
                }
                else {
                    combined = true;
                }
            }
            else {
                combined = true;
            }
        }
        else {
            this.content = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0) | (value[CHAR_DATA_WIDTH_INDEX] << 22 /* WIDTH_SHIFT */);
        }
        if (combined) {
            this.combinedData = value[CHAR_DATA_CHAR_INDEX];
            this.content = 2097152 /* IS_COMBINED_MASK */ | (value[CHAR_DATA_WIDTH_INDEX] << 22 /* WIDTH_SHIFT */);
        }
    }
    /** Get data as CharData. */
    getAsCharData() {
        return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
    }
}

;// CONCATENATED MODULE: ./src/frontends/xtermFrontend.ts
















const COLOR_NAMES = [
    'black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white',
    'brightBlack', 'brightRed', 'brightGreen', 'brightYellow', 'brightBlue', 'brightMagenta', 'brightCyan', 'brightWhite',
];
class FlowControl {
    constructor(xterm) {
        this.xterm = xterm;
        this.blocked = false;
        this.blocked$ = new external_rxjs_.BehaviorSubject(false);
        this.pendingCallbacks = 0;
        this.lowWatermark = 5;
        this.highWatermark = 10;
        this.bytesWritten = 0;
        this.bytesThreshold = 1024 * 128;
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.blocked) {
                yield (0,external_rxjs_.firstValueFrom)(this.blocked$.pipe((0,external_rxjs_.filter)(x => !x)));
            }
            this.bytesWritten += data.length;
            if (this.bytesWritten > this.bytesThreshold) {
                this.pendingCallbacks++;
                this.bytesWritten = 0;
                if (!this.blocked && this.pendingCallbacks > this.highWatermark) {
                    this.blocked = true;
                    this.blocked$.next(true);
                }
                this.xterm.write(data, () => {
                    this.pendingCallbacks--;
                    if (this.blocked && this.pendingCallbacks < this.lowWatermark) {
                        this.blocked = false;
                        this.blocked$.next(false);
                    }
                });
            }
            else {
                this.xterm.write(data);
            }
        });
    }
}
/** @hidden */
class XTermFrontend extends Frontend {
    constructor(injector) {
        super(injector);
        this.enableResizing = true;
        this.enableWebGL = false;
        this.configuredFontSize = 0;
        this.configuredLinePadding = 0;
        this.zoom = 0;
        this.configuredTheme = {};
        this.copyOnSelect = false;
        this.search = new xterm_addon_search.SearchAddon();
        this.searchState = { resultCount: 0 };
        this.fitAddon = new xterm_addon_fit.FitAddon();
        this.serializeAddon = new xterm_addon_serialize.SerializeAddon();
        this.opened = false;
        this.configService = injector.get(external_tabby_core_.ConfigService);
        this.hotkeysService = injector.get(external_tabby_core_.HotkeysService);
        this.platformService = injector.get(external_tabby_core_.PlatformService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.xterm = new xterm.Terminal({
            allowTransparency: true,
            overviewRulerWidth: 8,
            windowsMode: process.platform === 'win32',
        });
        this.flowControl = new FlowControl(this.xterm);
        this.xtermCore = this.xterm['_core'];
        this.xterm.onBinary(data => {
            this.input.next(Buffer.from(data, 'binary'));
        });
        this.xterm.onData(data => {
            this.input.next(Buffer.from(data, 'utf-8'));
        });
        this.xterm.onResize(({ cols, rows }) => {
            this.resize.next({ rows, columns: cols });
        });
        this.xterm.onTitleChange(title => {
            this.title.next(title);
        });
        this.xterm.onSelectionChange(() => {
            if (this.copyOnSelect && this.getSelection()) {
                this.copySelection();
            }
        });
        this.xterm.onBell(() => {
            this.bell.next();
        });
        this.xterm.loadAddon(this.fitAddon);
        this.xterm.loadAddon(this.serializeAddon);
        this.xterm.loadAddon(new xterm_addon_unicode11.Unicode11Addon());
        this.xterm.unicode.activeVersion = '11';
        if (this.configService.store.terminal.sixel) {
            this.xterm.loadAddon(new xterm_addon_image.ImageAddon(URL.createObjectURL(new Blob([__webpack_require__(/*! xterm-addon-image/lib/xterm-addon-image-worker.js */ 1612)], { type: 'application/javascript' }))));
        }
        const keyboardEventHandler = (name, event) => {
            if (this.isAlternateScreenActive()) {
                let modifiers = 0;
                modifiers += event.ctrlKey ? 1 : 0;
                modifiers += event.altKey ? 1 : 0;
                modifiers += event.shiftKey ? 1 : 0;
                modifiers += event.metaKey ? 1 : 0;
                if (event.key.startsWith('Arrow') && modifiers === 1) {
                    return true;
                }
            }
            // Ctrl-/
            if (event.type === 'keydown' && event.key === '/' && event.ctrlKey) {
                this.input.next(Buffer.from('\u001f', 'binary'));
                return false;
            }
            // Ctrl-@
            if (event.type === 'keydown' && event.key === '@' && event.ctrlKey) {
                this.input.next(Buffer.from('\u0000', 'binary'));
                return false;
            }
            this.hotkeysService.pushKeyEvent(name, event);
            let ret = true;
            if (this.hotkeysService.matchActiveHotkey(true) !== null) {
                event.stopPropagation();
                event.preventDefault();
                ret = false;
            }
            return ret;
        };
        this.xterm.attachCustomKeyEventHandler((event) => {
            if (this.hostApp.platform !== external_tabby_core_.Platform.Web) {
                if (event.getModifierState('Meta') && event.key.toLowerCase() === 'v' ||
                    event.key === 'Insert' && event.shiftKey) {
                    event.preventDefault();
                    return false;
                }
            }
            if (event.getModifierState('Meta') && event.key.startsWith('Arrow')) {
                return false;
            }
            return keyboardEventHandler('keydown', event);
        });
        this.xtermCore._scrollToBottom = this.xtermCore.scrollToBottom.bind(this.xtermCore);
        this.xtermCore.scrollToBottom = () => null;
        this.resizeHandler = () => {
            try {
                if (this.xterm.element && getComputedStyle(this.xterm.element).getPropertyValue('height') !== 'auto') {
                    this.fitAddon.fit();
                    this.xtermCore.viewport._refresh();
                }
            }
            catch (e) {
                // tends to throw when element wasn't shown yet
                console.warn('Could not resize xterm', e);
            }
        };
        const oldKeyUp = this.xtermCore._keyUp.bind(this.xtermCore);
        this.xtermCore._keyUp = (e) => {
            this.xtermCore.updateCursorStyle(e);
            if (keyboardEventHandler('keyup', e)) {
                oldKeyUp(e);
            }
        };
        this.xterm.buffer.onBufferChange(() => {
            const altBufferActive = this.xterm.buffer.active.type === 'alternate';
            this.alternateScreenActive.next(altBufferActive);
        });
    }
    attach(host) {
        return __awaiter(this, void 0, void 0, function* () {
            this.configure();
            this.element = host;
            this.xterm.open(host);
            this.opened = true;
            // Work around font loading bugs
            yield new Promise(resolve => setTimeout(resolve, this.hostApp.platform === external_tabby_core_.Platform.Web ? 1000 : 0));
            if (this.enableWebGL) {
                this.webGLAddon = new xterm_addon_webgl.WebglAddon();
                this.xterm.loadAddon(this.webGLAddon);
                this.platformService.displayMetricsChanged$.pipe((0,external_rxjs_.takeUntil)(this.destroyed$)).subscribe(() => {
                    var _a;
                    (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.clearTextureAtlas();
                });
            }
            this.ready.next();
            this.ready.complete();
            this.xterm.loadAddon(this.search);
            this.search.onDidChangeResults(state => {
                this.searchState = state !== null && state !== void 0 ? state : { resultCount: 0 };
            });
            window.addEventListener('resize', this.resizeHandler);
            this.resizeHandler();
            host.addEventListener('dragOver', (event) => this.dragOver.next(event));
            host.addEventListener('drop', event => this.drop.next(event));
            host.addEventListener('mousedown', event => this.mouseEvent.next(event));
            host.addEventListener('mouseup', event => this.mouseEvent.next(event));
            host.addEventListener('mousewheel', event => this.mouseEvent.next(event));
            host.addEventListener('contextmenu', event => {
                event.preventDefault();
                event.stopPropagation();
            });
            this.resizeObserver = new window['ResizeObserver'](() => setTimeout(() => this.resizeHandler()));
            this.resizeObserver.observe(host);
        });
    }
    detach(_host) {
        var _a;
        window.removeEventListener('resize', this.resizeHandler);
        (_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
        delete this.resizeObserver;
    }
    destroy() {
        var _a;
        super.destroy();
        (_a = this.webGLAddon) === null || _a === void 0 ? void 0 : _a.dispose();
        this.xterm.dispose();
    }
    getSelection() {
        return this.xterm.getSelection();
    }
    copySelection() {
        const text = this.getSelection();
        if (!text.trim().length) {
            return;
        }
        if (text.length < 1024 * 32 && this.configService.store.terminal.copyAsHTML) {
            this.platformService.setClipboard({
                text: this.getSelection(),
                html: this.getSelectionAsHTML(),
            });
        }
        else {
            this.platformService.setClipboard({
                text: this.getSelection(),
            });
        }
    }
    selectAll() {
        this.xterm.selectAll();
    }
    clearSelection() {
        this.xterm.clearSelection();
    }
    focus() {
        setTimeout(() => this.xterm.focus());
    }
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.flowControl.write(data);
        });
    }
    clear() {
        this.xterm.clear();
    }
    visualBell() {
        if (this.element) {
            this.element.style.animation = 'none';
            setTimeout(() => {
                this.element.style.animation = 'terminalShakeFrames 0.3s ease';
            });
        }
    }
    scrollToTop() {
        this.xterm.scrollToTop();
    }
    scrollPages(pages) {
        this.xterm.scrollPages(pages);
    }
    scrollToBottom() {
        this.xtermCore._scrollToBottom();
    }
    configure() {
        const config = this.configService.store;
        setImmediate(() => {
            if (this.xterm.cols && this.xterm.rows && this.xtermCore.charMeasure) {
                if (this.xtermCore.charMeasure) {
                    this.xtermCore.charMeasure.measure(this.xtermCore.options);
                }
                if (this.xtermCore.renderer) {
                    this.xtermCore.renderer._updateDimensions();
                }
                this.resizeHandler();
            }
        });
        this.xterm.options.fontFamily = (0,external_tabby_core_.getCSSFontFamily)(config);
        this.xterm.options.bellStyle = config.terminal.bell;
        this.xterm.options.cursorStyle = {
            beam: 'bar',
        }[config.terminal.cursor] || config.terminal.cursor;
        this.xterm.options.cursorBlink = config.terminal.cursorBlink;
        this.xterm.options.macOptionIsMeta = config.terminal.altIsMeta;
        this.xterm.options.scrollback = config.terminal.scrollbackLines;
        this.xterm.options.wordSeparator = config.terminal.wordSeparator;
        this.xterm.options.drawBoldTextInBrightColors = config.terminal.drawBoldTextInBrightColors;
        this.xterm.options.fontWeight = config.terminal.fontWeight;
        this.xterm.options.fontWeightBold = config.terminal.fontWeightBold;
        this.configuredFontSize = config.terminal.fontSize;
        this.configuredLinePadding = config.terminal.linePadding;
        this.setFontSize();
        this.copyOnSelect = config.terminal.copyOnSelect;
        const theme = {
            foreground: config.terminal.colorScheme.foreground,
            selection: config.terminal.colorScheme.selection || '#88888888',
            selectionForeground: config.terminal.colorScheme.selectionForeground || undefined,
            background: config.terminal.background === 'colorScheme' ? config.terminal.colorScheme.background : '#00000000',
            cursor: config.terminal.colorScheme.cursor,
            cursorAccent: config.terminal.colorScheme.cursorAccent,
        };
        for (let i = 0; i < COLOR_NAMES.length; i++) {
            theme[COLOR_NAMES[i]] = config.terminal.colorScheme.colors[i];
        }
        if (this.xtermCore._colorManager && !deep_equal_default()(this.configuredTheme, theme)) {
            this.xterm.options.theme = theme;
            this.configuredTheme = theme;
        }
        if (this.opened && config.terminal.ligatures && !this.ligaturesAddon && this.hostApp.platform !== external_tabby_core_.Platform.Web) {
            this.ligaturesAddon = new xterm_addon_ligatures.LigaturesAddon();
            this.xterm.loadAddon(this.ligaturesAddon);
        }
    }
    setZoom(zoom) {
        this.zoom = zoom;
        this.setFontSize();
    }
    getSearchOptions(searchOptions) {
        return Object.assign(Object.assign({}, searchOptions), { decorations: {
                matchOverviewRuler: '#cccc00',
                activeMatchColorOverviewRuler: '#ffff00',
                matchBorder: '#cc0',
                activeMatchBorder: '#ff0',
                activeMatchBackground: 'rgba(255, 255, 0, 0.125)',
            } });
    }
    wrapSearchResult(result) {
        if (!result) {
            return { resultCount: 0 };
        }
        return this.searchState;
    }
    findNext(term, searchOptions) {
        return this.wrapSearchResult(this.search.findNext(term, this.getSearchOptions(searchOptions)));
    }
    findPrevious(term, searchOptions) {
        return this.wrapSearchResult(this.search.findPrevious(term, this.getSearchOptions(searchOptions)));
    }
    cancelSearch() {
        this.search.clearDecorations();
    }
    saveState() {
        return this.serializeAddon.serialize({
            excludeAltBuffer: true,
            excludeModes: true,
            scrollback: 1000,
        });
    }
    restoreState(state) {
        this.xterm.write(state);
    }
    supportsBracketedPaste() {
        return this.xterm.modes.bracketedPasteMode;
    }
    isAlternateScreenActive() {
        return this.xterm.buffer.active.type === 'alternate';
    }
    setFontSize() {
        const scale = Math.pow(1.1, this.zoom);
        this.xterm.options.fontSize = this.configuredFontSize * scale;
        // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
        this.xterm.options.lineHeight = (this.configuredFontSize + this.configuredLinePadding * 2) / this.configuredFontSize * scale;
        this.resizeHandler();
    }
    getSelectionAsHTML() {
        let html = `<div style="font-family: '${this.configService.store.terminal.font}', monospace; white-space: pre">`;
        const selection = this.xterm.getSelectionPosition();
        if (!selection) {
            return '';
        }
        if (selection.startRow === selection.endRow) {
            html += this.getLineAsHTML(selection.startRow, selection.startColumn, selection.endColumn);
        }
        else {
            html += this.getLineAsHTML(selection.startRow, selection.startColumn, this.xterm.cols);
            for (let y = selection.startRow + 1; y < selection.endRow; y++) {
                html += this.getLineAsHTML(y, 0, this.xterm.cols);
            }
            html += this.getLineAsHTML(selection.endRow, 0, selection.endColumn);
        }
        html += '</div>';
        return html;
    }
    getHexColor(mode, color, def) {
        if (mode === 50331648 /* CM_RGB */) {
            const rgb = AttributeData.toColorRGB(color);
            return rgb.map(x => x.toString(16).padStart(2, '0')).join('');
        }
        if (mode === 16777216 /* CM_P16 */ || mode === 33554432 /* CM_P256 */) {
            return this.configService.store.terminal.colorScheme.colors[color];
        }
        return def;
    }
    getLineAsHTML(y, start, end) {
        let html = '<div>';
        let lastStyle = null;
        const outerLine = this.xterm.buffer.active.getLine(y);
        if (!outerLine) {
            return '';
        }
        const line = outerLine['_line'];
        const cell = new CellData();
        for (let i = start; i < end; i++) {
            line.loadCell(i, cell);
            const fg = this.getHexColor(cell.getFgColorMode(), cell.getFgColor(), this.configService.store.terminal.colorScheme.foreground);
            const bg = this.getHexColor(cell.getBgColorMode(), cell.getBgColor(), this.configService.store.terminal.colorScheme.background);
            const style = `color: ${fg}; background: ${bg}; font-weight: ${cell.isBold() ? 'bold' : 'normal'}; font-style: ${cell.isItalic() ? 'italic' : 'normal'}; text-decoration: ${cell.isUnderline() ? 'underline' : 'none'}`;
            if (style !== lastStyle) {
                if (lastStyle !== null) {
                    html += '</span>';
                }
                html += `<span style="${style}">`;
                lastStyle = style;
            }
            html += line.getString(i) || ' ';
        }
        html += '</span></div>';
        return html;
    }
}
/** @hidden */
class XTermWebGLFrontend extends XTermFrontend {
    constructor() {
        super(...arguments);
        this.enableWebGL = true;
    }
}

;// CONCATENATED MODULE: ./src/api/decorator.ts
/**
 * Extend to automatically run actions on new terminals
 */
class TerminalDecorator {
    constructor() {
        this.smartSubscriptions = new Map();
    }
    /**
     * Called when a new terminal tab starts
     */
    attach(terminal) { } // eslint-disable-line
    /**
     * Called before a terminal tab is destroyed.
     * Make sure to call super()
     */
    detach(terminal) {
        var _a;
        for (const s of (_a = this.smartSubscriptions.get(terminal)) !== null && _a !== void 0 ? _a : []) {
            s.unsubscribe();
        }
        this.smartSubscriptions.delete(terminal);
    }
    /**
     * Automatically cancel @subscription once detached from @terminal
     */
    subscribeUntilDetached(terminal, subscription) {
        var _a;
        if (!subscription) {
            return;
        }
        if (!this.smartSubscriptions.has(terminal)) {
            this.smartSubscriptions.set(terminal, []);
        }
        (_a = this.smartSubscriptions.get(terminal)) === null || _a === void 0 ? void 0 : _a.push(subscription);
    }
}

;// CONCATENATED MODULE: ./src/api/baseTerminalTab.component.ts










/**
 * A class to base your custom terminal tabs on
 */
class BaseTerminalTabComponent extends external_tabby_core_.BaseTabComponent {
    constructor(injector) {
        super();
        this.injector = injector;
        this.session = null;
        this.savedStateIsLive = false;
        this.zoom = 0;
        this.showSearchPanel = false;
        /** @hidden */
        this.backgroundColor = null;
        /** @hidden */
        this.enableToolbar = false;
        /** @hidden */
        this.pinToolbar = false;
        /** @hidden */
        this.revealToolbar = false;
        /** @hidden */
        this.frontendIsReady = false;
        this.frontendReady = new external_rxjs_.Subject();
        /**
         * Enables normall passthrough from session output to terminal input
         */
        this.enablePassthrough = true;
        /**
         * Disables display of dynamic window/tab title provided by the shell
         */
        this.disableDynamicTitle = false;
        this.alternateScreenActive = false;
        this.decorators = [];
        this.output = new external_rxjs_.Subject();
        this.sessionChanged = new external_rxjs_.Subject();
        this.termContainerSubscriptions = new external_tabby_core_.SubscriptionContainer();
        this.allFocusModeSubscription = null;
        this.sessionHandlers = new external_tabby_core_.SubscriptionContainer();
        this.spinner = new cli_spinner/* Spinner */.$({
            stream: {
                write: x => {
                    try {
                        this.writeRaw(x);
                    }
                    catch (_a) {
                        this.spinner.stop();
                    }
                },
            },
        });
        this.spinnerActive = false;
        this.spinnerPaused = false;
        this.toolbarRevealTimeout = new external_tabby_core_.ResettableTimeout(() => {
            this.revealToolbar = false;
        }, 1000);
        this.frontendWriteLock = Promise.resolve();
        this.rightMouseDownTime = 0;
        this.config = injector.get(external_tabby_core_.ConfigService);
        this.element = injector.get(core_.ElementRef);
        this.zone = injector.get(core_.NgZone);
        this.app = injector.get(external_tabby_core_.AppService);
        this.hostApp = injector.get(external_tabby_core_.HostAppService);
        this.hotkeys = injector.get(external_tabby_core_.HotkeysService);
        this.platform = injector.get(external_tabby_core_.PlatformService);
        this.notifications = injector.get(external_tabby_core_.NotificationsService);
        this.log = injector.get(external_tabby_core_.LogService);
        this.decorators = injector.get(TerminalDecorator, null, core_.InjectFlags.Optional);
        this.contextMenuProviders = injector.get(external_tabby_core_.TabContextMenuItemProvider, null, core_.InjectFlags.Optional);
        this.hostWindow = injector.get(external_tabby_core_.HostWindowService);
        this.translate = injector.get(external_tabby_core_.TranslateService);
        this.logger = this.log.create('baseTerminalTab');
        this.setTitle(this.translate.instant('Terminal'));
        this.subscribeUntilDestroyed(this.hotkeys.hotkey$, (hotkey) => __awaiter(this, void 0, void 0, function* () {
            var _a, _b, _c, _d, _e, _f, _g, _h;
            if (!this.hasFocus) {
                return;
            }
            switch (hotkey) {
                case 'ctrl-c':
                    if ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.getSelection()) {
                        this.frontend.copySelection();
                        this.frontend.clearSelection();
                        this.notifications.notice(this.translate.instant('Copied'));
                    }
                    else {
                        this.forEachFocusedTerminalPane(tab => tab.sendInput('\x03'));
                    }
                    break;
                case 'copy':
                    (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.copySelection();
                    (_c = this.frontend) === null || _c === void 0 ? void 0 : _c.clearSelection();
                    this.notifications.notice(this.translate.instant('Copied'));
                    break;
                case 'paste':
                    this.forEachFocusedTerminalPane(tab => tab.paste());
                    break;
                case 'select-all':
                    (_d = this.frontend) === null || _d === void 0 ? void 0 : _d.selectAll();
                    break;
                case 'clear':
                    this.forEachFocusedTerminalPane(tab => { var _a; return (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.clear(); });
                    break;
                case 'zoom-in':
                    this.forEachFocusedTerminalPane(tab => tab.zoomIn());
                    break;
                case 'zoom-out':
                    this.forEachFocusedTerminalPane(tab => tab.zoomOut());
                    break;
                case 'reset-zoom':
                    this.forEachFocusedTerminalPane(tab => tab.resetZoom());
                    break;
                case 'previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5D',
                            [external_tabby_core_.Platform.macOS]: '\x1bb',
                            [external_tabby_core_.Platform.Linux]: '\x1bb',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1b[1;5C',
                            [external_tabby_core_.Platform.macOS]: '\x1bf',
                            [external_tabby_core_.Platform.Linux]: '\x1bf',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'delete-line':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\x1bw');
                    });
                    break;
                case 'delete-previous-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput('\x1b\x7f');
                    });
                    break;
                case 'delete-next-word':
                    this.forEachFocusedTerminalPane(tab => {
                        tab.sendInput({
                            [external_tabby_core_.Platform.Windows]: '\x1bd\x1b[3;5~',
                            [external_tabby_core_.Platform.macOS]: '\x1bd',
                            [external_tabby_core_.Platform.Linux]: '\x1bd',
                        }[this.hostApp.platform]);
                    });
                    break;
                case 'search':
                    this.showSearchPanel = true;
                    setImmediate(() => {
                        const input = this.element.nativeElement.querySelector('.search-input');
                        input === null || input === void 0 ? void 0 : input.focus();
                        input === null || input === void 0 ? void 0 : input.select();
                    });
                    break;
                case 'pane-focus-all':
                    this.focusAllPanes();
                    break;
                case 'copy-current-path':
                    this.copyCurrentPath();
                    break;
                case 'scroll-to-top':
                    (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.scrollToTop();
                    break;
                case 'scroll-up':
                    (_f = this.frontend) === null || _f === void 0 ? void 0 : _f.scrollPages(-1);
                    break;
                case 'scroll-down':
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.scrollPages(1);
                    break;
                case 'scroll-to-bottom':
                    (_h = this.frontend) === null || _h === void 0 ? void 0 : _h.scrollToBottom();
                    break;
            }
        }));
        this.bellPlayer = document.createElement('audio');
        this.bellPlayer.src = (__webpack_require__(/*! ../bell.ogg */ 1425)["default"]);
        this.contextMenuProviders.sort((a, b) => a.weight - b.weight);
    }
    get input$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.input$;
    }
    get output$() { return this.output; }
    get resize$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.resize$;
    }
    get alternateScreenActive$() {
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        return this.frontend.alternateScreenActive$;
    }
    get frontendReady$() { return this.frontendReady; }
    get sessionChanged$() { return this.sessionChanged; }
    /** @hidden */
    ngOnInit() {
        var _a, _b;
        this.pinToolbar = this.enableToolbar && ((_a = window.localStorage.pinTerminalToolbar) !== null && _a !== void 0 ? _a : 'true') === 'true';
        this.focused$.subscribe(() => {
            var _a;
            this.configure();
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.focus();
        });
        const cls = (_b = {
            xterm: XTermFrontend,
            'xterm-webgl': XTermWebGLFrontend,
        }[this.config.store.terminal.frontend]) !== null && _b !== void 0 ? _b : XTermFrontend;
        this.frontend = new cls(this.injector);
        this.frontendReady$.pipe((0,external_rxjs_.first)()).subscribe(() => {
            this.onFrontendReady();
        });
        this.frontend.resize$.pipe((0,external_rxjs_.first)()).subscribe(({ columns, rows }) => __awaiter(this, void 0, void 0, function* () {
            var _c;
            this.size = { columns, rows };
            this.frontendReady.next();
            this.frontendReady.complete();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.attach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            setTimeout(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.resize(columns, rows);
            }, 1000);
            (_c = this.session) === null || _c === void 0 ? void 0 : _c.releaseInitialDataBuffer();
            this.sessionChanged$.subscribe(() => {
                var _a;
                (_a = this.session) === null || _a === void 0 ? void 0 : _a.releaseInitialDataBuffer();
            });
        }));
        this.alternateScreenActive$.subscribe(x => {
            this.alternateScreenActive = x;
        });
        setImmediate(() => __awaiter(this, void 0, void 0, function* () {
            var _d, _e;
            if (this.hasFocus) {
                yield ((_d = this.frontend) === null || _d === void 0 ? void 0 : _d.attach(this.content.nativeElement));
                (_e = this.frontend) === null || _e === void 0 ? void 0 : _e.configure();
            }
            else {
                this.focused$.pipe((0,external_rxjs_.first)()).subscribe(() => __awaiter(this, void 0, void 0, function* () {
                    var _f, _g;
                    yield ((_f = this.frontend) === null || _f === void 0 ? void 0 : _f.attach(this.content.nativeElement));
                    (_g = this.frontend) === null || _g === void 0 ? void 0 : _g.configure();
                }));
            }
        }));
        this.attachTermContainerHandlers();
        this.configure();
        setTimeout(() => {
            this.output.subscribe(() => {
                this.displayActivity();
            });
        }, 1000);
        this.frontend.bell$.subscribe(() => {
            var _a;
            if (this.config.store.terminal.bell === 'visual') {
                (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.visualBell();
            }
            if (this.config.store.terminal.bell === 'audible') {
                this.bellPlayer.play();
            }
        });
        this.frontend.focus();
        this.blurred$.subscribe(() => {
            this.cancelFocusAllPanes();
        });
    }
    onFrontendReady() {
        this.frontendIsReady = true;
        if (this.savedState) {
            this.frontend.restoreState(this.savedState);
            if (!this.savedStateIsLive) {
                this.frontend.write('\r\n\r\n');
                this.frontend.write(ansi_colors_default().bgWhite.black(' * ') + ansi_colors_default().bgBlackBright.white(' History restored '));
                this.frontend.write('\r\n\r\n');
            }
        }
    }
    buildContextMenu() {
        return __awaiter(this, void 0, void 0, function* () {
            let items = [];
            for (const section of yield Promise.all(this.contextMenuProviders.map(x => x.getItems(this)))) {
                items = items.concat(section);
                items.push({ type: 'separator' });
            }
            items.splice(items.length - 1, 1);
            return items;
        });
    }
    /**
     * Feeds input into the active session
     */
    sendInput(data) {
        var _a, _b;
        if (!(data instanceof Buffer)) {
            data = Buffer.from(data, 'utf-8');
        }
        (_a = this.session) === null || _a === void 0 ? void 0 : _a.feedFromTerminal(data);
        if (this.config.store.terminal.scrollOnInput) {
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.scrollToBottom();
        }
    }
    /**
     * Feeds input into the terminal frontend
     */
    write(data) {
        return __awaiter(this, void 0, void 0, function* () {
            this.frontendWriteLock = this.frontendWriteLock.then(() => this.withSpinnerPaused(() => this.writeRaw(data)));
            yield this.frontendWriteLock;
        });
    }
    writeRaw(data) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.frontend) {
                throw new Error('Frontend not ready');
            }
            if (this.config.store.terminal.detectProgress) {
                const percentageMatch = /(^|[^\d])(\d+(\.\d+)?)%([^\d]|$)/.exec(data);
                if (!this.alternateScreenActive && percentageMatch) {
                    const percentage = percentageMatch[3] ? parseFloat(percentageMatch[2]) : parseInt(percentageMatch[2]);
                    if (percentage > 0 && percentage <= 100) {
                        this.setProgress(percentage);
                    }
                }
                else {
                    this.setProgress(null);
                }
            }
            yield this.frontend.write(data);
        });
    }
    paste() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (this.hostApp.platform === external_tabby_core_.Platform.Windows) {
                data = data.replaceAll('\r\n', '\r');
            }
            else {
                data = data.replaceAll('\n', '\r');
            }
            if (data.endsWith('\n')) {
                data = data.substring(0, data.length - 1);
            }
            if (!this.alternateScreenActive) {
                data = data.trim();
                if (data.includes('\r') && this.config.store.terminal.warnOnMultilinePaste) {
                    const buttons = [
                        this.translate.instant('Paste'),
                        this.translate.instant('Cancel'),
                    ];
                    const result = (yield this.platform.showMessageBox({
                        type: 'warning',
                        detail: data.slice(0, 1000),
                        message: this.translate.instant('Paste multiple lines?'),
                        buttons,
                        defaultId: 0,
                        cancelId: 1,
                    })).response;
                    if (result === 1) {
                        return;
                    }
                }
            }
            if (this.config.store.terminal.bracketedPaste && ((_a = this.frontend) === null || _a === void 0 ? void 0 : _a.supportsBracketedPaste())) {
                data = `\x1b[200~${data}\x1b[201~`;
            }
            this.sendInput(data);
        });
    }
    /**
     * Applies the user settings to the terminal
     */
    configure() {
        var _a;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.configure();
        if (this.config.store.terminal.background === 'colorScheme') {
            if (this.config.store.terminal.colorScheme.background) {
                this.backgroundColor = this.config.store.terminal.colorScheme.background;
            }
        }
        else {
            this.backgroundColor = null;
        }
    }
    zoomIn() {
        var _a;
        this.zoom++;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    zoomOut() {
        var _a;
        this.zoom--;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    resetZoom() {
        var _a;
        this.zoom = 0;
        (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.setZoom(this.zoom);
    }
    focusAllPanes() {
        var _a, _b;
        if (this.allFocusModeSubscription) {
            return;
        }
        if (this.parent instanceof external_tabby_core_.SplitTabComponent) {
            const parent = this.parent;
            parent._allFocusMode = true;
            parent.layout();
            this.allFocusModeSubscription = (_b = (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.input$.subscribe(data => {
                for (const tab of parent.getAllTabs()) {
                    if (tab !== this && tab instanceof BaseTerminalTabComponent) {
                        tab.sendInput(data);
                    }
                }
            })) !== null && _b !== void 0 ? _b : null;
        }
    }
    cancelFocusAllPanes() {
        if (!this.allFocusModeSubscription) {
            return;
        }
        if (this.parent instanceof external_tabby_core_.SplitTabComponent) {
            this.allFocusModeSubscription.unsubscribe();
            this.allFocusModeSubscription = null;
            this.parent._allFocusMode = false;
            this.parent.layout();
        }
    }
    copyCurrentPath() {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let cwd = null;
            if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory()) {
                cwd = yield this.session.getWorkingDirectory();
            }
            if (cwd) {
                this.platform.setClipboard({ text: cwd });
                this.notifications.notice(this.translate.instant('Copied'));
            }
            else {
                this.notifications.error(this.translate.instant('Shell does not support current path detection'));
            }
        });
    }
    /** @hidden */
    ngOnDestroy() {
        super.ngOnDestroy();
    }
    destroy() {
        const _super = Object.create(null, {
            destroy: { get: () => super.destroy }
        });
        var _a, _b, _c;
        return __awaiter(this, void 0, void 0, function* () {
            (_a = this.frontend) === null || _a === void 0 ? void 0 : _a.detach(this.content.nativeElement);
            (_b = this.frontend) === null || _b === void 0 ? void 0 : _b.destroy();
            this.frontend = undefined;
            this.content.nativeElement.remove();
            this.detachTermContainerHandlers();
            this.config.enabledServices(this.decorators).forEach(decorator => {
                try {
                    decorator.detach(this);
                }
                catch (e) {
                    this.logger.warn('Decorator attach() throws', e);
                }
            });
            this.output.complete();
            this.frontendReady.complete();
            _super.destroy.call(this);
            if ((_c = this.session) === null || _c === void 0 ? void 0 : _c.open) {
                yield this.session.destroy();
            }
        });
    }
    detachTermContainerHandlers() {
        this.termContainerSubscriptions.cancelAll();
    }
    handleRightMouseDown(event) {
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            this.rightMouseDownTime = Date.now();
            if (this.config.store.terminal.rightClick === 'menu') {
                this.platform.popupContextMenu(yield this.buildContextMenu(), event);
            }
        });
    }
    handleRightMouseUp(event) {
        return __awaiter(this, void 0, void 0, function* () {
            event.preventDefault();
            event.stopPropagation();
            if (this.config.store.terminal.rightClick === 'paste') {
                const duration = Date.now() - this.rightMouseDownTime;
                if (duration < 250) {
                    this.paste();
                }
                else {
                    this.platform.popupContextMenu(yield this.buildContextMenu(), event);
                }
            }
        });
    }
    attachTermContainerHandlers() {
        this.detachTermContainerHandlers();
        if (!this.frontend) {
            throw new Error('Frontend not ready');
        }
        const maybeConfigure = () => {
            if (this.hasFocus) {
                setTimeout(() => this.configure(), 250);
            }
        };
        this.termContainerSubscriptions.subscribe(this.frontend.title$, title => this.zone.run(() => {
            if (!this.disableDynamicTitle) {
                this.setTitle(title);
            }
        }));
        this.termContainerSubscriptions.subscribe(this.focused$, () => this.frontend && (this.frontend.enableResizing = true));
        this.termContainerSubscriptions.subscribe(this.blurred$, () => this.frontend && (this.frontend.enableResizing = false));
        this.termContainerSubscriptions.subscribe(this.frontend.mouseEvent$, event => {
            if (event.type === 'mousedown') {
                if (event.which === 1) {
                    this.cancelFocusAllPanes();
                }
                if (event.which === 2) {
                    if (this.config.store.terminal.pasteOnMiddleClick) {
                        this.paste();
                    }
                    event.preventDefault();
                    event.stopPropagation();
                    return;
                }
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseDown(event);
                    return;
                }
            }
            if (event.type === 'mouseup') {
                if (event.which === 3 || event.which === 1 && event.ctrlKey) {
                    this.handleRightMouseUp(event);
                    return;
                }
            }
            if (event.type === 'mousewheel') {
                let wheelDeltaY = 0;
                if ('wheelDeltaY' in event) {
                    wheelDeltaY = event['wheelDeltaY'];
                }
                else {
                    wheelDeltaY = event.deltaY;
                }
                if (event.altKey) {
                    event.preventDefault();
                    const delta = Math.round(wheelDeltaY / 50);
                    this.sendInput((delta > 0 ? '\u001bOA' : '\u001bOB').repeat(Math.abs(delta)));
                }
            }
        });
        this.termContainerSubscriptions.subscribe(this.frontend.input$, data => {
            this.sendInput(data);
        });
        this.termContainerSubscriptions.subscribe(this.frontend.resize$.pipe((0,external_rxjs_.auditTime)(100)), ({ columns, rows }) => {
            this.logger.debug(`Resizing to ${columns}x${rows}`);
            this.size = { columns, rows };
            this.zone.run(() => {
                var _a;
                if ((_a = this.session) === null || _a === void 0 ? void 0 : _a.open) {
                    this.session.resize(columns, rows);
                }
            });
        });
        this.termContainerSubscriptions.subscribe(this.platform.displayMetricsChanged$, maybeConfigure);
        this.termContainerSubscriptions.subscribe(this.hostWindow.windowMoved$, maybeConfigure);
    }
    setSession(session, destroyOnSessionClose = false) {
        if (session) {
            if (this.session) {
                this.setSession(null);
            }
            this.detachSessionHandlers();
            this.session = session;
            this.attachSessionHandlers(destroyOnSessionClose);
        }
        else {
            this.detachSessionHandlers();
            this.session = null;
        }
        this.sessionChanged.next(session);
    }
    showToolbar() {
        this.revealToolbar = true;
        this.toolbarRevealTimeout.clear();
    }
    hideToolbar() {
        this.toolbarRevealTimeout.set();
    }
    togglePinToolbar() {
        this.pinToolbar = !this.pinToolbar;
        window.localStorage.pinTerminalToolbar = this.pinToolbar;
    }
    get hasTitleInset() {
        return this.hostApp.platform === external_tabby_core_.Platform.macOS && this.config.store.appearance.tabsLocation !== 'top' && this.config.store.appearance.frame === 'thin';
    }
    attachSessionHandler(observable, handler) {
        this.sessionHandlers.subscribe(observable, handler);
    }
    attachSessionHandlers(destroyOnSessionClose = false) {
        if (!this.session) {
            throw new Error('Session not set');
        }
        // this.session.output$.bufferTime(10).subscribe((datas) => {
        this.attachSessionHandler(this.session.output$, data => {
            if (this.enablePassthrough) {
                this.output.next(data);
                this.write(data);
            }
        });
        if (destroyOnSessionClose) {
            this.attachSessionHandler(this.session.closed$, () => {
                this.destroy();
            });
        }
        this.attachSessionHandler(this.session.destroyed$, () => {
            this.setSession(null);
        });
        this.attachSessionHandler(this.session.oscProcessor.copyRequested$, content => {
            this.platform.setClipboard({ text: content });
            this.notifications.notice(this.translate.instant('Copied'));
        });
    }
    detachSessionHandlers() {
        this.sessionHandlers.cancelAll();
    }
    startSpinner(text) {
        if (this.spinnerActive || this.spinnerPaused) {
            return;
        }
        if (text) {
            this.spinner.text = text;
        }
        this.spinner.setSpinnerString(6);
        this.spinnerActive = true;
        this.zone.runOutsideAngular(() => {
            this.spinner.start();
        });
    }
    stopSpinner() {
        if (!this.spinnerActive) {
            return;
        }
        this.spinner.stop(true);
        this.spinnerActive = false;
    }
    withSpinnerPaused(work) {
        return __awaiter(this, void 0, void 0, function* () {
            this.spinnerPaused = true;
            if (this.spinnerActive) {
                this.spinner.stop(true);
            }
            try {
                yield work();
            }
            finally {
                this.spinnerPaused = false;
                if (this.spinnerActive) {
                    this.zone.runOutsideAngular(() => {
                        this.spinner.start();
                    });
                }
            }
        });
    }
    forEachFocusedTerminalPane(cb) {
        if (this.parent && this.parent instanceof external_tabby_core_.SplitTabComponent && this.parent._allFocusMode) {
            for (const tab of this.parent.getAllTabs()) {
                if (tab instanceof BaseTerminalTabComponent) {
                    cb(tab);
                }
            }
        }
        else {
            cb(this);
        }
    }
}
BaseTerminalTabComponent.template = __webpack_require__(/*! ../components/baseTerminalTab.component.pug */ 8872);
BaseTerminalTabComponent.styles = [__webpack_require__(/*! ../components/baseTerminalTab.component.scss */ 3191)];
BaseTerminalTabComponent.animations = [
    (0,animations_.trigger)('toolbarSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(-25%)',
                opacity: '0',
            })),
        ]),
    ]),
    (0,animations_.trigger)('panelSlide', [
        (0,animations_.transition)(':enter', [
            (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            }),
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(0%)',
                opacity: '1',
            })),
        ]),
        (0,animations_.transition)(':leave', [
            (0,animations_.animate)('100ms ease-out', (0,animations_.style)({
                transform: 'translateY(25%)',
                opacity: '0',
            })),
        ]),
    ]),
];
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "zoom", void 0);
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "showSearchPanel", void 0);
__decorate([
    (0,core_.ViewChild)('content'),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "content", void 0);
__decorate([
    (0,core_.HostBinding)('style.background-color'),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "backgroundColor", void 0);
__decorate([
    (0,core_.HostBinding)('class.toolbar-enabled'),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "enableToolbar", void 0);
__decorate([
    (0,core_.HostBinding)('class.toolbar-pinned'),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "pinToolbar", void 0);
__decorate([
    (0,core_.HostBinding)('class.toolbar-revealed'),
    __metadata("design:type", Object)
], BaseTerminalTabComponent.prototype, "revealToolbar", void 0);
__decorate([
    (0,core_.ViewChild)(SearchPanelComponent, { 'static': false }),
    __metadata("design:type", SearchPanelComponent
    // Deps start
    )
], BaseTerminalTabComponent.prototype, "searchPanel", void 0);
__decorate([
    (0,core_.HostBinding)('class.with-title-inset'),
    __metadata("design:type", Boolean),
    __metadata("design:paramtypes", [])
], BaseTerminalTabComponent.prototype, "hasTitleInset", null);

;// CONCATENATED MODULE: ./src/components/terminalToolbar.component.ts

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */



/** @hidden */
let TerminalToolbarComponent = class TerminalToolbarComponent {
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    constructor(app) {
        this.app = app;
    }
    onTabDragStart() {
        this.app.emitTabDragStarted(this.tab);
    }
    onTabDragEnd() {
        setTimeout(() => {
            this.app.emitTabDragEnded();
            this.app.emitTabsChanged();
        });
    }
    get shouldShowDragHandle() {
        return this.tab.parent instanceof external_tabby_core_.SplitTabComponent && this.tab.parent.getAllTabs().length > 1;
    }
    onMouseEnter() {
        this.tab.showToolbar();
    }
    onMouseLeave() {
        this.tab.hideToolbar();
    }
};
__decorate([
    (0,core_.Input)(),
    __metadata("design:type", BaseTerminalTabComponent
    // eslint-disable-next-line @typescript-eslint/no-useless-constructor
    )
], TerminalToolbarComponent.prototype, "tab", void 0);
__decorate([
    (0,core_.HostListener)('mouseenter'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", void 0)
], TerminalToolbarComponent.prototype, "onMouseEnter", null);
__decorate([
    (0,core_.HostListener)('mouseleave'),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", []),
    __metadata("design:returntype", void 0)
], TerminalToolbarComponent.prototype, "onMouseLeave", null);
TerminalToolbarComponent = __decorate([
    (0,core_.Component)({
        selector: 'terminal-toolbar',
        template: __webpack_require__(/*! ./terminalToolbar.component.pug */ 1959),
        styles: [__webpack_require__(/*! ./terminalToolbar.component.scss */ 4820)],
    }),
    __metadata("design:paramtypes", [external_tabby_core_.AppService])
], TerminalToolbarComponent);


;// CONCATENATED MODULE: ./src/api/contextMenuProvider.ts
/**
 * Extend to add more terminal context menu items
 * @deprecated
 */
class TerminalContextMenuItemProvider {
}

;// CONCATENATED MODULE: ./src/settings.ts







/** @hidden */
let AppearanceSettingsTabProvider = class AppearanceSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-appearance';
        this.icon = 'swatchbook';
        this.title = this.translate.instant('Appearance');
        this.prioritized = true;
    }
    getComponentType() {
        return AppearanceSettingsTabComponent;
    }
};
AppearanceSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], AppearanceSettingsTabProvider);

/** @hidden */
let ColorSchemeSettingsTabProvider = class ColorSchemeSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal-color-scheme';
        this.icon = 'palette';
        this.title = this.translate.instant('Color scheme');
    }
    getComponentType() {
        return ColorSchemeSettingsTabComponent;
    }
};
ColorSchemeSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], ColorSchemeSettingsTabProvider);

/** @hidden */
let TerminalSettingsTabProvider = class TerminalSettingsTabProvider extends external_tabby_settings_.SettingsTabProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.id = 'terminal';
        this.icon = 'terminal';
        this.title = this.translate.instant('Terminal');
        this.prioritized = true;
    }
    getComponentType() {
        return TerminalSettingsTabComponent;
    }
};
TerminalSettingsTabProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalSettingsTabProvider);


;// CONCATENATED MODULE: ./src/features/debug.ts




/** @hidden */
let DebugDecorator = class DebugDecorator extends TerminalDecorator {
    constructor(platform) {
        super();
        this.platform = platform;
    }
    attach(terminal) {
        var _a;
        let sessionOutputBuffer = '';
        const bufferLength = 8192;
        const handler = data => {
            sessionOutputBuffer += data;
            if (sessionOutputBuffer.length > bufferLength) {
                sessionOutputBuffer = sessionOutputBuffer.substring(sessionOutputBuffer.length - bufferLength);
            }
        };
        this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(session => {
            this.subscribeUntilDetached(terminal, session === null || session === void 0 ? void 0 : session.output$.subscribe(handler));
        }));
        this.subscribeUntilDetached(terminal, (_a = terminal.session) === null || _a === void 0 ? void 0 : _a.output$.subscribe(handler));
        terminal.addEventListenerUntilDestroyed(terminal.content.nativeElement, 'keyup', (e) => {
            // Ctrl-Shift-Alt-1
            if (e.which === 49 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveState(terminal);
            }
            // Ctrl-Shift-Alt-2
            if (e.which === 50 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadState(terminal);
            }
            // Ctrl-Shift-Alt-3
            if (e.which === 51 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyState(terminal);
            }
            // Ctrl-Shift-Alt-4
            if (e.which === 52 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteState(terminal);
            }
            // Ctrl-Shift-Alt-5
            if (e.which === 53 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doSaveOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-6
            if (e.which === 54 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doLoadOutput(terminal);
            }
            // Ctrl-Shift-Alt-7
            if (e.which === 55 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doCopyOutput(sessionOutputBuffer);
            }
            // Ctrl-Shift-Alt-8
            if (e.which === 56 && e.ctrlKey && e.shiftKey && e.altKey) {
                this.doPasteOutput(terminal);
            }
        });
    }
    loadFile() {
        return __awaiter(this, void 0, void 0, function* () {
            const transfer = yield this.platform.startUpload();
            if (!transfer.length) {
                return null;
            }
            const data = yield transfer[0].readAll();
            transfer[0].close();
            return data.toString();
        });
    }
    saveFile(content, name) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = Buffer.from(content);
            const transfer = yield this.platform.startDownload(name, 0o644, data.length);
            if (transfer) {
                transfer.write(data);
                transfer.close();
            }
        });
    }
    doSaveState(terminal) {
        this.saveFile(terminal.frontend.saveState(), 'state.txt');
    }
    doCopyState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(terminal.frontend.saveState()) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                terminal.frontend.restoreState(data);
            }
        });
    }
    doPasteState(terminal) {
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                terminal.frontend.restoreState(JSON.parse(data));
            }
        });
    }
    doSaveOutput(buffer) {
        this.saveFile(buffer, 'output.txt');
    }
    doCopyOutput(buffer) {
        return __awaiter(this, void 0, void 0, function* () {
            const data = '```' + JSON.stringify(buffer) + '```';
            this.platform.setClipboard({ text: data });
        });
    }
    doLoadOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            const data = yield this.loadFile();
            if (data) {
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(data));
            }
        });
    }
    doPasteOutput(terminal) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            let data = this.platform.readClipboard();
            if (data) {
                if (data.startsWith('`')) {
                    data = data.substring(3, data.length - 3);
                }
                yield ((_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.write(JSON.parse(data)));
            }
        });
    }
};
DebugDecorator = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.PlatformService])
], DebugDecorator);


;// CONCATENATED MODULE: ./src/features/pathDrop.ts



/** @hidden */
let PathDropDecorator = class PathDropDecorator extends TerminalDecorator {
    attach(terminal) {
        setTimeout(() => {
            var _a, _b;
            this.subscribeUntilDetached(terminal, (_a = terminal.frontend) === null || _a === void 0 ? void 0 : _a.dragOver$.subscribe(event => {
                event.preventDefault();
            }));
            this.subscribeUntilDetached(terminal, (_b = terminal.frontend) === null || _b === void 0 ? void 0 : _b.drop$.subscribe((event) => {
                for (const file of event.dataTransfer.files) {
                    this.injectPath(terminal, file.path);
                }
                event.preventDefault();
            }));
        });
    }
    injectPath(terminal, path) {
        if (path.includes(' ')) {
            path = `"${path}"`;
        }
        path = path.replaceAll('\\', '\\\\');
        terminal.sendInput(path + ' ');
    }
};
PathDropDecorator = __decorate([
    (0,core_.Injectable)()
], PathDropDecorator);


// EXTERNAL MODULE: ./node_modules/zmodem.js/index.js
var zmodem_js = __webpack_require__(3167);
;// CONCATENATED MODULE: ./src/features/zmodem.ts







const SPACER = '            ';
/** @hidden */
let ZModemDecorator = class ZModemDecorator extends TerminalDecorator {
    constructor(log, hotkeys, platform) {
        super();
        this.platform = platform;
        this.activeSession = null;
        this.logger = log.create('zmodem');
        this.cancelEvent = hotkeys.hotkey$.pipe((0,external_rxjs_.filter)(x => x === 'ctrl-c'));
    }
    attach(terminal) {
        let isActive = false;
        const sentry = new zmodem_js.Sentry({
            to_terminal: data => {
                if (isActive) {
                    terminal.write(data);
                }
            },
            sender: data => terminal.session.feedFromTerminal(Buffer.from(data)),
            on_detect: (detection) => __awaiter(this, void 0, void 0, function* () {
                try {
                    terminal.enablePassthrough = false;
                    isActive = true;
                    yield this.process(terminal, detection);
                }
                finally {
                    terminal.enablePassthrough = true;
                    isActive = false;
                }
            }),
            on_retract: () => {
                this.showMessage(terminal, 'transfer cancelled');
            },
        });
        setTimeout(() => {
            this.attachToSession(sentry, terminal);
            this.subscribeUntilDetached(terminal, terminal.sessionChanged$.subscribe(() => {
                this.attachToSession(sentry, terminal);
            }));
        });
    }
    attachToSession(sentry, terminal) {
        if (!terminal.session) {
            return;
        }
        this.subscribeUntilDetached(terminal, terminal.session.binaryOutput$.subscribe(data => {
            const chunkSize = 1024;
            for (let i = 0; i <= Math.floor(data.length / chunkSize); i++) {
                try {
                    sentry.consume(Buffer.from(data.slice(i * chunkSize, (i + 1) * chunkSize)));
                }
                catch (e) {
                    this.showMessage(terminal, ansi_colors_default().bgRed.black(' Error ') + ' ' + e);
                    this.logger.error('protocol error', e);
                    this.activeSession.abort();
                    this.activeSession = null;
                    terminal.enablePassthrough = true;
                    return;
                }
            }
        }));
    }
    process(terminal, detection) {
        return __awaiter(this, void 0, void 0, function* () {
            this.showMessage(terminal, ansi_colors_default().bgBlue.black(' ZMODEM ') + ' Session started');
            this.showMessage(terminal, '------------------------');
            const zsession = detection.confirm();
            this.activeSession = zsession;
            this.logger.info('new session', zsession);
            if (zsession.type === 'send') {
                const transfers = yield this.platform.startUpload({ multiple: true });
                let filesRemaining = transfers.length;
                let sizeRemaining = transfers.reduce((a, b) => a + b.getSize(), 0);
                for (const transfer of transfers) {
                    yield this.sendFile(terminal, zsession, transfer, filesRemaining, sizeRemaining);
                    filesRemaining--;
                    sizeRemaining -= transfer.getSize();
                }
                this.activeSession = null;
                yield zsession.close();
            }
            else {
                zsession.on('offer', xfer => {
                    this.receiveFile(terminal, xfer, zsession);
                });
                zsession.start();
                yield new Promise(resolve => zsession.on('session_end', resolve));
                this.activeSession = null;
            }
        });
    }
    receiveFile(terminal, xfer, zsession) {
        return __awaiter(this, void 0, void 0, function* () {
            const details = xfer.get_details();
            this.showMessage(terminal, ansi_colors_default().bgYellow.black(' Offered ') + ' ' + details.name, true);
            this.logger.info('offered', xfer);
            const transfer = yield this.platform.startDownload(details.name, 0o644, details.size);
            if (!transfer) {
                this.showMessage(terminal, ansi_colors_default().bgRed.black(' Rejected ') + ' ' + details.name);
                xfer.skip();
                return;
            }
            let canceled = false;
            const cancelSubscription = this.cancelEvent.subscribe(() => {
                if (terminal.hasFocus) {
                    try {
                        zsession._skip();
                    }
                    catch (_a) { }
                    canceled = true;
                }
            });
            try {
                yield Promise.race([
                    xfer.accept({
                        on_input: chunk => {
                            if (canceled) {
                                return;
                            }
                            transfer.write(Buffer.from(chunk));
                            this.showMessage(terminal, ansi_colors_default().bgYellow.black(' ' + Math.round(100 * transfer.getCompletedBytes() / details.size).toString().padStart(3, ' ') + '% ') + ' ' + details.name, true);
                        },
                    }),
                    this.cancelEvent.pipe((0,external_rxjs_.first)()).toPromise(),
                ]);
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                    this.showMessage(terminal, ansi_colors_default().bgRed.black(' Canceled ') + ' ' + details.name);
                }
                else {
                    transfer.close();
                    this.showMessage(terminal, ansi_colors_default().bgGreen.black(' Received ') + ' ' + details.name);
                }
            }
            catch (_a) {
                this.showMessage(terminal, ansi_colors_default().bgRed.black(' Error ') + ' ' + details.name);
            }
            cancelSubscription.unsubscribe();
        });
    }
    sendFile(terminal, zsession, transfer, filesRemaining, sizeRemaining) {
        return __awaiter(this, void 0, void 0, function* () {
            const offer = {
                name: transfer.getName(),
                size: transfer.getSize(),
                mode: transfer.getMode(),
                files_remaining: filesRemaining,
                bytes_remaining: sizeRemaining,
            };
            this.logger.info('offering', offer);
            this.showMessage(terminal, ansi_colors_default().bgYellow.black(' Offered ') + ' ' + offer.name, true);
            const xfer = yield zsession.send_offer(offer);
            if (xfer) {
                let canceled = false;
                const cancelSubscription = this.cancelEvent.subscribe(() => {
                    if (terminal.hasFocus) {
                        canceled = true;
                    }
                });
                while (true) {
                    const chunk = yield transfer.read();
                    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                    if (canceled || !chunk.length) {
                        break;
                    }
                    yield xfer.send(chunk);
                    this.showMessage(terminal, ansi_colors_default().bgYellow.black(' ' + Math.round(100 * transfer.getCompletedBytes() / offer.size).toString().padStart(3, ' ') + '% ') + offer.name, true);
                }
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    transfer.cancel();
                }
                else {
                    transfer.close();
                }
                yield xfer.end();
                // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
                if (canceled) {
                    this.showMessage(terminal, ansi_colors_default().bgRed.black(' Canceled ') + ' ' + offer.name);
                }
                else {
                    this.showMessage(terminal, ansi_colors_default().bgGreen.black(' Sent ') + ' ' + offer.name);
                }
                cancelSubscription.unsubscribe();
            }
            else {
                transfer.cancel();
                this.showMessage(terminal, ansi_colors_default().bgRed.black(' Rejected ') + ' ' + offer.name);
                this.logger.warn('rejected by the other side');
            }
        });
    }
    showMessage(terminal, msg, overwrite = false) {
        terminal.write(Buffer.from(`\r${msg}${SPACER}`));
        if (!overwrite) {
            terminal.write(Buffer.from('\r\n'));
        }
    }
};
ZModemDecorator = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.LogService,
        external_tabby_core_.HotkeysService,
        external_tabby_core_.PlatformService])
], ZModemDecorator);


;// CONCATENATED MODULE: ./src/config.ts

/** @hidden */
class TerminalConfigProvider extends external_tabby_core_.ConfigProvider {
    constructor() {
        super(...arguments);
        this.defaults = {
            hotkeys: {
                'copy-current-path': [],
            },
            terminal: {
                frontend: 'xterm',
                fontSize: 14,
                fontWeight: 400,
                fontWeightBold: 700,
                fallbackFont: null,
                linePadding: 0,
                bell: 'off',
                bracketedPaste: true,
                background: 'theme',
                ligatures: false,
                cursor: 'block',
                cursorBlink: true,
                hideTabIndex: false,
                showTabProfileIcon: false,
                hideCloseButton: false,
                rightClick: 'menu',
                pasteOnMiddleClick: true,
                copyOnSelect: false,
                copyAsHTML: true,
                scrollOnInput: true,
                altIsMeta: false,
                wordSeparator: ' ()[]{}\'"',
                colorScheme: {
                    __nonStructural: true,
                    name: 'Material',
                    foreground: '#eceff1',
                    background: 'rgba(38, 50, 56, 1)',
                    selection: null,
                    cursor: '#FFCC00',
                    cursorAccent: null,
                    colors: [
                        '#000000',
                        '#D62341',
                        '#9ECE58',
                        '#FAED70',
                        '#396FE2',
                        '#BB80B3',
                        '#2DDAFD',
                        '#d0d0d0',
                        'rgba(255, 255, 255, 0.2)',
                        '#FF5370',
                        '#C3E88D',
                        '#FFCB6B',
                        '#82AAFF',
                        '#C792EA',
                        '#89DDFF',
                        '#ffffff',
                    ],
                },
                customColorSchemes: [],
                warnOnMultilinePaste: true,
                searchRegexAlwaysEnabled: false,
                searchOptions: {
                    regex: false,
                    wholeWord: false,
                    caseSensitive: false,
                },
                detectProgress: true,
                scrollbackLines: 25000,
                drawBoldTextInBrightColors: true,
                sixel: true,
            },
        };
        this.platformDefaults = {
            [external_tabby_core_.Platform.macOS]: {
                terminal: {
                    font: 'Menlo',
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        '⌘-C',
                    ],
                    paste: [
                        '⌘-V',
                    ],
                    clear: [
                        '⌘-K',
                    ],
                    'select-all': ['⌘-A'],
                    'zoom-in': [
                        '⌘-=',
                        '⌘-Shift-=',
                    ],
                    'zoom-out': [
                        '⌘--',
                        '⌘-Shift--',
                    ],
                    'reset-zoom': [
                        '⌘-0',
                    ],
                    home: ['⌘-Left', 'Home'],
                    end: ['⌘-Right', 'End'],
                    'previous-word': ['⌥-Left'],
                    'next-word': ['⌥-Right'],
                    'delete-previous-word': ['⌥-Backspace'],
                    'delete-line': ['⌘-Backspace'],
                    'delete-next-word': ['⌥-Delete'],
                    search: [
                        '⌘-F',
                    ],
                    'pane-focus-all': [
                        '⌘-Shift-I',
                    ],
                    'scroll-to-top': ['Shift-PageUp'],
                    'scroll-up': ['PageUp'],
                    'scroll-down': ['PageDown'],
                    'scroll-to-bottom': ['Shift-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Windows]: {
                terminal: {
                    font: 'Consolas',
                    rightClick: 'paste',
                    pasteOnMiddleClick: false,
                    copyOnSelect: true,
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-up': ['PageUp'],
                    'scroll-down': ['PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
            [external_tabby_core_.Platform.Linux]: {
                terminal: {
                    font: 'Liberation Mono',
                    pasteOnMiddleClick: false, // handled by OS
                },
                hotkeys: {
                    'ctrl-c': ['Ctrl-C'],
                    copy: [
                        'Ctrl-Shift-C',
                    ],
                    paste: [
                        'Ctrl-Shift-V',
                        'Shift-Insert',
                    ],
                    'select-all': ['Ctrl-Shift-A'],
                    clear: [],
                    'zoom-in': [
                        'Ctrl-=',
                        'Ctrl-Shift-=',
                    ],
                    'zoom-out': [
                        'Ctrl--',
                        'Ctrl-Shift--',
                    ],
                    'reset-zoom': [
                        'Ctrl-0',
                    ],
                    home: ['Home'],
                    end: ['End'],
                    'previous-word': ['Ctrl-Left'],
                    'next-word': ['Ctrl-Right'],
                    'delete-previous-word': ['Ctrl-Backspace'],
                    'delete-line': ['Ctrl-Shift-Backspace'],
                    'delete-next-word': ['Ctrl-Delete'],
                    search: [
                        'Ctrl-Shift-F',
                    ],
                    'pane-focus-all': [
                        'Ctrl-Shift-I',
                    ],
                    'scroll-to-top': ['Ctrl-PageUp'],
                    'scroll-up': ['PageUp'],
                    'scroll-down': ['PageDown'],
                    'scroll-to-bottom': ['Ctrl-PageDown'],
                },
            },
        };
    }
}

;// CONCATENATED MODULE: ./src/hotkeys.ts



/** @hidden */
let TerminalHotkeyProvider = class TerminalHotkeyProvider extends external_tabby_core_.HotkeyProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.hotkeys = [
            {
                id: 'copy',
                name: this.translate.instant('Copy to clipboard'),
            },
            {
                id: 'paste',
                name: this.translate.instant('Paste from clipboard'),
            },
            {
                id: 'home',
                name: this.translate.instant('Beginning of the line'),
            },
            {
                id: 'end',
                name: this.translate.instant('End of the line'),
            },
            {
                id: 'previous-word',
                name: this.translate.instant('Jump to previous word'),
            },
            {
                id: 'next-word',
                name: this.translate.instant('Jump to next word'),
            },
            {
                id: 'delete-previous-word',
                name: this.translate.instant('Delete previous word'),
            },
            {
                id: 'delete-line',
                name: this.translate.instant('Delete entire line'),
            },
            {
                id: 'delete-next-word',
                name: this.translate.instant('Delete next word'),
            },
            {
                id: 'clear',
                name: this.translate.instant('Clear terminal'),
            },
            {
                id: 'zoom-in',
                name: this.translate.instant('Zoom in'),
            },
            {
                id: 'zoom-out',
                name: this.translate.instant('Zoom out'),
            },
            {
                id: 'reset-zoom',
                name: this.translate.instant('Reset zoom'),
            },
            {
                id: 'ctrl-c',
                name: this.translate.instant('Intelligent Ctrl-C (copy/abort)'),
            },
            {
                id: 'copy-current-path',
                name: this.translate.instant('Copy current path'),
            },
            {
                id: 'search',
                name: this.translate.instant('Search'),
            },
            {
                id: 'pane-focus-all',
                name: this.translate.instant('Focus all panes at once (broadcast)'),
            },
            {
                id: 'scroll-to-top',
                name: this.translate.instant('Scroll terminal to top'),
            },
            {
                id: 'scroll-up',
                name: this.translate.instant('Scroll terminal one page up'),
            },
            {
                id: 'scroll-down',
                name: this.translate.instant('Scroll terminal one page down'),
            },
            {
                id: 'scroll-to-bottom',
                name: this.translate.instant('Scroll terminal to bottom'),
            },
        ];
    }
    provide() {
        return __awaiter(this, void 0, void 0, function* () {
            return this.hotkeys;
        });
    }
};
TerminalHotkeyProvider = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], TerminalHotkeyProvider);


;// CONCATENATED MODULE: ./src/tabContextMenu.ts





/** @hidden */
let CopyPasteContextMenu = class CopyPasteContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(notifications, translate) {
        super();
        this.notifications = notifications;
        this.translate = translate;
        this.weight = -10;
    }
    getItems(tab, tabHeader) {
        return __awaiter(this, void 0, void 0, function* () {
            if (tabHeader) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                return [
                    {
                        label: this.translate.instant('Copy'),
                        click: () => {
                            setTimeout(() => {
                                var _a;
                                (_a = tab.frontend) === null || _a === void 0 ? void 0 : _a.copySelection();
                                this.notifications.notice(this.translate.instant('Copied'));
                            });
                        },
                    },
                    {
                        label: this.translate.instant('Paste'),
                        click: () => tab.paste(),
                    },
                ];
            }
            return [];
        });
    }
};
CopyPasteContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.NotificationsService,
        external_tabby_core_.TranslateService])
], CopyPasteContextMenu);

/** @hidden */
let MiscContextMenu = class MiscContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(translate) {
        super();
        this.translate = translate;
        this.weight = 1;
    }
    getItems(tab) {
        var _a;
        return __awaiter(this, void 0, void 0, function* () {
            if (tab instanceof BaseTerminalTabComponent && ((_a = tab.session) === null || _a === void 0 ? void 0 : _a.supportsWorkingDirectory())) {
                return [{
                        label: this.translate.instant('Copy current path'),
                        click: () => tab.copyCurrentPath(),
                    }];
            }
            return [];
        });
    }
};
MiscContextMenu = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.TranslateService])
], MiscContextMenu);

/** @hidden */
let LegacyContextMenu = class LegacyContextMenu extends external_tabby_core_.TabContextMenuItemProvider {
    constructor(contextMenuProviders) {
        super();
        this.contextMenuProviders = contextMenuProviders;
        this.weight = 1;
    }
    getItems(tab, _tabHeader) {
        return __awaiter(this, void 0, void 0, function* () {
            if (!this.contextMenuProviders) {
                return [];
            }
            if (tab instanceof BaseTerminalTabComponent) {
                let items = [];
                for (const p of this.contextMenuProviders) {
                    items = items.concat(yield p.getItems(tab));
                }
                return items;
            }
            return [];
        });
    }
};
LegacyContextMenu = __decorate([
    (0,core_.Injectable)(),
    __param(0, (0,core_.Optional)()),
    __param(0, (0,core_.Inject)(TerminalContextMenuItemProvider)),
    __metadata("design:paramtypes", [Object])
], LegacyContextMenu);


// EXTERNAL MODULE: ../node_modules/shell-quote/index.js
var shell_quote = __webpack_require__(2650);
;// CONCATENATED MODULE: ./src/cli.ts





let TerminalCLIHandler = class TerminalCLIHandler extends external_tabby_core_.CLIHandler {
    constructor(app, hostWindow) {
        super();
        this.app = app;
        this.hostWindow = hostWindow;
        this.firstMatchOnly = true;
        this.priority = 0;
    }
    handle(event) {
        return __awaiter(this, void 0, void 0, function* () {
            const op = event.argv._[0];
            if (op === 'paste') {
                let text = event.argv.text;
                if (event.argv.escape) {
                    text = shell_quote.quote([text]);
                }
                this.handlePaste(text);
                return true;
            }
            return false;
        });
    }
    handlePaste(text) {
        if (this.app.activeTab instanceof BaseTerminalTabComponent && this.app.activeTab.session) {
            this.app.activeTab.sendInput(text);
            this.hostWindow.bringToFront();
        }
    }
};
TerminalCLIHandler = __decorate([
    (0,core_.Injectable)(),
    __metadata("design:paramtypes", [external_tabby_core_.AppService,
        external_tabby_core_.HostWindowService])
], TerminalCLIHandler);


// EXTERNAL MODULE: ./node_modules/hexer/index.js
var hexer = __webpack_require__(1068);
var hexer_default = /*#__PURE__*/__webpack_require__.n(hexer);
// EXTERNAL MODULE: ./node_modules/buffer-replace/index.js
var buffer_replace = __webpack_require__(6121);
var buffer_replace_default = /*#__PURE__*/__webpack_require__.n(buffer_replace);
// EXTERNAL MODULE: ./node_modules/binstring/lib/binstring.js
var binstring = __webpack_require__(8576);
var binstring_default = /*#__PURE__*/__webpack_require__.n(binstring);
// EXTERNAL MODULE: external "stream"
var external_stream_ = __webpack_require__(3978);
// EXTERNAL MODULE: external "readline"
var external_readline_ = __webpack_require__(2908);
;// CONCATENATED MODULE: ./src/api/middleware.ts


class SessionMiddleware {
    constructor() {
        this.outputToSession = new external_rxjs_.Subject();
        this.outputToTerminal = new external_rxjs_.Subject();
    }
    get outputToSession$() { return this.outputToSession; }
    get outputToTerminal$() { return this.outputToTerminal; }
    feedFromSession(data) {
        this.outputToTerminal.next(data);
    }
    feedFromTerminal(data) {
        this.outputToSession.next(data);
    }
    close() {
        this.outputToSession.complete();
        this.outputToTerminal.complete();
    }
}
class SesssionMiddlewareStack extends SessionMiddleware {
    constructor() {
        super();
        this.stack = [];
        this.subs = new external_tabby_core_.SubscriptionContainer();
        this.push(new SessionMiddleware());
    }
    push(middleware) {
        this.stack.push(middleware);
        this.relink();
    }
    unshift(middleware) {
        this.stack.unshift(middleware);
        this.relink();
    }
    remove(middleware) {
        this.stack = this.stack.filter(m => m !== middleware);
        this.relink();
    }
    replace(middleware, newMiddleware) {
        const index = this.stack.indexOf(middleware);
        if (index >= 0) {
            this.stack[index].close();
            this.stack[index] = newMiddleware;
        }
        else {
            this.stack.push(newMiddleware);
        }
        this.relink();
    }
    feedFromSession(data) {
        this.stack[0].feedFromSession(data);
    }
    feedFromTerminal(data) {
        this.stack[this.stack.length - 1].feedFromTerminal(data);
    }
    close() {
        for (const m of this.stack) {
            m.close();
        }
        this.subs.cancelAll();
        super.close();
    }
    relink() {
        this.subs.cancelAll();
        for (let i = 0; i < this.stack.length - 1; i++) {
            this.subs.subscribe(this.stack[i].outputToTerminal$, x => this.stack[i + 1].feedFromSession(x));
        }
        this.subs.subscribe(this.stack[this.stack.length - 1].outputToTerminal$, x => this.outputToTerminal.next(x));
        for (let i = this.stack.length - 2; i >= 0; i--) {
            this.subs.subscribe(this.stack[i + 1].outputToSession$, x => this.stack[i].feedFromTerminal(x));
        }
        this.subs.subscribe(this.stack[0].outputToSession$, x => this.outputToSession.next(x));
    }
}

;// CONCATENATED MODULE: ./src/middleware/streamProcessing.ts








class TerminalStreamProcessor extends SessionMiddleware {
    constructor(options) {
        super();
        this.options = options;
        this.forceEcho = false;
        this.inputReadline = null;
        this.inputPromptVisible = false;
        this.started = false;
        this.inputReadlineInStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream = new external_stream_.PassThrough();
        this.inputReadlineOutStream.on('data', data => {
            this.outputToTerminal.next(Buffer.from(data));
        });
        this.outputToTerminal$.pipe((0,external_rxjs_.debounce)(() => (0,external_rxjs_.interval)(500))).subscribe(() => {
            if (this.started) {
                this.onOutputSettled();
            }
        });
    }
    start() {
        this.inputReadline = (0,external_readline_.createInterface)({
            input: this.inputReadlineInStream,
            output: this.inputReadlineOutStream,
            terminal: true,
            prompt: this.options.inputMode === 'readline-hex' ? 'hex> ' : '> ',
        });
        this.inputReadline.on('line', line => {
            this.onTerminalInput(Buffer.from(line + '\n'));
            this.resetInputPrompt();
        });
        this.started = true;
    }
    feedFromSession(data) {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            if (this.inputPromptVisible) {
                (0,external_readline_.clearLine)(this.inputReadlineOutStream, 0);
                this.outputToTerminal.next(Buffer.from('\r'));
                this.inputPromptVisible = false;
            }
        }
        data = this.replaceNewlines(data, this.options.outputNewlines);
        if (this.options.outputMode === 'hex') {
            this.outputToTerminal.next(Buffer.concat([
                Buffer.from('\r\n'),
                Buffer.from(hexer_default()(data, {
                    group: 1,
                    gutter: 4,
                    divide: ansi_colors_default().gray(' ｜ '),
                    emptyHuman: ansi_colors_default().gray('╳'),
                }).replaceAll('\n', '\r\n')),
                Buffer.from('\r\n\n'),
            ]));
        }
        else {
            this.outputToTerminal.next(data);
        }
    }
    feedFromTerminal(data) {
        var _a;
        if (this.options.inputMode === 'local-echo' || this.forceEcho) {
            this.outputToTerminal.next(this.replaceNewlines(data, 'crlf'));
        }
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineInStream.write(data);
        }
        else {
            this.onTerminalInput(data);
        }
    }
    resize() {
        var _a;
        if ((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) {
            this.inputReadlineOutStream.emit('resize');
        }
    }
    close() {
        var _a;
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.close();
        super.close();
    }
    onTerminalInput(data) {
        if (this.options.inputMode === 'readline-hex') {
            const tokens = data.toString().split(/\s/g);
            data = Buffer.concat(tokens.filter(t => !!t).map(t => {
                if (t.startsWith('0x')) {
                    t = t.substring(2);
                }
                return binstring_default()(t, { 'in': 'hex' });
            }));
        }
        data = this.replaceNewlines(data, this.options.inputNewlines);
        this.outputToSession.next(data);
    }
    onOutputSettled() {
        var _a;
        if (((_a = this.options.inputMode) === null || _a === void 0 ? void 0 : _a.startsWith('readline')) && !this.inputPromptVisible) {
            this.resetInputPrompt();
        }
    }
    resetInputPrompt() {
        var _a;
        this.outputToTerminal.next(Buffer.from('\r\n'));
        (_a = this.inputReadline) === null || _a === void 0 ? void 0 : _a.prompt(true);
        this.inputPromptVisible = true;
    }
    replaceNewlines(data, mode) {
        if (!mode) {
            return data;
        }
        data = buffer_replace_default()(data, '\r\n', '\n');
        data = buffer_replace_default()(data, '\r', '\n');
        const replacement = {
            strip: '',
            cr: '\r',
            lf: '\n',
            crlf: '\r\n',
        }[mode];
        return buffer_replace_default()(data, '\n', replacement);
    }
}

// EXTERNAL MODULE: ../node_modules/clone-deep/index.js
var clone_deep = __webpack_require__(1644);
var clone_deep_default = /*#__PURE__*/__webpack_require__.n(clone_deep);
;// CONCATENATED MODULE: ./src/middleware/loginScriptProcessing.ts


class LoginScriptProcessor extends SessionMiddleware {
    constructor(logger, options) {
        var _a;
        super();
        this.logger = logger;
        this.remainingScripts = [];
        this.escapeSeqMap = {
            a: '\x07',
            b: '\x08',
            e: '\x1b',
            f: '\x0c',
            n: '\x0a',
            r: '\x0d',
            t: '\x09',
            v: '\x0b',
        };
        this.remainingScripts = clone_deep_default()((_a = options.scripts) !== null && _a !== void 0 ? _a : []);
        for (const script of this.remainingScripts) {
            if (!script.isRegex) {
                script.expect = this.unescape(script.expect);
            }
            script.send = this.unescape(script.send);
        }
    }
    feedFromSession(data) {
        const dataString = data.toString();
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                continue;
            }
            let match = false;
            if (script.isRegex) {
                const re = new RegExp(script.expect, 'g');
                match = re.test(dataString);
            }
            else {
                match = dataString.includes(script.expect);
            }
            if (match) {
                this.logger.info('Executing script:', script);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                if (script.optional) {
                    this.logger.debug('Skip optional script: ' + script.expect);
                    this.remainingScripts = this.remainingScripts.filter(x => x !== script);
                }
                else {
                    break;
                }
            }
        }
        super.feedFromSession(data);
    }
    close() {
        this.outputToSession.complete();
        super.close();
    }
    executeUnconditionalScripts() {
        for (const script of this.remainingScripts) {
            if (!script.expect) {
                this.logger.info('Executing script:', script.send);
                this.outputToSession.next(Buffer.from(script.send + '\n'));
                this.remainingScripts = this.remainingScripts.filter(x => x !== script);
            }
            else {
                break;
            }
        }
    }
    unescape(line) {
        line = line.replace(/\\((x\d{2})|(u\d{4}))/g, (match, g) => {
            return String.fromCharCode(parseInt(g.substr(1), 16));
        });
        return line.replace(/\\(.)/g, (match, g) => {
            return this.escapeSeqMap[g] || g;
        });
    }
}

// EXTERNAL MODULE: external "os"
var external_os_ = __webpack_require__(9044);
;// CONCATENATED MODULE: ./src/middleware/oscProcessing.ts



const OSCPrefix = Buffer.from('\x1b]');
const OSCSuffix = Buffer.from('\x07');
class OSCProcessor extends SessionMiddleware {
    constructor() {
        super(...arguments);
        this.cwdReported = new external_rxjs_.Subject();
        this.copyRequested = new external_rxjs_.Subject();
    }
    get cwdReported$() { return this.cwdReported; }
    get copyRequested$() { return this.copyRequested; }
    feedFromSession(data) {
        let startIndex = 0;
        while (data.includes(OSCPrefix, startIndex) && data.includes(OSCSuffix, startIndex)) {
            const params = data.subarray(data.indexOf(OSCPrefix, startIndex) + OSCPrefix.length);
            const oscString = params.subarray(0, params.indexOf(OSCSuffix)).toString();
            startIndex = data.indexOf(OSCSuffix, startIndex) + OSCSuffix.length;
            const [oscCodeString, ...oscParams] = oscString.split(';');
            const oscCode = parseInt(oscCodeString);
            if (oscCode === 1337) {
                const paramString = oscParams.join(';');
                if (paramString.startsWith('CurrentDir=')) {
                    let reportedCWD = paramString.split('=')[1];
                    if (reportedCWD.startsWith('~')) {
                        reportedCWD = external_os_.homedir() + reportedCWD.substring(1);
                    }
                    this.cwdReported.next(reportedCWD);
                }
                else {
                    console.debug('Unsupported OSC 1337 parameter:', paramString);
                }
            }
            else if (oscCode === 52) {
                if (oscParams[0] === 'c' || oscParams[0] === '') {
                    const content = Buffer.from(oscParams[1], 'base64');
                    this.copyRequested.next(content.toString());
                }
            }
            else {
                continue;
            }
        }
        super.feedFromSession(data);
    }
    close() {
        this.cwdReported.complete();
        this.copyRequested.complete();
        super.close();
    }
}

;// CONCATENATED MODULE: ./src/session.ts





/**
 * A session object for a [[BaseTerminalTabComponent]]
 * Extend this to implement custom I/O and process management for your terminal tab
 */
class BaseSession {
    constructor(logger) {
        this.logger = logger;
        this.oscProcessor = new OSCProcessor();
        this.middleware = new SesssionMiddlewareStack();
        this.output = new external_rxjs_.Subject();
        this.binaryOutput = new external_rxjs_.Subject();
        this.closed = new external_rxjs_.Subject();
        this.destroyed = new external_rxjs_.Subject();
        this.loginScriptProcessor = null;
        this.initialDataBuffer = Buffer.from('');
        this.initialDataBufferReleased = false;
        this.middleware.push(this.oscProcessor);
        this.oscProcessor.cwdReported$.subscribe(cwd => {
            this.reportedCWD = cwd;
        });
        this.middleware.outputToTerminal$.subscribe(data => {
            if (!this.initialDataBufferReleased) {
                this.initialDataBuffer = Buffer.concat([this.initialDataBuffer, data]);
            }
            else {
                this.output.next(data.toString());
                this.binaryOutput.next(data);
            }
        });
        this.middleware.outputToSession$.subscribe(data => this.write(data));
    }
    get output$() { return this.output; }
    get binaryOutput$() { return this.binaryOutput; }
    get closed$() { return this.closed; }
    get destroyed$() { return this.destroyed; }
    feedFromTerminal(data) {
        this.middleware.feedFromTerminal(data);
    }
    emitOutput(data) {
        this.middleware.feedFromSession(data);
    }
    releaseInitialDataBuffer() {
        this.initialDataBufferReleased = true;
        this.output.next(this.initialDataBuffer.toString());
        this.binaryOutput.next(this.initialDataBuffer);
        this.initialDataBuffer = Buffer.from('');
    }
    setLoginScriptsOptions(options) {
        const newProcessor = new LoginScriptProcessor(this.logger, options);
        if (this.loginScriptProcessor) {
            this.middleware.replace(this.loginScriptProcessor, newProcessor);
        }
        else {
            this.middleware.push(newProcessor);
        }
        this.loginScriptProcessor = newProcessor;
    }
    destroy() {
        return __awaiter(this, void 0, void 0, function* () {
            if (this.open) {
                this.logger.info('Destroying');
                this.open = false;
                this.closed.next();
                this.destroyed.next();
                yield this.gracefullyKillProcess();
            }
            this.middleware.close();
            this.closed.complete();
            this.destroyed.complete();
            this.output.complete();
            this.binaryOutput.complete();
        });
    }
}

;// CONCATENATED MODULE: ./src/index.ts































/** @hidden */
let TerminalModule = class TerminalModule {
}; // eslint-disable-line @typescript-eslint/no-extraneous-class
TerminalModule = __decorate([
    (0,core_.NgModule)({
        imports: [
            platform_browser_.BrowserModule,
            forms_.FormsModule,
            ng_bootstrap_.NgbModule,
            external_ngx_toastr_.ToastrModule,
            (external_tabby_core_default()),
            NgxColorsModule,
        ],
        providers: [
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: AppearanceSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: ColorSchemeSettingsTabProvider, multi: true },
            { provide: external_tabby_settings_.SettingsTabProvider, useClass: TerminalSettingsTabProvider, multi: true },
            { provide: external_tabby_core_.ConfigProvider, useClass: TerminalConfigProvider, multi: true },
            { provide: external_tabby_core_.HotkeyProvider, useClass: TerminalHotkeyProvider, multi: true },
            { provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
            { provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
            { provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: CopyPasteContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: MiscContextMenu, multi: true },
            { provide: external_tabby_core_.TabContextMenuItemProvider, useClass: LegacyContextMenu, multi: true },
            { provide: external_tabby_core_.CLIHandler, useClass: TerminalCLIHandler, multi: true },
        ],
        entryComponents: [
            AppearanceSettingsTabComponent,
            ColorSchemeSettingsTabComponent,
            TerminalSettingsTabComponent,
        ],
        declarations: [
            colorPicker_component_ColorPickerComponent,
            ColorSchemePreviewComponent,
            AppearanceSettingsTabComponent,
            ColorSchemeSettingsTabComponent,
            TerminalSettingsTabComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
        ],
        exports: [
            colorPicker_component_ColorPickerComponent,
            SearchPanelComponent,
            StreamProcessingSettingsComponent,
            LoginScriptsSettingsComponent,
            TerminalToolbarComponent,
        ],
    })
], TerminalModule);
/* harmony default export */ const src = (TerminalModule);











})();

/******/ 	return __webpack_exports__;
/******/ })()
;
});
//# sourceMappingURL=../../../app.asar.unpacked/assets/webpack/index.js.map