diff --git a/Blink.xcodeproj/project.pbxproj b/Blink.xcodeproj/project.pbxproj index dfc48768f..d6d514fd5 100644 --- a/Blink.xcodeproj/project.pbxproj +++ b/Blink.xcodeproj/project.pbxproj @@ -175,7 +175,7 @@ D24AFD58222410E700CFD3C1 /* MBProgressHUD.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0732F10D1D062BF700AB5438 /* MBProgressHUD.framework */; }; D24AFD59222410E700CFD3C1 /* MBProgressHUD.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0732F10D1D062BF700AB5438 /* MBProgressHUD.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; D2512AC520BD4C3000A80257 /* curl_ios_static.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2E4F92E20B2BB4500B30F7B /* curl_ios_static.framework */; }; - D25D58102358897B00D1BCAE /* Completions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25D580F2358897B00D1BCAE /* Completions.swift */; }; + D25D58102358897B00D1BCAE /* Complete.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25D580F2358897B00D1BCAE /* Complete.swift */; }; D263489820BEBFE000A8E89F /* libsshd.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D263489720BEBFE000A8E89F /* libsshd.a */; }; D265FBBD2317DD3C0017EAC4 /* BlinkTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D265FBBC2317DD3C0017EAC4 /* BlinkTests.swift */; }; D265FBC52317E5090017EAC4 /* SessionParamsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D265FBC42317E5090017EAC4 /* SessionParamsTests.swift */; }; @@ -609,7 +609,7 @@ D248E67D22DE14100057FE67 /* SessionParams.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionParams.swift; sourceTree = ""; }; D2496F3B20038B3300E75FE9 /* hterm_all.min.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = hterm_all.min.js; sourceTree = ""; }; D2496F402003941B00E75FE9 /* term.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = term.js; sourceTree = ""; }; - D25D580F2358897B00D1BCAE /* Completions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Completions.swift; sourceTree = ""; }; + D25D580F2358897B00D1BCAE /* Complete.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Complete.swift; sourceTree = ""; }; D263488A20BEBF5800A8E89F /* libsshpp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = libsshpp.hpp; sourceTree = ""; }; D263488B20BEBF5800A8E89F /* legacy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = legacy.h; sourceTree = ""; }; D263488C20BEBF5800A8E89F /* callbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = callbacks.h; sourceTree = ""; }; @@ -811,7 +811,7 @@ D2887A5D22DCA6D500701BD5 /* SceneDelegate.swift */, D248E67522DDDF130057FE67 /* UIStateRestorable.swift */, D2BC514C2355C3AE0034FDD4 /* History.swift */, - D25D580F2358897B00D1BCAE /* Completions.swift */, + D25D580F2358897B00D1BCAE /* Complete.swift */, ); path = Blink; sourceTree = ""; @@ -1800,7 +1800,7 @@ C9B2E0301D6B612400B89F69 /* BKPubKey.m in Sources */, D27BBA1C20529FFF00AEA303 /* TermStream.m in Sources */, D296198D214F96D50070935A /* digest-openssl.c in Sources */, - D25D58102358897B00D1BCAE /* Completions.swift in Sources */, + D25D58102358897B00D1BCAE /* Complete.swift in Sources */, B7D4503C1DD4706000CE0DBE /* Reachability.m in Sources */, 07AA065D1E08B6EB008310B7 /* UserDefaultsPasscodeRepository.swift in Sources */, B752EE2E1DFEF45300E305C8 /* BKSecurityConfigurationViewController.m in Sources */, diff --git a/Blink/Completions.swift b/Blink/Complete.swift similarity index 91% rename from Blink/Completions.swift rename to Blink/Complete.swift index b500bb1f3..bbfaf043c 100644 --- a/Blink/Completions.swift +++ b/Blink/Complete.swift @@ -36,7 +36,7 @@ import ios_system private let _completionQueue = DispatchQueue(label: "completion.queue") -struct Completions { +struct Complete { struct ForRequest: Codable { let id: Int @@ -47,6 +47,7 @@ struct Completions { let requestId: Int let input: String let result: [String] + let hint: String let kind: String } @@ -189,22 +190,49 @@ struct Completions { return Kind(rawValue: operatesOn(cmd) ?? "") ?? .no } } + + static func _hint(kind: Kind, candidates: [String]) -> String { + guard let first = candidates.first else { + return "" + } + var result = ""; + switch kind { + case .command: + if let hint = _commandHints()[first] { + result = "\(first) - \(hint)" + } + default: + result = candidates.prefix(5).joined(separator: ", ") + } + + return result; + } - static func _for(str: String) -> (kind: Kind, result: [String]) { + static func _for(str: String) -> (kind: Kind, result: [String], hint: String) { let input = _lastCommand(str) + var result:[String] = [] let parts = input.value.split(separator: " ", maxSplits: 1, omittingEmptySubsequences: false) + debugPrint(input.value, parts) + var kind: Kind = .command + var hint: String = "" if parts.count <= 1 { - return (kind: kind, result: _complete(kind: kind, input: str)) + result = _complete(kind: kind, input: input.value) + hint = _hint(kind: kind, candidates: result) + return (kind: kind, result: result.map { input.prefix + $0 }, hint: hint.isEmpty ? "" : input.prefix + hint) } let cmd = String(parts[0]) kind = _completionKind(cmd) + result = _complete(kind: kind, input: String(parts[1])) + hint = _hint(kind: kind, candidates: result) + let cmdPrefix = input.prefix + cmd + " " return ( kind: kind, - result: _complete(kind: kind, input: String(parts[1])).map( { cmd + " " + input.prefix + $0 } ) + result: result.map( { cmdPrefix + $0 } ), + hint: hint.isEmpty ? "" : cmdPrefix + hint ) } @@ -214,6 +242,7 @@ struct Completions { requestId: request.id, input: request.input, result: res.result, + hint: res.hint, kind: res.kind.rawValue) } diff --git a/Blink/History.swift b/Blink/History.swift index 1b301b0fa..7404e8967 100644 --- a/Blink/History.swift +++ b/Blink/History.swift @@ -46,6 +46,7 @@ struct History { struct SearchResponse: Codable { let requestId: Int + let pattern: String let lines: [Line] let found: Int let total: Int @@ -165,7 +166,7 @@ struct History { let (total, lines) = _filter(lines: _getLines(), pattern: request.pattern) let slice = _slice(lines: lines, with: request) - return SearchResponse(requestId: request.id, lines: slice, found: lines.count, total: total) + return SearchResponse(requestId: request.id, pattern: request.pattern, lines: slice, found: lines.count, total: total) } static func _searchAPI(json: String) -> String? { diff --git a/Blink/TermController.swift b/Blink/TermController.swift index 003755cdc..be37aae68 100644 --- a/Blink/TermController.swift +++ b/Blink/TermController.swift @@ -216,21 +216,24 @@ extension TermController: SessionDelegate { } } +let _apiRoutes:[String: (MCPSession, String) -> AnyPublisher] = [ + "history.search": History.searchAPI, + "completion.for": Complete.forAPI +] + extension TermController: TermDeviceDelegate { func apiCall(_ api: String!, andRequest request: String!) { - guard let session = _session else { + guard + let api = api, + let session = _session, + let call = _apiRoutes[api] + else { return } - - var call: (MCPSession, String) -> AnyPublisher - switch api { - case "history.search": call = History.searchAPI - case "completion.for": call = Completions.forAPI - default: return; - } weak var termView = _termView + _ = call(session, request) .receive(on: RunLoop.main) .sink { termView?.apiResponse(api, response: $0) } diff --git a/Resources/hterm_all.min.js b/Resources/hterm_all.min.js index 71af17aaf..a0a091e54 100644 --- a/Resources/hterm_all.min.js +++ b/Resources/hterm_all.min.js @@ -1,2 +1,2 @@ -!function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=12)}([function(e,t,r){"use strict";r.d(t,"b",function(){return i}),r.d(t,"a",function(){return h});var o=function(){function e(e,t){var r=[],o=!0,n=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);o=!0);}catch(e){n=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("undefined"!=typeof i)throw new Error('Global "lib" object already exists.');var i={};if(i.runtimeDependencies_={},i.initCallbacks_=[],i.rtdep=function(e){var t;try{throw new Error}catch(e){var r=e.stack.split("\n");t=r.length>=3?r[2].replace(/^\s*at\s+/,""):r[1].replace(/^\s*global code@/,"")}for(var o=0;ot.length&&(t=t.repeat(e/t.length+1)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return(e-=this.length)<=0?String(this):(void 0===t&&(t=" "),e>t.length&&(t=t.repeat(e/t.length+1)),String(this)+t.slice(0,e))}),!Object.values||!Object.entries){var s=Function.bind.call(Function.call,Array.prototype.reduce),a=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),l=Function.bind.call(Function.call,Array.prototype.concat);Object.values||(Object.values=function(e){return s(Reflect.ownKeys(e),function(t,r){return l(t,"string"===typeof r&&a(e,r)?[e[r]]:[])},[])}),Object.entries||(Object.entries=function(e){return s(Reflect.ownKeys(e),function(t,r){return l(t,"string"===typeof r&&a(e,r)?[[r,e[r]]]:[])},[])})}if("function"!==typeof Promise.prototype.finally){var c=function(e,t){if(!e||"object"!==("undefined"===typeof e?"undefined":n(e))&&"function"!==typeof e)throw new TypeError("Assertion failed: Type(O) is not Object");var r=e.constructor;if("undefined"===typeof r)return t;if(!r||"object"!==("undefined"===typeof r?"undefined":n(r))&&"function"!==typeof r)throw new TypeError("O.constructor is not an Object");var o="function"===typeof Symbol&&"symbol"===n(Symbol.species)?r[Symbol.species]:void 0;if(null==o)return t;if("function"===typeof o&&o.prototype)return o;throw new TypeError("no constructor found")},u={finally:function(e){var t=this;if("object"!==("undefined"===typeof t?"undefined":n(t))||null===t)throw new TypeError('"this" value is not an Object');var r=c(t,Promise);return"function"!==typeof e?Promise.prototype.then.call(t,e,e):Promise.prototype.then.call(t,function(t){return new r(function(t){return t(e())}).then(function(){return t})},function(t){return new r(function(t){return t(e())}).then(function(){throw t})})}};Object.defineProperty(Promise.prototype,"finally",{configurable:!0,writable:!0,value:u.finally})}i.array={},i.array.arrayBigEndianToUint32=function(e){return(e[0]<<24|e[1]<<16|e[2]<<8|e[3]<<0)>>>0},i.array.uint32ToArrayBigEndian=function(e){return[e>>>24&255,e>>>16&255,e>>>8&255,e>>>0&255]},i.array.concatTyped=function(){for(var e=0,t=arguments.length,r=Array(t),o=0;o>4*(r-2)}if(!e.startsWith("#"))return null;if(e=e.substr(1),-1==[3,6,9,12].indexOf(e.length))return null;if(e.match(/[^a-f0-9]/i))return null;var r=e.length/3,o=e.substr(0,r),n=e.substr(r,r),s=e.substr(r+r,r);return i.colors.arrayToRGBA([o,n,s].map(t))},i.colors.x11ToCSS=function(e){function t(e){return 1==e.length?parseInt(e+e,16):2==e.length?parseInt(e,16):(3==e.length&&(e+=e.substr(2)),Math.round(parseInt(e,16)/257))}var r=e.match(i.colors.re_.x11rgb);return r?(r.splice(0,1),i.colors.arrayToRGBA(r.map(t))):e.startsWith("#")?i.colors.x11HexToCSS(e):i.colors.nameToRGB(e)},i.colors.hexToRGB=function(e){function t(e){4==e.length&&(e=e.replace(r,function(e,t,r,o){return"#"+t+t+r+r+o+o}));var t=e.match(o);return t?"rgb("+parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16)+")":null}var r=i.colors.re_.hex16,o=i.colors.re_.hex24;if(e instanceof Array)for(var n=0;n3?e[3]:1;return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"},i.colors.setAlpha=function(e,t){var r=i.colors.crackRGB(e);return r[3]=t,i.colors.arrayToRGBA(r)},i.colors.mix=function(e,t,r){for(var o=i.colors.crackRGB(e),n=i.colors.crackRGB(t),s=0;s<4;++s){var a=n[s]-o[s];o[s]=Math.round(parseInt(o[s])+a*r)}return i.colors.arrayToRGBA(o)},i.colors.crackRGB=function(e){if(e.startsWith("rgba")){var t=e.match(i.colors.re_.rgba);if(t)return t.shift(),t}else{var t=e.match(i.colors.re_.rgb);if(t)return t.shift(),t.push("1"),t}return console.error("Couldn't crack: "+e),null},i.colors.nameToRGB=function(e){return e in i.colors.colorNames?i.colors.colorNames[e]:(e=e.toLowerCase())in i.colors.colorNames?i.colors.colorNames[e]:(e=e.replace(/\s+/g,""),e in i.colors.colorNames?i.colors.colorNames[e]:null)},i.colors.stockColorPalette=i.colors.hexToRGB(["#000000","#CC0000","#4E9A06","#C4A000","#3465A4","#75507B","#06989A","#D3D7CF","#555753","#EF2929","#00BA13","#FCE94F","#729FCF","#F200CB","#00B5BD","#EEEEEC","#000000","#00005F","#000087","#0000AF","#0000D7","#0000FF","#005F00","#005F5F","#005F87","#005FAF","#005FD7","#005FFF","#008700","#00875F","#008787","#0087AF","#0087D7","#0087FF","#00AF00","#00AF5F","#00AF87","#00AFAF","#00AFD7","#00AFFF","#00D700","#00D75F","#00D787","#00D7AF","#00D7D7","#00D7FF","#00FF00","#00FF5F","#00FF87","#00FFAF","#00FFD7","#00FFFF","#5F0000","#5F005F","#5F0087","#5F00AF","#5F00D7","#5F00FF","#5F5F00","#5F5F5F","#5F5F87","#5F5FAF","#5F5FD7","#5F5FFF","#5F8700","#5F875F","#5F8787","#5F87AF","#5F87D7","#5F87FF","#5FAF00","#5FAF5F","#5FAF87","#5FAFAF","#5FAFD7","#5FAFFF","#5FD700","#5FD75F","#5FD787","#5FD7AF","#5FD7D7","#5FD7FF","#5FFF00","#5FFF5F","#5FFF87","#5FFFAF","#5FFFD7","#5FFFFF","#870000","#87005F","#870087","#8700AF","#8700D7","#8700FF","#875F00","#875F5F","#875F87","#875FAF","#875FD7","#875FFF","#878700","#87875F","#878787","#8787AF","#8787D7","#8787FF","#87AF00","#87AF5F","#87AF87","#87AFAF","#87AFD7","#87AFFF","#87D700","#87D75F","#87D787","#87D7AF","#87D7D7","#87D7FF","#87FF00","#87FF5F","#87FF87","#87FFAF","#87FFD7","#87FFFF","#AF0000","#AF005F","#AF0087","#AF00AF","#AF00D7","#AF00FF","#AF5F00","#AF5F5F","#AF5F87","#AF5FAF","#AF5FD7","#AF5FFF","#AF8700","#AF875F","#AF8787","#AF87AF","#AF87D7","#AF87FF","#AFAF00","#AFAF5F","#AFAF87","#AFAFAF","#AFAFD7","#AFAFFF","#AFD700","#AFD75F","#AFD787","#AFD7AF","#AFD7D7","#AFD7FF","#AFFF00","#AFFF5F","#AFFF87","#AFFFAF","#AFFFD7","#AFFFFF","#D70000","#D7005F","#D70087","#D700AF","#D700D7","#D700FF","#D75F00","#D75F5F","#D75F87","#D75FAF","#D75FD7","#D75FFF","#D78700","#D7875F","#D78787","#D787AF","#D787D7","#D787FF","#D7AF00","#D7AF5F","#D7AF87","#D7AFAF","#D7AFD7","#D7AFFF","#D7D700","#D7D75F","#D7D787","#D7D7AF","#D7D7D7","#D7D7FF","#D7FF00","#D7FF5F","#D7FF87","#D7FFAF","#D7FFD7","#D7FFFF","#FF0000","#FF005F","#FF0087","#FF00AF","#FF00D7","#FF00FF","#FF5F00","#FF5F5F","#FF5F87","#FF5FAF","#FF5FD7","#FF5FFF","#FF8700","#FF875F","#FF8787","#FF87AF","#FF87D7","#FF87FF","#FFAF00","#FFAF5F","#FFAF87","#FFAFAF","#FFAFD7","#FFAFFF","#FFD700","#FFD75F","#FFD787","#FFD7AF","#FFD7D7","#FFD7FF","#FFFF00","#FFFF5F","#FFFF87","#FFFFAF","#FFFFD7","#FFFFFF","#080808","#121212","#1C1C1C","#262626","#303030","#3A3A3A","#444444","#4E4E4E","#585858","#626262","#6C6C6C","#767676","#808080","#8A8A8A","#949494","#9E9E9E","#A8A8A8","#B2B2B2","#BCBCBC","#C6C6C6","#D0D0D0","#DADADA","#E4E4E4","#EEEEEE"]),i.colors.colorPalette=i.colors.stockColorPalette,i.colors.colorNames={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",antiquewhite1:"rgb(255, 239, 219)",antiquewhite2:"rgb(238, 223, 204)",antiquewhite3:"rgb(205, 192, 176)",antiquewhite4:"rgb(139, 131, 120)",aquamarine:"rgb(127, 255, 212)",aquamarine1:"rgb(127, 255, 212)",aquamarine2:"rgb(118, 238, 198)",aquamarine3:"rgb(102, 205, 170)",aquamarine4:"rgb(69, 139, 116)",azure:"rgb(240, 255, 255)",azure1:"rgb(240, 255, 255)",azure2:"rgb(224, 238, 238)",azure3:"rgb(193, 205, 205)",azure4:"rgb(131, 139, 139)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",bisque1:"rgb(255, 228, 196)",bisque2:"rgb(238, 213, 183)",bisque3:"rgb(205, 183, 158)",bisque4:"rgb(139, 125, 107)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blue1:"rgb(0, 0, 255)",blue2:"rgb(0, 0, 238)",blue3:"rgb(0, 0, 205)",blue4:"rgb(0, 0, 139)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",brown1:"rgb(255, 64, 64)",brown2:"rgb(238, 59, 59)",brown3:"rgb(205, 51, 51)",brown4:"rgb(139, 35, 35)",burlywood:"rgb(222, 184, 135)",burlywood1:"rgb(255, 211, 155)",burlywood2:"rgb(238, 197, 145)",burlywood3:"rgb(205, 170, 125)",burlywood4:"rgb(139, 115, 85)",cadetblue:"rgb(95, 158, 160)",cadetblue1:"rgb(152, 245, 255)",cadetblue2:"rgb(142, 229, 238)",cadetblue3:"rgb(122, 197, 205)",cadetblue4:"rgb(83, 134, 139)",chartreuse:"rgb(127, 255, 0)",chartreuse1:"rgb(127, 255, 0)",chartreuse2:"rgb(118, 238, 0)",chartreuse3:"rgb(102, 205, 0)",chartreuse4:"rgb(69, 139, 0)",chocolate:"rgb(210, 105, 30)",chocolate1:"rgb(255, 127, 36)",chocolate2:"rgb(238, 118, 33)",chocolate3:"rgb(205, 102, 29)",chocolate4:"rgb(139, 69, 19)",coral:"rgb(255, 127, 80)",coral1:"rgb(255, 114, 86)",coral2:"rgb(238, 106, 80)",coral3:"rgb(205, 91, 69)",coral4:"rgb(139, 62, 47)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",cornsilk1:"rgb(255, 248, 220)",cornsilk2:"rgb(238, 232, 205)",cornsilk3:"rgb(205, 200, 177)",cornsilk4:"rgb(139, 136, 120)",cyan:"rgb(0, 255, 255)",cyan1:"rgb(0, 255, 255)",cyan2:"rgb(0, 238, 238)",cyan3:"rgb(0, 205, 205)",cyan4:"rgb(0, 139, 139)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgoldenrod1:"rgb(255, 185, 15)",darkgoldenrod2:"rgb(238, 173, 14)",darkgoldenrod3:"rgb(205, 149, 12)",darkgoldenrod4:"rgb(139, 101, 8)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkolivegreen1:"rgb(202, 255, 112)",darkolivegreen2:"rgb(188, 238, 104)",darkolivegreen3:"rgb(162, 205, 90)",darkolivegreen4:"rgb(110, 139, 61)",darkorange:"rgb(255, 140, 0)",darkorange1:"rgb(255, 127, 0)",darkorange2:"rgb(238, 118, 0)",darkorange3:"rgb(205, 102, 0)",darkorange4:"rgb(139, 69, 0)",darkorchid:"rgb(153, 50, 204)",darkorchid1:"rgb(191, 62, 255)",darkorchid2:"rgb(178, 58, 238)",darkorchid3:"rgb(154, 50, 205)",darkorchid4:"rgb(104, 34, 139)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkseagreen1:"rgb(193, 255, 193)",darkseagreen2:"rgb(180, 238, 180)",darkseagreen3:"rgb(155, 205, 155)",darkseagreen4:"rgb(105, 139, 105)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategray1:"rgb(151, 255, 255)",darkslategray2:"rgb(141, 238, 238)",darkslategray3:"rgb(121, 205, 205)",darkslategray4:"rgb(82, 139, 139)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",debianred:"rgb(215, 7, 81)",deeppink:"rgb(255, 20, 147)",deeppink1:"rgb(255, 20, 147)",deeppink2:"rgb(238, 18, 137)",deeppink3:"rgb(205, 16, 118)",deeppink4:"rgb(139, 10, 80)",deepskyblue:"rgb(0, 191, 255)",deepskyblue1:"rgb(0, 191, 255)",deepskyblue2:"rgb(0, 178, 238)",deepskyblue3:"rgb(0, 154, 205)",deepskyblue4:"rgb(0, 104, 139)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",dodgerblue1:"rgb(30, 144, 255)",dodgerblue2:"rgb(28, 134, 238)",dodgerblue3:"rgb(24, 116, 205)",dodgerblue4:"rgb(16, 78, 139)",firebrick:"rgb(178, 34, 34)",firebrick1:"rgb(255, 48, 48)",firebrick2:"rgb(238, 44, 44)",firebrick3:"rgb(205, 38, 38)",firebrick4:"rgb(139, 26, 26)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",gold1:"rgb(255, 215, 0)",gold2:"rgb(238, 201, 0)",gold3:"rgb(205, 173, 0)",gold4:"rgb(139, 117, 0)",goldenrod:"rgb(218, 165, 32)",goldenrod1:"rgb(255, 193, 37)",goldenrod2:"rgb(238, 180, 34)",goldenrod3:"rgb(205, 155, 29)",goldenrod4:"rgb(139, 105, 20)",gray:"rgb(190, 190, 190)",gray0:"rgb(0, 0, 0)",gray1:"rgb(3, 3, 3)",gray10:"rgb(26, 26, 26)",gray100:"rgb(255, 255, 255)",gray11:"rgb(28, 28, 28)",gray12:"rgb(31, 31, 31)",gray13:"rgb(33, 33, 33)",gray14:"rgb(36, 36, 36)",gray15:"rgb(38, 38, 38)",gray16:"rgb(41, 41, 41)",gray17:"rgb(43, 43, 43)",gray18:"rgb(46, 46, 46)",gray19:"rgb(48, 48, 48)",gray2:"rgb(5, 5, 5)",gray20:"rgb(51, 51, 51)",gray21:"rgb(54, 54, 54)",gray22:"rgb(56, 56, 56)",gray23:"rgb(59, 59, 59)",gray24:"rgb(61, 61, 61)",gray25:"rgb(64, 64, 64)",gray26:"rgb(66, 66, 66)",gray27:"rgb(69, 69, 69)",gray28:"rgb(71, 71, 71)",gray29:"rgb(74, 74, 74)",gray3:"rgb(8, 8, 8)",gray30:"rgb(77, 77, 77)",gray31:"rgb(79, 79, 79)",gray32:"rgb(82, 82, 82)",gray33:"rgb(84, 84, 84)",gray34:"rgb(87, 87, 87)",gray35:"rgb(89, 89, 89)",gray36:"rgb(92, 92, 92)",gray37:"rgb(94, 94, 94)",gray38:"rgb(97, 97, 97)",gray39:"rgb(99, 99, 99)",gray4:"rgb(10, 10, 10)",gray40:"rgb(102, 102, 102)",gray41:"rgb(105, 105, 105)",gray42:"rgb(107, 107, 107)",gray43:"rgb(110, 110, 110)",gray44:"rgb(112, 112, 112)",gray45:"rgb(115, 115, 115)",gray46:"rgb(117, 117, 117)",gray47:"rgb(120, 120, 120)",gray48:"rgb(122, 122, 122)",gray49:"rgb(125, 125, 125)",gray5:"rgb(13, 13, 13)",gray50:"rgb(127, 127, 127)",gray51:"rgb(130, 130, 130)",gray52:"rgb(133, 133, 133)",gray53:"rgb(135, 135, 135)",gray54:"rgb(138, 138, 138)",gray55:"rgb(140, 140, 140)",gray56:"rgb(143, 143, 143)",gray57:"rgb(145, 145, 145)",gray58:"rgb(148, 148, 148)",gray59:"rgb(150, 150, 150)",gray6:"rgb(15, 15, 15)",gray60:"rgb(153, 153, 153)",gray61:"rgb(156, 156, 156)",gray62:"rgb(158, 158, 158)",gray63:"rgb(161, 161, 161)",gray64:"rgb(163, 163, 163)",gray65:"rgb(166, 166, 166)",gray66:"rgb(168, 168, 168)",gray67:"rgb(171, 171, 171)",gray68:"rgb(173, 173, 173)",gray69:"rgb(176, 176, 176)",gray7:"rgb(18, 18, 18)",gray70:"rgb(179, 179, 179)",gray71:"rgb(181, 181, 181)",gray72:"rgb(184, 184, 184)",gray73:"rgb(186, 186, 186)",gray74:"rgb(189, 189, 189)",gray75:"rgb(191, 191, 191)",gray76:"rgb(194, 194, 194)",gray77:"rgb(196, 196, 196)",gray78:"rgb(199, 199, 199)",gray79:"rgb(201, 201, 201)",gray8:"rgb(20, 20, 20)",gray80:"rgb(204, 204, 204)",gray81:"rgb(207, 207, 207)",gray82:"rgb(209, 209, 209)",gray83:"rgb(212, 212, 212)",gray84:"rgb(214, 214, 214)",gray85:"rgb(217, 217, 217)",gray86:"rgb(219, 219, 219)",gray87:"rgb(222, 222, 222)",gray88:"rgb(224, 224, 224)",gray89:"rgb(227, 227, 227)",gray9:"rgb(23, 23, 23)",gray90:"rgb(229, 229, 229)",gray91:"rgb(232, 232, 232)",gray92:"rgb(235, 235, 235)",gray93:"rgb(237, 237, 237)",gray94:"rgb(240, 240, 240)",gray95:"rgb(242, 242, 242)",gray96:"rgb(245, 245, 245)",gray97:"rgb(247, 247, 247)",gray98:"rgb(250, 250, 250)",gray99:"rgb(252, 252, 252)",green:"rgb(0, 255, 0)",green1:"rgb(0, 255, 0)",green2:"rgb(0, 238, 0)",green3:"rgb(0, 205, 0)",green4:"rgb(0, 139, 0)",greenyellow:"rgb(173, 255, 47)",grey:"rgb(190, 190, 190)",grey0:"rgb(0, 0, 0)",grey1:"rgb(3, 3, 3)",grey10:"rgb(26, 26, 26)",grey100:"rgb(255, 255, 255)",grey11:"rgb(28, 28, 28)",grey12:"rgb(31, 31, 31)",grey13:"rgb(33, 33, 33)",grey14:"rgb(36, 36, 36)",grey15:"rgb(38, 38, 38)",grey16:"rgb(41, 41, 41)",grey17:"rgb(43, 43, 43)",grey18:"rgb(46, 46, 46)",grey19:"rgb(48, 48, 48)",grey2:"rgb(5, 5, 5)",grey20:"rgb(51, 51, 51)",grey21:"rgb(54, 54, 54)",grey22:"rgb(56, 56, 56)",grey23:"rgb(59, 59, 59)",grey24:"rgb(61, 61, 61)",grey25:"rgb(64, 64, 64)",grey26:"rgb(66, 66, 66)",grey27:"rgb(69, 69, 69)",grey28:"rgb(71, 71, 71)",grey29:"rgb(74, 74, 74)",grey3:"rgb(8, 8, 8)",grey30:"rgb(77, 77, 77)",grey31:"rgb(79, 79, 79)",grey32:"rgb(82, 82, 82)",grey33:"rgb(84, 84, 84)",grey34:"rgb(87, 87, 87)",grey35:"rgb(89, 89, 89)",grey36:"rgb(92, 92, 92)",grey37:"rgb(94, 94, 94)",grey38:"rgb(97, 97, 97)",grey39:"rgb(99, 99, 99)",grey4:"rgb(10, 10, 10)",grey40:"rgb(102, 102, 102)",grey41:"rgb(105, 105, 105)",grey42:"rgb(107, 107, 107)",grey43:"rgb(110, 110, 110)",grey44:"rgb(112, 112, 112)",grey45:"rgb(115, 115, 115)",grey46:"rgb(117, 117, 117)",grey47:"rgb(120, 120, 120)",grey48:"rgb(122, 122, 122)",grey49:"rgb(125, 125, 125)",grey5:"rgb(13, 13, 13)",grey50:"rgb(127, 127, 127)",grey51:"rgb(130, 130, 130)",grey52:"rgb(133, 133, 133)",grey53:"rgb(135, 135, 135)",grey54:"rgb(138, 138, 138)",grey55:"rgb(140, 140, 140)",grey56:"rgb(143, 143, 143)",grey57:"rgb(145, 145, 145)",grey58:"rgb(148, 148, 148)",grey59:"rgb(150, 150, 150)",grey6:"rgb(15, 15, 15)",grey60:"rgb(153, 153, 153)",grey61:"rgb(156, 156, 156)",grey62:"rgb(158, 158, 158)",grey63:"rgb(161, 161, 161)",grey64:"rgb(163, 163, 163)",grey65:"rgb(166, 166, 166)",grey66:"rgb(168, 168, 168)",grey67:"rgb(171, 171, 171)",grey68:"rgb(173, 173, 173)",grey69:"rgb(176, 176, 176)",grey7:"rgb(18, 18, 18)",grey70:"rgb(179, 179, 179)",grey71:"rgb(181, 181, 181)",grey72:"rgb(184, 184, 184)",grey73:"rgb(186, 186, 186)",grey74:"rgb(189, 189, 189)",grey75:"rgb(191, 191, 191)",grey76:"rgb(194, 194, 194)",grey77:"rgb(196, 196, 196)",grey78:"rgb(199, 199, 199)",grey79:"rgb(201, 201, 201)",grey8:"rgb(20, 20, 20)",grey80:"rgb(204, 204, 204)",grey81:"rgb(207, 207, 207)",grey82:"rgb(209, 209, 209)",grey83:"rgb(212, 212, 212)",grey84:"rgb(214, 214, 214)",grey85:"rgb(217, 217, 217)",grey86:"rgb(219, 219, 219)",grey87:"rgb(222, 222, 222)",grey88:"rgb(224, 224, 224)",grey89:"rgb(227, 227, 227)",grey9:"rgb(23, 23, 23)",grey90:"rgb(229, 229, 229)",grey91:"rgb(232, 232, 232)",grey92:"rgb(235, 235, 235)",grey93:"rgb(237, 237, 237)",grey94:"rgb(240, 240, 240)",grey95:"rgb(242, 242, 242)",grey96:"rgb(245, 245, 245)",grey97:"rgb(247, 247, 247)",grey98:"rgb(250, 250, 250)",grey99:"rgb(252, 252, 252)",honeydew:"rgb(240, 255, 240)",honeydew1:"rgb(240, 255, 240)",honeydew2:"rgb(224, 238, 224)",honeydew3:"rgb(193, 205, 193)",honeydew4:"rgb(131, 139, 131)",hotpink:"rgb(255, 105, 180)",hotpink1:"rgb(255, 110, 180)",hotpink2:"rgb(238, 106, 167)",hotpink3:"rgb(205, 96, 144)",hotpink4:"rgb(139, 58, 98)",indianred:"rgb(205, 92, 92)",indianred1:"rgb(255, 106, 106)",indianred2:"rgb(238, 99, 99)",indianred3:"rgb(205, 85, 85)",indianred4:"rgb(139, 58, 58)",ivory:"rgb(255, 255, 240)",ivory1:"rgb(255, 255, 240)",ivory2:"rgb(238, 238, 224)",ivory3:"rgb(205, 205, 193)",ivory4:"rgb(139, 139, 131)",khaki:"rgb(240, 230, 140)",khaki1:"rgb(255, 246, 143)",khaki2:"rgb(238, 230, 133)",khaki3:"rgb(205, 198, 115)",khaki4:"rgb(139, 134, 78)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lavenderblush1:"rgb(255, 240, 245)",lavenderblush2:"rgb(238, 224, 229)",lavenderblush3:"rgb(205, 193, 197)",lavenderblush4:"rgb(139, 131, 134)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lemonchiffon1:"rgb(255, 250, 205)",lemonchiffon2:"rgb(238, 233, 191)",lemonchiffon3:"rgb(205, 201, 165)",lemonchiffon4:"rgb(139, 137, 112)",lightblue:"rgb(173, 216, 230)",lightblue1:"rgb(191, 239, 255)",lightblue2:"rgb(178, 223, 238)",lightblue3:"rgb(154, 192, 205)",lightblue4:"rgb(104, 131, 139)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightcyan1:"rgb(224, 255, 255)",lightcyan2:"rgb(209, 238, 238)",lightcyan3:"rgb(180, 205, 205)",lightcyan4:"rgb(122, 139, 139)",lightgoldenrod:"rgb(238, 221, 130)",lightgoldenrod1:"rgb(255, 236, 139)",lightgoldenrod2:"rgb(238, 220, 130)",lightgoldenrod3:"rgb(205, 190, 112)",lightgoldenrod4:"rgb(139, 129, 76)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightpink1:"rgb(255, 174, 185)",lightpink2:"rgb(238, 162, 173)",lightpink3:"rgb(205, 140, 149)",lightpink4:"rgb(139, 95, 101)",lightsalmon:"rgb(255, 160, 122)",lightsalmon1:"rgb(255, 160, 122)",lightsalmon2:"rgb(238, 149, 114)",lightsalmon3:"rgb(205, 129, 98)",lightsalmon4:"rgb(139, 87, 66)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightskyblue1:"rgb(176, 226, 255)",lightskyblue2:"rgb(164, 211, 238)",lightskyblue3:"rgb(141, 182, 205)",lightskyblue4:"rgb(96, 123, 139)",lightslateblue:"rgb(132, 112, 255)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightsteelblue1:"rgb(202, 225, 255)",lightsteelblue2:"rgb(188, 210, 238)",lightsteelblue3:"rgb(162, 181, 205)",lightsteelblue4:"rgb(110, 123, 139)",lightyellow:"rgb(255, 255, 224)",lightyellow1:"rgb(255, 255, 224)",lightyellow2:"rgb(238, 238, 209)",lightyellow3:"rgb(205, 205, 180)",lightyellow4:"rgb(139, 139, 122)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",magenta1:"rgb(255, 0, 255)",magenta2:"rgb(238, 0, 238)",magenta3:"rgb(205, 0, 205)",magenta4:"rgb(139, 0, 139)",maroon:"rgb(176, 48, 96)",maroon1:"rgb(255, 52, 179)",maroon2:"rgb(238, 48, 167)",maroon3:"rgb(205, 41, 144)",maroon4:"rgb(139, 28, 98)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumorchid1:"rgb(224, 102, 255)",mediumorchid2:"rgb(209, 95, 238)",mediumorchid3:"rgb(180, 82, 205)",mediumorchid4:"rgb(122, 55, 139)",mediumpurple:"rgb(147, 112, 219)",mediumpurple1:"rgb(171, 130, 255)",mediumpurple2:"rgb(159, 121, 238)",mediumpurple3:"rgb(137, 104, 205)",mediumpurple4:"rgb(93, 71, 139)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",mistyrose1:"rgb(255, 228, 225)",mistyrose2:"rgb(238, 213, 210)",mistyrose3:"rgb(205, 183, 181)",mistyrose4:"rgb(139, 125, 123)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navajowhite1:"rgb(255, 222, 173)",navajowhite2:"rgb(238, 207, 161)",navajowhite3:"rgb(205, 179, 139)",navajowhite4:"rgb(139, 121, 94)",navy:"rgb(0, 0, 128)",navyblue:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olivedrab:"rgb(107, 142, 35)",olivedrab1:"rgb(192, 255, 62)",olivedrab2:"rgb(179, 238, 58)",olivedrab3:"rgb(154, 205, 50)",olivedrab4:"rgb(105, 139, 34)",orange:"rgb(255, 165, 0)",orange1:"rgb(255, 165, 0)",orange2:"rgb(238, 154, 0)",orange3:"rgb(205, 133, 0)",orange4:"rgb(139, 90, 0)",orangered:"rgb(255, 69, 0)",orangered1:"rgb(255, 69, 0)",orangered2:"rgb(238, 64, 0)",orangered3:"rgb(205, 55, 0)",orangered4:"rgb(139, 37, 0)",orchid:"rgb(218, 112, 214)",orchid1:"rgb(255, 131, 250)",orchid2:"rgb(238, 122, 233)",orchid3:"rgb(205, 105, 201)",orchid4:"rgb(139, 71, 137)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",palegreen1:"rgb(154, 255, 154)",palegreen2:"rgb(144, 238, 144)",palegreen3:"rgb(124, 205, 124)",palegreen4:"rgb(84, 139, 84)",paleturquoise:"rgb(175, 238, 238)",paleturquoise1:"rgb(187, 255, 255)",paleturquoise2:"rgb(174, 238, 238)",paleturquoise3:"rgb(150, 205, 205)",paleturquoise4:"rgb(102, 139, 139)",palevioletred:"rgb(219, 112, 147)",palevioletred1:"rgb(255, 130, 171)",palevioletred2:"rgb(238, 121, 159)",palevioletred3:"rgb(205, 104, 137)",palevioletred4:"rgb(139, 71, 93)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peachpuff1:"rgb(255, 218, 185)",peachpuff2:"rgb(238, 203, 173)",peachpuff3:"rgb(205, 175, 149)",peachpuff4:"rgb(139, 119, 101)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",pink1:"rgb(255, 181, 197)",pink2:"rgb(238, 169, 184)",pink3:"rgb(205, 145, 158)",pink4:"rgb(139, 99, 108)",plum:"rgb(221, 160, 221)",plum1:"rgb(255, 187, 255)",plum2:"rgb(238, 174, 238)",plum3:"rgb(205, 150, 205)",plum4:"rgb(139, 102, 139)",powderblue:"rgb(176, 224, 230)",purple:"rgb(160, 32, 240)",purple1:"rgb(155, 48, 255)",purple2:"rgb(145, 44, 238)",purple3:"rgb(125, 38, 205)",purple4:"rgb(85, 26, 139)",red:"rgb(255, 0, 0)",red1:"rgb(255, 0, 0)",red2:"rgb(238, 0, 0)",red3:"rgb(205, 0, 0)",red4:"rgb(139, 0, 0)",rosybrown:"rgb(188, 143, 143)",rosybrown1:"rgb(255, 193, 193)",rosybrown2:"rgb(238, 180, 180)",rosybrown3:"rgb(205, 155, 155)",rosybrown4:"rgb(139, 105, 105)",royalblue:"rgb(65, 105, 225)",royalblue1:"rgb(72, 118, 255)",royalblue2:"rgb(67, 110, 238)",royalblue3:"rgb(58, 95, 205)",royalblue4:"rgb(39, 64, 139)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",salmon1:"rgb(255, 140, 105)",salmon2:"rgb(238, 130, 98)",salmon3:"rgb(205, 112, 84)",salmon4:"rgb(139, 76, 57)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seagreen1:"rgb(84, 255, 159)",seagreen2:"rgb(78, 238, 148)",seagreen3:"rgb(67, 205, 128)",seagreen4:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",seashell1:"rgb(255, 245, 238)",seashell2:"rgb(238, 229, 222)",seashell3:"rgb(205, 197, 191)",seashell4:"rgb(139, 134, 130)",sienna:"rgb(160, 82, 45)",sienna1:"rgb(255, 130, 71)",sienna2:"rgb(238, 121, 66)",sienna3:"rgb(205, 104, 57)",sienna4:"rgb(139, 71, 38)",skyblue:"rgb(135, 206, 235)",skyblue1:"rgb(135, 206, 255)",skyblue2:"rgb(126, 192, 238)",skyblue3:"rgb(108, 166, 205)",skyblue4:"rgb(74, 112, 139)",slateblue:"rgb(106, 90, 205)",slateblue1:"rgb(131, 111, 255)",slateblue2:"rgb(122, 103, 238)",slateblue3:"rgb(105, 89, 205)",slateblue4:"rgb(71, 60, 139)",slategray:"rgb(112, 128, 144)",slategray1:"rgb(198, 226, 255)",slategray2:"rgb(185, 211, 238)",slategray3:"rgb(159, 182, 205)",slategray4:"rgb(108, 123, 139)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",snow1:"rgb(255, 250, 250)",snow2:"rgb(238, 233, 233)",snow3:"rgb(205, 201, 201)",snow4:"rgb(139, 137, 137)",springgreen:"rgb(0, 255, 127)",springgreen1:"rgb(0, 255, 127)",springgreen2:"rgb(0, 238, 118)",springgreen3:"rgb(0, 205, 102)",springgreen4:"rgb(0, 139, 69)",steelblue:"rgb(70, 130, 180)",steelblue1:"rgb(99, 184, 255)",steelblue2:"rgb(92, 172, 238)",steelblue3:"rgb(79, 148, 205)",steelblue4:"rgb(54, 100, 139)",tan:"rgb(210, 180, 140)",tan1:"rgb(255, 165, 79)",tan2:"rgb(238, 154, 73)",tan3:"rgb(205, 133, 63)",tan4:"rgb(139, 90, 43)",thistle:"rgb(216, 191, 216)",thistle1:"rgb(255, 225, 255)",thistle2:"rgb(238, 210, 238)",thistle3:"rgb(205, 181, 205)",thistle4:"rgb(139, 123, 139)",tomato:"rgb(255, 99, 71)",tomato1:"rgb(255, 99, 71)",tomato2:"rgb(238, 92, 66)",tomato3:"rgb(205, 79, 57)",tomato4:"rgb(139, 54, 38)",turquoise:"rgb(64, 224, 208)",turquoise1:"rgb(0, 245, 255)",turquoise2:"rgb(0, 229, 238)",turquoise3:"rgb(0, 197, 205)",turquoise4:"rgb(0, 134, 139)",violet:"rgb(238, 130, 238)",violetred:"rgb(208, 32, 144)",violetred1:"rgb(255, 62, 150)",violetred2:"rgb(238, 58, 140)",violetred3:"rgb(205, 50, 120)",violetred4:"rgb(139, 34, 82)",wheat:"rgb(245, 222, 179)",wheat1:"rgb(255, 231, 186)",wheat2:"rgb(238, 216, 174)",wheat3:"rgb(205, 186, 150)",wheat4:"rgb(139, 126, 102)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellow1:"rgb(255, 255, 0)",yellow2:"rgb(238, 238, 0)",yellow3:"rgb(205, 205, 0)",yellow4:"rgb(139, 139, 0)",yellowgreen:"rgb(154, 205, 50)"},i.f={},i.f.createEnum=function(e){return new String(e)},i.f.replaceVars=function(e,t){return e.replace(/%([a-z]*)\(([^\)]+)\)/gi,function(e,r,o){if("undefined"==typeof t[o])throw"Unknown variable: "+o;var n=t[o];if(r in i.f.replaceVars.functions)n=i.f.replaceVars.functions[r](n);else if(r)throw"Unknown escape function: "+r;return n})},i.f.replaceVars.functions={encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,escapeHTML:function(e){var t={"<":"<",">":">","&":"&",'"':""","'":"'"};return e.replace(/[<>&\"\']/g,function(e){return t[e]})}},i.f.parseQuery=function(e){e.startsWith("?")&&(e=e.substr(1));for(var t={},r=e.split("&"),o=0;or?r:e},i.f.zpad=function(e,t){return String(e).padStart(t,"0")},i.f.getWhitespace=function(e){if(e<=0)return"";var t=this.getWhitespace;for(t.whitespace||(t.whitespace=" ");e>t.whitespace.length;)t.whitespace+=t.whitespace;return t.whitespace.substr(0,e)},i.f.alarm=function(e,t){var r=t||5e3,o=i.f.getStack(1);return function(){var t=setTimeout(function(){var n="string"==typeof e?n:e.name;n=n?": "+n:"",console.warn("lib.f.alarm: timeout expired: "+r/1e3+"s"+n),console.log(o),t=null},r),n=function(e){return function(){return t&&(clearTimeout(t),t=null),e.apply(null,arguments)}};return"string"==typeof e?n:n(e)}()},i.f.getStack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=(new Error).stack.split("\n");e+=2;var o=r.length-e;t=void 0===t?o:i.f.clamp(t,0,o);for(var n=new Array,s=e;s0&&void 0!==arguments[0]?arguments[0]:null,t=void 0;return window.browser&&browser.runtime?t=browser.runtime.lastError:window.chrome&&chrome.runtime&&(t=chrome.runtime.lastError),t&&t.message?t.message:e},i.i18n={},i.i18n.browser_=window.browser&&browser.i18n?browser.i18n:window.chrome&&chrome.i18n?chrome.i18n:null,i.i18n.getAcceptLanguages=function(e){i.i18n.browser_?i.i18n.browser_.getAcceptLanguages(e):setTimeout(function(){e([navigator.language.replace(/-/g,"_")])},0)},i.i18n.getMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i.i18n.browser_){var o=i.i18n.browser_.getMessage(e,t);if(o)return o}return i.i18n.replaceReferences(r,t)},i.i18n.replaceReferences=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===t&&(t=[]),t instanceof Array||(t=[t]),e.replace(/\$(\d+)/g,function(e,r){return r<=t.length?t[r-1]:""})},i.MessageManager=function(e){this.languages_=e.map(function(e){return e.replace(/-/g,"_")}),-1==this.languages_.indexOf("en")&&this.languages_.unshift("en"),this.messages={}},i.MessageManager.prototype.addMessages=function(e){for(var t in e){var r=e[t];r.placeholders?this.messages[t]=r.message.replace(/\$([a-z][^\s\$]+)\$/gi,function(r,o){return e[t].placeholders[o.toLowerCase()].content}):this.messages[t]=r.message}},i.MessageManager.prototype.findAndLoadMessages=function(e,t){function r(e){e?n=o.shift():i=o.shift(),o.length?s():t(n,i)}var o=this.languages_.concat(),n=[],i=[],s=function(){this.loadMessages(this.replaceReferences(e,o),r.bind(this,!0),r.bind(this,!1))}.bind(this);s()},i.MessageManager.prototype.loadMessages=function(e,t,r){var o=this,n=new XMLHttpRequest;n.onload=function(){o.addMessages(JSON.parse(n.responseText)),t()},r&&(n.onerror=function(){return r(n)}),n.open("GET",e),n.send()},i.MessageManager.prototype.replaceReferences=i.i18n.replaceReferences,i.MessageManager.prototype.get=function(e,t,r){var o=i.i18n.getMessage(e,t);return o||(o=this.messages[e],o||(console.warn("Unknown message: "+e),o=void 0===r?e:r,this.messages[e]=o),this.replaceReferences(o,t))},i.MessageManager.prototype.processI18nAttributes=function(e){for(var t=e.querySelectorAll("[i18n]"),r=0;r=0&&this.observers.splice(t,1)},i.PreferenceManager.Record.prototype.get=function(){return this.currentValue===this.DEFAULT_VALUE?/^(string|number)$/.test(n(this.defaultValue))?this.defaultValue:"object"==n(this.defaultValue)?JSON.parse(JSON.stringify(this.defaultValue)):this.defaultValue:this.currentValue},i.PreferenceManager.prototype.deactivate=function(){if(!this.isActive_)throw new Error("Not activated");this.isActive_=!1,this.storage.removeObserver(this.storageObserver_)},i.PreferenceManager.prototype.activate=function(){if(this.isActive_)throw new Error("Already activated");this.isActive_=!0,this.storage.addObserver(this.storageObserver_)},i.PreferenceManager.prototype.readStorage=function(e){function t(){0==--o&&e&&e()}var r=this,o=0,n=Object.keys(this.prefRecords_).map(function(e){return r.prefix+e});this.trace&&console.log("Preferences read: "+this.prefix),this.storage.getItems(n,function(r){var n=this.prefix.length;for(var i in r){var s=r[i],a=i.substr(n),l=a in this.childLists_&&JSON.stringify(s)!=JSON.stringify(this.prefRecords_[a].currentValue);this.prefRecords_[a].currentValue=s,l&&(o++,this.syncChildList(a,t))}0==o&&e&&setTimeout(e)}.bind(this))},i.PreferenceManager.prototype.definePreference=function(e,t,r){var o=this.prefRecords_[e];o?this.changeDefault(e,t):o=this.prefRecords_[e]=new i.PreferenceManager.Record(e,t),r&&o.addObserver(r)},i.PreferenceManager.prototype.definePreferences=function(e){for(var t=0;t=0&&s.splice(c,1),!this.childLists_[e][l]){var u=this.childFactories_[e](this,l);if(!u){console.warn("Unable to restore child: "+e+": "+l);continue}u.trace=this.trace,this.childLists_[e][l]=u,o++,u.readStorage(r)}}for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.prefRecords_[e];if(!n)throw new Error("Unknown preference: "+e);var i=n.get();this.diff(i,t)&&(this.diff(n.defaultValue,t)?(n.currentValue=t,o&&this.storage.setItem(this.prefix+e,t,r)):(n.currentValue=this.DEFAULT_VALUE,o&&this.storage.removeItem(this.prefix+e,r)),setTimeout(this.notifyChange_.bind(this,e),0))},i.PreferenceManager.prototype.get=function(e){var t=this.prefRecords_[e];if(!t)throw new Error("Unknown preference: "+e);return t.get()},i.PreferenceManager.prototype.exportAsJson=function(){var e={};for(var t in this.prefRecords_)if(t in this.childLists_){e[t]=[];for(var r=this.get(t),o=0;o=0;o--){var n=e[o],i=this.storage_.getItem(n);if("string"==typeof i)try{r[n]=JSON.parse(i)}catch(e){r[n]=i}else e.splice(o,1)}setTimeout(t.bind(null,r),0)},i.Storage.Local.prototype.setItem=function(e,t,r){this.storage_.setItem(e,JSON.stringify(t)),r&&setTimeout(r,0)},i.Storage.Local.prototype.setItems=function(e,t){for(var r in e)this.storage_.setItem(r,JSON.stringify(e[r]));t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItem=function(e,t){this.storage_.removeItem(e),t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItems=function(e,t){for(var r=0;r=0;o--){var n=e[o],i=this.storage_[n];if("string"==typeof i)try{r[n]=JSON.parse(i)}catch(e){r[n]=i}else e.splice(o,1)}setTimeout(t.bind(null,r),0)},i.Storage.Memory.prototype.setItem=function(e,t,r){var o=this.storage_[e];this.storage_[e]=JSON.stringify(t);var n={};n[e]={oldValue:o,newValue:t},setTimeout(function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:console;this.save=!1,this.data="",this.prefix_="",this.prefixStack_=0,this.console_=t,["log","debug","info","warn","error"].forEach(function(t){var r="";switch(t){case"debug":case"warn":case"error":r=t.toUpperCase()+": "}var o=e.console_[t];e[t]=e.console_[t]=function(){for(var t=arguments.length,n=Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:"";r(t),e.save&&(e.data+=e.prefix_+t+"\n"),e.prefix_=" ".repeat(++e.prefixStack_)}});var r=this.console_.groupEnd;this.groupEnd=this.console_.groupEnd=function(){r(),e.prefixStack_&&(e.prefix_=" ".repeat(--e.prefixStack_))}},i.TestManager.Suite=function(e){function t(t,r){this.testManager_=t,this.suiteName=e,this.setup(r)}return t.suiteName=e,t.addTest=i.TestManager.Suite.addTest,t.disableTest=i.TestManager.Suite.disableTest,t.getTest=i.TestManager.Suite.getTest,t.getTestList=i.TestManager.Suite.getTestList,t.testList_=[],t.testMap_={},t.prototype=Object.create(i.TestManager.Suite.prototype),t.constructor=i.TestManager.Suite,i.TestManager.Suite.subclasses.push(t),t},i.TestManager.Suite.subclasses=[],i.TestManager.Suite.addTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);this.testMap_[e]=r,this.testList_.push(r)},i.TestManager.Suite.disableTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);console.log("Disabled test: "+r.fullName)},i.TestManager.Suite.getTest=function(e){return this.testMap_[e]},i.TestManager.Suite.getTestList=function(){return this.testList_},i.TestManager.Suite.prototype.setDefaults=function(e,t){for(var r in t)this[r]=r in e?e[r]:t[r]},i.TestManager.Suite.prototype.setup=function(e){},i.TestManager.Suite.prototype.preamble=function(e,t){},i.TestManager.Suite.prototype.postamble=function(e,t){},i.TestManager.Test=function(e,t,r){this.suiteClass=e,this.testName=t,this.fullName=e.suiteName+"["+t+"]",this.testFunction_=r},i.TestManager.Test.prototype.run=function(e){try{this.testFunction_.apply(e.suite,[e,e.testRun.cx])}catch(t){if(t instanceof i.TestManager.Result.TestComplete)return;e.println("Test raised an exception: "+t),t.stack&&(t.stack instanceof Array?e.println(t.stack.join("\n")):e.println(t.stack)),e.completeTest_(e.FAILED,!1)}},i.TestManager.TestRun=function(e,t){this.testManager=e,this.log=e.log,this.cx=t||{},this.failures=[],this.passes=[],this.startDate=null,this.duration=null,this.currentResult=null,this.maxFailures=0,this.panic=!1,this.testQueue_=[]},i.TestManager.TestRun.prototype.ALL_TESTS=i.f.createEnum(""),i.TestManager.TestRun.prototype.selectTest=function(e){this.testQueue_.push(e)},i.TestManager.TestRun.prototype.selectSuite=function(e,t){for(var r=t||this.ALL_TESTS,o=0,n=e.getTestList(),i=0;i500&&this.log.warn("Slow test took "+this.msToSeconds_(e.duration)),this.log.groupEnd(),e.status==e.FAILED)this.failures.push(e),this.currentSuite=null;else{if(e.status!=e.PASSED)return this.log.error("Unknown result status: "+e.test.fullName+": "+e.status),void(this.panic=!0);this.passes.push(e)}this.runNextTest_()},i.TestManager.TestRun.prototype.onResultReComplete=function(e,t){this.log.error("Late complete for test: "+e.test.fullName+": "+t);var r=this.passes.indexOf(e);r>=0&&(this.passes.splice(r,1),this.failures.push(e))},i.TestManager.TestRun.prototype.runNextTest_=function(){if(this.panic||!this.testQueue_.length)return void this.onTestRunComplete_();if(this.maxFailures&&this.failures.length>=this.maxFailures)return this.log.error("Maximum failure count reached, aborting test run."),void this.onTestRunComplete_();var e=this.testQueue_[0],t=this.currentResult?this.currentResult.suite:null;try{t&&t instanceof e.suiteClass||(t&&this.log.groupEnd(),this.log.group(e.suiteClass.suiteName),t=new e.suiteClass(this.testManager,this.cx))}catch(e){return this.log.error("Exception during setup: "+(e.stack?e.stack:e)),this.panic=!0,void this.onTestRunComplete_()}try{this.log.group(e.testName),this.currentResult=new i.TestManager.Result(this,t,e),this.testManager.testPreamble(this.currentResult,this.cx),t.preamble(this.currentResult,this.cx),this.testQueue_.shift()}catch(e){return this.log.error("Unexpected exception during test preamble: "+(e.stack?e.stack:e)),this.log.groupEnd(),this.panic=!0,void this.onTestRunComplete_()}try{this.currentResult.run()}catch(e){this.log.error("Unexpected exception during test run: "+(e.stack?e.stack:e)),this.panic=!0}},i.TestManager.TestRun.prototype.run=function(){this.log.info("Running "+this.testQueue_.length+" test(s)"),window.onerror=this.onUncaughtException_.bind(this),this.startDate=new Date,this.runNextTest_()},i.TestManager.TestRun.prototype.msToSeconds_=function(e){return(e/1e3).toFixed(2)+"s"},i.TestManager.TestRun.prototype.summarize=function(){if(this.failures.length)for(var e=0;e1?"\n"+r.join("\n"):r.join("\n")}if(e!==t&&!(t instanceof Array&&i.array.compare(e,t))){var n=r?"["+r+"]":"";this.fail("assertEQ"+n+": "+this.getCallerLocation_(1)+": "+o(e)+" !== "+o(t))}},i.TestManager.Result.prototype.assert=function(e,t){if(!0!==e){var r=t?"["+t+"]":"";this.fail("assert"+r+": "+this.getCallerLocation_(1)+": "+String(e))}},i.TestManager.Result.prototype.getCallerLocation_=function(e){try{throw new Error}catch(o){var t=o.stack.split("\n")[e+2],r=t.match(/([^\/]+:\d+):\d+\)?$/);return r?r[1]:"???"}},i.TestManager.Result.prototype.println=function(e){this.testRun.log.info(e)},i.TestManager.Result.prototype.fail=function(e){arguments.length&&this.println(e),this.completeTest_(this.FAILED,!0)},i.TestManager.Result.prototype.pass=function(){this.completeTest_(this.PASSED,!0)},i.UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},i.UTF8Decoder.prototype.decode=function(e){for(var t="",r=0;r1114111?t+="\ufffd":n<65536?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296+(n>>>10&1023),56320+(1023&n)))}}else t+="\ufffd",this.bytesLeft=0,r--}return t},i.decodeUTF8=function(e){return(new i.UTF8Decoder).decode(e)},i.encodeUTF8=function(e){for(var t="",r=0;r>>6),i=1):o<=65535?(t+=String.fromCharCode(224|o>>>12),i=2):(t+=String.fromCharCode(240|o>>>18),i=3);i>0;)i--,t+=String.fromCharCode(128|o>>>6*i&63)}return t},i.wc={},i.wc.nulWidth=0,i.wc.controlWidth=0,i.wc.regardCjkAmbiguous=!1,i.wc.cjkAmbiguousWidth=2,i.wc.combining=[[173,173],[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,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,3769],[3771,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,43452],[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],[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],[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],[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],[92912,92916],[92976,92982],[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],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],i.wc.ambiguous=[[161,161],[164,164],[167,168],[170,170],[173,174],[176,180],[182,186],[188,191],[198,198],[208,208],[215,216],[222,225],[230,230],[232,234],[236,237],[240,240],[242,243],[247,250],[252,252],[254,254],[257,257],[273,273],[275,275],[283,283],[294,295],[299,299],[305,307],[312,312],[319,322],[324,324],[328,331],[333,333],[338,339],[358,359],[363,363],[462,462],[464,464],[466,466],[468,468],[470,470],[472,472],[474,474],[476,476],[593,593],[609,609],[708,708],[711,711],[713,715],[717,717],[720,720],[728,731],[733,733],[735,735],[768,879],[913,929],[931,937],[945,961],[963,969],[1025,1025],[1040,1103],[1105,1105],[4352,4447],[8208,8208],[8211,8214],[8216,8217],[8220,8221],[8224,8226],[8228,8231],[8240,8240],[8242,8243],[8245,8245],[8251,8251],[8254,8254],[8308,8308],[8319,8319],[8321,8324],[8364,8364],[8451,8451],[8453,8453],[8457,8457],[8467,8467],[8470,8470],[8481,8482],[8486,8486],[8491,8491],[8531,8532],[8539,8542],[8544,8555],[8560,8569],[8585,8585],[8592,8601],[8632,8633],[8658,8658],[8660,8660],[8679,8679],[8704,8704],[8706,8707],[8711,8712],[8715,8715],[8719,8719],[8721,8721],[8725,8725],[8730,8730],[8733,8736],[8739,8739],[8741,8741],[8743,8748],[8750,8750],[8756,8759],[8764,8765],[8776,8776],[8780,8780],[8786,8786],[8800,8801],[8804,8807],[8810,8811],[8814,8815],[8834,8835],[8838,8839],[8853,8853],[8857,8857],[8869,8869],[8895,8895],[8978,8978],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9312,9449],[9451,9547],[9552,9587],[9600,9615],[9618,9621],[9632,9633],[9635,9641],[9650,9651],[9654,9655],[9660,9661],[9664,9665],[9670,9672],[9675,9675],[9678,9681],[9698,9701],[9711,9711],[9725,9726],[9733,9734],[9737,9737],[9742,9743],[9748,9749],[9756,9756],[9758,9758],[9792,9792],[9794,9794],[9800,9811],[9824,9825],[9827,9829],[9831,9834],[9836,9837],[9839,9839],[9855,9855],[9875,9875],[9886,9887],[9889,9889],[9898,9899],[9917,9919],[9924,9953],[9955,9955],[9960,9983],[9989,9989],[9994,9995],[10024,10024],[10045,10045],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10102,10111],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11097],[11904,12255],[12272,12350],[12352,19903],[19968,42191],[43360,43391],[44032,55203],[57344,64255],[65024,65049],[65072,65135],[65281,65376],[65504,65510],[65533,65533],[94176,94177],[94208,101119],[110592,110895],[110960,111359],[126980,126980],[127183,127183],[127232,127242],[127248,127277],[127280,127337],[127344,127404],[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],[128747,128748],[128756,128761],[129296,129342],[129344,129392],[129395,129398],[129402,129402],[129404,129442],[129456,129465],[129472,129474],[129488,129535],[131072,196605],[196608,262141],[917760,917999],[983040,1048573],[1048576,1114109]],i.wc.unambiguous=[[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,12255],[12272,12350],[12352,12871],[12880,19903],[19968,42191],[43360,43391],[44032,55203],[63744,64255],[65040,65049],[65072,65135],[65281,65376],[65504,65510],[94176,94177],[94208,101119],[110592,110895],[110960,111359],[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],[128747,128748],[128756,128761],[129296,129342],[129344,129392],[129395,129398],[129402,129402],[129404,129442],[129456,129465],[129472,129474],[129488,129535],[131072,196605],[196608,262141]],i.wc.binaryTableSearch_=function(e,t){var r,o=0,n=t.length-1;if(et[n][1])return!1;for(;n>=o;)if(r=Math.floor((o+n)/2),e>t[r][1])o=r+1;else{if(!(e=32?1:0==e?i.wc.nulWidth:i.wc.controlWidth:e<160?i.wc.controlWidth:i.wc.isSpace(e)?0:i.wc.binaryTableSearch_(e,i.wc.unambiguous)?2:1},i.wc.charWidthRegardAmbiguous=function(e){return i.wc.isCjkAmbiguous(e)?i.wc.cjkAmbiguousWidth:i.wc.charWidthDisregardAmbiguous(e)},i.wc.strWidth=function(e){for(var t,r=0,o=0;ot)break;s+=a<=65535?1:2}if(void 0!=r){for(o=s,n=0;or)break;o+=l<=65535?1:2}return e.substring(s,o)}return e.substr(s)},i.wc.substring=function(e,t,r){return i.wc.substr(e,t,r-t)},i.resource.add("libdot/changelog/version","text/plain","2018-10-24"),i.resource.add("libdot/changelog/date","text/plain","1.24"),i.resource.add("hterm/audio/bell","audio/ogg;base64","T2dnUwACAAAAAAAAAADhqW5KAAAAAMFvEjYBHgF2b3JiaXMAAAAAAYC7AAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAA4aluSgEAAAAAesI3EC3//////////////////8kDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDkwNzA5AAAAAAEFdm9yYmlzKUJDVgEACAAAADFMIMWA0JBVAAAQAABgJCkOk2ZJKaWUoSh5mJRISSmllMUwiZiUicUYY4wxxhhjjDHGGGOMIDRkFQAABACAKAmOo+ZJas45ZxgnjnKgOWlOOKcgB4pR4DkJwvUmY26mtKZrbs4pJQgNWQUAAAIAQEghhRRSSCGFFGKIIYYYYoghhxxyyCGnnHIKKqigggoyyCCDTDLppJNOOumoo4466ii00EILLbTSSkwx1VZjrr0GXXxzzjnnnHPOOeecc84JQkNWAQAgAAAEQgYZZBBCCCGFFFKIKaaYcgoyyIDQkFUAACAAgAAAAABHkRRJsRTLsRzN0SRP8ixREzXRM0VTVE1VVVVVdV1XdmXXdnXXdn1ZmIVbuH1ZuIVb2IVd94VhGIZhGIZhGIZh+H3f933f930gNGQVACABAKAjOZbjKaIiGqLiOaIDhIasAgBkAAAEACAJkiIpkqNJpmZqrmmbtmirtm3LsizLsgyEhqwCAAABAAQAAAAAAKBpmqZpmqZpmqZpmqZpmqZpmqZpmmZZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZlmVZQGjIKgBAAgBAx3Ecx3EkRVIkx3IsBwgNWQUAyAAACABAUizFcjRHczTHczzHczxHdETJlEzN9EwPCA1ZBQAAAgAIAAAAAABAMRzFcRzJ0SRPUi3TcjVXcz3Xc03XdV1XVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVY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DnH5TRq+kxun8fBkdxQJGhgd2Hjx01BBAwgQl7L/I5fyd4RJE3+TUdNjIPKSc0AJg/T+JxNNnK5Uly3VuterJOpzh3hmts5DWKExy3/j6l2J4eAAjI4PbjG9UF6YQrMaBWRCufu4fHRn0Bvp7USzkUS4vmD9as+IP3cSHWL5eXGTUizk6v/IDubodM7+++qs+ENbsg2RxLlE/5pr1Ew8H25aFnp6u2CFvGx0e0JHQGdMEJTWgkTo7d4xe3NfXg1KpiLe86TWg9ONtc3eKuVX3yatei5m1AIa6pRT9QaCeb2YporBzx7Zd0chnRkgKbaSLsMLZcK6/rzecU53n5TSAEkw/HPkFy86BpJtq3LRBIK6jq7NDhPOqPi0A0+cuuxq6EMas5bGJaVQWFWgTbrqVTdEX9f4ZvmfB9/3Il5bW2hNmnZbDB4omLpw/h7n5RYCa+3E0ToY4Jp9XiGSYk/WMvHmlxDEn7yN5ffN4mTzrM808G+0leJqVbG81njbfjFJHHr4no4lZ3fjRT06GoWxQ+eFHn7rTz/1Tv5QSrBQpZrAmfVMaQJyNOXHOPESjztJfs54uxFJWl5q1zYuZRzD+RzAPEufoJFln2TyMv8axwUheJPGRVSMFEHe4ZckqMy8cOXLin5f7xVUyyPypwhKAHp13IjJCVW4iHGAz30Q5mmx3I+dwyvbWE36x0ck1AFW9Gb+g06qmWkMQVuLEQEtuVldyjR/vFJqyjxNb6+mTA6DV96HMvkx0ej2pAZZxoBL5QJ8oDKIW3jxnfA5twj1xUhPMjjd9wGpOOEgIgUzaxFG8RZ4FTgxos9N1atajtd+S1LytA26p8NKbQE7/0+BtpNakNtpoo4022vgf7lRPtKCE39oAAAAASUVORK5CYII="),i.resource.add("hterm/concat/date","text/plain","Mon, 26 Nov 2018 08:50:09 +0000"),i.resource.add("hterm/changelog/version","text/plain","2018-10-24"),i.resource.add("hterm/changelog/date","text/plain","1.82"),i.resource.add("hterm/git/HEAD","text/plain","03ee0980444a38a97ef947b2272e44fdb3bdf5f5"),i.rtdep("lib.Storage");var h={};h.windowType=null,h.os=null,h.zoomWarningMessage="ZOOM != 100%",h.notifyCopyMessage="\u2702",h.desktopNotificationTitle="\u266a %(title) \u266a",h.testDeps=["hterm.AccessibilityReader.Tests","hterm.ScrollPort.Tests","hterm.Screen.Tests","hterm.Terminal.Tests","hterm.VT.Tests","hterm.VT.CannedTests"],i.registerInit("hterm",function(e){function t(t){h.os=t,e()}function r(){i.i18n.getAcceptLanguages(function(e){h.messageManager||(h.messageManager=new i.MessageManager(e)),i.f.getOs().then(t).catch(t)})}function o(e){h.windowType=e.type,r()}function n(e){e&&window.chrome?chrome.windows.get(e.windowId,null,o):(h.windowType="normal",r())}h.defaultStorage||(window.chrome&&chrome.storage&&chrome.storage.sync?h.defaultStorage=new i.Storage.Chrome(chrome.storage.sync):h.defaultStorage=new i.Storage.Local);var s=!1;if(window.chrome&&chrome.runtime&&chrome.runtime.getManifest){var a=chrome.runtime.getManifest();s=a.app&&a.app.background}s?setTimeout(o.bind(null,{type:"popup"}),0):window.chrome&&chrome.tabs?chrome.tabs.getCurrent(n):setTimeout(o.bind(null,{type:"normal"}),0)}),h.getClientSize=function(e){return e.getBoundingClientRect()},h.getClientWidth=function(e){return e.getBoundingClientRect().width},h.getClientHeight=function(e){return e.getBoundingClientRect().height},h.copySelectionToClipboard=function(e){try{e.execCommand("copy")}catch(e){}},h.pasteFromClipboard=function(e){try{return e.execCommand("paste")}catch(e){return!1}},h.msg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return h.messageManager.get("HTERM_"+e,t,r)},h.notify=function(e){var t=function(e,t){return void 0!==e?e:t};void 0!==e&&null!==e||(e={});var r={body:e.body,icon:t(e.icon,i.resource.getDataUrl("hterm/images/icon-96"))},o=t(e.title,window.document.title);o||(o="hterm"),o=i.f.replaceVars(h.desktopNotificationTitle,{title:o});var n=new Notification(o,r);return n.onclick=function(){window.focus(),this.close()},n},h.openUrl=function(e){if(window.chrome&&chrome.browser&&chrome.browser.openTab)chrome.browser.openTab({url:e});else{window.open(e,"_blank").focus()}},h.Size=function(e,t){this.width=e,this.height=t},h.Size.prototype.resize=function(e,t){this.width=e,this.height=t},h.Size.prototype.clone=function(){return new h.Size(this.width,this.height)},h.Size.prototype.setTo=function(e){this.width=e.width,this.height=e.height},h.Size.prototype.equals=function(e){return this.width==e.width&&this.height==e.height},h.Size.prototype.toString=function(){return"[hterm.Size: "+this.width+", "+this.height+"]"},h.RowCol=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},h.RowCol.prototype.move=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},h.RowCol.prototype.clone=function(){return new h.RowCol(this.row,this.column,this.overflow)},h.RowCol.prototype.setTo=function(e){this.row=e.row,this.column=e.column,this.overflow=e.overflow},h.RowCol.prototype.equals=function(e){return this.row==e.row&&this.column==e.column&&this.overflow==e.overflow},h.RowCol.prototype.toString=function(){return"[hterm.RowCol: "+this.row+", "+this.column+", "+this.overflow+"]"},h.AccessibilityReader=function(e){this.document_=e.ownerDocument;var t=this.document_.createElement("div");t.id="hterm:accessibility-live-region",t.style.cssText="position: absolute;\n width: 0; height: 0;\n overflow: hidden;\n left: 0; top: 0;",e.appendChild(t),this.accessibilityEnabled=!1,this.liveElement_=this.document_.createElement("p"),this.liveElement_.setAttribute("aria-live","polite"),this.liveElement_.setAttribute("aria-label",""),t.appendChild(this.liveElement_),this.assertiveLiveElement_=this.document_.createElement("p"),this.assertiveLiveElement_.setAttribute("aria-live","assertive"),this.assertiveLiveElement_.setAttribute("aria-label",""),t.appendChild(this.assertiveLiveElement_),this.queue_=[],this.nextReadTimer_=null,this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},h.AccessibilityReader.DELAY=50,h.AccessibilityReader.prototype.setAccessibilityEnabled=function(e){e||this.clear(),this.accessibilityEnabled=e},h.AccessibilityReader.prototype.decorate=function(e){var t=this;["keydown","keypress","keyup","textInput"].forEach(function(r){e.addEventListener(r,function(){t.hasUserGesture=!0})})},h.AccessibilityReader.prototype.beforeCursorChange=function(e,t,r){this.accessibilityEnabled&&this.hasUserGesture&&!this.cursorIsChanging_&&(this.cursorIsChanging_=!0,this.lastCursorRowString_=e,this.lastCursorRow_=t,this.lastCursorColumn_=r)},h.AccessibilityReader.prototype.afterCursorChange=function(e,t,r){if(this.cursorIsChanging_){if(this.cursorIsChanging_=!1,!this.announceAction_(e,t,r))for(var o=0;o0)return void this.queue_.push("");if(0==this.queue_.length)this.queue_.push(e);else{var t="";0!=this.queue_[this.queue_.length-1].length&&(t=" "),this.queue_[this.queue_.length-1]+=t+e}if(!this.nextReadTimer_){if(1!=this.queue_.length)throw new Error("Expected only one item in queue_ or nextReadTimer_ to be running.");this.nextReadTimer_=setTimeout(this.addToLiveRegion_.bind(this),h.AccessibilityReader.DELAY)}}},h.AccessibilityReader.prototype.assertiveAnnounce=function(e){this.hasUserGesture&&" "==e&&(e=h.msg("SPACE_CHARACTER",[],"Space")),e=e.trim(),e==this.assertiveLiveElement_.getAttribute("aria-label")&&(e="\n"+e),this.clear(),this.assertiveLiveElement_.setAttribute("aria-label",e)},h.AccessibilityReader.prototype.newLine=function(){this.announce("\n")},h.AccessibilityReader.prototype.clear=function(){this.liveElement_.setAttribute("aria-label",""),this.assertiveLiveElement_.setAttribute("aria-label",""),clearTimeout(this.nextReadTimer_),this.nextReadTimer_=null,this.queue_=[],this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},h.AccessibilityReader.prototype.announceAction_=function(e,t,r){if(this.lastCursorRow_!=t)return!1;if(this.lastCursorRowString_==e){if(this.lastCursorColumn_!=r&&""==this.cursorChangeQueue_.join("").trim()){var o=Math.min(this.lastCursorColumn_,r),n=Math.abs(r-this.lastCursorColumn_);return this.assertiveAnnounce(i.wc.substr(this.lastCursorRowString_,o,n)),!0}return!1}if(this.lastCursorRowString_!=e){if(this.lastCursorColumn_+1==r&&" "==i.wc.substr(e,r-1,1)&&this.cursorChangeQueue_.length>0&&" "==this.cursorChangeQueue_[0])return this.assertiveAnnounce(" "),!0;var s=r;if(i.wc.strWidth(e)<=i.wc.strWidth(this.lastCursorRowString_)&&i.wc.substr(this.lastCursorRowString_,0,s)==i.wc.substr(e,0,s)){for(var a=i.wc.strWidth(e);a>0&&(a!=s&&" "==i.wc.substr(e,a-1,1));--a);var l=i.wc.strWidth(this.lastCursorRowString_)-a,c=a-s;if(i.wc.substr(this.lastCursorRowString_,s+l,c)==i.wc.substr(e,s,c)){var u=i.wc.substr(this.lastCursorRowString_,s,l);if(""!=u)return this.assertiveAnnounce(u),!0}}return!1}return!1},h.AccessibilityReader.prototype.addToLiveRegion_=function(){this.nextReadTimer_=null;var e=this.queue_.join("\n").trim();e==this.liveElement_.getAttribute("aria-label")&&(e="\n"+e),this.liveElement_.setAttribute("aria-label",e),this.queue_=[]},h.ContextMenu=function(){this.document_=null,this.element_=null,this.menu_=[]},h.ContextMenu.SEPARATOR={},h.ContextMenu.prototype.setDocument=function(e){this.element_&&(this.element_.remove(),this.element_=null),this.document_=e,this.regenerate_(),this.document_.body.appendChild(this.element_)},h.ContextMenu.prototype.regenerate_=function(){var e=this;for(this.element_?this.hide():(this.element_=this.document_.createElement("menu"),this.element_.id="hterm:context-menu",this.element_.style.cssText="\n display: none;\n border: solid 1px;\n position: absolute;\n ");this.element_.firstChild;)this.element_.removeChild(this.element_.firstChild);this.menu_.forEach(function(t){var r=o(t,2),n=r[0],i=r[1],s=e.document_.createElement("menuitem");n===h.ContextMenu.SEPARATOR?(s.innerHTML="
",s.className="separator"):(s.innerText=n,s.addEventListener("mousedown",function(e){e.preventDefault(),i(e)})),e.element_.appendChild(s)})},h.ContextMenu.prototype.setItems=function(e){this.menu_=e,this.regenerate_()},h.ContextMenu.prototype.show=function(e,t){if(0!=this.menu_.length){t&&(this.element_.style.backgroundColor=t.getBackgroundColor(),this.element_.style.color=t.getForegroundColor(),this.element_.style.fontSize=t.getFontSize(),this.element_.style.fontFamily=t.getFontFamily()),this.element_.style.top=e.clientY+"px",this.element_.style.left=e.clientX+"px";var r=h.getClientSize(this.document_.body);this.element_.style.display="block";var o=h.getClientSize(this.element_),n=Math.max(0,r.height-o.height),i=Math.max(0,r.width-o.width);n=32&&(t=e.charCode);t&&this.terminal.onVTKeystroke(String.fromCharCode(t)),e.preventDefault(),e.stopPropagation()}},h.Keyboard.prototype.preventChromeAppNonCtrlShiftDefault_=function(e){window.chrome&&window.chrome.app&&window.chrome.app.window&&(e.ctrlKey&&e.shiftKey||e.preventDefault())},h.Keyboard.prototype.onFocusOut_=function(e){this.altKeyPressed=0},h.Keyboard.prototype.onKeyUp_=function(e){18==e.keyCode&&(this.altKeyPressed=this.altKeyPressed&~(1<=64&&w<=95&&(p=String.fromCharCode(w-64))}if(u&&"8-bit"==this.altSendsWhat&&1==p.length){var w=p.charCodeAt(0)+128;p=String.fromCharCode(w)}(u&&"escape"==this.altSendsWhat||d&&this.metaSendsEscape)&&(p="\x1b"+p)}this.terminal.onVTKeystroke(p)}},h.Keyboard.Bindings=function(){this.bindings_={}},h.Keyboard.Bindings.prototype.clear=function(){this.bindings_={}},h.Keyboard.Bindings.prototype.addBinding_=function(e,t){var r=null,o=this.bindings_[e.keyCode];if(o)for(var n=0;n",g,n(b,m),g,g],[191,"/?",g,o(s("_"),s("?")),g,g],[17,"[CTRL]",m,m,m,m],[18,"[ALT]",m,m,m,m],[91,"[LAPL]",m,m,m,m],[32," ",g,s("@"),g,g],[92,"[RAPL]",m,m,m,m],[93,"[RMENU]",m,m,m,m],[42,"[PRTSCR]",m,m,m,m],[145,"[SCRLK]",m,m,m,m],[19,"[BREAK]",m,m,m,m],[45,"[INSERT]",a("onKeyInsert_"),g,g,g],[36,"[HOME]",a("onKeyHome_"),g,g,g],[33,"[PGUP]",a("onKeyPageUp_"),g,g,g],[46,"[DEL]",a("onKeyDel_"),g,g,g],[35,"[END]",a("onKeyEnd_"),g,g,g],[34,"[PGDOWN]",a("onKeyPageDown_"),g,g,g],[38,"[UP]",a("onKeyArrowUp_"),g,g,g],[40,"[DOWN]",a("onKeyArrowDown_"),g,g,g],[39,"[RIGHT]",t("\x1b[C","\x1bOC"),g,g,g],[37,"[LEFT]",t("\x1b[D","\x1bOD"),g,g,g],[144,"[NUMLOCK]",m,m,m,m],[12,"[CLEAR]",m,m,m,m],[96,"[KP0]",g,g,g,g],[97,"[KP1]",g,g,g,g],[98,"[KP2]",g,g,g,g],[99,"[KP3]",g,g,g,g],[100,"[KP4]",g,g,g,g],[101,"[KP5]",g,g,g,g],[102,"[KP6]",g,g,g,g],[103,"[KP7]",g,g,g,g],[104,"[KP8]",g,g,g,g],[105,"[KP9]",g,g,g,g],[107,"[KP+]",g,a("onPlusMinusZero_"),g,a("onPlusMinusZero_")],[109,"[KP-]",g,a("onPlusMinusZero_"),g,a("onPlusMinusZero_")],[106,"[KP*]",g,g,g,g],[111,"[KP/]",g,g,g,g],[110,"[KP.]",g,g,g,g]),"cros"==h.os&&this.addKeyDefs([166,"[BACK]",l(i("\x1bOP","\x1b[P")),g,"\x1b[23~",g],[167,"[FWD]",l(i("\x1bOQ","\x1b[Q")),g,"\x1b[24~",g],[168,"[RELOAD]",l(i("\x1bOR","\x1b[R")),g,"\x1b[25~",g],[183,"[FSCR]",l(i("\x1bOS","\x1b[S")),g,"\x1b[26~",g],[182,"[WINS]",l("\x1b[15~"),g,"\x1b[28~",g],[216,"[BRIT-]",l("\x1b[17~"),g,"\x1b[29~",g],[217,"[BRIT+]",l("\x1b[18~"),g,"\x1b[31~",g],[173,"[MUTE]",l("\x1b[19~"),g,"\x1b[32~",g],[174,"[VOL-]",l("\x1b[20~"),g,"\x1b[33~",g],[175,"[VOL+]",l("\x1b[21~"),g,"\x1b[34~",g],[152,"[POWER]",g,g,g,g],[179,"[PLAY]",l("\x1b[18~"),g,"\x1b[31~",g],[154,"[DOGS]",l("\x1b[23~"),g,"\x1b[42~",g],[153,"[ASSIST]",g,g,g,g])},h.Keyboard.KeyMap.prototype.onKeyInsert_=function(e){return this.keyboard.shiftInsertPaste&&e.shiftKey?h.Keyboard.KeyActions.PASS:"\x1b[2~"},h.Keyboard.KeyMap.prototype.onKeyHome_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"\x1b[H":"\x1bOH":(this.keyboard.terminal.scrollHome(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyEnd_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altKey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"\x1b[F":"\x1bOF":(this.keyboard.terminal.scrollEnd(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyPageUp_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"\x1b[5~":(this.keyboard.terminal.scrollPageUp(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyDel_=function(e){return this.keyboard.altBackspaceIsMetaBackspace&&this.keyboard.altKeyPressed&&!e.altKey?"\x1b\x7f":"\x1b[3~"},h.Keyboard.KeyMap.prototype.onKeyPageDown_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"\x1b[6~":(this.keyboard.terminal.scrollPageDown(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyArrowUp_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineUp(),h.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"\x1b[A":"\x1bOA"},h.Keyboard.KeyMap.prototype.onKeyArrowDown_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineDown(),h.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"\x1b[B":"\x1bOB"},h.Keyboard.KeyMap.prototype.onClear_=function(e,t){return this.keyboard.terminal.wipeContents(),h.Keyboard.KeyActions.CANCEL},h.Keyboard.KeyMap.prototype.onF11_=function(e,t){return"popup"!=h.windowType?h.Keyboard.KeyActions.PASS:"\x1b[23~"},h.Keyboard.KeyMap.prototype.onCtrlNum_=function(e,t){function r(e){return String.fromCharCode(e.charCodeAt(0)-64)}if(this.keyboard.terminal.passCtrlNumber&&!e.shiftKey)return h.Keyboard.KeyActions.PASS;switch(t.keyCap.substr(0,1)){case"1":return"1";case"2":return r("@");case"3":return r("[");case"4":return r("\\");case"5":return r("]");case"6":return r("^");case"7":return r("_");case"8":return"\x7f";case"9":return"9"}},h.Keyboard.KeyMap.prototype.onAltNum_=function(e,t){return this.keyboard.terminal.passAltNumber&&!e.shiftKey?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onMetaNum_=function(e,t){return this.keyboard.terminal.passMetaNumber&&!e.shiftKey?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onCtrlC_=function(e,t){var r=this.keyboard.terminal.getDocument().getSelection();if(!r.isCollapsed){if(this.keyboard.ctrlCCopy&&!e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),h.Keyboard.KeyActions.PASS;if(!this.keyboard.ctrlCCopy&&e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),this.keyboard.terminal.copySelectionToClipboard(),h.Keyboard.KeyActions.CANCEL}return"\x03"},h.Keyboard.KeyMap.prototype.onCtrlN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.innerWidth+",height="+window.innerHeight),h.Keyboard.KeyActions.CANCEL):"\x0e"},h.Keyboard.KeyMap.prototype.onCtrlV_=function(e,t){return!e.shiftKey&&this.keyboard.ctrlVPaste||e.shiftKey&&!this.keyboard.ctrlVPaste?this.keyboard.terminal.paste()?h.Keyboard.KeyActions.CANCEL:h.Keyboard.KeyActions.PASS:"\x16"},h.Keyboard.KeyMap.prototype.onMetaN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.outerWidth+",height="+window.outerHeight),h.Keyboard.KeyActions.CANCEL):h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onMetaC_=function(e,t){var r=this.keyboard.terminal.getDocument();return e.shiftKey||r.getSelection().isCollapsed?t.keyCap.substr(e.shiftKey?1:0,1):(this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(function(){r.getSelection().collapseToEnd()},50),h.Keyboard.KeyActions.PASS)},h.Keyboard.KeyMap.prototype.onMetaV_=function(e,t){return e.shiftKey?h.Keyboard.KeyActions.PASS:this.keyboard.passMetaV?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onPlusMinusZero_=function(e,t){if(!(this.keyboard.ctrlPlusMinusZeroZoom^e.shiftKey))return"-_"==t.keyCap?"\x1f":h.Keyboard.KeyActions.CANCEL;if(1!=this.keyboard.terminal.getZoomFactor())return h.Keyboard.KeyActions.PASS;var r=t.keyCap.substr(0,1);if("0"==r)this.keyboard.terminal.setFontSize(0);else{var o=this.keyboard.terminal.getFontSize();"-"==r||"[KP-]"==t.keyCap?o-=1:o+=1,this.keyboard.terminal.setFontSize(o)}return h.Keyboard.KeyActions.CANCEL},h.Keyboard.KeyPattern=function(e){this.wildcardCount=0,this.keyCode=e.keyCode,h.Keyboard.KeyPattern.modifiers.forEach(function(t){this[t]=e[t]||!1,"*"==this[t]&&this.wildcardCount++}.bind(this))},h.Keyboard.KeyPattern.modifiers=["shift","ctrl","alt","meta"],h.Keyboard.KeyPattern.sortCompare=function(e,t){return e.wildcardCountt.wildcardCount?1:0},h.Keyboard.KeyPattern.prototype.match_=function(e,t){if(this.keyCode!=e.keyCode)return!1;var r=!0;return h.Keyboard.KeyPattern.modifiers.forEach(function(o){var n=o in e&&e[o];r&&(t||"*"!=this[o])&&this[o]!=n&&(r=!1)}.bind(this)),r},h.Keyboard.KeyPattern.prototype.matchKeyDown=function(e){return this.match_(e,!1)},h.Keyboard.KeyPattern.prototype.matchKeyPattern=function(e){return this.match_(e,!0)},h.Options=function(e){this.wraparound=!e||e.wraparound,this.reverseWraparound=!!e&&e.reverseWraparound,this.originMode=!!e&&e.originMode,this.autoCarriageReturn=!!e&&e.autoCarriageReturn,this.cursorVisible=!!e&&e.cursorVisible,this.cursorBlink=!!e&&e.cursorBlink,this.insertMode=!!e&&e.insertMode,this.reverseVideo=!!e&&e.reverseVideo,this.bracketedPaste=!!e&&e.bracketedPaste},i.rtdep("hterm.Keyboard.KeyActions"),h.Parser=function(){this.source="",this.pos=0,this.ch=null},h.Parser.prototype.error=function(e){return new Error("Parse error at "+this.pos+": "+e)},h.Parser.prototype.isComplete=function(){return this.pos==this.source.length},h.Parser.prototype.reset=function(e,t){this.source=e,this.pos=t||0,this.ch=e.substr(0,1)},h.Parser.prototype.parseKeySequence=function(){var e={keyCode:null};for(var t in h.Parser.identifiers.modifierKeys)e[h.Parser.identifiers.modifierKeys[t]]=!1;for(;this.pos 'none', else => 'right-alt'\n'none': Disable any AltGr related munging.\n'ctrl-alt': Assume Ctrl+Alt means AltGr.\n'left-alt': Assume left Alt means AltGr.\n'right-alt': Assume right Alt means AltGr."),"alt-backspace-is-meta-backspace":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If set, undoes the Chrome OS Alt-Backspace->DEL remap, so that Alt-Backspace indeed is Alt-Backspace."),"alt-is-meta":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Whether the Alt key acts as a Meta key or as a distinct Alt key."),"alt-sends-what":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,"escape",["escape","8-bit","browser-key"],"Controls how the Alt key is handled.\n\n escape: Send an ESC prefix.\n 8-bit: Add 128 to the typed character as in xterm.\n browser-key: Wait for the keypress event and see what the browser\n says. (This won't work well on platforms where the browser\n performs a default action for some Alt sequences.)"),"audible-bell-sound":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Sounds,"lib-resource:hterm/audio/bell","url","URL of the terminal bell sound. Empty string for no audible bell."),"desktop-notification-bell":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Sounds,!1,"bool",'If true, terminal bells in the background will create a Web Notification. https://www.w3.org/TR/notifications/\n\nDisplaying notifications requires permission from the user. When this option is set to true, hterm will attempt to ask the user for permission if necessary. Browsers may not show this permission request if it was not triggered by a user action.\n\nChrome extensions with the "notifications" permission have permission to display notifications.'),"background-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgb(16, 16, 16)","color","The background color for text with no other color attributes."),"background-image":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image. Empty string for no image.\n\nFor example:\n url(https://goo.gl/anedTK)\n linear-gradient(top bottom, blue, red)"),"background-size":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image size."),"background-position":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image position.\n\nFor example:\n 10% 10%\n center"),"backspace-sends-backspace":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, the backspace should send BS ('\\x08', aka ^H). Otherwise the backspace key should send '\\x7f'."),"character-map-overrides":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"value",'This is specified as an object. It is a sparse array, where each property is the character set code and the value is an object that is a sparse array itself. In that sparse array, each property is the received character and the value is the displayed character.\n\nFor example:\n {"0":{"+":"\\u2192",",":"\\u2190","-":"\\u2191",".":"\\u2193", "0":"\\u2588"}}'),"close-on-exit":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!0,"bool","Whether to close the window when the command finishes executing."),"cursor-blink":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!1,"bool","Whether the text cursor blinks by default. This can be toggled at runtime via terminal escape sequences."),"cursor-blink-cycle":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,[1e3,500],"value","The text cursor blink rate in milliseconds.\n\nA two element array, the first of which is how long the text cursor should be on, second is how long it should be off."),"cursor-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgba(255, 0, 0, 0.5)","color","The color of the visible text cursor."),"color-palette-overrides":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"value",'Override colors in the default palette.\n\nThis can be specified as an array or an object. If specified as an object it is assumed to be a sparse array, where each property is a numeric index into the color palette.\n\nValues can be specified as almost any CSS color value. This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the standard X11 rgb.txt file.\n\nYou can use \'null\' to specify that the default value should be not be changed. This is useful for skipping a small number of indices when the value is specified as an array.\n\nFor example, these both set color index 1 to blue:\n {1: "#0000ff"}\n [null, "#0000ff"]'),"copy-on-select":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Automatically copy mouse selection to the clipboard."),"use-default-window-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!1,"bool","Whether to use the default browser/OS's copy behavior.\n\nAllow the browser/OS to handle the copy event directly which might improve compatibility with some systems (where copying doesn't work at all), but makes the text selection less robust.\n\nFor example, long lines that were automatically line wrapped will be copied with the newlines still in them."),"clear-selection-after-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Whether to clear the selection after copying."),"ctrl-plus-minus-zero-zoom":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","If true, Ctrl-Plus/Minus/Zero controls zoom.\nIf false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing."),"ctrl-c-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl-C copies if true, send ^C to host if false.\nCtrl-Shift-C sends ^C to host if true, copies if false."),"ctrl-v-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl-V pastes if true, send ^V to host if false.\nCtrl-Shift-V sends ^V to host if true, pastes if false."),"east-asian-ambiguous-as-two-column":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Whether East Asian Ambiguous characters have two column width."),"enable-8-bit-control":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","True to enable 8-bit control characters, false to ignore them.\n\nWe'll respect the two-byte versions of these control characters regardless of this setting."),"enable-bold":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"tristate","If true, use bold weight font for text with the bold/bright attribute. False to use the normal weight font. Null to autodetect."),"enable-bold-as-bright":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!0,"bool","If true, use bright colors (8-15 on a 16 color palette) for any text with the bold attribute. False otherwise."),"enable-blink":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!0,"bool","If true, respect the blink attribute. False to ignore it."),"enable-clipboard-notice":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Whether to show a message in the terminal when the host writes to the clipboard."),"enable-clipboard-write":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Allow the remote host to write directly to the local system clipboard.\nRead access is never granted regardless of this setting.\n\nThis is used to control access to features like OSC-52."),"enable-dec12":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!1,"bool","Respect the host's attempt to change the text cursor blink status using DEC Private Mode 12."),"enable-csi-j-3":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!0,"bool","Whether CSI-J (Erase Display) mode 3 may clear the terminal scrollback buffer.\n\nEnabling this by default is safe."),environment:h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,{NCURSES_NO_UTF8_ACS:"1",TERM:"xterm-256color",COLORTERM:"truecolor"},"value","The initial set of environment variables, as an object."),"font-family":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,'"DejaVu Sans Mono", "Noto Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace',"string","Default font family for the terminal text."),"font-size":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,15,"int","The default font size in pixels."),"font-smoothing":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"antialiased","string","CSS font-smoothing property."),"foreground-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgb(240, 240, 240)","color","The foreground color for text with no other color attributes."),"hide-mouse-while-typing":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether to automatically hide the mouse cursor when typing. By default, autodetect whether the platform/OS handles this.\n\nNote: Some operating systems may override this setting and thus you might not be able to always disable it."),"home-keys-scroll":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, Home/End controls the terminal scrollbar and Shift-Home/Shift-End are sent to the remote host. If false, then Home/End are sent to the remote host and Shift-Home/Shift-End scrolls."),keybindings:h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"value",'A map of key sequence to key actions. Key sequences include zero or more modifier keys followed by a key code. Key codes can be decimal or hexadecimal numbers, or a key identifier. Key actions can be specified as a string to send to the host, or an action identifier. For a full explanation of the format, see https://goo.gl/LWRndr.\n\nSample keybindings:\n{\n "Ctrl-Alt-K": "clearTerminal",\n "Ctrl-Shift-L": "PASS",\n "Ctrl-H": "\'Hello World\'"\n}'),"media-keys-are-fkeys":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, convert media keys to their Fkey equivalent. If false, let the browser handle the keys."),"meta-sends-escape":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Send an ESC prefix when pressing a key while holding the Meta key.\n\nFor example, when enabled, pressing Meta-K will send ^[k as if you typed Escape then k. When disabled, only k will be sent."),"mouse-right-click-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool",'Paste on right mouse button clicks.\n\nThis option is independent of the "mouse-paste-button" setting.\n\nNote: This will handle left & right handed mice correctly.'),"mouse-paste-button":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,null,[null,0,1,2,3,4,5,6],"Mouse paste button, or null to autodetect.\n\nFor autodetect, we'll use the middle mouse button for non-X11 platforms (including Chrome OS). On X11, we'll use the right mouse button (since the native window manager should paste via the middle mouse button).\n\n0 == left (primary) button.\n1 == middle (auxiliary) button.\n2 == right (secondary) button.\n\nThis option is independent of the setting for right-click paste.\n\nNote: This will handle left & right handed mice correctly."),"word-break-match-left":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:`]","string",'Regular expression to halt matching to the left (start) of a selection.\n\nNormally this is a character class to reject specific characters.\nWe allow "~" and "." by default as paths frequently start with those.'),"word-break-match-right":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:~.`]","string","Regular expression to halt matching to the right (end) of a selection.\n\nNormally this is a character class to reject specific characters."),"word-break-match-middle":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^]*","string","Regular expression to match all the characters in the middle.\n\nNormally this is a character class to reject specific characters.\n\nUsed to expand the selection surrounding the starting point."),"page-keys-scroll":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, Page Up/Page Down controls the terminal scrollbar and Shift-Page Up/Shift-Page Down are sent to the remote host. If false, then Page Up/Page Down are sent to the remote host and Shift-Page Up/Shift-Page Down scrolls."),"pass-alt-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Alt-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Alt-1..9 will be handled by the browser. If false, Alt-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-ctrl-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Ctrl-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Ctrl-1..9 will be handled by the browser. If false, Ctrl-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-meta-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Meta-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Meta-1..9 will be handled by the browser. If false, Meta-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-meta-v":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Whether Meta-V gets passed to host."),"paste-on-drop":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","If true, Drag and dropped text will paste into terminal.\nIf false, dropped text will be ignored."),"receive-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the expected encoding for data received from the host.\nIf the encodings do not match, visual bugs are likely to be observed.\n\nValid values are 'utf-8' and 'raw'."),"scroll-on-keystroke":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!0,"bool","Whether to scroll to the bottom on any keystroke."),"scroll-on-output":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!1,"bool","Whether to scroll to the bottom on terminal output."),"scrollbar-visible":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!0,"bool","The vertical scrollbar mode."),"scroll-wheel-may-send-arrow-keys":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!1,"bool","When using the alternative screen buffer, and DECCKM (Application Cursor Keys) is active, mouse wheel scroll events will emulate arrow keys.\n\nIt can be temporarily disabled by holding the Shift key.\n\nThis frequently comes up when using pagers (less) or reading man pages or text editors (vi/nano) or using screen/tmux."),"scroll-wheel-move-multiplier":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,1,"int","The multiplier for scroll wheel events when measured in pixels.\n\nAlters how fast the page scrolls."),"send-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the encoding for data sent to host."),"terminal-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["iso-2022","utf-8","utf-8-locked"],"The default terminal encoding (DOCS).\n\nISO-2022 enables character map translations (like graphics maps).\nUTF-8 disables support for those.\n\nThe locked variant means the encoding cannot be changed at runtime via terminal escape sequences.\n\nYou should stick with UTF-8 unless you notice broken rendering with legacy applications."),"shift-insert-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Whether Shift-Insert is used for pasting or is sent to the remote host."),"user-css":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","url","URL of user stylesheet to include in the terminal document."),"user-css-text":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","multiline-string","Custom CSS text for styling the terminal."),"allow-images-inline":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Extensions,null,"tristate","Whether to allow the remote host to display images in the terminal.\n\nBy default, we prompt until a choice is made.")},h.PreferenceManager.prototype=Object.create(i.PreferenceManager.prototype),h.PreferenceManager.constructor=h.PreferenceManager,h.PubSub=function(){this.observers_={}},h.PubSub.addBehavior=function(e){var t=new h.PubSub;for(var r in h.PubSub.prototype)e[r]=h.PubSub.prototype[r].bind(t)},h.PubSub.prototype.subscribe=function(e,t){e in this.observers_||(this.observers_[e]=[]),this.observers_[e].push(t)},h.PubSub.prototype.unsubscribe=function(e,t){var r=this.observers_[e];if(!r)throw"Invalid subject: "+e;var o=r.indexOf(t);if(o<0)throw"Not subscribed: "+e;r.splice(o,1)},h.PubSub.prototype.publish=function(e,t,r){function o(e){e=e&&this.setCursorPosition(this.cursorPosition.row,e-1)},h.Screen.prototype.shiftRow=function(){return this.shiftRows(1)[0]},h.Screen.prototype.shiftRows=function(e){return this.rowsArray.splice(0,e)},h.Screen.prototype.unshiftRow=function(e){this.rowsArray.splice(0,0,e)},h.Screen.prototype.unshiftRows=function(e){this.rowsArray.unshift.apply(this.rowsArray,e)},h.Screen.prototype.popRow=function(){return this.popRows(1)[0]},h.Screen.prototype.popRows=function(e){return this.rowsArray.splice(this.rowsArray.length-e,e)},h.Screen.prototype.pushRow=function(e){this.rowsArray.push(e)},h.Screen.prototype.pushRows=function(e){e.push.apply(this.rowsArray,e)},h.Screen.prototype.insertRow=function(e,t){this.rowsArray.splice(e,0,t)},h.Screen.prototype.insertRows=function(e,t){for(var r=0;r=this.rowsArray.length?(console.error("Row out of bounds: "+e),e=this.rowsArray.length-1):e<0&&(console.error("Row out of bounds: "+e),e=0),t>=this.columnCount_?(console.error("Column out of bounds: "+t),t=this.columnCount_-1):t<0&&(console.error("Column out of bounds: "+t),t=0),this.cursorPosition.overflow=!1;var r=this.rowsArray[e],o=r.firstChild;o||(o=r.ownerDocument.createTextNode(""),r.appendChild(o));var n=0;for(r==this.cursorRowNode_?t>=this.cursorPosition.column-this.cursorOffset_&&(o=this.cursorNode_,n=this.cursorPosition.column-this.cursorOffset_):this.cursorRowNode_=r,this.cursorPosition.move(e,t);o;){var i=t-n,s=h.TextAttributes.nodeWidth(o);if(!o.nextSibling||s>i)return this.cursorNode_=o,void(this.cursorOffset_=i);n+=s,o=o.nextSibling}},h.Screen.prototype.syncSelectionCaret=function(e){try{e.collapse(this.cursorNode_,this.cursorOffset_)}catch(e){}},h.Screen.prototype.splitNode_=function(e,t){var r=e.cloneNode(!1),o=e.textContent;e.textContent=h.TextAttributes.nodeSubstr(e,0,t),r.textContent=i.wc.substr(o,t),r.textContent&&e.parentNode.insertBefore(r,e.nextSibling),e.textContent||e.parentNode.removeChild(e)},h.Screen.prototype.maybeClipCurrentRow=function(){var e=h.TextAttributes.nodeWidth(this.cursorRowNode_);if(e<=this.columnCount_)return void(this.cursorPosition.column>=this.columnCount_&&(this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),this.cursorPosition.overflow=!0));var t=this.cursorPosition.column;this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),e=h.TextAttributes.nodeWidth(this.cursorNode_),this.cursorOffset_1&&void 0!==arguments[1]?arguments[1]:void 0,r=this.cursorNode_,o=r.textContent;this.cursorRowNode_.removeAttribute("line-overflow"),void 0===t&&(t=i.wc.strWidth(e)),this.cursorPosition.column+=t;var n=this.cursorOffset_,s=h.TextAttributes.nodeWidth(r)-n;if(s<0){var a=i.f.getWhitespace(-s);if(this.textAttributes.underline||this.textAttributes.strikethrough||this.textAttributes.background||this.textAttributes.wcNode||!this.textAttributes.asciiNode||null!=this.textAttributes.tileData)if(r.nodeType!=Node.TEXT_NODE&&(r.wcNode||!r.asciiNode||r.tileNode||r.style.textDecoration||r.style.textDecorationStyle||r.style.textDecorationLine||r.style.backgroundColor)){var l=r.ownerDocument.createTextNode(a);this.cursorRowNode_.insertBefore(l,r.nextSibling),this.cursorNode_=r=l,this.cursorOffset_=n=-s,o=a}else r.textContent=o+=a;else e=a+e;s=0}if(this.textAttributes.matchesContainer(r))return r.textContent=0==s?o+e:0==n?e+o:h.TextAttributes.nodeSubstr(r,0,n)+e+h.TextAttributes.nodeSubstr(r,n),void(this.cursorOffset_+=t);if(0==n){var c=r.previousSibling;if(c&&this.textAttributes.matchesContainer(c))return c.textContent+=e,this.cursorNode_=c,void(this.cursorOffset_=i.wc.strWidth(c.textContent));var u=this.textAttributes.createContainer(e);return this.cursorRowNode_.insertBefore(u,r),this.cursorNode_=u,void(this.cursorOffset_=t)}if(0==s){var d=r.nextSibling;if(d&&this.textAttributes.matchesContainer(d))return d.textContent=e+d.textContent,this.cursorNode_=d,void(this.cursorOffset_=i.wc.strWidth(e));var u=this.textAttributes.createContainer(e);return this.cursorRowNode_.insertBefore(u,d),this.cursorNode_=u,void(this.cursorOffset_=h.TextAttributes.nodeWidth(u))}this.splitNode_(r,n);var u=this.textAttributes.createContainer(e);this.cursorRowNode_.insertBefore(u,r.nextSibling),this.cursorNode_=u,this.cursorOffset_=t},h.Screen.prototype.overwriteString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this.columnCount_-this.cursorPosition.column;return r?(void 0===t&&(t=i.wc.strWidth(e)),this.textAttributes.matchesContainer(this.cursorNode_)&&this.cursorNode_.textContent.substr(this.cursorOffset_)==e?(this.cursorOffset_+=t,void(this.cursorPosition.column+=t)):(this.deleteChars(Math.min(t,r)),void this.insertString(e,t))):[e]},h.Screen.prototype.deleteChars=function(e){var t=this.cursorNode_,r=this.cursorOffset_,o=this.cursorPosition.column;if(!(e=Math.min(e,this.columnCount_-o)))return 0;for(var n,i,s=e;t&&e;){if(e<0){console.error("Deleting "+s+" chars went negative: "+e);break}if(n=h.TextAttributes.nodeWidth(t),t.textContent=h.TextAttributes.nodeSubstr(t,0,r)+h.TextAttributes.nodeSubstr(t,r+e),i=h.TextAttributes.nodeWidth(t),t.wcNode&&rh.TextAttributes.nodeWidth(e);){if(!e.hasAttribute("line-overflow")||!e.nextSibling)return-1;t-=h.TextAttributes.nodeWidth(e),e=e.nextSibling}return this.getNodeAndOffsetWithinRow_(e,t)},h.Screen.prototype.getNodeAndOffsetWithinRow_=function(e,t){for(var r=0;rl)){var p=i.wc.substring(u,l,i.wc.strWidth(u)),g=new RegExp("^"+o+r),m=p.match(g);if(m){var b=l+i.wc.strWidth(m[0]);-1==b||b\"'\\^!@#$%&*,;:`]","[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:~.`]","[^\\s\\[\\](){}<>\"'\\^]*")},h.Screen.prototype.saveCursorAndState=function(e){this.cursorState_.save(e)},h.Screen.prototype.restoreCursorAndState=function(e){this.cursorState_.restore(e)},h.Screen.CursorState=function(e){this.screen_=e,this.cursor=null,this.textAttributes=null,this.GL=this.GR=this.G0=this.G1=this.G2=this.G3=null},h.Screen.CursorState.prototype.save=function(e){this.cursor=e.terminal.saveCursor(),this.textAttributes=this.screen_.textAttributes.clone(),this.GL=e.GL,this.GR=e.GR,this.G0=e.G0,this.G1=e.G1,this.G2=e.G2,this.G3=e.G3},h.Screen.CursorState.prototype.restore=function(e){e.terminal.restoreCursor(this.cursor);var t=this.textAttributes.clone();t.colorPalette=this.screen_.textAttributes.colorPalette,t.syncColors(),this.screen_.textAttributes=t,e.GL=this.GL,e.GR=this.GR,e.G0=this.G0,e.G1=this.G1,e.G2=this.G2,e.G3=this.G3},i.rtdep("lib.f","hterm.PubSub","hterm.Size"),h.ScrollPort=function(e){h.PubSub.addBehavior(this),this.rowProvider_=e,this.characterSize=new h.Size(10,10),this.ruler_=null,this.selection=new h.ScrollPort.Selection(this),this.currentRowNodeCache_=null,this.previousRowNodeCache_={},this.lastScreenWidth_=null,this.lastScreenHeight_=null,this.selectionEnabled_=!0,this.lastRowCount_=0,this.scrollWheelMultiplier_=1,this.lastTouch_={},this.isScrolledEnd=!0,this.currentScrollbarWidthPx=16,this.ctrlVPaste=!1,this.pasteOnDrop=!0,this.div_=null,this.document_=null,this.timeouts_={},this.observers_={},this.DEBUG_=!1},h.ScrollPort.Selection=function(e){this.scrollPort_=e,this.startRow=null,this.endRow=null,this.isMultiline=null,this.isCollapsed=null};h.ScrollPort.Selection.prototype.findFirstChild=function(e,t){for(var r=e.firstChild;r;){if(-1!=t.indexOf(r))return r;if(r.childNodes.length){var o=this.findFirstChild(r,t);if(o)return o}r=r.nextSibling}return null},h.ScrollPort.Selection.prototype.sync=function(){function e(){r.startRow=i,r.startNode=o.anchorNode,r.startOffset=o.anchorOffset,r.endRow=s,r.endNode=o.focusNode,r.endOffset=o.focusOffset}function t(){r.startRow=s,r.startNode=o.focusNode,r.startOffset=o.focusOffset,r.endRow=i,r.endNode=o.anchorNode,r.endOffset=o.anchorOffset}var r=this,o=this.scrollPort_.getDocument().getSelection();if(this.startRow=null,this.endRow=null,this.isMultiline=null,this.isCollapsed=!o||o.isCollapsed,o){var n=this.scrollPort_.accessibilityReader_&&this.scrollPort_.accessibilityReader_.accessibilityEnabled;if(!this.isCollapsed||n){for(var i=o.anchorNode;i&&"X-ROW"!=i.nodeName;)i=i.parentNode;if(i){for(var s=o.focusNode;s&&"X-ROW"!=s.nodeName;)s=s.parentNode;if(s){if(i.rowIndexs.rowIndex)t();else if(o.focusNode==o.anchorNode)o.anchorOffset=this.lastRowCount_,this.updateScrollButtonState_()},h.ScrollPort.prototype.drawTopFold_=function(e){if(!this.selection.startRow||this.selection.startRow.rowIndex>=e)return void(this.rowNodes_.firstChild!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.rowNodes_.firstChild));if(!this.selection.isMultiline||this.selection.endRow.rowIndex>=e)this.selection.startRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.startRow.nextSibling);else for(this.selection.endRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.endRow.nextSibling);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.firstChild!=this.selection.startRow;)this.rowNodes_.removeChild(this.rowNodes_.firstChild)},h.ScrollPort.prototype.drawBottomFold_=function(e){if(!this.selection.endRow||this.selection.endRow.rowIndex<=e)return void(this.rowNodes_.lastChild!=this.bottomFold_&&this.rowNodes_.appendChild(this.bottomFold_));if(!this.selection.isMultiline||this.selection.startRow.rowIndex<=e)this.bottomFold_.nextSibling!=this.selection.endRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.endRow);else for(this.bottomFold_.nextSibling!=this.selection.startRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.startRow);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.lastChild!=this.selection.endRow;)this.rowNodes_.removeChild(this.rowNodes_.lastChild)},h.ScrollPort.prototype.drawVisibleRows_=function(e,t){function r(e,t){for(;e!=t;){if(!e)throw"Did not encounter target node";if(e==o.bottomFold_)throw"Encountered bottom fold before target node";var r=e;e=e.nextSibling,r.parentNode.removeChild(r)}}for(var o=this,n=this.selection.startRow,i=this.selection.endRow,s=this.bottomFold_,a=this.topFold_.nextSibling,l=Math.min(this.visibleRowCount,this.rowProvider_.getRowCount()),c=0;c=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin,r=this.getScrollMax_();t>r&&(t=r),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t,this.scheduleRedraw())},h.ScrollPort.prototype.scrollRowToBottom=function(e){this.syncScrollHeight(),this.isScrolledEnd=e+this.visibleRowCount>=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin+this.visibleRowBottomMargin;t-=this.visibleRowCount*this.characterSize.height,t<0&&(t=0),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t)},h.ScrollPort.prototype.getTopRowIndex=function(){return Math.round(this.screen_.scrollTop/this.characterSize.height)},h.ScrollPort.prototype.getBottomRowIndex=function(e){return e+this.visibleRowCount-1},h.ScrollPort.prototype.onScroll_=function(e){var t=this.getScreenSize();if(t.width!=this.lastScreenWidth_||t.height!=this.lastScreenHeight_)return void this.resize();this.redraw_(),this.publish("scroll",{scrollPort:this})},h.ScrollPort.prototype.onScrollWheel=function(e){},h.ScrollPort.prototype.onScrollWheel_=function(e){if(this.onScrollWheel(e),!e.defaultPrevented){var t=this.scrollWheelDelta(e),r=this.screen_.scrollTop-t.y;r<0&&(r=0);var o=this.getScrollMax_();r>o&&(r=o),r!=this.screen_.scrollTop&&(this.screen_.scrollTop=r,e.preventDefault())}},h.ScrollPort.prototype.scrollWheelDelta=function(e){var t={x:0,y:0};switch(e.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:t.x=e.deltaX*this.scrollWheelMultiplier_,t.y=e.deltaY*this.scrollWheelMultiplier_;break;case WheelEvent.DOM_DELTA_LINE:t.x=e.deltaX*this.characterSize.width,t.y=e.deltaY*this.characterSize.height;break;case WheelEvent.DOM_DELTA_PAGE:t.x=e.deltaX*this.characterSize.width*this.screen_.getWidth(),t.y=e.deltaY*this.characterSize.height*this.screen_.getHeight()}return t.y*=-1,t},h.ScrollPort.prototype.onTouch=function(e){},h.ScrollPort.prototype.onTouch_=function(e){if(this.onTouch(e),!e.defaultPrevented){var t,r,o=function(e){return{id:e.identifier,y:e.clientY,x:e.clientX}};switch(e.type){case"touchstart":for(t=0;ts&&(i=s),i!=this.screen_.scrollTop&&(this.screen_.scrollTop=i)}e.preventDefault()}},h.ScrollPort.prototype.onResize_=function(e){this.syncCharacterSize()},h.ScrollPort.prototype.onCopy=function(e){},h.ScrollPort.prototype.onCopy_=function(e){if(this.onCopy(e),!e.defaultPrevented&&(this.resetSelectBags_(),this.selection.sync(),!(this.selection.isCollapsed||this.selection.endRow.rowIndex-this.selection.startRow.rowIndex<2))){var t=this.getTopRowIndex(),r=this.getBottomRowIndex(t);if(this.selection.startRow.rowIndexr){var n;n=this.selection.startRow.rowIndex>r?this.selection.startRow.rowIndex+1:this.bottomFold_.previousSibling.rowIndex+1,this.bottomSelectBag_.textContent=this.rowProvider_.getRowsText(n,this.selection.endRow.rowIndex),this.rowNodes_.insertBefore(this.bottomSelectBag_,this.selection.endRow)}}},h.ScrollPort.prototype.onBodyKeyDown_=function(e){this.ctrlVPaste&&(e.ctrlKey||e.metaKey)&&118==e.keyCode&&this.pasteTarget_.focus()},h.ScrollPort.prototype.onPaste_=function(e){this.pasteTarget_.focus();var t=this;setTimeout(function(){t.publish("paste",{text:t.pasteTarget_.value}),t.pasteTarget_.value="",t.focus()},0)},h.ScrollPort.prototype.handlePasteTargetTextInput_=function(e){e.stopPropagation()},h.ScrollPort.prototype.onDragAndDrop_=function(e){if(this.pasteOnDrop){e.preventDefault();var t=void 0,r=void 0;e.shiftKey&&(e.dataTransfer.types.forEach(function(e){!r&&"text/plain"!=e&&e.startsWith("text/")&&(r=e)}),r&&(t=e.dataTransfer.getData(r))),t||(t=e.dataTransfer.getData("text/plain")),t&&this.publish("paste",{text:t})}},h.ScrollPort.prototype.setScrollbarVisible=function(e){this.screen_.style.overflowY=e?"scroll":"hidden"},h.ScrollPort.prototype.setScrollWheelMoveMultipler=function(e){this.scrollWheelMultiplier_=e},i.rtdep("lib.colors","lib.PreferenceManager","lib.resource","lib.wc","lib.f","hterm.AccessibilityReader","hterm.Keyboard","hterm.Options","hterm.PreferenceManager","hterm.Screen","hterm.ScrollPort","hterm.Size","hterm.TextAttributes","hterm.VT"),h.Terminal=function(e){this.profileId_=null,this.primaryScreen_=new h.Screen,this.alternateScreen_=new h.Screen,this.screen_=this.primaryScreen_,this.screenSize=new h.Size(0,0),this.scrollPort_=new h.ScrollPort(this),this.scrollPort_.subscribe("resize",this.onResize_.bind(this)),this.scrollPort_.subscribe("scroll",this.onScroll_.bind(this)),this.scrollPort_.subscribe("paste",this.onPaste_.bind(this)),this.scrollPort_.subscribe("focus",this.onScrollportFocus_.bind(this)),this.scrollPort_.onCopy=this.onCopy_.bind(this),this.div_=null,this.document_=window.document,this.scrollbackRows_=[],this.tabStops_=[],this.defaultTabStops=!0,this.vtScrollTop_=null,this.vtScrollBottom_=null,this.cursorNode_=null,this.cursorShape_=h.Terminal.cursorShape.BLOCK,this.cursorBlinkCycle_=[100,100],this.myOnCursorBlink_=this.onCursorBlink_.bind(this),this.backgroundColor_=null,this.foregroundColor_=null,this.scrollOnOutput_=null,this.scrollOnKeystroke_=null,this.scrollWheelArrowKeys_=null,this.defeatMouseReports_=!1,this.setAutomaticMouseHiding(),this.mouseHideDelay_=null,this.bellAudio_=this.document_.createElement("audio"),this.bellAudio_.id="hterm:bell-audio",this.bellAudio_.setAttribute("preload","auto"),this.accessibilityReader_=null,this.contextMenu=new h.ContextMenu,this.bellNotificationList_=[],this.desktopNotificationBell_=!1,this.savedOptions_={},this.options_=new h.Options,this.timeouts_={},this.vt=new h.VT(this),this.saveCursorAndState(!0),this.keyboard=new h.Keyboard(this),this.io=new h.Terminal.IO(this),this.enableMouseDragScroll=!0,this.copyOnSelect=null,this.mouseRightClickPaste=null,this.mousePasteButton=null,this.useDefaultWindowCopy=!1,this.clearSelectionAfterCopy=!0,this.realizeSize_(80,24),this.setDefaultTabStops(),this.allowImagesInline=null,this.reportFocus=!1,this.setProfile(e||"default",function(){this.onTerminalReady()}.bind(this))},h.Terminal.cursorShape={BLOCK:"BLOCK",BEAM:"BEAM",UNDERLINE:"UNDERLINE"},h.Terminal.prototype.onTerminalReady=function(){},h.Terminal.prototype.tabWidth=8,h.Terminal.prototype.setProfile=function(e,t){this.profileId_=e.replace(/\//g,"");var r=this;this.prefs_&&this.prefs_.deactivate(),this.prefs_=new h.PreferenceManager(this.profileId_),this.prefs_.addObservers(null,{"alt-gr-mode":function(e){e=null==e?"en-us"==navigator.language.toLowerCase()?"none":"right-alt":"string"==typeof e?e.toLowerCase():"none",/^(none|ctrl-alt|left-alt|right-alt)$/.test(e)||(e="none"),r.keyboard.altGrMode=e},"alt-backspace-is-meta-backspace":function(e){r.keyboard.altBackspaceIsMetaBackspace=e},"alt-is-meta":function(e){r.keyboard.altIsMeta=e},"alt-sends-what":function(e){/^(escape|8-bit|browser-key)$/.test(e)||(e="escape"),r.keyboard.altSendsWhat=e},"audible-bell-sound":function(e){var t=e.match(/^lib-resource:(\S+)/);t?r.bellAudio_.setAttribute("src",i.resource.getDataUrl(t[1])):r.bellAudio_.setAttribute("src",e)},"desktop-notification-bell":function(e){e&&Notification?(r.desktopNotificationBell_="granted"===Notification.permission,r.desktopNotificationBell_||console.warn("desktop-notification-bell is true but we do not have permission to display notifications.")):r.desktopNotificationBell_=!1},"background-color":function(e){r.setBackgroundColor(e)},"background-image":function(e){r.scrollPort_.setBackgroundImage(e)},"background-size":function(e){r.scrollPort_.setBackgroundSize(e)},"background-position":function(e){r.scrollPort_.setBackgroundPosition(e)},"backspace-sends-backspace":function(e){r.keyboard.backspaceSendsBackspace=e},"character-map-overrides":function(e){if(!(null==e||e instanceof Object))return void console.warn("Preference character-map-modifications is not an object: "+e);r.vt.characterMaps.reset(),r.vt.characterMaps.setOverrides(e)},"cursor-blink":function(e){r.setCursorBlink(!!e)},"cursor-blink-cycle":function(e){e instanceof Array&&"number"==typeof e[0]&&"number"==typeof e[1]?r.cursorBlinkCycle_=e:r.cursorBlinkCycle_="number"==typeof e?[e,e]:[100,100]},"cursor-color":function(e){r.setCursorColor(e)},"color-palette-overrides":function(e){if(!(null==e||e instanceof Object||e instanceof Array))return void console.warn("Preference color-palette-overrides is not an array or object: "+e);if(i.colors.colorPalette=i.colors.stockColorPalette.concat(),e)for(var t in e){var o=parseInt(t);if(isNaN(o)||o<0||o>255)console.log("Invalid value in palette: "+t+": "+e[t]);else if(e[o]){var n=i.colors.normalizeCSS(e[o]);n&&(i.colors.colorPalette[o]=n)}}r.primaryScreen_.textAttributes.resetColorPalette(),r.alternateScreen_.textAttributes.resetColorPalette()},"copy-on-select":function(e){r.copyOnSelect=!!e},"use-default-window-copy":function(e){r.useDefaultWindowCopy=!!e},"clear-selection-after-copy":function(e){r.clearSelectionAfterCopy=!!e},"ctrl-plus-minus-zero-zoom":function(e){r.keyboard.ctrlPlusMinusZeroZoom=e},"ctrl-c-copy":function(e){r.keyboard.ctrlCCopy=e},"ctrl-v-paste":function(e){r.keyboard.ctrlVPaste=e,r.scrollPort_.setCtrlVPaste(e)},"paste-on-drop":function(e){r.scrollPort_.setPasteOnDrop(e)},"east-asian-ambiguous-as-two-column":function(e){i.wc.regardCjkAmbiguous=e},"enable-8-bit-control":function(e){r.vt.enable8BitControl=!!e},"enable-bold":function(e){r.syncBoldSafeState()},"enable-bold-as-bright":function(e){r.primaryScreen_.textAttributes.enableBoldAsBright=!!e,r.alternateScreen_.textAttributes.enableBoldAsBright=!!e},"enable-blink":function(e){r.setTextBlink(!!e)},"enable-clipboard-write":function(e){r.vt.enableClipboardWrite=!!e},"enable-dec12":function(e){r.vt.enableDec12=!!e},"enable-csi-j-3":function(e){r.vt.enableCsiJ3=!!e},"font-family":function(e){r.syncFontFamily()},"font-size":function(e){if((e=parseInt(e))<=0)return void console.error("Invalid font size: "+e);r.setFontSize(e)},"font-smoothing":function(e){r.syncFontFamily()},"foreground-color":function(e){r.setForegroundColor(e)},"hide-mouse-while-typing":function(e){r.setAutomaticMouseHiding(e)},"home-keys-scroll":function(e){r.keyboard.homeKeysScroll=e},keybindings:function(e){if(r.keyboard.bindings.clear(),e){if(!(e instanceof Object))return void console.error("Error in keybindings preference: Expected object");try{r.keyboard.bindings.addBindings(e)}catch(e){console.error("Error in keybindings preference: "+e)}}},"media-keys-are-fkeys":function(e){r.keyboard.mediaKeysAreFKeys=e},"meta-sends-escape":function(e){r.keyboard.metaSendsEscape=e},"mouse-right-click-paste":function(e){r.mouseRightClickPaste=e},"mouse-paste-button":function(e){r.syncMousePasteButton()},"page-keys-scroll":function(e){r.keyboard.pageKeysScroll=e},"pass-alt-number":function(e){null==e&&(e="mac"!=h.os&&"popup"!=h.windowType),r.passAltNumber=e},"pass-ctrl-number":function(e){null==e&&(e="mac"!=h.os&&"popup"!=h.windowType),r.passCtrlNumber=e},"pass-meta-number":function(e){null==e&&(e="mac"==h.os&&"popup"!=h.windowType),r.passMetaNumber=e},"pass-meta-v":function(e){r.keyboard.passMetaV=e},"receive-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "receive-encoding": '+e),e="utf-8"),r.vt.characterEncoding=e},"scroll-on-keystroke":function(e){r.scrollOnKeystroke_=e},"scroll-on-output":function(e){r.scrollOnOutput_=e},"scrollbar-visible":function(e){r.setScrollbarVisible(e)},"scroll-wheel-may-send-arrow-keys":function(e){r.scrollWheelArrowKeys_=e},"scroll-wheel-move-multiplier":function(e){r.setScrollWheelMoveMultipler(e)},"send-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "send-encoding": '+e),e="utf-8"),r.keyboard.characterEncoding=e},"shift-insert-paste":function(e){r.keyboard.shiftInsertPaste=e},"terminal-encoding":function(e){r.vt.setEncoding(e)},"user-css":function(e){r.scrollPort_.setUserCssUrl(e)},"user-css-text":function(e){r.scrollPort_.setUserCssText(e)},"word-break-match-left":function(e){r.primaryScreen_.wordBreakMatchLeft=e,r.alternateScreen_.wordBreakMatchLeft=e},"word-break-match-right":function(e){r.primaryScreen_.wordBreakMatchRight=e,r.alternateScreen_.wordBreakMatchRight=e},"word-break-match-middle":function(e){r.primaryScreen_.wordBreakMatchMiddle=e,r.alternateScreen_.wordBreakMatchMiddle=e},"allow-images-inline":function(e){r.allowImagesInline=e}}),this.prefs_.readStorage(function(){this.prefs_.notifyAll(),t&&t()}.bind(this))},h.Terminal.prototype.getPrefs=function(){return this.prefs_},h.Terminal.prototype.setBracketedPaste=function(e){this.options_.bracketedPaste=e},h.Terminal.prototype.setCursorColor=function(e){void 0===e&&(e=this.prefs_.get("cursor-color")),this.setCssVar("cursor-color",e)},h.Terminal.prototype.getCursorColor=function(){return this.getCssVar("cursor-color")},h.Terminal.prototype.setSelectionEnabled=function(e){this.enableMouseDragScroll=e},h.Terminal.prototype.setBackgroundColor=function(e){void 0===e&&(e=this.prefs_.get("background-color")),this.backgroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setBackgroundColor(e)},h.Terminal.prototype.getBackgroundColor=function(){return this.backgroundColor_},h.Terminal.prototype.setForegroundColor=function(e){void 0===e&&(e=this.prefs_.get("foreground-color")),this.foregroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setForegroundColor(e)},h.Terminal.prototype.getForegroundColor=function(){return this.foregroundColor_},h.Terminal.prototype.runCommandClass=function(e,t){var r=this.prefs_.get("environment");"object"==("undefined"===typeof r?"undefined":n(r))&&null!=r||(r={});var o=this;this.command=new e({argString:t||"",io:this.io.push(),environment:r,onExit:function(e){o.io.pop(),o.uninstallKeyboard(),o.prefs_.get("close-on-exit")&&window.close()}}),this.installKeyboard(),this.command.run()},h.Terminal.prototype.isPrimaryScreen=function(){return this.screen_==this.primaryScreen_},h.Terminal.prototype.installKeyboard=function(){this.keyboard.installKeyboard(this.scrollPort_.getDocument().body)},h.Terminal.prototype.uninstallKeyboard=function(){this.keyboard.installKeyboard(null)},h.Terminal.prototype.setCssVar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"--hterm-";this.document_.documentElement.style.setProperty(""+r+e,t)},h.Terminal.prototype.getCssVar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"--hterm-";return this.document_.documentElement.style.getPropertyValue(""+t+e)},h.Terminal.prototype.setFontSize=function(e){e<=0&&(e=this.prefs_.get("font-size")),this.scrollPort_.setFontSize(e),this.setCssVar("charsize-width",this.scrollPort_.characterSize.width+"px"),this.setCssVar("charsize-height",this.scrollPort_.characterSize.height+"px")},h.Terminal.prototype.getFontSize=function(){return this.scrollPort_.getFontSize()},h.Terminal.prototype.getFontFamily=function(){return this.scrollPort_.getFontFamily()},h.Terminal.prototype.syncFontFamily=function(){this.scrollPort_.setFontFamily(this.prefs_.get("font-family"),this.prefs_.get("font-smoothing")),this.syncBoldSafeState()},h.Terminal.prototype.syncMousePasteButton=function(){var e=this.prefs_.get("mouse-paste-button");if("number"==typeof e)return void(this.mousePasteButton=e);"linux"!=h.os?this.mousePasteButton=1:this.mousePasteButton=2},h.Terminal.prototype.syncBoldSafeState=function(){var e=this.prefs_.get("enable-bold");if(null!==e)return this.primaryScreen_.textAttributes.enableBold=e,void(this.alternateScreen_.textAttributes.enableBold=e);var t=this.scrollPort_.measureCharacterSize(),r=this.scrollPort_.measureCharacterSize("bold"),o=t.equals(r);o||console.warn("Bold characters disabled: Size of bold weight differs from normal. Font family is: "+this.scrollPort_.getFontFamily()),this.primaryScreen_.textAttributes.enableBold=o,this.alternateScreen_.textAttributes.enableBold=o},h.Terminal.prototype.setTextBlink=function(e){void 0===e&&(e=this.prefs_.get("enable-blink")),this.setCssVar("blink-node-duration",e?"0.7s":"0")},h.Terminal.prototype.syncMouseStyle=function(){this.setCssVar("mouse-cursor-style",this.vt.mouseReport==this.vt.MOUSE_REPORT_DISABLED?"var(--hterm-mouse-cursor-text)":"var(--hterm-mouse-cursor-pointer)")},h.Terminal.prototype.saveCursor=function(){return this.screen_.cursorPosition.clone()},h.Terminal.prototype.getTextAttributes=function(){return this.screen_.textAttributes},h.Terminal.prototype.setTextAttributes=function(e){this.screen_.textAttributes=e},h.Terminal.prototype.getZoomFactor=function(){return this.scrollPort_.characterSize.zoomFactor},h.Terminal.prototype.setWindowTitle=function(e){window.document.title=e},h.Terminal.prototype.restoreCursor=function(e){var t=i.f.clamp(e.row,0,this.screenSize.height-1),r=i.f.clamp(e.column,0,this.screenSize.width-1);this.screen_.setCursorPosition(t,r),(e.column>r||e.column==r&&e.overflow)&&(this.screen_.cursorPosition.overflow=!0)},h.Terminal.prototype.clearCursorOverflow=function(){this.screen_.cursorPosition.overflow=!1},h.Terminal.prototype.saveCursorAndState=function(e){e?(this.primaryScreen_.saveCursorAndState(this.vt),this.alternateScreen_.saveCursorAndState(this.vt)):this.screen_.saveCursorAndState(this.vt)},h.Terminal.prototype.restoreCursorAndState=function(e){e?(this.primaryScreen_.restoreCursorAndState(this.vt),this.alternateScreen_.restoreCursorAndState(this.vt)):this.screen_.restoreCursorAndState(this.vt)},h.Terminal.prototype.setCursorShape=function(e){this.cursorShape_=e,this.restyleCursor_()},h.Terminal.prototype.getCursorShape=function(){return this.cursorShape_},h.Terminal.prototype.setWidth=function(e){if(null==e)return void(this.div_.style.width="100%");this.div_.style.width=Math.ceil(this.scrollPort_.characterSize.width*e+this.scrollPort_.currentScrollbarWidthPx)+"px",this.realizeSize_(e,this.screenSize.height),this.scheduleSyncCursorPosition_()},h.Terminal.prototype.setHeight=function(e){if(null==e)return void(this.div_.style.height="100%");this.div_.style.height=this.scrollPort_.characterSize.height*e+"px",this.realizeSize_(this.screenSize.width,e),this.scheduleSyncCursorPosition_()},h.Terminal.prototype.realizeSize_=function(e,t){e!=this.screenSize.width&&this.realizeWidth_(e),t!=this.screenSize.height&&this.realizeHeight_(t),this.io.onTerminalResize_(e,t)},h.Terminal.prototype.realizeWidth_=function(e){if(e<=0)throw new Error("Attempt to realize bad width: "+e);var t=e-this.screen_.getWidth();if(this.screenSize.width=e,this.screen_.setColumnCount(e),t>0)this.defaultTabStops&&this.setDefaultTabStops(this.screenSize.width-t);else for(var r=this.tabStops_.length-1;r>=0&&!(this.tabStops_[r]0){if(t<=this.scrollbackRows_.length){var i=Math.min(t,this.scrollbackRows_.length),s=this.scrollbackRows_.splice(this.scrollbackRows_.length-i,i);this.screen_.unshiftRows(s),t-=i,r.row+=i}t&&this.appendRows_(t)}this.setVTScrollRegion(null,null),this.restoreCursor(r)},h.Terminal.prototype.scrollHome=function(){this.scrollPort_.scrollRowToTop(0)},h.Terminal.prototype.scrollEnd=function(){this.scrollPort_.scrollRowToBottom(this.getRowCount())},h.Terminal.prototype.scrollPageUp=function(){this.scrollPort_.scrollPageUp()},h.Terminal.prototype.scrollPageDown=function(){this.scrollPort_.scrollPageDown()},h.Terminal.prototype.scrollLineUp=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e-1)},h.Terminal.prototype.scrollLineDown=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e+1)},h.Terminal.prototype.wipeContents=function(){this.clearHome(this.primaryScreen_),this.clearHome(this.alternateScreen_),this.clearScrollback()},h.Terminal.prototype.clearScrollback=function(){var e=this;this.scrollEnd(),this.scrollbackRows_.length=0,this.scrollPort_.resetCache(),[this.primaryScreen_,this.alternateScreen_].forEach(function(t){var r=t.getHeight();e.renumberRows_(0,r,t)}),this.syncCursorPosition_(),this.scrollPort_.invalidate()},h.Terminal.prototype.reset=function(){var e=this;this.vt.reset(),this.clearAllTabStops(),this.setDefaultTabStops();var t=function(t){t.textAttributes.reset(),t.textAttributes.resetColorPalette(),e.clearHome(t),t.saveCursorAndState(e.vt)};t(this.primaryScreen_),t(this.alternateScreen_),this.options_=new h.Options,this.setCursorBlink(!!this.prefs_.get("cursor-blink")),this.setVTScrollRegion(null,null),this.setCursorVisible(!0)},h.Terminal.prototype.softReset=function(){var e=this;this.vt.reset(),this.options_=new h.Options,this.options_.cursorBlink=!!this.timeouts_.cursorBlink;var t=function(t){t.textAttributes.reset(),t.textAttributes.resetColorPalette(),t.saveCursorAndState(e.vt)};t(this.primaryScreen_),t(this.alternateScreen_),this.setVTScrollRegion(null,null),this.setCursorVisible(!0)},h.Terminal.prototype.forwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=0;te)return void this.setCursorColumn(this.tabStops_[t]);var r=this.screen_.cursorPosition.overflow;this.setCursorColumn(this.screenSize.width-1),this.screen_.cursorPosition.overflow=r},h.Terminal.prototype.backwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=this.tabStops_.length-1;t>=0;t--)if(this.tabStops_[t]=0;t--){if(this.tabStops_[t]==e)return;if(this.tabStops_[t] to your HTML to fix."),this.div_=e,this.accessibilityReader_=new h.AccessibilityReader(e),this.scrollPort_.decorate(e),this.scrollPort_.setBackgroundImage(this.prefs_.get("background-image")),this.scrollPort_.setBackgroundSize(this.prefs_.get("background-size")),this.scrollPort_.setBackgroundPosition(this.prefs_.get("background-position")),this.scrollPort_.setUserCssUrl(this.prefs_.get("user-css")),this.scrollPort_.setUserCssText(this.prefs_.get("user-css-text")),this.scrollPort_.setAccessibilityReader(this.accessibilityReader_),this.div_.focus=this.focus.bind(this),this.setFontSize(this.prefs_.get("font-size")),this.syncFontFamily(),this.setScrollbarVisible(this.prefs_.get("scrollbar-visible")),this.setScrollWheelMoveMultipler(this.prefs_.get("scroll-wheel-move-multiplier")),this.document_=this.scrollPort_.getDocument(),this.accessibilityReader_.decorate(this.document_),this.document_.body.oncontextmenu=function(){return!1},this.contextMenu.setDocument(this.document_);var r=this.onMouse_.bind(this),o=this.scrollPort_.getScreenNode();o.addEventListener("mousedown",r),o.addEventListener("mouseup",r),o.addEventListener("mousemove",r),this.scrollPort_.onScrollWheel=r,o.addEventListener("keydown",this.onKeyboardActivity_.bind(this)),o.addEventListener("focus",this.onFocusChange_.bind(this,!0)),o.addEventListener("mousedown",function(){setTimeout(this.onFocusChange_.bind(this,!0))}.bind(this)),o.addEventListener("blur",this.onFocusChange_.bind(this,!1));var n=this.document_.createElement("style");n.textContent='.cursor-node[focus="false"] { box-sizing: border-box; background-color: transparent !important; border-width: 2px; border-style: solid;}menu { margin: 0; padding: 0; cursor: var(--hterm-mouse-cursor-pointer);}menuitem { white-space: nowrap; border-bottom: 1px dashed; display: block; padding: 0.3em 0.3em 0 0.3em;}menuitem.separator { border-bottom: none; height: 0.5em; padding: 0;}menuitem:hover { color: var(--hterm-cursor-color);}.wc-node { display: inline-block; text-align: center; width: calc(var(--hterm-charsize-width) * 2); line-height: var(--hterm-charsize-height);}:root { --hterm-charsize-width: '+this.scrollPort_.characterSize.width+"px; --hterm-charsize-height: "+this.scrollPort_.characterSize.height+"px; --hterm-cursor-offset-col: -1; --hterm-cursor-offset-row: -1; --hterm-blink-node-duration: 0.7s; --hterm-mouse-cursor-text: text; --hterm-mouse-cursor-pointer: default; --hterm-mouse-cursor-style: var(--hterm-mouse-cursor-text);}.uri-node:hover { text-decoration: underline; cursor: var(--hterm-mouse-cursor-pointer), pointer;}@keyframes blink { from { opacity: 1.0; } to { opacity: 0.0; }}.blink-node { animation-name: blink; animation-duration: var(--hterm-blink-node-duration); animation-iteration-count: infinite; animation-timing-function: ease-in-out; animation-direction: alternate;}",this.document_.head.insertBefore(n,this.document_.head.firstChild),this.cursorNode_=this.document_.createElement("div"),this.cursorNode_.id="hterm:terminal-cursor",this.cursorNode_.className="cursor-node",this.cursorNode_.style.cssText="position: absolute;left: calc(var(--hterm-charsize-width) * var(--hterm-cursor-offset-col));top: calc(var(--hterm-charsize-height) * var(--hterm-cursor-offset-row));display: "+(this.options_.cursorVisible?"":"none")+";width: var(--hterm-charsize-width);height: var(--hterm-charsize-height);background-color: var(--hterm-cursor-color);border-color: var(--hterm-cursor-color);-webkit-transition: opacity, background-color 100ms linear;-moz-transition: opacity, background-color 100ms linear;",this.setCursorColor(),this.setCursorBlink(!!this.prefs_.get("cursor-blink")),this.restyleCursor_(),this.document_.body.appendChild(this.cursorNode_),this.scrollBlockerNode_=this.document_.createElement("div"),this.scrollBlockerNode_.id="hterm:mouse-drag-scroll-blocker",this.scrollBlockerNode_.setAttribute("aria-hidden","true"),this.scrollBlockerNode_.style.cssText="position: absolute;top: -99px;display: block;width: 10px;height: 10px;",this.document_.body.appendChild(this.scrollBlockerNode_),this.scrollPort_.onScrollWheel=r,["mousedown","mouseup","mousemove","click","dblclick"].forEach(function(e){this.scrollBlockerNode_.addEventListener(e,r),this.cursorNode_.addEventListener(e,r),this.document_.addEventListener(e,r)}.bind(this)),this.cursorNode_.addEventListener("mousedown",function(){setTimeout(this.focus.bind(this))}.bind(this)),this.setReverseVideo(!1),this.scrollPort_.focus(),this.scrollPort_.scheduleRedraw()},h.Terminal.prototype.getDocument=function(){return this.document_},h.Terminal.prototype.focus=function(){this.scrollPort_.focus()},h.Terminal.prototype.getRowNode=function(e){if(e0){var s=this.screen_.shiftRows(i);Array.prototype.push.apply(this.scrollbackRows_,s),this.scrollPort_.isScrolledEnd&&this.scheduleScrollDown_()}t>=this.screen_.rowsArray.length&&(t=this.screen_.rowsArray.length-1),this.setAbsoluteCursorPosition(t,0)},h.Terminal.prototype.moveRows_=function(e,t,r){var o=this.screen_.removeRows(e,t);this.screen_.insertRows(r,o);var n,i;e=this.screenSize.width&&(s=!0,n=this.screenSize.width-this.screen_.cursorPosition.column),s&&!this.options_.wraparound?(o=i.wc.substr(e,t,n-1)+i.wc.substr(e,r-1),n=r):o=i.wc.substr(e,t,n);for(var a=h.TextAttributes.splitWidecharString(o),l=0;l0&&void 0!==arguments[0]&&arguments[0]||this.accessibilityReader_.newLine();var e=this.screen_.cursorPosition.row==this.screen_.rowsArray.length-1;null!=this.vtScrollBottom_?this.screen_.cursorPosition.row==this.vtScrollBottom_?(this.vtScrollUp(1),this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row,0)):e?this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row,0):this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row+1,0):e?this.appendRows_(1):this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row+1,0)},h.Terminal.prototype.lineFeed=function(){var e=this.screen_.cursorPosition.column;this.newLine(),this.setCursorColumn(e)},h.Terminal.prototype.formFeed=function(){this.options_.autoCarriageReturn?this.newLine():this.lineFeed()},h.Terminal.prototype.reverseLineFeed=function(){var e=this.getVTScrollTop(),t=this.screen_.cursorPosition.row;t==e?this.insertLines(1):this.setAbsoluteCursorRow(t-1)},h.Terminal.prototype.eraseToLeft=function(){var e=this.saveCursor();this.setCursorColumn(0);var t=e.column+1;this.screen_.overwriteString(i.f.getWhitespace(t),t),this.restoreCursor(e)},h.Terminal.prototype.eraseToRight=function(e){if(!this.screen_.cursorPosition.overflow){var t=this.screenSize.width-this.screen_.cursorPosition.column,r=e?Math.min(e,t):t;if(this.screen_.textAttributes.background===this.screen_.textAttributes.DEFAULT_COLOR){var o=this.screen_.rowsArray[this.screen_.cursorPosition.row];if(h.TextAttributes.nodeWidth(o)<=this.screen_.cursorPosition.column+r)return this.screen_.deleteChars(r),void this.clearCursorOverflow()}var n=this.saveCursor();this.screen_.overwriteString(i.f.getWhitespace(r),r),this.restoreCursor(n),this.clearCursorOverflow()}},h.Terminal.prototype.eraseLine=function(){var e=this.saveCursor();this.screen_.clearCursorRow(),this.restoreCursor(e),this.clearCursorOverflow()},h.Terminal.prototype.eraseAbove=function(){var e=this.saveCursor();this.eraseToLeft();for(var t=0;t=0;n--)this.setAbsoluteCursorPosition(t+n,0),this.screen_.clearCursorRow()},h.Terminal.prototype.deleteLines=function(e){var t=this.saveCursor(),r=t.row,o=this.getVTScrollBottom(),n=o-r+1;e=Math.min(e,n);var i=o-e+1;e!=n&&this.moveRows_(r,e,i);for(var s=0;st)return this.setCssVar("cursor-offset-row","-1"),!1;this.options_.cursorVisible&&"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display=""),this.setCssVar("cursor-offset-row",r-e+" + "+this.scrollPort_.visibleRowTopMargin+"px"),this.setCssVar("cursor-offset-col",this.screen_.cursorPosition.column),this.cursorNode_.setAttribute("title","("+this.screen_.cursorPosition.column+", "+this.screen_.cursorPosition.row+")");var s=this.document_.getSelection();return s&&(s.isCollapsed||o)&&this.screen_.syncSelectionCaret(s),!0},h.Terminal.prototype.restyleCursor_=function(){var e=this.cursorShape_;"false"==this.cursorNode_.getAttribute("focus")&&(e=h.Terminal.cursorShape.BLOCK);var t=this.cursorNode_.style;switch(e){case h.Terminal.cursorShape.BEAM:t.height="var(--hterm-charsize-height)",t.backgroundColor="transparent",t.borderBottomStyle=null,t.borderLeftStyle="solid";break;case h.Terminal.cursorShape.UNDERLINE:t.height=this.scrollPort_.characterSize.baseline+"px",t.backgroundColor="transparent",t.borderBottomStyle="solid",t.borderLeftStyle=null;break;default:t.height="var(--hterm-charsize-height)",t.backgroundColor="var(--hterm-cursor-color)",t.borderBottomStyle=null,t.borderLeftStyle=null}},h.Terminal.prototype.scheduleSyncCursorPosition_=function(){if(!this.timeouts_.syncCursor){if(this.accessibilityReader_.accessibilityEnabled){var e=this.scrollbackRows_.length+this.screen_.cursorPosition.row,t=this.screen_.cursorPosition.column,r=this.screen_.rowsArray[this.screen_.cursorPosition.row].innerText;this.accessibilityReader_.beforeCursorChange(r,e,t)}var o=this;this.timeouts_.syncCursor=setTimeout(function(){o.syncCursorPosition_(),delete o.timeouts_.syncCursor},0)}},h.Terminal.prototype.showZoomWarning_=function(e){if(!this.zoomWarningNode_){if(!e)return;this.zoomWarningNode_=this.document_.createElement("div"),this.zoomWarningNode_.id="hterm:zoom-warning",this.zoomWarningNode_.style.cssText="color: black;background-color: #ff2222;font-size: large;border-radius: 8px;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;top: 0.5em;right: 1.2em;position: absolute;-webkit-text-size-adjust: none;-webkit-user-select: none;-moz-text-size-adjust: none;-moz-user-select: none;",this.zoomWarningNode_.addEventListener("click",function(e){this.parentNode.removeChild(this)})}this.zoomWarningNode_.textContent=i.MessageManager.replaceReferences(h.zoomWarningMessage,[parseInt(100*this.scrollPort_.characterSize.zoomFactor)]),this.zoomWarningNode_.style.fontFamily=this.prefs_.get("font-family"),e?this.zoomWarningNode_.parentNode||this.div_.parentNode.appendChild(this.zoomWarningNode_):this.zoomWarningNode_.parentNode&&this.zoomWarningNode_.parentNode.removeChild(this.zoomWarningNode_)},h.Terminal.prototype.showOverlay=function(e,t){var r=this;if(!this.overlayNode_){if(!this.div_)return;this.overlayNode_=this.document_.createElement("div"),this.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",this.overlayNode_.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation()},!0)}this.overlayNode_.style.color=this.prefs_.get("background-color"),this.overlayNode_.style.backgroundColor=this.prefs_.get("foreground-color"),this.overlayNode_.style.fontFamily=this.prefs_.get("font-family"),this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.div_.appendChild(this.overlayNode_);var o=h.getClientSize(this.div_),n=h.getClientSize(this.overlayNode_);this.overlayNode_.style.top=(o.height-n.height)/2+"px",this.overlayNode_.style.left=(o.width-n.width-this.scrollPort_.currentScrollbarWidthPx)/2+"px",this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),this.accessibilityReader_.assertiveAnnounce(e),null!==t&&(this.overlayTimeout_=setTimeout(function(){r.overlayNode_.style.opacity="0",r.overlayTimeout_=setTimeout(function(){return r.hideOverlay()},200)},t||1500))},h.Terminal.prototype.hideOverlay=function(){this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),this.overlayTimeout_=null,this.overlayNode_.parentNode&&this.overlayNode_.parentNode.removeChild(this.overlayNode_),this.overlayNode_.style.opacity="0.75"},h.Terminal.prototype.paste=function(){return h.pasteFromClipboard(this.document_)},h.Terminal.prototype.copyStringToClipboard=function(e){this.prefs_.get("enable-clipboard-notice")&&setTimeout(this.showOverlay.bind(this,h.notifyCopyMessage,500),200);var t=this.document_.createElement("pre");t.id="hterm:copy-to-clipboard-source",t.textContent=e,t.style.cssText="-webkit-user-select: text;-moz-user-select: text;position: absolute;top: -99px",this.document_.body.appendChild(t);var r=this.document_.getSelection(),o=r.anchorNode,n=r.anchorOffset,i=r.focusNode,s=r.focusOffset;try{r.selectAllChildren(t)}catch(e){}h.copySelectionToClipboard(this.document_),r.extend&&(r.collapse(o,n),r.extend(i,s)),t.parentNode.removeChild(t)},h.Terminal.prototype.displayImage=function(e,t,r){var o=this;if(void 0!==e.uri){if(e.name||(e.name=""),!0!==this.allowImagesInline){this.newLine();var n=this.getRowNode(this.scrollbackRows_.length+this.getCursorRow()-1);if(!1===this.allowImagesInline)return void(n.textContent=h.msg("POPUP_INLINE_IMAGE_DISABLED",[],"Inline Images Disabled"));var i=void 0,s=this.document_.createElement("span");return s.innerText=h.msg("POPUP_INLINE_IMAGE",[],"Inline Images"),s.style.fontWeight="bold",s.style.borderWidth="1px",s.style.borderStyle="dashed",i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_BLOCK",[],"block"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.prefs_.set("allow-images-inline",!1)}),s.appendChild(i),i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_ALLOW_SESSION",[],"allow this session"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.allowImagesInline=!0}),s.appendChild(i),i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_ALLOW_ALWAYS",[],"always allow"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.prefs_.set("allow-images-inline",!0)}),s.appendChild(i),void n.appendChild(s)}if(e.inline){var a=this.io.push();a.showOverlay(h.msg("LOADING_RESOURCE_START",[e.name],"Loading $1 ..."),null),a.onVTKeystroke=a.sendString=function(){};var l=this.document_.createElement("img");l.src=e.uri,l.title=l.alt=e.name,this.document_.body.appendChild(l),l.onload=function(){l.style.objectFit=e.preserveAspectRatio?"scale-down":"fill",l.style.maxWidth=o.document_.body.clientWidth+"px",l.style.maxHeight=o.document_.body.clientHeight+"px";var r=function(e,t,r){if(!e||"auto"==e)return"";var o=e.match(/^([0-9]+)(px|%)?$/);return o?"%"==o[2]?t*parseInt(o[1])/100+"px":"px"==o[2]?e:"calc("+e+" * var("+r+"))":""};l.style.width=r(e.width,o.document_.body.clientWidth,"--hterm-charsize-width"),l.style.height=r(e.height,o.document_.body.clientHeight,"--hterm-charsize-height");for(var n=Math.ceil(l.clientHeight/o.scrollPort_.characterSize.height),i=0;i2048||e.search(/[\s\[\](){}<>"'\\^`]/)>=0)){if(e.search("^[a-zA-Z][a-zA-Z0-9+.-]*://")<0)switch(e.split(":",1)[0]){case"mailto":break;default:e="http://"+e}h.openUrl(e)}},h.Terminal.prototype.setAutomaticMouseHiding=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e="cros"!=h.os&&"mac"!=h.os),this.mouseHideWhileTyping_=!!e};h.Terminal.prototype.onKeyboardActivity_=function(e){this.mouseHideWhileTyping_&&!this.mouseHideDelay_&&this.setCssVar("mouse-cursor-style","none")},h.Terminal.prototype.onMouse_=function(e){var t=this;if(!e.processedByTerminalHandler_){e.button>2&&e.preventDefault();var r=!this.defeatMouseReports_&&this.vt.mouseReport!=this.vt.MOUSE_REPORT_DISABLED;if(e.processedByTerminalHandler_=!0,this.mouseHideWhileTyping_&&!this.mouseHideDelay_&&(this.syncMouseStyle(),this.mouseHideDelay_=setTimeout(function(){return t.mouseHideDelay_=null},1e3)),e.terminalRow=parseInt((e.clientY-this.scrollPort_.visibleRowTopMargin)/this.scrollPort_.characterSize.height)+1,e.terminalColumn=parseInt(e.clientX/this.scrollPort_.characterSize.width)+1,!("mousedown"==e.type&&e.terminalColumn>this.screenSize.width)){if(this.options_.cursorVisible&&!r&&(e.terminalRow-1==this.screen_.cursorPosition.row&&e.terminalColumn-1==this.screen_.cursorPosition.column?this.cursorNode_.style.display="none":"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display="")),"mousedown"==e.type&&(this.contextMenu.hide(e),e.altKey||!r?(this.defeatMouseReports_=!0,this.setSelectionEnabled(!0)):(this.defeatMouseReports_=!1,this.document_.getSelection().collapseToEnd(),this.setSelectionEnabled(!1),e.preventDefault())),r)this.scrollBlockerNode_.engaged||("mousedown"==e.type?(this.scrollBlockerNode_.engaged=!0,this.scrollBlockerNode_.style.top=e.clientY-5+"px",this.scrollBlockerNode_.style.left=e.clientX-5+"px"):"mousemove"==e.type&&(this.document_.getSelection().collapseToEnd(),e.preventDefault())),this.onMouse(e);else{if("dblclick"==e.type&&(this.screen_.expandSelection(this.document_.getSelection()),this.copyOnSelect&&this.copySelectionToClipboard(this.document_)),"click"==e.type&&!e.shiftKey&&(e.ctrlKey||e.metaKey))return clearTimeout(this.timeouts_.openUrl),void(this.timeouts_.openUrl=setTimeout(this.openSelectedUrl_.bind(this),500));if("mousedown"==e.type&&(e.ctrlKey&&2==e.button?(e.preventDefault(),this.contextMenu.show(e,this)):(e.button==this.mousePasteButton||this.mouseRightClickPaste&&2==e.button)&&(this.paste()||console.warn("Could not paste manually due to web restrictions"))),"mouseup"==e.type&&0==e.button&&this.copyOnSelect&&!this.document_.getSelection().isCollapsed&&this.copySelectionToClipboard(this.document_),"mousemove"!=e.type&&"mouseup"!=e.type||!this.scrollBlockerNode_.engaged||(this.scrollBlockerNode_.engaged=!1,this.scrollBlockerNode_.style.top="-99px"),this.scrollWheelArrowKeys_&&!e.shiftKey&&this.keyboard.applicationCursor&&!this.isPrimaryScreen()&&"wheel"==e.type){var o=this.scrollPort_.scrollWheelDelta(e),n=function(e,t,r,o){if(0==e)return"";var n=i.f.smartFloorDivide(Math.abs(e),t);return("\x1bO"+(e<0?o:r)).repeat(n)};this.io.sendString(n(o.y,this.scrollPort_.characterSize.height,"A","B")+n(o.x,this.scrollPort_.characterSize.width,"C","D")),e.preventDefault()}}"mouseup"==e.type&&this.document_.getSelection().isCollapsed&&(this.defeatMouseReports_=!1)}}},h.Terminal.prototype.onMouse=function(e){},h.Terminal.prototype.onFocusChange_=function(e){this.cursorNode_.setAttribute("focus",e),this.restyleCursor_(),this.reportFocus&&this.io.sendString(!0===e?"\x1b[I":"\x1b[O"),!0===e&&this.closeBellNotifications_()},h.Terminal.prototype.onScroll_=function(){this.scheduleSyncCursorPosition_()},h.Terminal.prototype.onPaste_=function(e){var t=e.text.replace(/\n/gm,"\r");if(t=this.keyboard.encode(t),this.options_.bracketedPaste){t="\x1b[200~"+function(e){return e.replace(/[\x00-\x07\x0b-\x0c\x0e-\x1f]/g,"")}(t)+"\x1b[201~"}this.io.sendString(t)},h.Terminal.prototype.onCopy_=function(e){this.useDefaultWindowCopy||(e.preventDefault(),setTimeout(this.copySelectionToClipboard.bind(this),0))},h.Terminal.prototype.onResize_=function(){var e=Math.floor(this.scrollPort_.getScreenWidth()/this.scrollPort_.characterSize.width)||0,t=i.f.smartFloorDivide(this.scrollPort_.getScreenHeight(),this.scrollPort_.characterSize.height)||0;if(!(e<=0||t<=0)){var r=e!=this.screenSize.width||t!=this.screenSize.height;this.realizeSize_(e,t),this.showZoomWarning_(1!=this.scrollPort_.characterSize.zoomFactor),r&&this.overlaySize(),this.restyleCursor_(),this.scheduleSyncCursorPosition_()}},h.Terminal.prototype.onCursorBlink_=function(){if(!this.options_.cursorBlink)return void delete this.timeouts_.cursorBlink;"false"==this.cursorNode_.getAttribute("focus")||"0"==this.cursorNode_.style.opacity?(this.cursorNode_.style.opacity="1",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[0])):(this.cursorNode_.style.opacity="0",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[1]))},h.Terminal.prototype.setScrollbarVisible=function(e){this.scrollPort_.setScrollbarVisible(e)},h.Terminal.prototype.setScrollWheelMoveMultipler=function(e){this.scrollPort_.setScrollWheelMoveMultipler(e)},h.Terminal.prototype.closeBellNotifications_=function(){this.bellNotificationList_.forEach(function(e){e.close()}),this.bellNotificationList_.length=0},h.Terminal.prototype.onScrollportFocus_=function(){var e=this.scrollPort_.getTopRowIndex(),t=this.scrollPort_.getBottomRowIndex(e),r=this.document_.getSelection();!this.syncCursorPosition_()&&r&&r.collapse(this.getRowNode(t))},i.rtdep("lib.encodeUTF8"),h.Terminal.IO=function(e){this.terminal_=e,this.previousIO_=null,this.buffered_=""},h.Terminal.IO.prototype.showOverlay=function(e,t){this.terminal_.showOverlay(e,t)},h.Terminal.IO.prototype.hideOverlay=function(){this.terminal_.hideOverlay()},h.Terminal.IO.prototype.createFrame=function(e,t){return new h.Frame(this.terminal_,e,t)},h.Terminal.IO.prototype.setTerminalProfile=function(e){this.terminal_.setProfile(e)},h.Terminal.IO.prototype.push=function(){var e=new h.Terminal.IO(this.terminal_);return e.keyboardCaptured_=this.keyboardCaptured_,e.columnCount=this.columnCount,e.rowCount=this.rowCount,e.previousIO_=this.terminal_.io,this.terminal_.io=e,e},h.Terminal.IO.prototype.pop=function(){this.terminal_.io=this.previousIO_,this.previousIO_.flush()},h.Terminal.IO.prototype.flush=function(){this.buffered_&&(this.terminal_.interpret(this.buffered_),this.buffered_="")},h.Terminal.IO.prototype.sendString=function(e){console.log("Unhandled sendString: "+e)},h.Terminal.IO.prototype.onVTKeystroke=function(e){console.log("Unobserverd VT keystroke: "+JSON.stringify(e))},h.Terminal.IO.prototype.onTerminalResize_=function(e,t){for(var r=this;r;)r.columnCount=e,r.rowCount=t,r=r.previousIO_;this.onTerminalResize(e,t)},h.Terminal.IO.prototype.onTerminalResize=function(e,t){},h.Terminal.IO.prototype.writeUTF8=function(e){if(this.terminal_.io!=this)return void(this.buffered_+=e);this.terminal_.interpret(e)},h.Terminal.IO.prototype.writelnUTF8=function(e){this.writeUTF8(e+"\r\n")},h.Terminal.IO.prototype.print=h.Terminal.IO.prototype.writeUTF16=function(e){this.writeUTF8(i.encodeUTF8(e))},h.Terminal.IO.prototype.println=h.Terminal.IO.prototype.writelnUTF16=function(e){this.writelnUTF8(i.encodeUTF8(e))},i.rtdep("lib.colors"),h.TextAttributes=function(e){this.document_=e,this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.underlineSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.underlineColor=this.DEFAULT_COLOR,this.defaultForeground="rgb(255, 255, 255)",this.defaultBackground="rgb(0, 0, 0)",this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0,this.tileData=null,this.uri=null,this.uriId=null,this.colorPalette=null,this.resetColorPalette()},h.TextAttributes.prototype.enableBold=!0,h.TextAttributes.prototype.enableBoldAsBright=!0,h.TextAttributes.prototype.DEFAULT_COLOR=i.f.createEnum(""),h.TextAttributes.prototype.SRC_DEFAULT="default",h.TextAttributes.prototype.setDocument=function(e){this.document_=e},h.TextAttributes.prototype.clone=function(){var e=new h.TextAttributes(null);for(var t in this)e[t]=this[t];return e.colorPalette=this.colorPalette.concat(),e},h.TextAttributes.prototype.reset=function(){this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.underlineSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.underlineColor=this.DEFAULT_COLOR,this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0,this.uri=null,this.uriId=null},h.TextAttributes.prototype.resetColorPalette=function(){this.colorPalette=i.colors.colorPalette.concat(),this.syncColors()},h.TextAttributes.prototype.resetColor=function(e){e=parseInt(e,10),isNaN(e)||e>=this.colorPalette.length||(this.colorPalette[e]=i.colors.stockColorPalette[e],this.syncColors())},h.TextAttributes.prototype.isDefault=function(){return this.foregroundSource==this.SRC_DEFAULT&&this.backgroundSource==this.SRC_DEFAULT&&!this.bold&&!this.faint&&!this.italic&&!this.blink&&!this.underline&&!this.strikethrough&&!this.inverse&&!this.invisible&&!this.wcNode&&this.asciiNode&&null==this.tileData&&null==this.uri},h.TextAttributes.prototype.createContainer=function(e){if(this.isDefault()){var t=this.document_.createTextNode(e);return t.asciiNode=!0,t}var r=this.document_.createElement("span"),o=r.style,n=[];this.foreground!=this.DEFAULT_COLOR&&(o.color=this.foreground),this.background!=this.DEFAULT_COLOR&&(o.backgroundColor=this.background),this.enableBold&&this.bold&&(o.fontWeight="bold"),this.faint&&(r.faint=!0),this.italic&&(o.fontStyle="italic"),this.blink&&(n.push("blink-node"),r.blinkNode=!0);var i="";return r.underline=this.underline,this.underline&&(i+=" underline",o.textDecorationStyle=this.underline),this.underlineSource!=this.SRC_DEFAULT&&(o.textDecorationColor=this.underlineColor),this.strikethrough&&(i+=" line-through",r.strikethrough=!0),i&&(o.textDecorationLine=i),this.wcNode&&(n.push("wc-node"),r.wcNode=!0),r.asciiNode=this.asciiNode,null!=this.tileData&&(n.push("tile"),n.push("tile_"+this.tileData),r.tileNode=!0),e&&(r.textContent=e),this.uri&&(n.push("uri-node"),r.uriId=this.uriId,r.title=this.uri,r.addEventListener("click",h.openUrl.bind(this,this.uri))),n.length&&(r.className=n.join(" ")),r},h.TextAttributes.prototype.matchesContainer=function(e){if("string"==typeof e||e.nodeType==Node.TEXT_NODE)return this.isDefault();var t=e.style;return!(this.wcNode||e.wcNode)&&this.asciiNode==e.asciiNode&&!(null!=this.tileData||e.tileNode)&&this.uriId==e.uriId&&this.foreground==t.color&&this.background==t.backgroundColor&&this.underlineColor==t.textDecorationColor&&(this.enableBold&&this.bold)==!!t.fontWeight&&this.blink==!!e.blinkNode&&this.italic==!!t.fontStyle&&this.underline==e.underline&&!!this.strikethrough==!!e.strikethrough},h.TextAttributes.prototype.setDefaults=function(e,t){this.defaultForeground=e,this.defaultBackground=t,this.syncColors()},h.TextAttributes.prototype.syncColors=function(){var e=this,t=function(t,r){return t==e.DEFAULT_COLOR?r:t},r=this.foregroundSource,o=this.backgroundSource;if(this.enableBoldAsBright&&this.bold&&Number.isInteger(r)&&(r=function(e){return e<8?e+8:e}(r)),r==this.SRC_DEFAULT?this.foreground=this.DEFAULT_COLOR:Number.isInteger(r)?this.foreground=this.colorPalette[r]:this.foreground=r,this.faint){var n=t(this.foreground,this.defaultForeground);this.foreground=i.colors.mix(n,"rgb(0, 0, 0)",.3333)}if(o==this.SRC_DEFAULT?this.background=this.DEFAULT_COLOR:Number.isInteger(o)?this.background=this.colorPalette[o]:this.background=o,this.inverse){var s=t(this.foreground,this.defaultForeground);this.foreground=t(this.background,this.defaultBackground),this.background=s}this.invisible&&(this.foreground=this.background),this.underlineSource==this.SRC_DEFAULT?this.underlineColor="":Number.isInteger(this.underlineSource)?this.underlineColor=this.colorPalette[this.underlineSource]:this.underlineColor=this.underlineSource},h.TextAttributes.containersMatch=function(e,t){if("string"==typeof e)return h.TextAttributes.containerIsDefault(t);if(e.nodeType!=t.nodeType)return!1;if(e.nodeType==Node.TEXT_NODE)return!0;var r=e.style,o=t.style;return r.color==o.color&&r.backgroundColor==o.backgroundColor&&r.backgroundColor==o.backgroundColor&&r.fontWeight==o.fontWeight&&r.fontStyle==o.fontStyle&&r.textDecoration==o.textDecoration&&r.textDecorationColor==o.textDecorationColor&&r.textDecorationStyle==o.textDecorationStyle&&r.textDecorationLine==o.textDecorationLine},h.TextAttributes.containerIsDefault=function(e){return"string"==typeof e||e.nodeType==Node.TEXT_NODE},h.TextAttributes.nodeWidth=function(e){return e.asciiNode?e.textContent.length:i.wc.strWidth(e.textContent)},h.TextAttributes.nodeSubstr=function(e,t,r){return e.asciiNode?e.textContent.substr(t,r):i.wc.substr(e.textContent,t,r)},h.TextAttributes.nodeSubstring=function(e,t,r){return e.asciiNode?e.textContent.substring(t,r):i.wc.substring(e.textContent,t,r)},h.TextAttributes.splitWidecharString=function(e){for(var t,r=[],o=0,n=0,s=0,a=!0,l=0;l0?0:1),a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a+32)+o+n,e.preventDefault();break;case"mousedown":var a=Math.min(e.button,2);this.mouseCoordinates!=this.MOUSE_COORDINATES_SGR&&(a+=32),a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a)+o+n;break;case"mouseup":this.mouseReport!=this.MOUSE_REPORT_PRESS&&(t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+e.button+";"+o+";"+n+"m":"\x1b[M#"+o+n);break;case"mousemove":this.mouseReport==this.MOUSE_REPORT_DRAG&&e.buttons&&(a=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?0:32,1&e.buttons?a+=0:4&e.buttons?a+=1:2&e.buttons?a+=2:a+=3,a+=32,a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a)+o+n,this.lastMouseDragResponse_==t?t="":this.lastMouseDragResponse_=t);break;case"click":case"dblclick":break;default:console.error("Unknown mouse event: "+e.type,e)}t&&this.terminal.io.sendString(t)}},h.VT.prototype.interpret=function(e){for(this.parseState_.resetBuf(this.decode(e));!this.parseState_.isComplete();){var t=this.parseState_.func,r=this.parseState_.pos,e=this.parseState_.buf;if(this.parseState_.func.call(this,this.parseState_),this.parseState_.func==t&&this.parseState_.pos==r&&this.parseState_.buf==e)throw"Parser did not alter the state!"}},h.VT.prototype.decode=function(e){return"utf-8"==this.characterEncoding?this.decodeUTF8(e):e},h.VT.prototype.encodeUTF8=function(e){return i.encodeUTF8(e)},h.VT.prototype.decodeUTF8=function(e){return this.utf8Decoder_.decode(e)},h.VT.prototype.setEncoding=function(e){switch(e){default:console.warn('Invalid value for "terminal-encoding": '+e);case"iso-2022":this.codingSystemUtf8_=!1,this.codingSystemLocked_=!1;break;case"utf-8-locked":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!0;break;case"utf-8":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!1}this.updateEncodingState_()},h.VT.prototype.updateEncodingState_=function(){var e=this,t=Object.keys(h.VT.CC1).filter(function(t){return!e.codingSystemUtf8_||t.charCodeAt()<128}).map(function(e){return"\\x"+i.f.zpad(e.charCodeAt().toString(16),2)}).join("");this.cc1Pattern_=new RegExp("["+t+"]")},h.VT.prototype.parseUnknown_=function(e){function t(e){!r.codingSystemUtf8_&&r[r.GL].GL&&(e=r[r.GL].GL(e)),r.terminal.print(e)}var r=this,o=e.peekRemainingBuf(),n=o.search(this.cc1Pattern_);return 0==n?(this.dispatch("CC1",o.substr(0,1),e),void e.advance(1)):-1==n?(t(o),void e.reset()):(t(o.substr(0,n)),this.dispatch("CC1",o.substr(n,1),e),void e.advance(n+1))},h.VT.prototype.parseCSI_=function(e){var t=e.peekChar(),r=e.args,o=function(){e.resetArguments(),e.subargs=null,e.resetParseFunction()};t>="@"&&t<="~"?(this.dispatch("CSI",this.leadingModifier_+this.trailingModifier_+t,e),o()):";"==t?this.trailingModifier_?o():(r.length||r.push(""),r.push("")):t>="0"&&t<="9"||":"==t?this.trailingModifier_?o():(r.length?r[r.length-1]+=t:r[0]=t,":"==t&&e.argSetSubargs(r.length-1)):t>=" "&&t<="?"?r.length?this.trailingModifier_+=t:this.leadingModifier_+=t:this.cc1Pattern_.test(t)?this.dispatch("CC1",t,e):o(),e.advance(1)},h.VT.prototype.parseUntilStringTerminator_=function(e){var t=e.peekRemainingBuf(),r=e.args,o=0;r.length?"\x1b"==r[0].slice(-1)&&(r[0]=r[0].slice(0,-1),t="\x1b"+t,o=1):(r[0]="",r[1]=new Date);var n=t.search(/[\x1b\x07]/),i=t[n];if(!(("\x1b"!=i||"\\"==t[n+1])&&-1!=n)){r[0]+=t;var s;return"\x1b"==i&&n!=t.length-1&&(s="embedded escape: "+n),(new Date-r[1]>this.oscTimeLimit_&&(s="timeout expired: "+(new Date-r[1])),s)?(this.warnUnimplemented&&console.log("parseUntilStringTerminator_: aborting: "+s,r[0]),e.reset(r[0]),!1):(e.advance(t.length-o),!0)}return r[0]+=t.substr(0,n),e.resetParseFunction(),e.advance(n+("\x1b"==i?2:1)-o),!0},h.VT.prototype.dispatch=function(e,t,r){var o=h.VT[e][t];return o?o==h.VT.ignore?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code: "+JSON.stringify(t))):r.subargs&&!o.supportsSubargs?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code w/subargs: "+JSON.stringify(t))):"CC1"==e&&t>"\x7f"&&!this.enable8BitControl?void console.warn("Ignoring 8-bit control code: 0x"+t.charCodeAt(0).toString(16)):void o.apply(this,[r,t]):void(this.warnUnimplemented&&console.warn("Unknown "+e+" code: "+JSON.stringify(t)))},h.VT.prototype.setANSIMode=function(e,t){4==e?this.terminal.setInsertMode(t):20==e?this.terminal.setAutoCarriageReturn(t):this.warnUnimplemented&&console.warn("Unimplemented ANSI Mode: "+e)},h.VT.prototype.setDECMode=function(e,t){switch(parseInt(e,10)){case 1:this.terminal.keyboard.applicationCursor=t;break;case 3:this.allowColumnWidthChanges_&&(this.terminal.setWidth(t?132:80),this.terminal.clearHome(),this.terminal.setVTScrollRegion(null,null));break;case 5:this.terminal.setReverseVideo(t);break;case 6:this.terminal.setOriginMode(t);break;case 7:this.terminal.setWraparound(t);break;case 9:this.mouseReport=t?this.MOUSE_REPORT_PRESS:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 12:this.enableDec12&&this.terminal.setCursorBlink(t);break;case 25:this.terminal.setCursorVisible(t);break;case 30:this.terminal.setScrollbarVisible(t);break;case 40:this.terminal.allowColumnWidthChanges_=t;break;case 45:this.terminal.setReverseWraparound(t);break;case 67:this.terminal.keyboard.backspaceSendsBackspace=t;break;case 1e3:this.mouseReport=t?this.MOUSE_REPORT_CLICK:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1002:this.mouseReport=t?this.MOUSE_REPORT_DRAG:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1004:this.terminal.reportFocus=t;break;case 1005:this.mouseCoordinates=t?this.MOUSE_COORDINATES_UTF8:this.MOUSE_COORDINATES_X10;break;case 1006:this.mouseCoordinates=t?this.MOUSE_COORDINATES_SGR:this.MOUSE_COORDINATES_X10;break;case 1007:this.terminal.scrollWheelArrowKeys_=t;break;case 1010:this.terminal.scrollOnOutput=t;break;case 1011:this.terminal.scrollOnKeystroke=t;break;case 1036:this.terminal.keyboard.metaSendsEscape=t;break;case 1039:t?this.terminal.keyboard.previousAltSendsWhat_||(this.terminal.keyboard.previousAltSendsWhat_=this.terminal.keyboard.altSendsWhat,this.terminal.keyboard.altSendsWhat="escape"):this.terminal.keyboard.previousAltSendsWhat_&&(this.terminal.keyboard.altSendsWhat=this.terminal.keyboard.previousAltSendsWhat_,this.terminal.keyboard.previousAltSendsWhat_=null);break;case 47:case 1047:this.terminal.setAlternateMode(t);break;case 1048:t?this.terminal.saveCursorAndState():this.terminal.restoreCursorAndState();break;case 1049:t?(this.terminal.saveCursorAndState(),this.terminal.setAlternateMode(t),this.terminal.clear()):(this.terminal.setAlternateMode(t),this.terminal.restoreCursorAndState());break;case 2004:this.terminal.setBracketedPaste(t);break;default:this.warnUnimplemented&&console.warn("Unimplemented DEC Private Mode: "+e)}},h.VT.ignore=function(){},h.VT.CC1={},h.VT.ESC={},h.VT.CSI={},h.VT.OSC={},h.VT.VT52={},h.VT.CC1["\0"]=h.VT.ignore,h.VT.CC1["\x05"]=h.VT.ignore,h.VT.CC1["\x07"]=function(){this.terminal.ringBell()},h.VT.CC1["\b"]=function(){this.terminal.cursorLeft(1)},h.VT.CC1["\t"]=function(){this.terminal.forwardTabStop()},h.VT.CC1["\n"]=function(){this.terminal.formFeed()},h.VT.CC1["\v"]=h.VT.CC1["\n"],h.VT.CC1["\f"]=h.VT.CC1["\n"],h.VT.CC1["\r"]=function(){this.terminal.setCursorColumn(0)},h.VT.CC1["\x0e"]=function(){this.GL="G1"},h.VT.CC1["\x0f"]=function(){this.GL="G0"},h.VT.CC1["\x11"]=h.VT.ignore,h.VT.CC1["\x13"]=h.VT.ignore,h.VT.CC1["\x18"]=function(e){"G1"==this.GL&&(this.GL="G0"),e.resetParseFunction(),this.terminal.print("?")},h.VT.CC1["\x1a"]=h.VT.CC1["\x18"],h.VT.CC1["\x1b"]=function(e){function t(e){var r=e.consumeChar();"\x1b"!=r&&(this.dispatch("ESC",r,e),e.func==t&&e.resetParseFunction())}e.func=t},h.VT.CC1["\x7f"]=h.VT.ignore,h.VT.CC1["\x84"]=h.VT.ESC.D=function(){this.terminal.lineFeed()},h.VT.CC1["\x85"]=h.VT.ESC.E=function(){this.terminal.setCursorColumn(0),this.terminal.cursorDown(1)},h.VT.CC1["\x88"]=h.VT.ESC.H=function(){this.terminal.setTabStop(this.terminal.getCursorColumn())},h.VT.CC1["\x8d"]=h.VT.ESC.M=function(){this.terminal.reverseLineFeed()},h.VT.CC1["\x8e"]=h.VT.ESC.N=h.VT.ignore,h.VT.CC1["\x8f"]=h.VT.ESC.O=h.VT.ignore,h.VT.CC1["\x90"]=h.VT.ESC.P=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.CC1["\x96"]=h.VT.ESC.V=h.VT.ignore,h.VT.CC1["\x97"]=h.VT.ESC.W=h.VT.ignore,h.VT.CC1["\x98"]=h.VT.ESC.X=h.VT.ignore,h.VT.CC1["\x9a"]=h.VT.ESC.Z=function(){this.terminal.io.sendString("\x1b[?1;2c")},h.VT.CC1["\x9b"]=h.VT.ESC["["]=function(e){e.resetArguments(),this.leadingModifier_="",this.trailingModifier_="",e.func=this.parseCSI_},h.VT.CC1["\x9c"]=h.VT.ESC["\\"]=h.VT.ignore,h.VT.CC1["\x9d"]=h.VT.ESC["]"]=function(e){function t(e){if(this.parseUntilStringTerminator_(e)&&e.func!=t){var r=e.args[0].match(/^(\d+);(.*)$/);r?(e.args[0]=r[2],this.dispatch("OSC",r[1],e)):console.warn("Invalid OSC: "+JSON.stringify(e.args[0])),e.resetArguments()}}e.resetArguments(),e.func=t},h.VT.CC1["\x9e"]=h.VT.ESC["^"]=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.CC1["\x9f"]=h.VT.ESC._=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.ESC[" "]=function(e){e.func=function(e){var t=e.consumeChar();this.warnUnimplemented&&console.warn("Unimplemented sequence: ESC 0x20 "+t),e.resetParseFunction()}},h.VT.ESC["#"]=function(e){e.func=function(e){"8"==e.consumeChar()&&(this.terminal.setCursorPosition(0,0),this.terminal.fill("E")),e.resetParseFunction()}},h.VT.ESC["%"]=function(e){e.func=function(e){var t=e.consumeChar();if(this.codingSystemLocked_)return"/"==t&&e.consumeChar(),void e.resetParseFunction();switch(t){case"@":this.setEncoding("iso-2022");break;case"G":this.setEncoding("utf-8");break;case"/":switch(t=e.consumeChar()){case"G":case"H":case"I":this.setEncoding("utf-8-locked");break;default:this.warnUnimplemented&&console.warn("Unknown ESC % / argument: "+JSON.stringify(t))}break;default:this.warnUnimplemented&&console.warn("Unknown ESC % argument: "+JSON.stringify(t))}e.resetParseFunction()}},h.VT.ESC["("]=h.VT.ESC[")"]=h.VT.ESC["*"]=h.VT.ESC["+"]=h.VT.ESC["-"]=h.VT.ESC["."]=h.VT.ESC["/"]=function(e,t){e.func=function(e){var r=e.consumeChar();if("\x1b"==r)return e.resetParseFunction(),void e.func();var o=this.characterMaps.getMap(r);void 0!==o?"("==t?this.G0=o:")"==t||"-"==t?this.G1=o:"*"==t||"."==t?this.G2=o:"+"!=t&&"/"!=t||(this.G3=o):this.warnUnimplemented&&console.log('Invalid character set for "'+t+'": '+r),e.resetParseFunction()}},h.VT.ESC[6]=h.VT.ignore,h.VT.ESC[7]=function(){this.terminal.saveCursorAndState()},h.VT.ESC[8]=function(){this.terminal.restoreCursorAndState()},h.VT.ESC[9]=h.VT.ignore,h.VT.ESC["="]=function(){this.terminal.keyboard.applicationKeypad=!0},h.VT.ESC[">"]=function(){this.terminal.keyboard.applicationKeypad=!1},h.VT.ESC.F=h.VT.ignore,h.VT.ESC.c=function(){this.terminal.reset()},h.VT.ESC.l=h.VT.ESC.m=h.VT.ignore,h.VT.ESC.n=function(){this.GL="G2"},h.VT.ESC.o=function(){this.GL="G3"},h.VT.ESC["|"]=function(){this.GR="G3"},h.VT.ESC["}"]=function(){this.GR="G2"},h.VT.ESC["~"]=function(){this.GR="G1"},h.VT.OSC[0]=function(e){this.terminal.setWindowTitle(e.args[0])},h.VT.OSC[2]=h.VT.OSC[0],h.VT.OSC[4]=function(e){for(var t=e.args[0].split(";"),r=parseInt(t.length/2),o=this.terminal.getTextAttributes().colorPalette,n=[],s=0;s=o.length||("?"!=l?(l=i.colors.x11ToCSS(l))&&(o[a]=l):(l=i.colors.rgbToX11(o[a]))&&n.push(a+";"+l))}n.length&&this.terminal.io.sendString("\x1b]4;"+n.join(";")+"\x07")},h.VT.OSC[8]=function(e){var t=e.args[0].split(";"),r=null,o=null;if(2!=t.length||0==t[1].length);else{var n=t[0].split(":");r="",n.forEach(function(e){var t=e.indexOf("=");if(-1!=t){var o=e.slice(0,t),n=e.slice(t+1);switch(o){case"id":r=n}}}),o=t[1]}var i=this.terminal.getTextAttributes();i.uri=o,i.uriId=r},h.VT.OSC[9]=function(e){h.notify({body:e.args[0]})},h.VT.OSC[10]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setForegroundColor(r),t.length>0&&(e.args[0]=t.join(";"),h.VT.OSC[11].apply(this,[e]))}},h.VT.OSC[11]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setBackgroundColor(r),t.length>0&&(e.args[0]=t.join(";"),h.VT.OSC[12].apply(this,[e]))}},h.VT.OSC[12]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setCursorColor(r)}},h.VT.OSC[50]=function(e){var t=e.args[0].match(/CursorShape=(.)/i);if(!t)return void console.warn("Could not parse OSC 50 args: "+e.args[0]);switch(t[1]){case"1":this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM);break;case"2":this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE);break;default:this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK)}},h.VT.OSC[52]=function(e){if(this.enableClipboardWrite){var t=e.args[0].match(/^[cps01234567]*;(.*)/);if(t){var r=window.atob(t[1]);r&&this.terminal.copyStringToClipboard(this.decode(r))}}},h.VT.OSC[104]=function(e){var t=this.terminal.getTextAttributes();if(!e.args[0])return void t.resetColorPalette();e.args[0].split(";").forEach(function(e){return t.resetColor(e)})},h.VT.OSC[110]=function(e){this.terminal.setForegroundColor()},h.VT.OSC[111]=function(e){this.terminal.setBackgroundColor()},h.VT.OSC[112]=function(e){this.terminal.setCursorColor()},h.VT.OSC[1337]=function(e){var t=e.args[0].match(/^File=([^:]*):([\s\S]*)$/m);if(!t)return void(this.warnUnimplemented&&console.log("iTerm2 1337: unsupported sequence: "+t[1]));var r={name:"",size:0,preserveAspectRatio:!0,inline:!1,width:"auto",height:"auto",align:"left",uri:"data:application/octet-stream;base64,"+t[2].replace(/[\n\r]+/gm,"")};if(t[1].split(";").forEach(function(e){var t=e.match(/^([^=]+)=(.*)$/m);if(t)switch(t[1]){case"name":try{r.name=window.atob(t[2])}catch(e){}break;case"size":try{r.size=parseInt(t[2])}catch(e){}break;case"width":r.width=t[2];break;case"height":r.height=t[2];break;case"preserveAspectRatio":r.preserveAspectRatio=!("0"==t[2]);break;case"inline":r.inline=!("0"==t[2]);break;case"align":r.align=t[2]}}),r.inline){var o=this.terminal.io,n=e.peekRemainingBuf();e.advance(n.length),this.terminal.displayImage(r),o.writeUTF8(n)}else this.terminal.displayImage(r)},h.VT.OSC[777]=function(e){var t;switch(e.args[0].split(";",1)[0]){case"notify":var r,o;t=e.args[0].match(/^[^;]+;([^;]*)(;([\s\S]*))?$/),t&&(r=t[1],o=t[3]),h.notify({title:r,body:o});break;default:console.warn("Unknown urxvt module: "+e.args[0])}},h.VT.CSI["@"]=function(e){this.terminal.insertSpace(e.iarg(0,1))},h.VT.CSI.A=function(e){this.terminal.cursorUp(e.iarg(0,1))},h.VT.CSI.B=function(e){this.terminal.cursorDown(e.iarg(0,1))},h.VT.CSI.C=function(e){this.terminal.cursorRight(e.iarg(0,1))},h.VT.CSI.D=function(e){this.terminal.cursorLeft(e.iarg(0,1))},h.VT.CSI.E=function(e){this.terminal.cursorDown(e.iarg(0,1)),this.terminal.setCursorColumn(0)},h.VT.CSI.F=function(e){this.terminal.cursorUp(e.iarg(0,1)),this.terminal.setCursorColumn(0)},h.VT.CSI.G=function(e){this.terminal.setCursorColumn(e.iarg(0,1)-1)},h.VT.CSI.H=function(e){this.terminal.setCursorPosition(e.iarg(0,1)-1,e.iarg(1,1)-1)},h.VT.CSI.I=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rT"]=h.VT.ignore,h.VT.CSI.X=function(e){this.terminal.eraseToRight(e.iarg(0,1))},h.VT.CSI.Z=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rc"]=function(e){this.terminal.io.sendString("\x1b[>0;256;0c")},h.VT.CSI.d=function(e){this.terminal.setAbsoluteCursorRow(e.iarg(0,1)-1)},h.VT.CSI.f=h.VT.CSI.H,h.VT.CSI.g=function(e){e.args[0]&&0!=e.args[0]?3==e.args[0]&&this.terminal.clearAllTabStops():this.terminal.clearTabStopAtCursor(!1)},h.VT.CSI.h=function(e){for(var t=0;t=90&&o<=97?t.foregroundSource=o-90+8:o>=100&&o<=107&&(t.backgroundSource=o-100+8)}t.setDefaults(this.terminal.getForegroundColor(),this.terminal.getBackgroundColor())},h.VT.CSI.m.supportsSubargs=!0,h.VT.CSI[">m"]=h.VT.ignore,h.VT.CSI.n=function(e){if(5==e.args[0])this.terminal.io.sendString("\x1b0n");else if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("\x1b["+t+";"+r+"R")}};h.VT.CSI[">n"]=h.VT.ignore,h.VT.CSI["?n"]=function(e){if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("\x1b["+t+";"+r+"R")}else 15==e.args[0]?this.terminal.io.sendString("\x1b[?11n"):25==e.args[0]?this.terminal.io.sendString("\x1b[?21n"):26==e.args[0]?this.terminal.io.sendString("\x1b[?12;1;0;0n"):53==e.args[0]&&this.terminal.io.sendString("\x1b[?50n")},h.VT.CSI[">p"]=h.VT.ignore,h.VT.CSI["!p"]=function(){this.terminal.softReset()},h.VT.CSI.$p=h.VT.ignore,h.VT.CSI["?$p"]=h.VT.ignore,h.VT.CSI['"p']=h.VT.ignore,h.VT.CSI.q=h.VT.ignore,h.VT.CSI[" q"]=function(e){var t=e.args[0];0==t||1==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!0)):2==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!1)):3==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!0)):4==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!1)):5==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!0)):6==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!1)):console.warn("Unknown cursor style: "+t)},h.VT.CSI['"q']=h.VT.ignore,h.VT.CSI.r=function(e){var t=e.args,r=t[0]?parseInt(t[0],10)-1:null,o=t[1]?parseInt(t[1],10)-1:null;this.terminal.setVTScrollRegion(r,o),this.terminal.setCursorPosition(0,0)},h.VT.CSI["?r"]=h.VT.ignore,h.VT.CSI.$r=h.VT.ignore,h.VT.CSI.s=function(){this.terminal.saveCursorAndState()},h.VT.CSI["?s"]=h.VT.ignore,h.VT.CSI.t=h.VT.ignore,h.VT.CSI.$t=h.VT.ignore,h.VT.CSI[">t"]=h.VT.ignore,h.VT.CSI[" t"]=h.VT.ignore,h.VT.CSI.u=function(){this.terminal.restoreCursorAndState()},h.VT.CSI[" u"]=h.VT.ignore,h.VT.CSI.$v=h.VT.ignore,h.VT.CSI["'w"]=h.VT.ignore,h.VT.CSI.x=h.VT.ignore,h.VT.CSI["*x"]=h.VT.ignore,h.VT.CSI.$x=h.VT.ignore,h.VT.CSI.z=function(e){if(!(e.args.length<1)){var t=e.args[0];if(0==t){if(e.args.length<2)return;this.terminal.getTextAttributes().tileData=e.args[1]}else 1==t&&(this.terminal.getTextAttributes().tileData=null)}},h.VT.CSI["'z"]=h.VT.ignore,h.VT.CSI.$z=h.VT.ignore,h.VT.CSI["'{"]=h.VT.ignore,h.VT.CSI["'|"]=h.VT.ignore,h.VT.CSI["'}"]=h.VT.ignore,h.VT.CSI["'~"]=h.VT.ignore,i.rtdep("lib.f"),h.VT.CharacterMap=function(e,t){this.description=e,this.GL=null,this.glmapBase_=t,this.sync_()},h.VT.CharacterMap.prototype.sync_=function(e){var t=this;if(!this.glmapBase_&&!e)return this.GL=null,delete this.glmap_,void delete this.glre_;this.glmap_=e?Object.assign({},this.glmapBase_,e):this.glmapBase_;var r=Object.keys(this.glmap_).map(function(e){return"\\x"+i.f.zpad(e.charCodeAt(0).toString(16))});this.glre_=new RegExp("["+r.join("")+"]","g"),this.GL=function(e){return e.replace(t.glre_,function(e){return t.glmap_[e]})}},h.VT.CharacterMap.prototype.reset=function(){this.glmap_!==this.glmapBase_&&this.sync_()},h.VT.CharacterMap.prototype.setOverrides=function(e){this.sync_(e)},h.VT.CharacterMap.prototype.clone=function(){var e=new h.VT.CharacterMap(this.description,this.glmapBase_);return this.glmap_!==this.glmapBase_&&e.setOverrides(this.glmap_),e},h.VT.CharacterMaps=function(){this.maps_=h.VT.CharacterMaps.DefaultMaps,this.mapsBase_=this.maps_},h.VT.CharacterMaps.prototype.getMap=function(e){return this.maps_.hasOwnProperty(e)?this.maps_[e]:void 0},h.VT.CharacterMaps.prototype.addMap=function(e,t){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_)),this.maps_[e]=t},h.VT.CharacterMaps.prototype.reset=function(){this.maps_!==h.VT.CharacterMaps.DefaultMaps&&(this.maps_=h.VT.CharacterMaps.DefaultMaps)},h.VT.CharacterMaps.prototype.setOverrides=function(e){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_));for(var t in e){var r=this.getMap(t);void 0!==r?(this.maps_[t]=r.clone(),this.maps_[t].setOverrides(e[t])):this.addMap(t,new h.VT.CharacterMap("user "+t,e[t]))}},h.VT.CharacterMaps.DefaultMaps={},h.VT.CharacterMaps.DefaultMaps[0]=new h.VT.CharacterMap("graphic",{"`":"\u25c6",a:"\u2592",b:"\u2409",c:"\u240c",d:"\u240d",e:"\u240a",f:"\xb0",g:"\xb1",h:"\u2424",i:"\u240b",j:"\u2518",k:"\u2510",l:"\u250c",m:"\u2514",n:"\u253c",o:"\u23ba",p:"\u23bb",q:"\u2500",r:"\u23bc",s:"\u23bd",t:"\u251c",u:"\u2524",v:"\u2534",w:"\u252c",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03c0","|":"\u2260","}":"\xa3","~":"\xb7"}),h.VT.CharacterMaps.DefaultMaps.A=new h.VT.CharacterMap("british",{"#":"\xa3"}),h.VT.CharacterMaps.DefaultMaps.B=new h.VT.CharacterMap("us",null),h.VT.CharacterMaps.DefaultMaps[4]=new h.VT.CharacterMap("dutch",{"#":"\xa3","@":"\xbe","[":"\u0132","\\":"\xbd","]":"|","{":"\xa8","|":"f","}":"\xbc","~":"\xb4"}),h.VT.CharacterMaps.DefaultMaps.C=h.VT.CharacterMaps.DefaultMaps[5]=new h.VT.CharacterMap("finnish",{"[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps.R=new h.VT.CharacterMap("french",{"#":"\xa3","@":"\xe0","[":"\xb0","\\":"\xe7","]":"\xa7","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xa8"}),h.VT.CharacterMaps.DefaultMaps.Q=new h.VT.CharacterMap("french canadian",{"@":"\xe0","[":"\xe2","\\":"\xe7","]":"\xea","^":"\xee","`":"\xf4","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xfb"}),h.VT.CharacterMaps.DefaultMaps.K=new h.VT.CharacterMap("german",{"@":"\xa7","[":"\xc4","\\":"\xd6","]":"\xdc","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xdf"}),h.VT.CharacterMaps.DefaultMaps.Y=new h.VT.CharacterMap("italian",{"#":"\xa3","@":"\xa7","[":"\xb0","\\":"\xe7","]":"\xe9","`":"\xf9","{":"\xe0","|":"\xf2","}":"\xe8","~":"\xec"}),h.VT.CharacterMaps.DefaultMaps.E=h.VT.CharacterMaps.DefaultMaps[6]=new h.VT.CharacterMap("norwegian/danish",{"@":"\xc4","[":"\xc6","\\":"\xd8","]":"\xc5","^":"\xdc","`":"\xe4","{":"\xe6","|":"\xf8","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps.Z=new h.VT.CharacterMap("spanish",{"#":"\xa3","@":"\xa7","[":"\xa1","\\":"\xd1","]":"\xbf","{":"\xb0","|":"\xf1","}":"\xe7"}),h.VT.CharacterMaps.DefaultMaps[7]=h.VT.CharacterMaps.DefaultMaps.H=new h.VT.CharacterMap("swedish",{"@":"\xc9","[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps["="]=new h.VT.CharacterMap("swiss",{"#":"\xf9","@":"\xe0","[":"\xe9","\\":"\xe7","]":"\xea","^":"\xee",_:"\xe8","`":"\xf4","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xfb"}),i.resource.add("hterm/audio/bell","audio/ogg;base64","T2dnUwACAAAAAAAAAADhqW5KAAAAAMFvEjYBHgF2b3JiaXMAAAAAAYC7AAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAA4aluSgEAAAAAesI3EC3//////////////////8kDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDkwNzA5AAAAAAEFdm9yYmlzKUJDVgEACAAAADFMIMWA0JBVAAAQAABgJCkOk2ZJKaWUoSh5mJRISSmllMUwiZiUicUYY4wxxhhjjDHGGGOMIDRkFQAABACA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2N19MO91S9rd8EHTZHnzC5MYmfQEACy/FBcAAADA5c4gi4z8RANs/m6FNXVo9DV46JG1BBDukqlw/Va5G7QbuGVSI+2aZaoLXJrdVj2zlC9Z5QEAEFz/5QzgVZwAAAAA/oXcxyC6WfTu+09Ve/c766J4VTAGUFmA51+VANKi/QPoPwYgYAkA715OH4S0s5KDHvj99MMq8TPFc3roKZnGOoT1bmIhVgc7XAMBAAAAAMAW1VbQw3gapzOpJd+Kd2fc4iSO62fJv9+movui1wUNPAj059N3OVxzk4gV73PmE8FIA2F5mRq37Evc76vLXfF4rD5UJJAw46hW6LZCb5sNLdx+kzMCAAB+hfy95+965ZCLP7B3/VlTHCvDEKtQhTm4KiCgAEAbrfbWTPssAAAAXpee1tVrozYYn41wD1aeYtkKfswN5/SXPO0JDnhO/4laUortv/s412fybe/nONdncoCHnBVliu0CQGBWlPY/5Kwom2L/kruPM6Q7oz4tvDQy+bZ3HzOi+gNHA4DZEgA="),i.resource.add("hterm/images/icon-96","image/png;base64","iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAStklEQVR42u1dBXjrupL+RzIGmjIfvAcu42NmZub3lpmZmZmZmRkuMzPDYaYyJG0Sa9b2p2z1eQtp7bzefpv/nKnkkSw7Gg1IshNsDtpoo4022mijDWp/tlTgzbpJSqYvMoFTC9vjRD5JLb9RYaRkpk22SS28P8pacAaPdZ41KYMCI89YB6wN3JzQJM3UIGqurfTlKQTAZtqENid5SlNdU804VmbbWQtA6HMkAAdADsBeAJ7mxwIhIhFSXJ9iRPw4JYDEcqmGWEp1HhCI8gAtpXF7scB1ZRH9E3HObANCNy1AoGTegNDnCdE41tfQDH2t+CINQEpJ9Xp97oUDh3+nXK48DYAMIWQmANIkNTn6vP69e3d/zctfeu0nXNexmVn3F0gDAMxMlBoHuht0qnsEEekC42SdGHmNxgVjgk4bPN04Yui8bhc534cQBH35RKrPN9sGdLnB1/Wuv+HW4f+6/tZvBHAaAJvmKr0AjJGvyQMw8p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TdEX9f4ZvmfB9/3Il5bW2hNmnZbDB4omLpw/h7n5RYCa+3E0ToY4Jp9XiGSYk/WMvHmlxDEn7yN5ffN4mTzrM808G+0leJqVbG81njbfjFJHHr4no4lZ3fjRT06GoWxQ+eFHn7rTz/1Tv5QSrBQpZrAmfVMaQJyNOXHOPESjztJfs54uxFJWl5q1zYuZRzD+RzAPEufoJFln2TyMv8axwUheJPGRVSMFEHe4ZckqMy8cOXLin5f7xVUyyPypwhKAHp13IjJCVW4iHGAz30Q5mmx3I+dwyvbWE36x0ck1AFW9Gb+g06qmWkMQVuLEQEtuVldyjR/vFJqyjxNb6+mTA6DV96HMvkx0ej2pAZZxoBL5QJ8oDKIW3jxnfA5twj1xUhPMjjd9wGpOOEgIgUzaxFG8RZ4FTgxos9N1atajtd+S1LytA26p8NKbQE7/0+BtpNakNtpoo4022vgf7lRPtKCE39oAAAAASUVORK5CYII="),i.resource.add("hterm/concat/date","text/plain","Mon, 26 Nov 2018 08:50:10 +0000"),i.resource.add("hterm/changelog/version","text/plain","2018-10-24"),i.resource.add("hterm/changelog/date","text/plain","1.82"),i.resource.add("hterm/git/HEAD","text/plain","03ee0980444a38a97ef947b2272e44fdb3bdf5f5")},function(e,t,r){"use strict";e.exports=r(24)},function(e,t,r){"use strict";function o(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(e){console.error(e)}}o(),e.exports=r(23)},function(e,t,r){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,a,l=o(e),c=1;c="a"&&e<="z")o.name=e;else if(1===e.length&&e>="A"&&e<="Z")o.name=e.toLowerCase(),o.shift=!0;else if(r=s.exec(e))o.name=r[1].toLowerCase(),o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=l.exec(e)){var n=(r[1]||"")+(r[2]||"")+(r[4]||"")+(r[9]||""),i=(r[3]||r[8]||1)-1;switch(o.ctrl=!!(4&i),o.meta=!!(10&i),o.shift=!!(1&i),o.code=n,n){case"OP":o.name="f1";break;case"OQ":o.name="f2";break;case"OR":o.name="f3";break;case"OS":o.name="f4";break;case"[11~":o.name="f1";break;case"[12~":o.name="f2";break;case"[13~":o.name="f3";break;case"[14~":o.name="f4";break;case"[[A":o.name="f1";break;case"[[B":o.name="f2";break;case"[[C":o.name="f3";break;case"[[D":o.name="f4";break;case"[[E":case"[15~":o.name="f5";break;case"[17~":o.name="f6";break;case"[18~":o.name="f7";break;case"[19~":o.name="f8";break;case"[20~":o.name="f9";break;case"[21~":o.name="f10";break;case"[23~":o.name="f11";break;case"[24~":o.name="f12";break;case"[A":o.name="up";break;case"[B":o.name="down";break;case"[C":o.name="right";break;case"[D":o.name="left";break;case"[E":o.name="clear";break;case"[F":o.name="end";break;case"[H":o.name="home";break;case"OA":o.name="up";break;case"OB":o.name="down";break;case"OC":o.name="right";break;case"OD":o.name="left";break;case"OE":o.name="clear";break;case"OF":o.name="end";break;case"OH":case"[1~":o.name="home";break;case"[2~":o.name="insert";break;case"[3~":o.name="delete";break;case"[4~":o.name="end";break;case"[5~":o.name="pageup";break;case"[6~":o.name="pagedown";break;case"[[5~":o.name="pageup";break;case"[[6~":o.name="pagedown";break;case"[7~":o.name="home";break;case"[8~":o.name="end";break;case"[a":o.name="up",o.shift=!0;break;case"[b":o.name="down",o.shift=!0;break;case"[c":o.name="right",o.shift=!0;break;case"[d":o.name="left",o.shift=!0;break;case"[e":o.name="clear",o.shift=!0;break;case"[2$":o.name="insert",o.shift=!0;break;case"[3$":o.name="delete",o.shift=!0;break;case"[5$":o.name="pageup",o.shift=!0;break;case"[6$":o.name="pagedown",o.shift=!0;break;case"[7$":o.name="home",o.shift=!0;break;case"[8$":o.name="end",o.shift=!0;break;case"Oa":o.name="up",o.ctrl=!0;break;case"Ob":o.name="down",o.ctrl=!0;break;case"Oc":o.name="right",o.ctrl=!0;break;case"Od":o.name="left",o.ctrl=!0;break;case"Oe":o.name="clear",o.ctrl=!0;break;case"[2^":o.name="insert",o.ctrl=!0;break;case"[3^":o.name="delete",o.ctrl=!0;break;case"[5^":o.name="pageup",o.ctrl=!0;break;case"[6^":o.name="pagedown",o.ctrl=!0;break;case"[7^":o.name="home",o.ctrl=!0;break;case"[8^":o.name="end",o.ctrl=!0;break;case"[Z":o.name="tab",o.shift=!0;break;default:o.name=null}}1===e.length&&(o.ch=e);var a=o.name||"";o.shift&&(a="S-"+a),o.meta&&(a="M-"+a),o.ctrl&&(a="C-"+a),o.fullName=a,t(o)})}}function n(e){return/\x1b\[M/.test(e)||/\x1b\[M([\x00\u0020-\uffff]{3})/.test(e)||/\x1b\[(\d+;\d+;\d+)M/.test(e)||/\x1b\[<(\d+;\d+;\d+)([mM])/.test(e)||/\x1b\[<(\d+;\d+;\d+;\d+)&w/.test(e)||/\x1b\[24([0135])~\[(\d+),(\d+)\]\r/.test(e)||/\x1b\[(O|I)/.test(e)}t.a=o;var i=/(?:\x1b)([a-zA-Z0-9])/,s=new RegExp("^"+i.source+"$"),a=new RegExp("(?:\x1b+)(O|N|\\[|\\[\\[)(?:"+["(\\d+)(?:;(\\d+))?([~^$])","(?:M([@ #!a`])(.)(.))","(?:1;)?(\\d+)?([a-zA-Z])"].join("|")+")"),l=new RegExp("^"+a.source),c=new RegExp([a.source,i.source,/\x1b./.source].join("|"))},function(e,t,r){"use strict";function o(e,t,r,o,i,s,a,l){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,o,i,s,a,l],h=0;c=new Error(t.replace(/%s/g,function(){return u[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var n=function(e){};e.exports=o},function(e,t,r){"use strict";var o={};e.exports=o},function(e,t,r){"use strict";function o(e){return function(){return e}}var n=function(){};n.thatReturns=o,n.thatReturnsFalse=o(!1),n.thatReturnsTrue=o(!0),n.thatReturnsNull=o(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}r.d(t,"a",function(){return c});for(var s=r(1),a=r.n(s),l=(function(){function e(e,t){for(var r=0;r=0?r.push(u[t.fci]):void 0!==t.fcs&&(o=o||{},o.color=t.fcs),t.bci>=0?r.push(h[t.bci]):void 0!==t.bcs&&(o=o||{},o.backgroundColor=t.bcs),t.uci>=0?r.push(d[t.uci]):void 0!==t.ucs&&(o=o||{},o.textDecorationColor=t.ucs),t.bold&&r.push("b"),t.italic&&r.push("i"),t.blink&&r.push("blink-node"),t.underline?(t.strikethrough?r.push("us"):r.push("u"),r.push(f[t.underline])):t.strikethrough&&r.push("s"),t.asciiNode||(t.wcNode?g.test(e.txt)?r.push("wc wc-node emoji"):r.push("wc wc-node"):e.wcwt)break;i+=s<=65535?1:2}if(void 0!=r){for(o=i,n=0;or)break;o+=a<=65535?1:2}return e.substring(i,o)}return e.substr(i)},d.b.wc.strWidth=function(e){var t,r=e.length,o=0,n=e.search(b);if(n<0)return r;var i=n;for(o=n;i2e4&&(y=new Map),y.set(e,t)),t}},function(e,t,r){r(13),e.exports=r(19)},function(e,t,r){"use strict";"undefined"===typeof Promise&&(r(14).enable(),window.Promise=r(17)),r(18),Object.assign=r(3)},function(e,t,r){"use strict";function o(){c=!1,a._47=null,a._71=null}function n(e){function t(t){(e.allRejections||s(h[t].error,e.whitelist||l))&&(h[t].displayId=u++,e.onUnhandled?(h[t].logged=!0,e.onUnhandled(h[t].displayId,h[t].error)):(h[t].logged=!0,i(h[t].displayId,h[t].error)))}function r(t){h[t].logged&&(e.onHandled?e.onHandled(h[t].displayId,h[t].error):h[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+h[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+h[t].displayId+".")))}e=e||{},c&&o(),c=!0;var n=0,u=0,h={};a._47=function(e){2===e._83&&h[e._56]&&(h[e._56].logged?r(e._56):clearTimeout(h[e._56].timeout),delete h[e._56])},a._71=function(e,r){0===e._75&&(e._56=n++,h[e._56]={displayId:null,error:r,timeout:setTimeout(t.bind(null,e._56),s(r,l)?100:2e3),logged:!1})}}function i(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach(function(e){console.warn(" "+e)})}function s(e,t){return t.some(function(t){return e instanceof t})}var a=r(5),l=[ReferenceError,TypeError,RangeError],c=!1;t.disable=o,t.enable=n},function(e,t,r){"use strict";(function(t){function r(e){s.length||(i(),a=!0),s[s.length]=e}function o(){for(;lc){for(var t=0,r=s.length-l;t-1?t:e}function f(e,t){t=t||{};var r=t.body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(n))}}),t}function g(e){var t=new n;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();t.append(o,n)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},v=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};n.prototype.append=function(e,o){e=t(e),o=r(o);var n=this.map[e];this.map[e]=n?n+","+o:o},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,o){this.map[t(e)]=r(o)},n.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},n.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),o(e)},n.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},n.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),o(e)},b.iterable&&(n.prototype[Symbol.iterator]=n.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=f,e.Response=m,e.fetch=function(e,t){return new Promise(function(r,o){var n=new f(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:g(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;r(new m(t,e))},i.onerror=function(){o(new TypeError("Network request failed"))},i.ontimeout=function(){o(new TypeError("Network request failed"))},i.open(n.method,n.url,!0),"include"===n.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),n.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof n._bodyInit?null:n._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(20);r(21),r(22),r(31),r(35),r(36),window.hterm=o.a,window.lib=o.b,window.KeystrokeVisualizer=n.a},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=r(6),i=function(){function e(e,t){for(var r=0;r>0;return othis.oscTimeLimit_&&(s="timeout expired: "+(new Date-r[1])),s)?(this.warnUnimplemented&&console.log("parseUntilStringTerminator_: aborting: "+s,r[0]),e.reset(r[0]),!1):(e.advance(t.length-o),!0)}return r[0]+=t.substr(0,n),e.resetParseFunction(),e.advance(n+("\x1b"==i?2:1)-o),!0},c.a.VT.prototype.dispatch=function(e,t,r){var o=b.get(e).get(t);return o?o===c.a.VT.ignore?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code: "+JSON.stringify(t))):r.subargs&&!o.supportsSubargs?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code w/subargs: "+JSON.stringify(t))):"CC1"===e&&t>"\x7f"&&!this.enable8BitControl?void console.warn("Ignoring 8-bit control code: 0x"+t.charCodeAt(0).toString(16)):void o.call(this,r,t):void(this.warnUnimplemented&&console.warn("Unknown "+e+" code: "+JSON.stringify(t)))},c.a.VT.ParseState.prototype.peekRemainingBuf=function(){return this.buf.substr(this.pos)},c.a.VT.ParseState.prototype.peekChar=function(){return this.buf.charAt(this.pos)},c.a.VT.ParseState.prototype.consumeChar=function(){return this.buf.charAt(this.pos++)},c.a.VT.prototype.parseUnknown_=function(e){var t=e.peekRemainingBuf(),r=t.search(this.cc1Pattern_);return 0===r?(this.dispatch("CC1",t.charAt(0),e),void e.advance(1)):-1===r?(o(this,t),void e.reset()):(o(this,t.substr(0,r)),this.dispatch("CC1",t.charAt(r),e),void e.advance(r+1))};var f,p=[],g=null,m=!1;c.a.VT.prototype.interpret=function(e){f=this,p.push(this.decode(e)),m||(m=!0,n())},c.a.VT.prototype.parseCSI_=function(e){var t=e.peekChar(),r=e.args;t>="@"&&t<="~"?(this.dispatch("CSI",this.leadingModifier_+this.trailingModifier_+t,e),s(e)):";"===t?this.trailingModifier_?s(e):(r.length||r.push(""),r.push("")):t>="0"&&t<="9"||":"===t?this.trailingModifier_?s(e):(r.length?r[r.length-1]+=t:r[0]=t,":"===t&&e.argSetSubargs(r.length-1)):t>=" "&&t<="?"?r.length?this.trailingModifier_+=t:this.leadingModifier_+=t:this.cc1Pattern_.test(t)?this.dispatch("CC1",t,e):s(e),e.advance(1)};var b=new Map;c.a.VT.ParseState.prototype.resetArguments=function(){this.args=[]},c.a.VT.ParseState.prototype.parseInt=function(e,t){var r=e>>0;return 0===r?void 0===t?r:t:r},c.a.VT.prototype.parseSgrExtendedColors=function(e,t,r){var o=void 0,n=void 0;if(e.argHasSubargs(t))o=e.args[t].split(":"),o.shift(),n=!0;else{if(e.argHasSubargs(t+1))return{skipCount:0};if(e.args[t+1]>>0===5)return l(e.args,t,r);o=e.args.slice(t+1),n=!1}switch(o[0]>>0){default:case 0:return{skipCount:0};case 1:return n?{color:"rgba(0, 0, 0, 0)",skipCount:0}:{skipCount:0};case 2:var i=void 0;if(i=n?4==o.length?1:2:1,o.length>0)+", "+(o[i+1]>>0)+", "+(o[i+2]>>0)+")",skipCount:n?0:4};case 3:if(!n)return{skipCount:0};if(o.length<4)return{skipCount:0};o[1],o[2],o[3];return{skipCount:0};case 4:if(!n)return{skipCount:0};if(o.length<5)return{skipCount:0};o[1],o[2],o[3],o[4];return{skipCount:0};case 5:if(o.length<2)return{skipCount:0};var s={skipCount:n?0:2},a=o[1]>>0;return athis.eventPool.length&&this.eventPool.push(e)}function U(e){e.eventPool=[],e.getPooled=V,e.release=B}function K(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function z(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function L(e,t){switch(e){case"compositionend":return z(t);case"keypress":return 32!==t.which?null:(En=!0,xn);case"textInput":return e=t.data,e===xn&&En?null:e;default:return null}}function W(e,t){if(Rn)return"compositionend"===e||!Cn&&K(e,t)?(e=O(),bn._root=null,bn._startText=null,bn._fallbackText=null,Rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function he(e,t,r,o,n){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t}function de(e){return e[1].toUpperCase()}function fe(e,t,r,o){var n=ti.hasOwnProperty(t)?ti[t]:null;(null!==n?0===n.type:!o&&(2Ei.length&&Ei.push(e)}}}function Ge(e){return Object.prototype.hasOwnProperty.call(e,Oi)||(e[Oi]=Fi++,Mi[e[Oi]]={}),Mi[e[Oi]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ze(e,t){var r=He(e);e=0;for(var o;r;){if(3===r.nodeType){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=He(r)}}function qe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Je(e,t){if(Ki||null==Vi||Vi!==Bo())return null;var r=Vi;return"selectionStart"in r&&qe(r)?r={start:r.selectionStart,end:r.selectionEnd}:window.getSelection?(r=window.getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}):r=void 0,Ui&&Uo(Ui,r)?null:(Ui=r,e=D.getPooled(Di.select,Bi,e,t),e.type="select",e.target=Vi,E(e),e)}function Ye(e){var t="";return Oo.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Xe(e,t){return e=Do({children:void 0},t),(t=Ye(t.children))&&(e.children=t),e}function $e(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n=t.length||o("93"),t=t[0]),r=""+t),null==r&&(r="")),e._wrapperState={initialValue:""+r}}function ot(e,t){var r=t.value;null!=r&&(r=""+r,r!==e.value&&(e.value=r),null==t.defaultValue&&(e.defaultValue=r)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function nt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function it(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function st(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?it(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function at(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=0===r.indexOf("--"),n=r,i=t[r];n=null==i||"boolean"===typeof i||""===i?"":o||"number"!==typeof i||0===i||cs.hasOwnProperty(n)&&cs[n]?(""+i).trim():i+"px","float"===r&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}function ct(e,t,r){t&&(hs[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&o("137",e,r()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&o("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||o("61")),null!=t.style&&"object"!==typeof t.style&&o("62",r()))}function ut(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ht(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var r=Ge(e);t=Zo[t];for(var o=0;o<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?r.createElement(e,{is:t.is}):r.createElement(e):e=r.createElementNS(o,e),e}function ft(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function pt(e,t,r,o){var n=ut(t,r);switch(t){case"iframe":case"object":Le("load",e);var i=r;break;case"video":case"audio":for(i=0;ivs||(e.current=_s[vs],_s[vs]=null,vs--)}function Tt(e,t){vs++,_s[vs]=e.current,e.current=t}function kt(e){return Pt(e)?Cs:ws.current}function xt(e,t){var r=e.type.contextTypes;if(!r)return zo;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n,i={};for(n in r)i[n]=t[n];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return 2===e.tag&&null!=e.type.childContextTypes}function Et(e){Pt(e)&&(St(As,e),St(ws,e))}function Rt(e){St(As,e),St(ws,e)}function Nt(e,t,r){ws.current!==zo&&o("168"),Tt(ws,t,e),Tt(As,r,e)}function Mt(e,t){var r=e.stateNode,n=e.type.childContextTypes;if("function"!==typeof r.getChildContext)return t;r=r.getChildContext();for(var i in r)i in n||o("108",se(e)||"Unknown",i);return Do({},t,r)}function Ft(e){if(!Pt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||zo,Cs=ws.current,Tt(ws,t,e),Tt(As,As.current,e),!0}function Ot(e,t){var r=e.stateNode;if(r||o("169"),t){var n=Mt(e,Cs);r.__reactInternalMemoizedMergedChildContext=n,St(As,e),St(ws,e),Tt(ws,n,e)}else St(As,e);Tt(As,t,e)}function It(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Dt(e,t,r){var o=e.alternate;return null===o?(o=new It(e.tag,t,e.key,e.mode),o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.effectTag=0,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null),o.expirationTime=r,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Vt(e,t,r){var n=e.type,i=e.key;if(e=e.props,"function"===typeof n)var s=n.prototype&&n.prototype.isReactComponent?2:0;else if("string"===typeof n)s=5;else switch(n){case Wn:return Bt(e.children,t,r,i);case Zn:s=11,t|=3;break;case jn:s=11,t|=2;break;case Qn:return n=new It(15,e,i,4|t),n.type=Qn,n.expirationTime=r,n;case Jn:s=16,t|=2;break;default:e:{switch("object"===typeof n&&null!==n?n.$$typeof:null){case Gn:s=13;break e;case Hn:s=12;break e;case qn:s=14;break e;default:o("130",null==n?n:typeof n,"")}s=void 0}}return t=new It(s,e,i,t),t.type=n,t.expirationTime=r,t}function Bt(e,t,r,o){return e=new It(10,e,o,t),e.expirationTime=r,e}function Ut(e,t,r){return e=new It(6,e,null,t),e.expirationTime=r,e}function Kt(e,t,r){return t=new It(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zt(e,t,r){return t=new It(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:r,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Lt(e){return function(t){try{return e(t)}catch(e){}}}function Wt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var r=t.inject(e);Ss=Lt(function(e){return t.onCommitFiberRoot(r,e)}),Ts=Lt(function(e){return t.onCommitFiberUnmount(r,e)})}catch(e){}return!0}function jt(e){"function"===typeof Ss&&Ss(e)}function Qt(e){"function"===typeof Ts&&Ts(e)}function Gt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Zt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function qt(e,t,r){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>r)&&(e.expirationTime=r)}function Jt(e,t,r){var o=e.alternate;if(null===o){var n=e.updateQueue,i=null;null===n&&(n=e.updateQueue=Gt(e.memoizedState))}else n=e.updateQueue,i=o.updateQueue,null===n?null===i?(n=e.updateQueue=Gt(e.memoizedState),i=o.updateQueue=Gt(o.memoizedState)):n=e.updateQueue=Ht(i):null===i&&(i=o.updateQueue=Ht(n));null===i||n===i?qt(n,t,r):null===n.lastUpdate||null===i.lastUpdate?(qt(n,t,r),qt(i,t,r)):(qt(n,t,r),i.lastUpdate=t)}function Yt(e,t,r){var o=e.updateQueue;o=null===o?e.updateQueue=Gt(e.memoizedState):Xt(e,o),null===o.lastCapturedUpdate?o.firstCapturedUpdate=o.lastCapturedUpdate=t:(o.lastCapturedUpdate.next=t,o.lastCapturedUpdate=t),(0===o.expirationTime||o.expirationTime>r)&&(o.expirationTime=r)}function Xt(e,t){var r=e.alternate;return null!==r&&t===r.updateQueue&&(t=e.updateQueue=Ht(t)),t}function $t(e,t,r,o,n,i){switch(r.tag){case 1:return e=r.payload,"function"===typeof e?e.call(i,o,n):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=r.payload,null===(n="function"===typeof e?e.call(i,o,n):e)||void 0===n)break;return Do({},o,n);case 2:ks=!0}return o}function er(e,t,r,o,n){if(ks=!1,!(0===t.expirationTime||t.expirationTime>n)){t=Xt(e,t);for(var i=t.baseState,s=null,a=0,l=t.firstUpdate,c=i;null!==l;){var u=l.expirationTime;u>n?(null===s&&(s=l,i=c),(0===a||a>u)&&(a=u)):(c=$t(e,t,l,c,r,o),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(u=null,l=t.firstCapturedUpdate;null!==l;){var h=l.expirationTime;h>n?(null===u&&(u=l,null===s&&(i=c)),(0===a||a>h)&&(a=h)):(c=$t(e,t,l,c,r,o),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===s&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===s&&null===u&&(i=c),t.baseState=i,t.firstUpdate=s,t.firstCapturedUpdate=u,t.expirationTime=a,e.memoizedState=c}}function tr(e,t){"function"!==typeof e&&o("191",e),e.call(t)}function rr(e,t,r){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var o=e.callback;null!==o&&(e.callback=null,tr(o,r)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tr(t,r)),e=e.nextEffect}function or(e,t){return{value:e,source:t,stack:ae(t)}}function nr(e){var t=e.type._context;Tt(Es,t._changedBits,e),Tt(Ps,t._currentValue,e),Tt(xs,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function ir(e){var t=Es.current,r=Ps.current;St(xs,e),St(Ps,e),St(Es,e),e=e.type._context,e._currentValue=r,e._changedBits=t}function sr(e){return e===Rs&&o("174"),e}function ar(e,t){Tt(Fs,t,e),Tt(Ms,e,e),Tt(Ns,Rs,e);var r=t.nodeType;switch(r){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:st(null,"");break;default:r=8===r?t.parentNode:t,t=r.namespaceURI||null,r=r.tagName,t=st(t,r)}St(Ns,e),Tt(Ns,t,e)}function lr(e){St(Ns,e),St(Ms,e),St(Fs,e)}function cr(e){Ms.current===e&&(St(Ns,e),St(Ms,e))}function ur(e,t,r){var o=e.memoizedState;t=t(r,o),o=null===t||void 0===t?o:Do({},o,t),e.memoizedState=o,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=o)}function hr(e,t,r,o,n,i){var s=e.stateNode;return e=e.type,"function"===typeof s.shouldComponentUpdate?s.shouldComponentUpdate(r,n,i):!e.prototype||!e.prototype.isPureReactComponent||(!Uo(t,r)||!Uo(o,n))}function dr(e,t,r,o){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,o),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Os.enqueueReplaceState(t,t.state,null)}function fr(e,t){var r=e.type,o=e.stateNode,n=e.pendingProps,i=kt(e);o.props=n,o.state=e.memoizedState,o.refs=zo,o.context=xt(e,i),i=e.updateQueue,null!==i&&(er(e,i,n,o,t),o.state=e.memoizedState),i=e.type.getDerivedStateFromProps,"function"===typeof i&&(ur(e,i,n),o.state=e.memoizedState),"function"===typeof r.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(r=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),r!==o.state&&Os.enqueueReplaceState(o,o.state,null),null!==(i=e.updateQueue)&&(er(e,i,n,o,t),o.state=e.memoizedState)),"function"===typeof o.componentDidMount&&(e.effectTag|=4)}function pr(e,t,r){if(null!==(e=r.ref)&&"function"!==typeof e&&"object"!==typeof e){if(r._owner){r=r._owner;var n=void 0;r&&(2!==r.tag&&o("110"),n=r.stateNode),n||o("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=n.refs===zo?n.refs={}:n.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}"string"!==typeof e&&o("148"),r._owner||o("254",e)}return e}function gr(e,t){"textarea"!==e.type&&o("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function mr(e){function t(t,r){if(e){var o=t.lastEffect;null!==o?(o.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r,r.nextEffect=null,r.effectTag=8}}function r(r,o){if(!e)return null;for(;null!==o;)t(r,o),o=o.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,r){return e=Dt(e,t,r),e.index=0,e.sibling=null,e}function s(t,r,o){return t.index=o,e?null!==(o=t.alternate)?(o=o.index,og?(m=h,h=null):m=h.sibling;var b=f(o,h,a[g],l);if(null===b){null===h&&(h=m);break}e&&h&&null===b.alternate&&t(o,h),i=s(b,i,g),null===u?c=b:u.sibling=b,u=b,h=m}if(g===a.length)return r(o,h),c;if(null===h){for(;gm?(b=g,g=null):b=g.sibling;var _=f(i,g,y.value,c);if(null===_){g||(g=b);break}e&&g&&null===_.alternate&&t(i,g),a=s(_,a,m),null===h?u=_:h.sibling=_,h=_,g=b}if(y.done)return r(i,g),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=d(i,y.value,c))&&(a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return u}for(g=n(i,g);!y.done;m++,y=l.next())null!==(y=p(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return e&&g.forEach(function(e){return t(i,e)}),u}return function(e,n,s,l){"object"===typeof s&&null!==s&&s.type===Wn&&null===s.key&&(s=s.props.children);var c="object"===typeof s&&null!==s;if(c)switch(s.$$typeof){case zn:e:{var u=s.key;for(c=n;null!==c;){if(c.key===u){if(10===c.tag?s.type===Wn:c.type===s.type){r(e,c.sibling),n=i(c,s.type===Wn?s.props.children:s.props,l),n.ref=pr(e,c,s),n.return=e,e=n;break e}r(e,c);break}t(e,c),c=c.sibling}s.type===Wn?(n=Bt(s.props.children,e.mode,l,s.key),n.return=e,e=n):(l=Vt(s,e.mode,l),l.ref=pr(e,n,s),l.return=e,e=l)}return a(e);case Ln:e:{for(c=s.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===s.containerInfo&&n.stateNode.implementation===s.implementation){r(e,n.sibling),n=i(n,s.children||[],l),n.return=e,e=n;break e}r(e,n);break}t(e,n),n=n.sibling}n=Kt(s,e.mode,l),n.return=e,e=n}return a(e)}if("string"===typeof s||"number"===typeof s)return s=""+s,null!==n&&6===n.tag?(r(e,n.sibling),n=i(n,s,l),n.return=e,e=n):(r(e,n),n=Ut(s,e.mode,l),n.return=e,e=n),a(e);if(Is(s))return g(e,n,s,l);if(ie(s))return m(e,n,s,l);if(c&&gr(e,s),"undefined"===typeof s)switch(e.tag){case 2:case 1:l=e.type,o("152",l.displayName||l.name||"Component")}return r(e,n)}}function br(e,t){var r=new It(5,null,null,0);r.type="DELETED",r.stateNode=t,r.return=e,r.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function yr(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function _r(e){if(Ks){var t=Us;if(t){var r=t;if(!yr(e,t)){if(!(t=wt(r))||!yr(e,t))return e.effectTag|=2,Ks=!1,void(Bs=e);br(Bs,r)}Bs=e,Us=At(t)}else e.effectTag|=2,Ks=!1,Bs=e}}function vr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Bs=e}function wr(e){if(e!==Bs)return!1;if(!Ks)return vr(e),Ks=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!vt(t,e.memoizedProps))for(t=Us;t;)br(e,t),t=wt(t);return vr(e),Us=Bs?wt(e.stateNode):null,!0}function Ar(){Us=Bs=null,Ks=!1}function Cr(e,t,r){Sr(e,t,r,t.expirationTime)}function Sr(e,t,r,o){t.child=null===e?Vs(t,null,r,o):Ds(t,e.child,r,o)}function Tr(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.effectTag|=128)}function kr(e,t,r,o,n){Tr(e,t);var i=0!==(64&t.effectTag);if(!r&&!i)return o&&Ot(t,!1),Rr(e,t);r=t.stateNode,Un.current=t;var s=i?null:r.render();return t.effectTag|=1,i&&(Sr(e,t,null,n),t.child=null),Sr(e,t,s,n),t.memoizedState=r.state,t.memoizedProps=r.props,o&&Ot(t,!0),t.child}function xr(e){var t=e.stateNode;t.pendingContext?Nt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nt(e,t.context,!1),ar(e,t.containerInfo)}function Pr(e,t,r,o){var n=e.child;for(null!==n&&(n.return=e);null!==n;){switch(n.tag){case 12:var i=0|n.stateNode;if(n.type===t&&0!==(i&r)){for(i=n;null!==i;){var s=i.alternate;if(0===i.expirationTime||i.expirationTime>o)i.expirationTime=o,null!==s&&(0===s.expirationTime||s.expirationTime>o)&&(s.expirationTime=o);else{if(null===s||!(0===s.expirationTime||s.expirationTime>o))break;s.expirationTime=o}i=i.return}i=null}else i=n.child;break;case 13:i=n.type===e.type?null:n.child;break;default:i=n.child}if(null!==i)i.return=n;else for(i=n;null!==i;){if(i===e){i=null;break}if(null!==(n=i.sibling)){n.return=i.return,i=n;break}i=i.return}n=i}}function Er(e,t,r){var o=t.type._context,n=t.pendingProps,i=t.memoizedProps,s=!0;if(As.current)s=!1;else if(i===n)return t.stateNode=0,nr(t),Rr(e,t);var a=n.value;if(t.memoizedProps=n,null===i)a=1073741823;else if(i.value===n.value){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t);a=0}else{var l=i.value;if(l===a&&(0!==l||1/l===1/a)||l!==l&&a!==a){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t);a=0}else if(a="function"===typeof o._calculateChangedBits?o._calculateChangedBits(l,a):1073741823,0===(a|=0)){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t)}else Pr(t,o,a,r)}return t.stateNode=a,nr(t),Cr(e,t,n.children),t.child}function Rr(e,t){if(null!==e&&t.child!==e.child&&o("153"),null!==t.child){e=t.child;var r=Dt(e,e.pendingProps,e.expirationTime);for(t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,r=r.sibling=Dt(e,e.pendingProps,e.expirationTime),r.return=t;r.sibling=null}return t.child}function Nr(e,t,r){if(0===t.expirationTime||t.expirationTime>r){switch(t.tag){case 3:xr(t);break;case 2:Ft(t);break;case 4:ar(t,t.stateNode.containerInfo);break;case 13:nr(t)}return null}switch(t.tag){case 0:null!==e&&o("155");var n=t.type,i=t.pendingProps,s=kt(t);return s=xt(t,s),n=n(i,s),t.effectTag|=1,"object"===typeof n&&null!==n&&"function"===typeof n.render&&void 0===n.$$typeof?(s=t.type,t.tag=2,t.memoizedState=null!==n.state&&void 0!==n.state?n.state:null,s=s.getDerivedStateFromProps,"function"===typeof s&&ur(t,s,i),i=Ft(t),n.updater=Os,t.stateNode=n,n._reactInternalFiber=t,fr(t,r),e=kr(e,t,!0,i,r)):(t.tag=1,Cr(e,t,n),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,r=t.pendingProps,As.current||t.memoizedProps!==r?(n=kt(t),n=xt(t,n),i=i(r,n),t.effectTag|=1,Cr(e,t,i),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 2:if(i=Ft(t),null===e)if(null===t.stateNode){var a=t.pendingProps,l=t.type;n=kt(t);var c=2===t.tag&&null!=t.type.contextTypes;s=c?xt(t,n):zo,a=new l(a,s),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Os,t.stateNode=a,a._reactInternalFiber=t,c&&(c=t.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=n,c.__reactInternalMemoizedMaskedChildContext=s),fr(t,r),n=!0}else{l=t.type,n=t.stateNode,c=t.memoizedProps,s=t.pendingProps,n.props=c;var u=n.context;a=kt(t),a=xt(t,a);var h=l.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof n.getSnapshotBeforeUpdate)||"function"!==typeof n.UNSAFE_componentWillReceiveProps&&"function"!==typeof n.componentWillReceiveProps||(c!==s||u!==a)&&dr(t,n,s,a),ks=!1;var d=t.memoizedState;u=n.state=d;var f=t.updateQueue;null!==f&&(er(t,f,s,n,r),u=t.memoizedState),c!==s||d!==u||As.current||ks?("function"===typeof h&&(ur(t,h,s),u=t.memoizedState),(c=ks||hr(t,c,s,d,u,a))?(l||"function"!==typeof n.UNSAFE_componentWillMount&&"function"!==typeof n.componentWillMount||("function"===typeof n.componentWillMount&&n.componentWillMount(),"function"===typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount()),"function"===typeof n.componentDidMount&&(t.effectTag|=4)):("function"===typeof n.componentDidMount&&(t.effectTag|=4),t.memoizedProps=s,t.memoizedState=u),n.props=s,n.state=u,n.context=a,n=c):("function"===typeof n.componentDidMount&&(t.effectTag|=4),n=!1)}else l=t.type,n=t.stateNode,s=t.memoizedProps,c=t.pendingProps,n.props=s,u=n.context,a=kt(t),a=xt(t,a),h=l.getDerivedStateFromProps,(l="function"===typeof h||"function"===typeof n.getSnapshotBeforeUpdate)||"function"!==typeof n.UNSAFE_componentWillReceiveProps&&"function"!==typeof n.componentWillReceiveProps||(s!==c||u!==a)&&dr(t,n,c,a),ks=!1,u=t.memoizedState,d=n.state=u,f=t.updateQueue,null!==f&&(er(t,f,c,n,r),d=t.memoizedState),s!==c||u!==d||As.current||ks?("function"===typeof h&&(ur(t,h,c),d=t.memoizedState),(h=ks||hr(t,s,c,u,d,a))?(l||"function"!==typeof n.UNSAFE_componentWillUpdate&&"function"!==typeof n.componentWillUpdate||("function"===typeof n.componentWillUpdate&&n.componentWillUpdate(c,d,a),"function"===typeof n.UNSAFE_componentWillUpdate&&n.UNSAFE_componentWillUpdate(c,d,a)),"function"===typeof n.componentDidUpdate&&(t.effectTag|=4),"function"===typeof n.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof n.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof n.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=c,t.memoizedState=d),n.props=c,n.state=d,n.context=a,n=h):("function"!==typeof n.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof n.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),n=!1);return kr(e,t,n,i,r);case 3:return xr(t),i=t.updateQueue,null!==i?(n=t.memoizedState,n=null!==n?n.element:null,er(t,i,t.pendingProps,null,r),(i=t.memoizedState.element)===n?(Ar(),e=Rr(e,t)):(n=t.stateNode,(n=(null===e||null===e.child)&&n.hydrate)&&(Us=At(t.stateNode.containerInfo),Bs=t,n=Ks=!0),n?(t.effectTag|=2,t.child=Vs(t,null,i,r)):(Ar(),Cr(e,t,i)),e=t.child)):(Ar(),e=Rr(e,t)),e;case 5:return sr(Fs.current),i=sr(Ns.current),n=st(i,t.type),i!==n&&(Tt(Ms,t,t),Tt(Ns,n,t)),null===e&&_r(t),i=t.type,c=t.memoizedProps,n=t.pendingProps,s=null!==e?e.memoizedProps:null,As.current||c!==n||((c=1&t.mode&&!!n.hidden)&&(t.expirationTime=1073741823),c&&1073741823===r)?(c=n.children,vt(i,n)?c=null:s&&vt(i,s)&&(t.effectTag|=16),Tr(e,t),1073741823!==r&&1&t.mode&&n.hidden?(t.expirationTime=1073741823,t.memoizedProps=n,e=null):(Cr(e,t,c),t.memoizedProps=n,e=t.child)):e=Rr(e,t),e;case 6:return null===e&&_r(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ar(t,t.stateNode.containerInfo),i=t.pendingProps,As.current||t.memoizedProps!==i?(null===e?t.child=Ds(t,null,i,r):Cr(e,t,i),t.memoizedProps=i,e=t.child):e=Rr(e,t),e;case 14:return i=t.type.render,r=t.pendingProps,n=t.ref,As.current||t.memoizedProps!==r||n!==(null!==e?e.ref:null)?(i=i(r,n),Cr(e,t,i),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 10:return r=t.pendingProps,As.current||t.memoizedProps!==r?(Cr(e,t,r),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 11:return r=t.pendingProps.children,As.current||null!==r&&t.memoizedProps!==r?(Cr(e,t,r),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 15:return r=t.pendingProps,t.memoizedProps===r?e=Rr(e,t):(Cr(e,t,r.children),t.memoizedProps=r,e=t.child),e;case 13:return Er(e,t,r);case 12:e:if(n=t.type,s=t.pendingProps,c=t.memoizedProps,i=n._currentValue,a=n._changedBits,As.current||0!==a||c!==s){if(t.memoizedProps=s,l=s.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(a&l))Pr(t,n,a,r);else if(c===s){e=Rr(e,t);break e}r=s.children,r=r(i),t.effectTag|=1,Cr(e,t,r),e=t.child}else e=Rr(e,t);return e;default:o("156")}}function Mr(e){e.effectTag|=4}function Fr(e,t){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return Et(t),null;case 3:lr(t),Rt(t);var n=t.stateNode;return n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(wr(t),t.effectTag&=-3),zs(t),null;case 5:cr(t),n=sr(Fs.current);var i=t.type;if(null!==e&&null!=t.stateNode){var s=e.memoizedProps,a=t.stateNode,l=sr(Ns.current);a=gt(a,i,s,r,n),Ls(e,t,a,i,s,r,n,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&o("166"),null;if(e=sr(Ns.current),wr(t))r=t.stateNode,i=t.type,s=t.memoizedProps,r[on]=t,r[nn]=s,n=bt(r,i,s,e,n),t.updateQueue=n,null!==n&&Mr(t);else{e=dt(i,r,n,e),e[on]=t,e[nn]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}pt(e,i,r,n),_t(i,r)&&Mr(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ws(e,t,e.memoizedProps,r);else{if("string"!==typeof r)return null===t.stateNode&&o("166"),null;n=sr(Fs.current),sr(Ns.current),wr(t)?(n=t.stateNode,r=t.memoizedProps,n[on]=t,yt(n,r)&&Mr(t)):(n=ft(r,n),n[on]=t,t.stateNode=n)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return lr(t),zs(t),null;case 13:return ir(t),null;case 12:return null;case 0:o("167");default:o("156")}}function Or(e,t){var r=t.source;null===t.stack&&null!==r&&ae(r),null!==r&&se(r),t=t.value,null!==e&&2===e.tag&&se(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Ir(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){qr(e,t)}else t.current=null}function Dr(e){switch("function"===typeof Qt&&Qt(e),e.tag){case 2:Ir(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){qr(e,t)}break;case 5:Ir(e);break;case 4:Ur(e)}}function Vr(e){return 5===e.tag||3===e.tag||4===e.tag}function Br(e){e:{for(var t=e.return;null!==t;){if(Vr(t)){var r=t;break e}t=t.return}o("160"),r=void 0}var n=t=void 0;switch(r.tag){case 5:t=r.stateNode,n=!1;break;case 3:case 4:t=r.stateNode.containerInfo,n=!0;break;default:o("161")}16&r.effectTag&&(at(t,""),r.effectTag&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||Vr(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag;){if(2&r.effectTag)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child}if(!(2&r.effectTag)){r=r.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(r)if(n){var s=t,a=i.stateNode,l=r;8===s.nodeType?s.parentNode.insertBefore(a,l):s.insertBefore(a,l)}else t.insertBefore(i.stateNode,r);else n?(s=t,a=i.stateNode,8===s.nodeType?s.parentNode.insertBefore(a,s):s.appendChild(a)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Ur(e){for(var t=e,r=!1,n=void 0,i=void 0;;){if(!r){r=t.return;e:for(;;){switch(null===r&&o("160"),r.tag){case 5:n=r.stateNode,i=!1;break e;case 3:case 4:n=r.stateNode.containerInfo,i=!0;break e}r=r.return}r=!0}if(5===t.tag||6===t.tag){e:for(var s=t,a=s;;)if(Dr(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===s)break;for(;null===a.sibling;){if(null===a.return||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(s=n,a=t.stateNode,8===s.nodeType?s.parentNode.removeChild(a):s.removeChild(a)):n.removeChild(t.stateNode)}else if(4===t.tag?n=t.stateNode.containerInfo:Dr(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(r=!1)}t.sibling.return=t.return,t=t.sibling}}function Kr(e,t){switch(t.tag){case 2:break;case 5:var r=t.stateNode;if(null!=r){var n=t.memoizedProps;e=null!==e?e.memoizedProps:n;var i=t.type,s=t.updateQueue;t.updateQueue=null,null!==s&&(r[nn]=n,mt(r,s,i,e,n))}break;case 6:null===t.stateNode&&o("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:o("163")}}function zr(e,t,r){r=Zt(r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){po(o),Or(e,t)},r}function Lr(e,t,r){r=Zt(r),r.tag=3;var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){null===na?na=new Set([this]):na.add(this);var r=t.value,o=t.stack;Or(e,t),this.componentDidCatch(r,{componentStack:null!==o?o:""})}),r}function Wr(e,t,r,o,n,i){r.effectTag|=512,r.firstEffect=r.lastEffect=null,o=or(o,r),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,o=zr(e,o,i),void Yt(e,o,i);case 2:if(t=o,r=e.stateNode,0===(64&e.effectTag)&&null!==r&&"function"===typeof r.componentDidCatch&&(null===na||!na.has(r)))return e.effectTag|=1024,o=Lr(e,t,i),void Yt(e,o,i)}e=e.return}while(null!==e)}function jr(e){switch(e.tag){case 2:Et(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return lr(e),Rt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cr(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return lr(e),null;case 13:return ir(e),null;default:return null}}function Qr(){if(null!==Js)for(var e=Js.return;null!==e;){var t=e;switch(t.tag){case 2:Et(t);break;case 3:lr(t),Rt(t);break;case 5:cr(t);break;case 4:lr(t);break;case 13:ir(t)}e=e.return}Ys=null,Xs=0,$s=-1,ea=!1,Js=null,oa=!1}function Gr(e){for(;;){var t=e.alternate,r=e.return,o=e.sibling;if(0===(512&e.effectTag)){t=Fr(t,e,Xs);var n=e;if(1073741823===Xs||1073741823!==n.expirationTime){var i=0;switch(n.tag){case 3:case 2:var s=n.updateQueue;null!==s&&(i=s.expirationTime)}for(s=n.child;null!==s;)0!==s.expirationTime&&(0===i||i>s.expirationTime)&&(i=s.expirationTime),s=s.sibling;n.expirationTime=i}if(null!==t)return t;if(null!==r&&0===(512&r.effectTag)&&(null===r.firstEffect&&(r.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==r.lastEffect&&(r.lastEffect.nextEffect=e.firstEffect),r.lastEffect=e.lastEffect),1da)&&(da=e),e}function Xr(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var r=e.stateNode;!qs&&0!==Xs&&twa&&o("185")}e=e.return}}function $r(){return Gs=ms()-js,Qs=2+(Gs/10|0)}function eo(e){var t=Zs;Zs=2+25*(1+(($r()-2+500)/25|0));try{return e()}finally{Zs=t}}function to(e,t,r,o,n){var i=Zs;Zs=1;try{return e(t,r,o,n)}finally{Zs=i}}function ro(e){if(0!==aa){if(e>aa)return;ys(la)}var t=ms()-js;aa=e,la=bs(io,{timeout:10*(e-2)-t})}function oo(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===sa?(ia=sa=e,e.nextScheduledRoot=e):(sa=sa.nextScheduledRoot=e,sa.nextScheduledRoot=ia);else{var r=e.remainingExpirationTime;(0===r||t=ha)&&(!fa||$r()>=ha);)$r(),uo(ua,ha,!fa),no();else for(;null!==ua&&0!==ha&&(0===e||e>=ha);)uo(ua,ha,!1),no();null!==ma&&(aa=0,la=-1),0!==ha&&ro(ha),ma=null,fa=!1,co()}function lo(e,t){ca&&o("253"),ua=e,ha=t,uo(e,t,!1),so(),co()}function co(){if(Aa=0,null!==va){var e=va;va=null;for(var t=0;t_&&(v=_,_=k,k=v),v=Ze(S,k),w=Ze(S,_),v&&w&&(1!==T.rangeCount||T.anchorNode!==v.node||T.anchorOffset!==v.offset||T.focusNode!==w.node||T.focusOffset!==w.offset)&&(A=document.createRange(),A.setStart(v.node,v.offset),T.removeAllRanges(),k>_?(T.addRange(A),T.extend(w.node,w.offset)):(A.setEnd(w.node,w.offset),T.addRange(A))))),T=[];for(k=S;k=k.parentNode;)1===k.nodeType&&T.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(S.focus(),S=0;SCa)&&(fa=!0)}function po(e){null===ua&&o("246"),ua.remainingExpirationTime=0,pa||(pa=!0,ga=e)}function go(e){null===ua&&o("246"),ua.remainingExpirationTime=e}function mo(e,t){var r=ba;ba=!0;try{return e(t)}finally{(ba=r)||ca||so()}}function bo(e,t){if(ba&&!ya){ya=!0;try{return e(t)}finally{ya=!1}}return e(t)}function yo(e,t){ca&&o("187");var r=ba;ba=!0;try{return to(e,t)}finally{ba=r,so()}}function _o(e){var t=ba;ba=!0;try{to(e)}finally{(ba=t)||ca||ao(1,!1,null)}}function vo(e,t,r,n,i){var s=t.current;if(r){r=r._reactInternalFiber;var a;e:{for(2===Fe(r)&&2===r.tag||o("170"),a=r;3!==a.tag;){if(Pt(a)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}(a=a.return)||o("171")}a=a.stateNode.context}r=Pt(r)?Mt(r,a):a}else r=zo;return null===t.context?t.context=r:t.pendingContext=r,t=i,i=Zt(n),i.payload={element:e},t=void 0===t?null:t,null!==t&&(i.callback=t),Jt(s,i,n),Xr(s,n),n}function wo(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?o("188"):o("268",Object.keys(e))),e=De(t),null===e?null:e.stateNode}function Ao(e,t,r,o){var n=t.current;return n=Yr($r(),n),vo(e,t,r,n,o)}function Co(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function So(e){var t=e.findFiberByHostInstance;return Wt(Do({},e,{findHostInstanceByFiber:function(e){return e=De(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function To(e,t,r){var o=3=Sn),xn=String.fromCharCode(32),Pn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},En=!1,Rn=!1,Nn={eventTypes:Pn,extractEvents:function(e,t,r,o){var n=void 0,i=void 0;if(Cn)e:{switch(e){case"compositionstart":n=Pn.compositionStart;break e;case"compositionend":n=Pn.compositionEnd;break e;case"compositionupdate":n=Pn.compositionUpdate;break e}n=void 0}else Rn?K(e,r)&&(n=Pn.compositionEnd):"keydown"===e&&229===r.keyCode&&(n=Pn.compositionStart);return n?(kn&&(Rn||n!==Pn.compositionStart?n===Pn.compositionEnd&&Rn&&(i=O()):(bn._root=o,bn._startText=I(),Rn=!0)),n=vn.getPooled(n,t,r,o),i?n.data=i:null!==(i=z(r))&&(n.data=i),E(n),i=n):i=null,(e=Tn?L(e,r):W(e,r))?(t=wn.getPooled(Pn.beforeInput,t,r,o),t.data=e,E(t)):t=null,null===i?t:null===t?i:[i,t]}},Mn=null,Fn={injectFiberControlledHostComponent:function(e){Mn=e}},On=null,In=null,Dn={injection:Fn,enqueueStateRestore:Q,needsStateRestore:G,restoreStateIfNeeded:H},Vn=!1,Bn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Un=Oo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kn="function"===typeof Symbol&&Symbol.for,zn=Kn?Symbol.for("react.element"):60103,Ln=Kn?Symbol.for("react.portal"):60106,Wn=Kn?Symbol.for("react.fragment"):60107,jn=Kn?Symbol.for("react.strict_mode"):60108,Qn=Kn?Symbol.for("react.profiler"):60114,Gn=Kn?Symbol.for("react.provider"):60109,Hn=Kn?Symbol.for("react.context"):60110,Zn=Kn?Symbol.for("react.async_mode"):60111,qn=Kn?Symbol.for("react.forward_ref"):60112,Jn=Kn?Symbol.for("react.timeout"):60113,Yn="function"===typeof Symbol&&Symbol.iterator,Xn=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$n={},ei={},ti={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ti[e]=new he(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ti[t]=new he(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ti[e]=new he(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){ti[e]=new he(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ti[e]=new he(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ti[e]=new he(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){ti[e]=new he(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){ti[e]=new he(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){ti[e]=new he(e,5,!1,e.toLowerCase(),null)});var ri=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ti.tabIndex=new he("tabIndex",1,!1,"tabindex",null);var oi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ni=null,ii=null,si=!1;Io.canUseDOM&&(si=ee("input")&&(!document.documentMode||9=document.documentMode,Di={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vi=null,Bi=null,Ui=null,Ki=!1,zi={eventTypes:Di,extractEvents:function(e,t,r,o){var n,i=o.window===o?o.document:9===o.nodeType?o:o.ownerDocument;if(!(n=!i)){e:{i=Ge(i),n=Zo.onSelect;for(var s=0;se))){Zi=-1,es.didTimeout=!0;for(var t=0,r=Qi.length;tt&&(t=8),$i=t"+t+"",t=as.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),cs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},us=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(e){us.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cs[t]=cs[e]})});var hs=Do({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ds=Vo.thatReturns(""),fs={createElement:dt,createTextNode:ft,setInitialProperties:pt,diffProperties:gt,updateProperties:mt,diffHydratedProperties:bt,diffHydratedText:yt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,r){switch(t){case"input":if(be(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tB.length&&B.push(e)}function d(e,t,r,n){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case A:case C:s=!0}}if(s)return r(n,e,""===t?"."+f(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;ai.rowIndex)t();else if(o.focusNode==o.anchorNode)o.anchorOffset=this.lastRowCount_},n.a.ScrollPort.prototype.drawVisibleRows_=function(e,t){for(var r=(this.selection.startRow,this.selection.endRow,this.bottomFold_,this.topFold_.nextSibling,Math.min(this.visibleRowCount,this.rowProvider_.getRowCount())),o=[],n=0;n=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin,r=this.getScrollMax_();t>r&&(t=r),d!==t&&(this.scroller_.scrollTo(0,t),this.scheduleRedraw())},n.a.ScrollPort.prototype.scrollRowToBottom=function(e){this.syncScrollHeight(),this.isScrolledEnd=e+this.visibleRowCount>=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin+this.visibleRowBottomMargin;t-=this.visibleRowCount*this.characterSize.height,t<0&&(t=0),d!==t&&this.scroller_.scrollTo(0,t)},n.a.ScrollPort.prototype.scrollToBottom=function(){this.syncScrollHeight(),this.scroller_.scrollTo(0,g-h.height,!1)},n.a.ScrollPort.prototype.getTopRowIndex=function(){var e=Math.round(d/this.characterSize.height);return e<0?0:e},n.a.ScrollPort.prototype.onScroll_=function(e){var t=this.getScreenSize();if(t.width!=this.lastScreenWidth_||t.height!=this.lastScreenHeight_)return void this.resize();this.redraw_(),this.publish("scroll",{scrollPort:this})},n.a.ScrollPort.prototype.onScrollWheel=function(e){},n.a.ScrollPort.prototype.onResize_=function(e){h=n.a.getClientSize(this.screen_),this.scroller_.setDimensions(h.width,h.height,null,g),this.syncCharacterSize()},n.a.ScrollPort.prototype.onCopy_=function(e){if(this.onCopy(e),!e.defaultPrevented&&(this.resetSelectBags_(),this.selection.sync(),this.selection.startRow&&!(this.selection.endRow.rowIndex-this.selection.startRow.rowIndex<2))){var t=this.getTopRowIndex(),r=this.getBottomRowIndex(t);if(this.selection.startRow.rowIndexr){var n;n=this.selection.startRow.rowIndex>r?this.selection.startRow.rowIndex+1:this.bottomFold_.previousSibling.rowIndex+1,this.bottomSelectBag_.textContent=this.rowProvider_.getRowsText(n,this.selection.endRow.rowIndex),this.rowNodes_.insertBefore(this.bottomSelectBag_,this.selection.endRow)}}},n.a.ScrollPort.prototype.measureCharacterSize=function(e){var t="canvas"!==window.fontSizeDetectionMethod;this.ruler_||(this.ruler_=this.document_.createElement("div"),this.ruler_.id="hterm:ruler-character-size",this.ruler_.style.cssText="position: absolute;top: 0;left: 0;visibility: hidden;height: auto !important;width: auto !important;",t&&(this.rulerSpan_=this.document_.createElement("span"),this.rulerSpan_.id="hterm:ruler-span-workaround",this.rulerSpan_.innerHTML=("X".repeat(100)+"\r").repeat(100),this.ruler_.appendChild(this.rulerSpan_)),this.rulerBaseline_=this.document_.createElement("span"),this.rulerBaseline_.id="hterm:ruler-baseline",this.rulerBaseline_.style.fontSize="0px",this.rulerBaseline_.textContent="X"),this.rulerSpan_&&(this.rulerSpan_.style.fontWeight=e||""),this.rowNodes_.appendChild(this.ruler_);var r;if(t){var i=n.a.getClientSize(this.rulerSpan_);r=new n.a.Size(i.width/100,i.height/100)}else{var s=this.screen_.style.font,a=o("QWER1YUIOX".repeat(10),s);r=new n.a.Size(a.width/100,a.height)}return this.ruler_.insertBefore(this.rulerBaseline_,this.ruler_.childNodes[0]),r.baseline=this.rulerBaseline_.offsetTop,this.ruler_.removeChild(this.rulerBaseline_),this.rowNodes_.removeChild(this.ruler_),this.div_.ownerDocument.body.appendChild(this.svg_),r.zoomFactor=this.svg_.currentScale,this.div_.ownerDocument.body.removeChild(this.svg_),r},n.a.ScrollPort.prototype.resize=function(){this.currentScrollbarWidthPx=n.a.getClientWidth(this.screen_)-this.screen_.clientWidth,this.syncScrollHeight(),this.syncRowNodesDimensions_();var e=this;this.publish("resize",{scrollPort:this},function(){e.scroller_.setDimensions(h.width,h.height,h.width,g);var t=g-h.height;t<0&&(t=0),e.scroller_.scrollTo(0,t,!1),e.scheduleRedraw()})}},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=r(1),a=r.n(s),l=r(2),c=(r.n(l),r(33)),u=function(){function e(e,t){for(var r=0;r0&&(Object(s.e)(l,o,n,a),e.nodes.splice(t+1,r),Object(i.e)(e))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(11),a=r(0);a.a.Screen.prototype.invalidateCursorPosition=function(){this.cursorPosition.move(0,0),this.cursorRowIdx_=0,this.cursorNodeIdx_=0,this.cursorOffset_=0},a.a.Screen.prototype.clearCursorRow=function(){this.cursorOffset_=0,this.cursorPosition.column=0,this.cursorPosition.overflow=!1;var e;e=this.textAttributes.isDefault()?"":a.b.f.getWhitespace(this.columnCount_);var t=this.textAttributes.inverse;this.textAttributes.inverse=!1,this.textAttributes.syncColors();var r=Object(s.a)(this.textAttributes.attrs(),e,e.length),o=this.rowsArray[this.cursorRowIdx_];o.nodes=[r],o.o=!1,delete o.img,Object(i.e)(o),this.cursorNodeIdx_=0,this.textAttributes.inverse=t,this.textAttributes.syncColors()},a.a.Screen.prototype.commitLineOverflow=function(){var e=this.rowsArray[this.cursorRowIdx_];e.o=!0,Object(i.e)(e)},a.a.Screen.prototype.setCursorPosition=function(e,t){if(!this.rowsArray.length)return void console.warn("Attempt to set cursor position on empty screen.");e>=this.rowsArray.length&&(console.error("Row out of bounds: "+e),e=this.rowsArray.length-1),e<0&&(console.error("Row out of bounds: "+e),e=0),t>=this.columnCount_?(console.error("Column out of bounds: "+t),t=this.columnCount_-1):t<0&&(console.error("Column out of bounds: "+t),t=0),this.cursorPosition.overflow=!1;var r=this.rowsArray[e],o=0,n=r.nodes[0];n||(n=Object(s.c)("",0),r.nodes=[n],Object(i.e)(r));var a=0;if(e===this.cursorRowIdx_?t>=this.cursorPosition.column-this.cursorOffset_&&(o=this.cursorNodeIdx_,n=r.nodes[o],a=this.cursorPosition.column-this.cursorOffset_):this.cursorRowIdx_=e,this.cursorPosition.move(e,t),0===t)return this.cursorNodeIdx_=0,void(this.cursorOffset_=0);for(;n;){var l=t-a;if(!r.nodes[o+1]||n.wcw>l)return this.cursorNodeIdx_=o,void(this.cursorOffset_=l);a+=n.wcw,n=r.nodes[++o]}},a.a.Screen.prototype.syncSelectionCaret=function(e){e.collapse(null)},a.a.Screen.prototype.cursorRow=function(){return this.rowsArray[this.cursorRowIdx_]},a.a.Screen.prototype.maybeClipCurrentRow=function(){var e=this.cursorRow(),t=Object(i.d)(e);if(t<=this.columnCount_)return void(this.cursorPosition.column>=this.columnCount_&&(this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),this.cursorPosition.overflow=!0));var r=this.cursorPosition.column;this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1);var o=this.rowsArray[this.cursorRowIdx_].nodes[this.cursorNodeIdx_];t=o.wcw,this.cursorOffset_=0||l.attrs.bcs||l.attrs.underline||l.attrs.strikethrough))Object(s.f)(l,u+=f,l.wcw-d);else{var p=Object(s.b)(f,-d);this.cursorNodeIdx_++,n.nodes.splice(this.cursorNodeIdx_,0,p),l=p,this.cursorOffset_=h=-d,u=f}d=0}if(Object(s.d)(l,r)){if(0===d)Object(s.e)(r,l,u+e),n.nodes[this.cursorNodeIdx_+1]||(c=0);else if(0===h){var g=t-l.wcw;g>=0?(Object(s.e)(r,l,e,t),c=n.nodes[this.cursorNodeIdx_+1]?g:0):(Object(s.e)(r,l,e+Object(i.b)(l,t)),c=0)}else{var m=t+h-l.wcw;if(m>=0)Object(s.e)(r,l,Object(i.b)(l,0,h)+e),c=m;else{var b=Object(i.b)(l,0,h)+e+Object(i.b)(l,h+t);Object(s.e)(r,l,b),c=0}}return this.cursorOffset_+=t,c}if(0===h){var y=n.nodes[this.cursorNodeIdx_-1];if(y&&Object(s.d)(y,r)){Object(s.e)(r,y,y.txt+e);var _=t-l.wcw;return _>=0?(n.nodes.splice(this.cursorNodeIdx_,1),c=_):l.attrs.wcNode||(Object(s.f)(l,Object(i.b)(l,t)),c=0),this.cursorNodeIdx_=this.cursorNodeIdx_-1,this.cursorOffset_=y.wcw,c}var v=Object(s.a)(r,e,t);this.cursorOffset_=t;var w=t-l.wcw;return w>=0?(n.nodes.splice(this.cursorNodeIdx_,1,v),c=w):(n.nodes.splice(this.cursorNodeIdx_,0,v),Object(s.f)(l,Object(i.b)(l,t)),c=0),c}if(0===d){var A=n.nodes[this.cursorNodeIdx_+1];if(A&&Object(s.d)(A,r)){var C=t-A.wcw;return C>=0?(Object(s.e)(r,A,e,t),c=C):(Object(s.e)(r,A,e+Object(i.b)(A,t)),c=0),this.cursorNodeIdx_++,this.cursorOffset_=t,c}return v=Object(s.a)(r,e,t),n.nodes.splice(this.cursorNodeIdx_+1,0,v),this.cursorNodeIdx_++,A||(c=0),this.cursorOffset_=v.wcw,c}var S=h+t-l.wcw;if(S>=0){Object(s.f)(l,Object(i.b)(l,0,h));var v=Object(s.a)(r,e,t);return this.cursorNodeIdx_++,n.nodes.splice(this.cursorNodeIdx_,0,v),this.cursorOffset_=t,c=S}var v=Object(s.a)(r,e,t),T=o(l,h,v),k=T.length;return 1===k?n.nodes.splice(this.cursorNodeIdx_,1,T[0]):2===k?n.nodes.splice(this.cursorNodeIdx_,1,T[0],T[1]):3===k&&(n.nodes.splice(this.cursorNodeIdx_,1,T[0],T[1],T[2]),this.cursorNodeIdx_++),this.cursorNodeIdx_++,this.cursorOffset_=0,c},a.a.Screen.prototype.insertString=function(e,t){var r=this.rowsArray[this.cursorRowIdx_],n=r.nodes[this.cursorNodeIdx_],l=n.txt,c=this.textAttributes.attrs();r.o=!1,this.cursorPosition.column+=t;var u=this.cursorOffset_,h=n.wcw-u;if(h<0){var d=a.b.f.getWhitespace(-h);if(n.attrs.isDefault||!(!n.attrs.asciiNode||n.attrs.wcNode||n.attrs.bci>=0||n.attrs.bcs||n.attrs.underline||n.attrs.strikethrough))Object(s.f)(n,l+=d,n.wcw-h);else{var f=Object(s.b)(d,-h);this.cursorNodeIdx_++,r.nodes.splice(this.cursorNodeIdx_,0,f),n=f,this.cursorOffset_=u=-h,l=d}h=0}if(Object(s.d)(n,c)){if(0===h)Object(s.e)(c,n,l+e);else if(0===u)Object(s.e)(c,n,e+l);else{var p=Object(i.b)(n,0,u)+e+Object(i.b)(n,u);Object(s.e)(c,n,p)}return void(this.cursorOffset_+=t)}if(0===u){var g=r.nodes[this.cursorNodeIdx_-1];if(g&&Object(s.d)(g,c))return Object(s.e)(c,g,g.txt+e),this.cursorNodeIdx_=this.cursorNodeIdx_-1,void(this.cursorOffset_=g.wcw);var m=Object(s.a)(c,e,t);return r.nodes.splice(this.cursorNodeIdx_,0,m),void(this.cursorOffset_=t)}if(0===h){var b=r.nodes[this.cursorNodeIdx_+1];return b&&Object(s.d)(b,c)?(Object(s.e)(c,b,e+b.txt),this.cursorNodeIdx_++,void(this.cursorOffset_=t)):(m=Object(s.a)(c,e,t),r.nodes.splice(this.cursorNodeIdx_+1,0,m),this.cursorNodeIdx_++,void(this.cursorOffset_=m.wcw))}var m=Object(s.a)(c,e,t),y=o(n,u,m),_=y.length;1===_?r.nodes.splice(this.cursorNodeIdx_,1,y[0]):2===_?r.nodes.splice(this.cursorNodeIdx_,1,y[0],y[1]):3===_&&(r.nodes.splice(this.cursorNodeIdx_,1,y[0],y[1],y[2]),this.cursorNodeIdx_++),this.cursorNodeIdx_++,this.cursorOffset_=0},a.a.Screen.prototype.overwriteString=function(e,t){if(!(this.columnCount_-this.cursorPosition.column))return[e];var r=this.rowsArray[this.cursorRowIdx_],o=r.nodes[this.cursorNodeIdx_],a=this.textAttributes.attrs(),l=this.cursorOffset_,c=t+l-o.wcw;if(c<=0&&Object(s.d)(o,a)){if(this.cursorOffset_+=t,this.cursorPosition.column+=t,0===c&&o.txt.substr(l)===e)return;if(0===c)Object(s.e)(a,o,Object(i.b)(o,0,l)+e);else{var u=Object(i.b)(o,0,l)+e+Object(i.b)(o,l+t);Object(s.e)(a,o,u)}return void Object(i.e)(r)}var h=this.overwriteNode(e,t,a);h>0&&this.deleteChars(h),n(r,this.cursorNodeIdx_),Object(i.e)(r)},a.a.Screen.prototype.deleteChars=function(e){for(var t=this.rowsArray[this.cursorRowIdx_],r=this.cursorNodeIdx_,o=0,n=this.cursorOffset_,a=t.nodes.length,l=e,c=this.cursorNodeIdx_;c0){if(h-n===e)return Object(s.f)(u,Object(i.b)(u,0,n)),l;if(h-n>e)return Object(s.f)(u,Object(i.b)(u,0,n)+Object(i.b)(u,n+e)),l;Object(s.f)(u,Object(i.b)(u,0,n));if(!t.nodes[c+1])return l;e-=h-n,n=0,r++}else{if(!(h<=e)){if(Object(s.f)(u,Object(i.b)(u,e)),u.attrs.wcNode&&h===u.wcw){var d=Object(s.c)(" ",1);e-=1,t.nodes.splice(c,1,d)}break}o++,e-=h}}return 0===o?l:(t.nodes.splice(r,o),r>this.cursorNodeIdx_?l:0===(a=t.nodes.length)?(t.nodes=[Object(s.c)("",0)],this.cursorNodeIdx_=0,this.cursorOffset_=0,l):a<=this.cursorNodeIdx_?(this.cursorNodeIdx_=a-1,this.cursorOffset_=t.nodes[a-1].wcw,l):(this.cursorOffset_=0,l))},a.a.Screen.prototype.popRow=function(){return this.rowsArray.pop()},a.a.Screen.prototype.popRows=function(e){return this.rowsArray.splice(this.rowsArray.length-e,e)},a.a.Screen.prototype.pushRow=function(e){this.rowsArray[this.rowsArray.length]=e},a.a.Screen.prototype.setRow=function(e,t){this.rowsArray[t]=e},a.a.Screen.prototype.pushRows=function(e){for(var t=0,r=this.rowsArray.length,o=e.length;tt)return void this.setCssCursorPos({row:-1,col:-1});this.options_.cursorVisible&&"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display=""),this.setCssCursorPos({row:r-e+this.scrollPort_.visibleRowTopMargin,col:this.screen_.cursorPosition.column});var l=this.document_.getSelection();l&&(l.isCollapsed||o)&&this.screen_.syncSelectionCaret(l)};var a={row:-1,col:-1};o.a.Terminal.prototype.setCssCursorPos=function(e){a.row===e.row&&a.col===e.col||-1===a.row&&-1===e.row||(a.row!==e.row&&this.setCursorCssVar("cursor-offset-row",e.row+""),a.col!==e.col&&this.setCursorCssVar("cursor-offset-col",e.col+""),a=e)},o.a.Terminal.prototype.setCursorCssVar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"--hterm-";this.cursorOverlayNode_.style.setProperty(""+r+e,t)},o.a.Terminal.prototype.scheduleSyncCursorPosition_=function(){if(!this.timeouts_.syncCursor){var e=this;this.timeouts_.syncCursor=setTimeout(function(){requestAnimationFrame(function(){e.syncCursorPosition_(),e.timeouts_.syncCursor=0})},0)}},o.a.Terminal.prototype.scheduleRedraw_=function(){if(!this.timeouts_.redraw){var e=this;this.timeouts_.redraw=setTimeout(function(){e.timeouts_.redraw=0,e.scrollPort_.redraw_()},0)}},o.a.Terminal.prototype.scheduleScrollDown_=function(){if(!this.timeouts_.scrollDown){var e=this;this.timeouts_.scrollDown=setTimeout(function(){e.timeouts_.scrollDown=0,e.scrollPort_.scrollToBottom()},20)}},o.a.Terminal.prototype.renumberRows_=function(e,t,r){for(var o=r||this.screen_,i=this.scrollbackRows_.length,s=o.rowsArray,a=e;a6e3&&(this.scrollbackRows_.splice(0,2e3),t=!0);for(var r=this.screen_.rowsArray.length,o=this.scrollbackRows_.length+r,s=0;s0){var c=this.screen_.shiftRows(l);Array.prototype.push.apply(this.scrollbackRows_,c),this.scrollPort_.isScrolledEnd&&this.scheduleScrollDown_()}t&&(this.scrollPort_.syncScrollHeight(),this.scheduleScrollDown_()),r>=this.screen_.rowsArray.length&&(r=this.screen_.rowsArray.length-1),this.setAbsoluteCursorPosition(r,0)},o.a.Terminal.prototype.moveRows_=function(e,t,r){var o=this.screen_.removeRows(e,t);this.screen_.insertRows(r,o);var n,i;e=0;n--)this.setAbsoluteCursorPosition(t+n,0),this.screen_.clearCursorRow(),this.scrollPort_.renderRef.touchRow(this.screen_.cursorRow())},o.a.Terminal.prototype.deleteLines=function(e){var t=this.saveCursor(),r=t.row,o=this.getVTScrollBottom(),n=o-r+1;e=Math.min(e,n);var i=o-e+1;e!=n&&this.moveRows_(r,e,i);for(var s=0;s1&&void 0!==arguments[1])||arguments[1];this.scheduleSyncCursorPosition_(),t&&this.accessibilityReader_.announce(e);var r=0,n=o.b.wc.strWidth(e);for(0===n&&e&&(n=1);r=this.screenSize.width&&(a=!0,s=this.screenSize.width-this.screen_.cursorPosition.column),a&&!this.options_.wraparound?(i=o.b.wc.substr(e,r,s-1)+o.b.wc.substr(e,n-1),s=n):i=o.b.wc.substr(e,r,s);for(var l=this.screen_.textAttributes,c=o.a.TextAttributes.splitWidecharString(i),u=c.length,h=0;h0)return void this.queue_.push("");if(0==this.queue_.length)this.queue_.push(e);else{var t="";0!=this.queue_[this.queue_.length-1].length&&(t=" "),this.queue_[this.queue_.length-1]+=t+e}if(!this.nextReadTimer_){if(1!=this.queue_.length)throw new Error("Expected only one item in queue_ or nextReadTimer_ to be running.");this.nextReadTimer_=setTimeout(this.addToLiveRegion_.bind(this),o.a.AccessibilityReader.DELAY)}}},o.a.AccessibilityReader.prototype.assertiveAnnounce=function(e){this.hasUserGesture&&" "==e&&(e=o.a.msg("SPACE_CHARACTER",[],"Space")),e=(e||"").trim(),e==this.assertiveLiveElement_.innerText&&(e="\n"+e),this.clear(),this.assertiveLiveElement_.innerText=e},o.a.AccessibilityReader.prototype.newLine=function(){this.announce("\n")},o.a.AccessibilityReader.prototype.clear=function(){this.liveElement_.innerText="",this.assertiveLiveElement_.innerText="",clearTimeout(this.nextReadTimer_),this.nextReadTimer_=null,this.queue_=[],this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},o.a.AccessibilityReader.prototype.announceAction_=function(e,t,r){if(this.lastCursorRow_!=t)return!1;if(this.lastCursorRowString_==e){if(this.lastCursorColumn_!=r&&""==this.cursorChangeQueue_.join("").trim()){var n=Math.min(this.lastCursorColumn_,r),i=Math.abs(r-this.lastCursorColumn_);return this.assertiveAnnounce(o.b.wc.substr(this.lastCursorRowString_,n,i)),!0}return!1}if(this.lastCursorRowString_!=e){if(this.lastCursorColumn_+1==r&&" "==o.b.wc.substr(e,r-1,1)&&this.cursorChangeQueue_.length>0&&" "==this.cursorChangeQueue_[0])return this.assertiveAnnounce(" "),!0;var s=r;if(o.b.wc.strWidth(e)<=o.b.wc.strWidth(this.lastCursorRowString_)&&o.b.wc.substr(this.lastCursorRowString_,0,s)==o.b.wc.substr(e,0,s)){for(var a=o.b.wc.strWidth(e);a>0&&(a!=s&&" "==o.b.wc.substr(e,a-1,1));--a);var l=o.b.wc.strWidth(this.lastCursorRowString_)-a,c=a-s;if(o.b.wc.substr(this.lastCursorRowString_,s+l,c)==o.b.wc.substr(e,s,c)){var u=o.b.wc.substr(this.lastCursorRowString_,s,l);if(""!=u)return this.assertiveAnnounce(u),!0}}return!1}return!1},o.a.AccessibilityReader.prototype.addToLiveRegion_=function(){this.nextReadTimer_=null;var e=this.queue_.join("\n").trim();e==this.liveElement_.innertText&&(e="\n"+e),this.liveElement_.innerText=e,this.queue_=[]}},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=r(6),i=r(0),s=function(){function e(e,t){for(var r=0;r0?(this._cursor=this._lines[o-1].num,this._prompt._render()):(this._call=window.term_apiRequest("history.search",{pattern:this._prompt._value,before:1,after:0,cursor:this._cursor}),this._call.then(function(e){if(e){var r=e.lines[0];if(!r)return void t._prompt._term.ringBell();t._lines.splice(-1,1),t._lines.splice(0,0,r),t._cursor=r.num,t.render()}})))}this._call=window.term_apiRequest("history.search",{pattern:this._lastValue,before:1,after:0,cursor:this._cursor}),this._call.then(function(e){if(e){var r=e.lines[0];if(!r)return void t._prompt._term.ringBell();t._cursor=r.num,t._prompt._value=r.val,t._prompt._cursor=i.b.wc.strWidth(r.val),t._prompt._render()}})}},{key:"next",value:function(e){var t=this;if(e){var r=this._cursor,o=this._lines.findIndex(function(e){return e.num==r});return void(o0&&(o="\ud83d\udcd6 \ud83d\udd0d",0==this._lines.length&&(o+=" \ud83e\udd37")),o=(""+this._found).padStart(6," ")+" of "+this._total+" "+o;e.print(o,!1);var n=r+i.b.wc.strWidth("> "),s=n/t|0,a=n%t,l=Math.min(8,this._lines.length),c=l+this._prompt._startRow+s+2-e.screenSize.height;c>0&&(e.appendRows_(c),this._prompt._startRow-=c,e.setCursorPosition(this._prompt._startRow,this._prompt._startCol));for(var u=0;u ",!1),e.print(this._prompt._value,!1),n=this._prompt._cursor+i.b.wc.strWidth("> "),s=n/t|0,a=n%t,e.setCursorPosition(this._prompt._startRow+s+l+1,a),e.setCursorVisible(!0)}}]),e}(),u=function(){function e(t){o(this,e),this._cursor=-1,this._lastValue="",this._call=null,this._prompt=t,this._lastValue=t._value}return s(e,[{key:"complete",value:function(){var e=this;this._cancelCall(),this._call=window.term_apiRequest("completion.for",{input:this._prompt._value}),this._call.then(function(t){if(t){var r=t.result[0];r&&(e._prompt._value=r,e._prompt._cursor=i.b.wc.strWidth(r)),e._prompt._render()}})}},{key:"_cancelCall",value:function(){this._call&&this._call.cancel(),this._call=null}}]),e}(),h=function(){function e(t){o(this,e),d.call(this),this._term=t}return s(e,[{key:"_valueStartCol",value:function(){return this._startCol+i.b.wc.strWidth(this._prompt)}},{key:"_searchIfNeeded",value:function(){this._shell&&this._historySearchMode&&this._getHistory().search()}},{key:"_completeIfNeeded",value:function(){this._shell&&!this._historySearchMode&&this._getComplete().complete()}},{key:"_moveLeft",value:function(){if(this._cursor<0)return this._cursor=0,void this._term.ringBell();var e,t,r=0;do{r+=1,e=i.b.wc.substring(this._value,0,this._cursor-r),t=i.b.wc.strWidth(e)}while(t>=this._cursor&&r<5);this._cursor=t}},{key:"_moveRight",value:function(){var e=i.b.wc.strWidth(this._value);if(this._cursor>=e)return this._cursor=e,void this._term.ringBell();var t,r,o=0;do{o+=1,t=i.b.wc.substring(this._value,0,this._cursor+o),r=i.b.wc.strWidth(t)}while(r<=this._cursor&&o<5);this._cursor=r}},{key:"_moveUp",value:function(){var e=this._term,t=this._term.screen_;if(((this._cursor+this._valueStartCol())/t.columnCount_|0)>0)this._cursor-=t.columnCount_,this._cursor<0&&(this._cursor=0);else{if(this._shell)return this._getHistory().prev(this._historySearchMode);e.ringBell()}this._render()}},{key:"_moveDown",value:function(){var e=this._term,t=this._term.screen_,r=i.b.wc.strWidth(this._value);if(((this._cursor+this._valueStartCol())/t.columnCount_|0)<(r/t.columnCount_|0))this._cursor+=t.columnCount_,this._cursor>r&&(this._cursor=r);else{if(this._shell)return this._getHistory().next(this._historySearchMode);e.ringBell()}this._render()}},{key:"_getHistory",value:function(){return this._history||(this._history=new c(this)),this._history}},{key:"_getComplete",value:function(){return this._complete||(this._complete=new u(this)),this._complete}},{key:"_resetHistory",value:function(){if(this._historySearchMode)return void this._getHistory().search();this._history&&(this._history.reset(),this._history=null)}},{key:"_forwardWord",value:function(){var e=i.b.wc.substr(this._value,this._cursor),t=a.exec(e);t&&(this._cursor+=i.b.wc.strWidth(t[0]))}},{key:"_backWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=l.exec(e);t&&(this._cursor-=i.b.wc.strWidth(t[0]),this._cursor<0&&(this._cursor=0))}},{key:"_deleteBackWord",value:function(){0==this._cursor&&this._term.ringBell();var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=l.exec(e);if(r){var o=i.b.wc.strWidth(r[0]);e=i.b.wc.substring(this._value,0,this._cursor-o),this._value=[e,t].join(""),this._cursor=Math.max(0,this._cursor-o),this._resetHistory()}}},{key:"_deleteForwardWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=a.exec(t);if(r){var o=i.b.wc.strWidth(r[0]);t=i.b.wc.substr(t,o),this._value=[e,t].join(""),this._resetHistory()}}},{key:"_uppercaseForwardWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=a.exec(t);if(r){var o=r[0].toUpperCase(),n=i.b.wc.strWidth(o);t=i.b.wc.substr(t,n),this._value=[e,o,t].join(""),this._cursor+=n,this._resetHistory()}}},{key:"_render",value:function(){if(this._historySearchMode)return void this._getHistory().render();var e=this._term,t=e.screen_.columnCount_;e.setCursorVisible(!1),e.setCursorPosition(this._startRow,this._startCol),e.eraseBelow();var r=i.b.wc.strWidth(this._value);this._secure&&(r=0);var o=r+this._valueStartCol(),n=o/t|0,s=o%t,a=this._startRow+n+1-e.screenSize.height;a>0&&(e.appendRows_(a),this._startRow-=a,e.setCursorPosition(this._startRow,this._startCol)),e.print(this._prompt,!1),this._secure||e.print(this._value,!1),o=(this._secure?0:this._cursor)+this._valueStartCol(),n=o/t|0,s=o%t,e.setCursorPosition(this._startRow+n,s),e.setCursorVisible(!0)}},{key:"processInput",value:function(e){this._startCol<0&&(this._value="",this._cursor=0,this._startCol=this._term.getCursorColumn(),this._startRow=this._term.getCursorRow()),Object(n.a)(e,this._onKey)}},{key:"processMouseClick",value:function(e){if(this._startCol<0)return!1;if(null==e.terminalRow||null==e.terminalColumn)return!1;var t=this._startRow,r=this._getHistory()._lines;this._historySearchMode&&(t+=r.length+1);var o=e.terminalRow-t;if(o<0){if(-o<=r.length){var n=r[r.length+o];return this._getHistory()._cursor=n.num,void this._getHistory().render()}return this._cursor=0,void this._render()}var s=i.b.wc.strWidth(this._value),a=this._term.screen_.columnCount_,l=o*a+e.terminalColumn-(this._historySearchMode?2:this._valueStartCol());this._cursor=Math.min(Math.max(l,0),s);var c=i.b.wc.substring(this._value,0,this._cursor);return this._cursor=i.b.wc.strWidth(c),this._render(),!0}},{key:"processMouseScroll",value:function(e){return!(this._startCol<0)&&(null!=e.terminalRow&&null!=e.terminalColumn&&(!!this._historySearchMode&&(e.deltaY>0?this._moveUp():this._moveDown(),!0)))}},{key:"promptB64",value:function(e){this.reset(),this._term.setAutoCarriageReturn(!0);var t=JSON.parse(window.atob(e));this._prompt=t.prompt,this._secure=t.secure,this._shell=t.shell,this._value="",this._cursor=0,this._startCol=this._term.getCursorColumn(),this._startRow=this._term.getCursorRow(),this._render(),this._term.accessibilityReader_.announce(this._prompt)}},{key:"reset",value:function(){-1!=this._startCol&&(this._history=null,this._complete=null,this._prompt="",this._startCol=-1,this._secure=!1,this._shell=!1,this._historySearchMode=!1)}},{key:"resize",value:function(){this._startCol<0||this._render()}}]),e}(),d=function(){var e=this;this._prompt="",this._shell=!1,this._secure=!1,this._cursor=0,this._row=0,this._value="",this._history=null,this._complete=null,this._startCol=0,this._startRow=0,this._historySearchMode=!1,this._onKey=function(t){var r=e._term;switch(t.fullName){case"tab":return void e._completeIfNeeded();case"M-f":case"M-right":e._forwardWord();break;case"M-b":case"M-left":e._backWord();break;case"C-w":e._deleteBackWord();break;case"M-d":e._deleteForwardWord();break;case"M-u":e._uppercaseForwardWord();break;case"home":case"C-a":e._cursor=0;break;case"end":case"C-e":e._cursor=i.b.wc.strWidth(e._value);break;case"C-k":e._value=i.b.wc.substring(e._value,0,e._cursor),e._cursor=i.b.wc.strWidth(e._value),e._resetHistory();break;case"C-u":e._value=i.b.wc.substr(e._value,e._cursor),e._cursor=0;break;case"C-l":0==e._cursor&&""===e._value?r.ringBell():(e._cursor=0,e._value="",e._resetHistory());break;case"C-r":e._shell?(e._historySearchMode=!0,e._resetHistory()):r.ringBell();break;case"C-c":e._cursor=0,e._value="";break;case"backspace":if(0==e._cursor)r.ringBell();else{var o=i.b.wc.substring(e._value,0,e._cursor-1),n=i.b.wc.substr(e._value,e._cursor);e._value=[o,n].join(""),e._cursor=i.b.wc.strWidth(o),e._resetHistory()}break;case"C-d":var s=i.b.wc.substring(e._value,0,e._cursor),a=i.b.wc.substr(e._value,e._cursor+1);e._value=[s,a].join("");break;case"C-b":case"left":e._moveLeft();break;case"C-f":case"right":e._moveRight();break;case"C-p":case"up":return e._moveUp();case"C-n":case"down":return e._moveDown();case"escape":e._historySearchMode=!1;break;case"return":case"enter":if(e._historySearchMode)return e._getHistory().enter(),e._historySearchMode=!1,e._resetHistory(),void e._render();if(e._cursor=i.b.wc.strWidth(e._value),e._render(),e._term.interpret("\r\n"),e._value&&e._value.length>0){var l={text:e._value};window.webkit.messageHandlers.interOp.postMessage({op:"line",data:l})}return;default:if(t.ch){var c=i.b.wc.strWidth(t.ch),u=i.b.wc.substring(e._value,0,e._cursor),h=i.b.wc.substr(e._value,e._cursor);r.accessibilityReader_.assertiveAnnounce(t.ch),e._value=[u,t.ch,h].join(""),e._cursor+=c,e._resetHistory(),e._searchIfNeeded()}}e._render()}};t.a=h}]); -//# sourceMappingURL=main.8a791e12.js.map \ No newline at end of file +!function(e){function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=12)}([function(e,t,r){"use strict";r.d(t,"b",function(){return i}),r.d(t,"a",function(){return h});var o=function(){function e(e,t){var r=[],o=!0,n=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(o=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);o=!0);}catch(e){n=!0,i=e}finally{try{!o&&a.return&&a.return()}finally{if(n)throw i}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};if("undefined"!=typeof i)throw new Error('Global "lib" object already exists.');var i={};if(i.runtimeDependencies_={},i.initCallbacks_=[],i.rtdep=function(e){var t;try{throw new Error}catch(e){var r=e.stack.split("\n");t=r.length>=3?r[2].replace(/^\s*at\s+/,""):r[1].replace(/^\s*global code@/,"")}for(var o=0;ot.length&&(t=t.repeat(e/t.length+1)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return(e-=this.length)<=0?String(this):(void 0===t&&(t=" "),e>t.length&&(t=t.repeat(e/t.length+1)),String(this)+t.slice(0,e))}),!Object.values||!Object.entries){var s=Function.bind.call(Function.call,Array.prototype.reduce),a=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),l=Function.bind.call(Function.call,Array.prototype.concat);Object.values||(Object.values=function(e){return s(Reflect.ownKeys(e),function(t,r){return l(t,"string"===typeof r&&a(e,r)?[e[r]]:[])},[])}),Object.entries||(Object.entries=function(e){return s(Reflect.ownKeys(e),function(t,r){return l(t,"string"===typeof r&&a(e,r)?[[r,e[r]]]:[])},[])})}if("function"!==typeof Promise.prototype.finally){var c=function(e,t){if(!e||"object"!==("undefined"===typeof e?"undefined":n(e))&&"function"!==typeof e)throw new TypeError("Assertion failed: Type(O) is not Object");var r=e.constructor;if("undefined"===typeof r)return t;if(!r||"object"!==("undefined"===typeof r?"undefined":n(r))&&"function"!==typeof r)throw new TypeError("O.constructor is not an Object");var o="function"===typeof Symbol&&"symbol"===n(Symbol.species)?r[Symbol.species]:void 0;if(null==o)return t;if("function"===typeof o&&o.prototype)return o;throw new TypeError("no constructor found")},u={finally:function(e){var t=this;if("object"!==("undefined"===typeof t?"undefined":n(t))||null===t)throw new TypeError('"this" value is not an Object');var r=c(t,Promise);return"function"!==typeof e?Promise.prototype.then.call(t,e,e):Promise.prototype.then.call(t,function(t){return new r(function(t){return t(e())}).then(function(){return t})},function(t){return new r(function(t){return t(e())}).then(function(){throw t})})}};Object.defineProperty(Promise.prototype,"finally",{configurable:!0,writable:!0,value:u.finally})}i.array={},i.array.arrayBigEndianToUint32=function(e){return(e[0]<<24|e[1]<<16|e[2]<<8|e[3]<<0)>>>0},i.array.uint32ToArrayBigEndian=function(e){return[e>>>24&255,e>>>16&255,e>>>8&255,e>>>0&255]},i.array.concatTyped=function(){for(var e=0,t=arguments.length,r=Array(t),o=0;o>4*(r-2)}if(!e.startsWith("#"))return null;if(e=e.substr(1),-1==[3,6,9,12].indexOf(e.length))return null;if(e.match(/[^a-f0-9]/i))return null;var r=e.length/3,o=e.substr(0,r),n=e.substr(r,r),s=e.substr(r+r,r);return i.colors.arrayToRGBA([o,n,s].map(t))},i.colors.x11ToCSS=function(e){function t(e){return 1==e.length?parseInt(e+e,16):2==e.length?parseInt(e,16):(3==e.length&&(e+=e.substr(2)),Math.round(parseInt(e,16)/257))}var r=e.match(i.colors.re_.x11rgb);return r?(r.splice(0,1),i.colors.arrayToRGBA(r.map(t))):e.startsWith("#")?i.colors.x11HexToCSS(e):i.colors.nameToRGB(e)},i.colors.hexToRGB=function(e){function t(e){4==e.length&&(e=e.replace(r,function(e,t,r,o){return"#"+t+t+r+r+o+o}));var t=e.match(o);return t?"rgb("+parseInt(t[1],16)+", "+parseInt(t[2],16)+", "+parseInt(t[3],16)+")":null}var r=i.colors.re_.hex16,o=i.colors.re_.hex24;if(e instanceof Array)for(var n=0;n3?e[3]:1;return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"},i.colors.setAlpha=function(e,t){var r=i.colors.crackRGB(e);return r[3]=t,i.colors.arrayToRGBA(r)},i.colors.mix=function(e,t,r){for(var o=i.colors.crackRGB(e),n=i.colors.crackRGB(t),s=0;s<4;++s){var a=n[s]-o[s];o[s]=Math.round(parseInt(o[s])+a*r)}return i.colors.arrayToRGBA(o)},i.colors.crackRGB=function(e){if(e.startsWith("rgba")){var t=e.match(i.colors.re_.rgba);if(t)return t.shift(),t}else{var t=e.match(i.colors.re_.rgb);if(t)return t.shift(),t.push("1"),t}return console.error("Couldn't crack: "+e),null},i.colors.nameToRGB=function(e){return e in i.colors.colorNames?i.colors.colorNames[e]:(e=e.toLowerCase())in i.colors.colorNames?i.colors.colorNames[e]:(e=e.replace(/\s+/g,""),e in i.colors.colorNames?i.colors.colorNames[e]:null)},i.colors.stockColorPalette=i.colors.hexToRGB(["#000000","#CC0000","#4E9A06","#C4A000","#3465A4","#75507B","#06989A","#D3D7CF","#555753","#EF2929","#00BA13","#FCE94F","#729FCF","#F200CB","#00B5BD","#EEEEEC","#000000","#00005F","#000087","#0000AF","#0000D7","#0000FF","#005F00","#005F5F","#005F87","#005FAF","#005FD7","#005FFF","#008700","#00875F","#008787","#0087AF","#0087D7","#0087FF","#00AF00","#00AF5F","#00AF87","#00AFAF","#00AFD7","#00AFFF","#00D700","#00D75F","#00D787","#00D7AF","#00D7D7","#00D7FF","#00FF00","#00FF5F","#00FF87","#00FFAF","#00FFD7","#00FFFF","#5F0000","#5F005F","#5F0087","#5F00AF","#5F00D7","#5F00FF","#5F5F00","#5F5F5F","#5F5F87","#5F5FAF","#5F5FD7","#5F5FFF","#5F8700","#5F875F","#5F8787","#5F87AF","#5F87D7","#5F87FF","#5FAF00","#5FAF5F","#5FAF87","#5FAFAF","#5FAFD7","#5FAFFF","#5FD700","#5FD75F","#5FD787","#5FD7AF","#5FD7D7","#5FD7FF","#5FFF00","#5FFF5F","#5FFF87","#5FFFAF","#5FFFD7","#5FFFFF","#870000","#87005F","#870087","#8700AF","#8700D7","#8700FF","#875F00","#875F5F","#875F87","#875FAF","#875FD7","#875FFF","#878700","#87875F","#878787","#8787AF","#8787D7","#8787FF","#87AF00","#87AF5F","#87AF87","#87AFAF","#87AFD7","#87AFFF","#87D700","#87D75F","#87D787","#87D7AF","#87D7D7","#87D7FF","#87FF00","#87FF5F","#87FF87","#87FFAF","#87FFD7","#87FFFF","#AF0000","#AF005F","#AF0087","#AF00AF","#AF00D7","#AF00FF","#AF5F00","#AF5F5F","#AF5F87","#AF5FAF","#AF5FD7","#AF5FFF","#AF8700","#AF875F","#AF8787","#AF87AF","#AF87D7","#AF87FF","#AFAF00","#AFAF5F","#AFAF87","#AFAFAF","#AFAFD7","#AFAFFF","#AFD700","#AFD75F","#AFD787","#AFD7AF","#AFD7D7","#AFD7FF","#AFFF00","#AFFF5F","#AFFF87","#AFFFAF","#AFFFD7","#AFFFFF","#D70000","#D7005F","#D70087","#D700AF","#D700D7","#D700FF","#D75F00","#D75F5F","#D75F87","#D75FAF","#D75FD7","#D75FFF","#D78700","#D7875F","#D78787","#D787AF","#D787D7","#D787FF","#D7AF00","#D7AF5F","#D7AF87","#D7AFAF","#D7AFD7","#D7AFFF","#D7D700","#D7D75F","#D7D787","#D7D7AF","#D7D7D7","#D7D7FF","#D7FF00","#D7FF5F","#D7FF87","#D7FFAF","#D7FFD7","#D7FFFF","#FF0000","#FF005F","#FF0087","#FF00AF","#FF00D7","#FF00FF","#FF5F00","#FF5F5F","#FF5F87","#FF5FAF","#FF5FD7","#FF5FFF","#FF8700","#FF875F","#FF8787","#FF87AF","#FF87D7","#FF87FF","#FFAF00","#FFAF5F","#FFAF87","#FFAFAF","#FFAFD7","#FFAFFF","#FFD700","#FFD75F","#FFD787","#FFD7AF","#FFD7D7","#FFD7FF","#FFFF00","#FFFF5F","#FFFF87","#FFFFAF","#FFFFD7","#FFFFFF","#080808","#121212","#1C1C1C","#262626","#303030","#3A3A3A","#444444","#4E4E4E","#585858","#626262","#6C6C6C","#767676","#808080","#8A8A8A","#949494","#9E9E9E","#A8A8A8","#B2B2B2","#BCBCBC","#C6C6C6","#D0D0D0","#DADADA","#E4E4E4","#EEEEEE"]),i.colors.colorPalette=i.colors.stockColorPalette,i.colors.colorNames={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",antiquewhite1:"rgb(255, 239, 219)",antiquewhite2:"rgb(238, 223, 204)",antiquewhite3:"rgb(205, 192, 176)",antiquewhite4:"rgb(139, 131, 120)",aquamarine:"rgb(127, 255, 212)",aquamarine1:"rgb(127, 255, 212)",aquamarine2:"rgb(118, 238, 198)",aquamarine3:"rgb(102, 205, 170)",aquamarine4:"rgb(69, 139, 116)",azure:"rgb(240, 255, 255)",azure1:"rgb(240, 255, 255)",azure2:"rgb(224, 238, 238)",azure3:"rgb(193, 205, 205)",azure4:"rgb(131, 139, 139)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",bisque1:"rgb(255, 228, 196)",bisque2:"rgb(238, 213, 183)",bisque3:"rgb(205, 183, 158)",bisque4:"rgb(139, 125, 107)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blue1:"rgb(0, 0, 255)",blue2:"rgb(0, 0, 238)",blue3:"rgb(0, 0, 205)",blue4:"rgb(0, 0, 139)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",brown1:"rgb(255, 64, 64)",brown2:"rgb(238, 59, 59)",brown3:"rgb(205, 51, 51)",brown4:"rgb(139, 35, 35)",burlywood:"rgb(222, 184, 135)",burlywood1:"rgb(255, 211, 155)",burlywood2:"rgb(238, 197, 145)",burlywood3:"rgb(205, 170, 125)",burlywood4:"rgb(139, 115, 85)",cadetblue:"rgb(95, 158, 160)",cadetblue1:"rgb(152, 245, 255)",cadetblue2:"rgb(142, 229, 238)",cadetblue3:"rgb(122, 197, 205)",cadetblue4:"rgb(83, 134, 139)",chartreuse:"rgb(127, 255, 0)",chartreuse1:"rgb(127, 255, 0)",chartreuse2:"rgb(118, 238, 0)",chartreuse3:"rgb(102, 205, 0)",chartreuse4:"rgb(69, 139, 0)",chocolate:"rgb(210, 105, 30)",chocolate1:"rgb(255, 127, 36)",chocolate2:"rgb(238, 118, 33)",chocolate3:"rgb(205, 102, 29)",chocolate4:"rgb(139, 69, 19)",coral:"rgb(255, 127, 80)",coral1:"rgb(255, 114, 86)",coral2:"rgb(238, 106, 80)",coral3:"rgb(205, 91, 69)",coral4:"rgb(139, 62, 47)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",cornsilk1:"rgb(255, 248, 220)",cornsilk2:"rgb(238, 232, 205)",cornsilk3:"rgb(205, 200, 177)",cornsilk4:"rgb(139, 136, 120)",cyan:"rgb(0, 255, 255)",cyan1:"rgb(0, 255, 255)",cyan2:"rgb(0, 238, 238)",cyan3:"rgb(0, 205, 205)",cyan4:"rgb(0, 139, 139)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgoldenrod1:"rgb(255, 185, 15)",darkgoldenrod2:"rgb(238, 173, 14)",darkgoldenrod3:"rgb(205, 149, 12)",darkgoldenrod4:"rgb(139, 101, 8)",darkgray:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkgrey:"rgb(169, 169, 169)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkolivegreen1:"rgb(202, 255, 112)",darkolivegreen2:"rgb(188, 238, 104)",darkolivegreen3:"rgb(162, 205, 90)",darkolivegreen4:"rgb(110, 139, 61)",darkorange:"rgb(255, 140, 0)",darkorange1:"rgb(255, 127, 0)",darkorange2:"rgb(238, 118, 0)",darkorange3:"rgb(205, 102, 0)",darkorange4:"rgb(139, 69, 0)",darkorchid:"rgb(153, 50, 204)",darkorchid1:"rgb(191, 62, 255)",darkorchid2:"rgb(178, 58, 238)",darkorchid3:"rgb(154, 50, 205)",darkorchid4:"rgb(104, 34, 139)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkseagreen1:"rgb(193, 255, 193)",darkseagreen2:"rgb(180, 238, 180)",darkseagreen3:"rgb(155, 205, 155)",darkseagreen4:"rgb(105, 139, 105)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategray1:"rgb(151, 255, 255)",darkslategray2:"rgb(141, 238, 238)",darkslategray3:"rgb(121, 205, 205)",darkslategray4:"rgb(82, 139, 139)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",debianred:"rgb(215, 7, 81)",deeppink:"rgb(255, 20, 147)",deeppink1:"rgb(255, 20, 147)",deeppink2:"rgb(238, 18, 137)",deeppink3:"rgb(205, 16, 118)",deeppink4:"rgb(139, 10, 80)",deepskyblue:"rgb(0, 191, 255)",deepskyblue1:"rgb(0, 191, 255)",deepskyblue2:"rgb(0, 178, 238)",deepskyblue3:"rgb(0, 154, 205)",deepskyblue4:"rgb(0, 104, 139)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",dodgerblue1:"rgb(30, 144, 255)",dodgerblue2:"rgb(28, 134, 238)",dodgerblue3:"rgb(24, 116, 205)",dodgerblue4:"rgb(16, 78, 139)",firebrick:"rgb(178, 34, 34)",firebrick1:"rgb(255, 48, 48)",firebrick2:"rgb(238, 44, 44)",firebrick3:"rgb(205, 38, 38)",firebrick4:"rgb(139, 26, 26)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",gold1:"rgb(255, 215, 0)",gold2:"rgb(238, 201, 0)",gold3:"rgb(205, 173, 0)",gold4:"rgb(139, 117, 0)",goldenrod:"rgb(218, 165, 32)",goldenrod1:"rgb(255, 193, 37)",goldenrod2:"rgb(238, 180, 34)",goldenrod3:"rgb(205, 155, 29)",goldenrod4:"rgb(139, 105, 20)",gray:"rgb(190, 190, 190)",gray0:"rgb(0, 0, 0)",gray1:"rgb(3, 3, 3)",gray10:"rgb(26, 26, 26)",gray100:"rgb(255, 255, 255)",gray11:"rgb(28, 28, 28)",gray12:"rgb(31, 31, 31)",gray13:"rgb(33, 33, 33)",gray14:"rgb(36, 36, 36)",gray15:"rgb(38, 38, 38)",gray16:"rgb(41, 41, 41)",gray17:"rgb(43, 43, 43)",gray18:"rgb(46, 46, 46)",gray19:"rgb(48, 48, 48)",gray2:"rgb(5, 5, 5)",gray20:"rgb(51, 51, 51)",gray21:"rgb(54, 54, 54)",gray22:"rgb(56, 56, 56)",gray23:"rgb(59, 59, 59)",gray24:"rgb(61, 61, 61)",gray25:"rgb(64, 64, 64)",gray26:"rgb(66, 66, 66)",gray27:"rgb(69, 69, 69)",gray28:"rgb(71, 71, 71)",gray29:"rgb(74, 74, 74)",gray3:"rgb(8, 8, 8)",gray30:"rgb(77, 77, 77)",gray31:"rgb(79, 79, 79)",gray32:"rgb(82, 82, 82)",gray33:"rgb(84, 84, 84)",gray34:"rgb(87, 87, 87)",gray35:"rgb(89, 89, 89)",gray36:"rgb(92, 92, 92)",gray37:"rgb(94, 94, 94)",gray38:"rgb(97, 97, 97)",gray39:"rgb(99, 99, 99)",gray4:"rgb(10, 10, 10)",gray40:"rgb(102, 102, 102)",gray41:"rgb(105, 105, 105)",gray42:"rgb(107, 107, 107)",gray43:"rgb(110, 110, 110)",gray44:"rgb(112, 112, 112)",gray45:"rgb(115, 115, 115)",gray46:"rgb(117, 117, 117)",gray47:"rgb(120, 120, 120)",gray48:"rgb(122, 122, 122)",gray49:"rgb(125, 125, 125)",gray5:"rgb(13, 13, 13)",gray50:"rgb(127, 127, 127)",gray51:"rgb(130, 130, 130)",gray52:"rgb(133, 133, 133)",gray53:"rgb(135, 135, 135)",gray54:"rgb(138, 138, 138)",gray55:"rgb(140, 140, 140)",gray56:"rgb(143, 143, 143)",gray57:"rgb(145, 145, 145)",gray58:"rgb(148, 148, 148)",gray59:"rgb(150, 150, 150)",gray6:"rgb(15, 15, 15)",gray60:"rgb(153, 153, 153)",gray61:"rgb(156, 156, 156)",gray62:"rgb(158, 158, 158)",gray63:"rgb(161, 161, 161)",gray64:"rgb(163, 163, 163)",gray65:"rgb(166, 166, 166)",gray66:"rgb(168, 168, 168)",gray67:"rgb(171, 171, 171)",gray68:"rgb(173, 173, 173)",gray69:"rgb(176, 176, 176)",gray7:"rgb(18, 18, 18)",gray70:"rgb(179, 179, 179)",gray71:"rgb(181, 181, 181)",gray72:"rgb(184, 184, 184)",gray73:"rgb(186, 186, 186)",gray74:"rgb(189, 189, 189)",gray75:"rgb(191, 191, 191)",gray76:"rgb(194, 194, 194)",gray77:"rgb(196, 196, 196)",gray78:"rgb(199, 199, 199)",gray79:"rgb(201, 201, 201)",gray8:"rgb(20, 20, 20)",gray80:"rgb(204, 204, 204)",gray81:"rgb(207, 207, 207)",gray82:"rgb(209, 209, 209)",gray83:"rgb(212, 212, 212)",gray84:"rgb(214, 214, 214)",gray85:"rgb(217, 217, 217)",gray86:"rgb(219, 219, 219)",gray87:"rgb(222, 222, 222)",gray88:"rgb(224, 224, 224)",gray89:"rgb(227, 227, 227)",gray9:"rgb(23, 23, 23)",gray90:"rgb(229, 229, 229)",gray91:"rgb(232, 232, 232)",gray92:"rgb(235, 235, 235)",gray93:"rgb(237, 237, 237)",gray94:"rgb(240, 240, 240)",gray95:"rgb(242, 242, 242)",gray96:"rgb(245, 245, 245)",gray97:"rgb(247, 247, 247)",gray98:"rgb(250, 250, 250)",gray99:"rgb(252, 252, 252)",green:"rgb(0, 255, 0)",green1:"rgb(0, 255, 0)",green2:"rgb(0, 238, 0)",green3:"rgb(0, 205, 0)",green4:"rgb(0, 139, 0)",greenyellow:"rgb(173, 255, 47)",grey:"rgb(190, 190, 190)",grey0:"rgb(0, 0, 0)",grey1:"rgb(3, 3, 3)",grey10:"rgb(26, 26, 26)",grey100:"rgb(255, 255, 255)",grey11:"rgb(28, 28, 28)",grey12:"rgb(31, 31, 31)",grey13:"rgb(33, 33, 33)",grey14:"rgb(36, 36, 36)",grey15:"rgb(38, 38, 38)",grey16:"rgb(41, 41, 41)",grey17:"rgb(43, 43, 43)",grey18:"rgb(46, 46, 46)",grey19:"rgb(48, 48, 48)",grey2:"rgb(5, 5, 5)",grey20:"rgb(51, 51, 51)",grey21:"rgb(54, 54, 54)",grey22:"rgb(56, 56, 56)",grey23:"rgb(59, 59, 59)",grey24:"rgb(61, 61, 61)",grey25:"rgb(64, 64, 64)",grey26:"rgb(66, 66, 66)",grey27:"rgb(69, 69, 69)",grey28:"rgb(71, 71, 71)",grey29:"rgb(74, 74, 74)",grey3:"rgb(8, 8, 8)",grey30:"rgb(77, 77, 77)",grey31:"rgb(79, 79, 79)",grey32:"rgb(82, 82, 82)",grey33:"rgb(84, 84, 84)",grey34:"rgb(87, 87, 87)",grey35:"rgb(89, 89, 89)",grey36:"rgb(92, 92, 92)",grey37:"rgb(94, 94, 94)",grey38:"rgb(97, 97, 97)",grey39:"rgb(99, 99, 99)",grey4:"rgb(10, 10, 10)",grey40:"rgb(102, 102, 102)",grey41:"rgb(105, 105, 105)",grey42:"rgb(107, 107, 107)",grey43:"rgb(110, 110, 110)",grey44:"rgb(112, 112, 112)",grey45:"rgb(115, 115, 115)",grey46:"rgb(117, 117, 117)",grey47:"rgb(120, 120, 120)",grey48:"rgb(122, 122, 122)",grey49:"rgb(125, 125, 125)",grey5:"rgb(13, 13, 13)",grey50:"rgb(127, 127, 127)",grey51:"rgb(130, 130, 130)",grey52:"rgb(133, 133, 133)",grey53:"rgb(135, 135, 135)",grey54:"rgb(138, 138, 138)",grey55:"rgb(140, 140, 140)",grey56:"rgb(143, 143, 143)",grey57:"rgb(145, 145, 145)",grey58:"rgb(148, 148, 148)",grey59:"rgb(150, 150, 150)",grey6:"rgb(15, 15, 15)",grey60:"rgb(153, 153, 153)",grey61:"rgb(156, 156, 156)",grey62:"rgb(158, 158, 158)",grey63:"rgb(161, 161, 161)",grey64:"rgb(163, 163, 163)",grey65:"rgb(166, 166, 166)",grey66:"rgb(168, 168, 168)",grey67:"rgb(171, 171, 171)",grey68:"rgb(173, 173, 173)",grey69:"rgb(176, 176, 176)",grey7:"rgb(18, 18, 18)",grey70:"rgb(179, 179, 179)",grey71:"rgb(181, 181, 181)",grey72:"rgb(184, 184, 184)",grey73:"rgb(186, 186, 186)",grey74:"rgb(189, 189, 189)",grey75:"rgb(191, 191, 191)",grey76:"rgb(194, 194, 194)",grey77:"rgb(196, 196, 196)",grey78:"rgb(199, 199, 199)",grey79:"rgb(201, 201, 201)",grey8:"rgb(20, 20, 20)",grey80:"rgb(204, 204, 204)",grey81:"rgb(207, 207, 207)",grey82:"rgb(209, 209, 209)",grey83:"rgb(212, 212, 212)",grey84:"rgb(214, 214, 214)",grey85:"rgb(217, 217, 217)",grey86:"rgb(219, 219, 219)",grey87:"rgb(222, 222, 222)",grey88:"rgb(224, 224, 224)",grey89:"rgb(227, 227, 227)",grey9:"rgb(23, 23, 23)",grey90:"rgb(229, 229, 229)",grey91:"rgb(232, 232, 232)",grey92:"rgb(235, 235, 235)",grey93:"rgb(237, 237, 237)",grey94:"rgb(240, 240, 240)",grey95:"rgb(242, 242, 242)",grey96:"rgb(245, 245, 245)",grey97:"rgb(247, 247, 247)",grey98:"rgb(250, 250, 250)",grey99:"rgb(252, 252, 252)",honeydew:"rgb(240, 255, 240)",honeydew1:"rgb(240, 255, 240)",honeydew2:"rgb(224, 238, 224)",honeydew3:"rgb(193, 205, 193)",honeydew4:"rgb(131, 139, 131)",hotpink:"rgb(255, 105, 180)",hotpink1:"rgb(255, 110, 180)",hotpink2:"rgb(238, 106, 167)",hotpink3:"rgb(205, 96, 144)",hotpink4:"rgb(139, 58, 98)",indianred:"rgb(205, 92, 92)",indianred1:"rgb(255, 106, 106)",indianred2:"rgb(238, 99, 99)",indianred3:"rgb(205, 85, 85)",indianred4:"rgb(139, 58, 58)",ivory:"rgb(255, 255, 240)",ivory1:"rgb(255, 255, 240)",ivory2:"rgb(238, 238, 224)",ivory3:"rgb(205, 205, 193)",ivory4:"rgb(139, 139, 131)",khaki:"rgb(240, 230, 140)",khaki1:"rgb(255, 246, 143)",khaki2:"rgb(238, 230, 133)",khaki3:"rgb(205, 198, 115)",khaki4:"rgb(139, 134, 78)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lavenderblush1:"rgb(255, 240, 245)",lavenderblush2:"rgb(238, 224, 229)",lavenderblush3:"rgb(205, 193, 197)",lavenderblush4:"rgb(139, 131, 134)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lemonchiffon1:"rgb(255, 250, 205)",lemonchiffon2:"rgb(238, 233, 191)",lemonchiffon3:"rgb(205, 201, 165)",lemonchiffon4:"rgb(139, 137, 112)",lightblue:"rgb(173, 216, 230)",lightblue1:"rgb(191, 239, 255)",lightblue2:"rgb(178, 223, 238)",lightblue3:"rgb(154, 192, 205)",lightblue4:"rgb(104, 131, 139)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightcyan1:"rgb(224, 255, 255)",lightcyan2:"rgb(209, 238, 238)",lightcyan3:"rgb(180, 205, 205)",lightcyan4:"rgb(122, 139, 139)",lightgoldenrod:"rgb(238, 221, 130)",lightgoldenrod1:"rgb(255, 236, 139)",lightgoldenrod2:"rgb(238, 220, 130)",lightgoldenrod3:"rgb(205, 190, 112)",lightgoldenrod4:"rgb(139, 129, 76)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgray:"rgb(211, 211, 211)",lightgreen:"rgb(144, 238, 144)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightpink1:"rgb(255, 174, 185)",lightpink2:"rgb(238, 162, 173)",lightpink3:"rgb(205, 140, 149)",lightpink4:"rgb(139, 95, 101)",lightsalmon:"rgb(255, 160, 122)",lightsalmon1:"rgb(255, 160, 122)",lightsalmon2:"rgb(238, 149, 114)",lightsalmon3:"rgb(205, 129, 98)",lightsalmon4:"rgb(139, 87, 66)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightskyblue1:"rgb(176, 226, 255)",lightskyblue2:"rgb(164, 211, 238)",lightskyblue3:"rgb(141, 182, 205)",lightskyblue4:"rgb(96, 123, 139)",lightslateblue:"rgb(132, 112, 255)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightsteelblue1:"rgb(202, 225, 255)",lightsteelblue2:"rgb(188, 210, 238)",lightsteelblue3:"rgb(162, 181, 205)",lightsteelblue4:"rgb(110, 123, 139)",lightyellow:"rgb(255, 255, 224)",lightyellow1:"rgb(255, 255, 224)",lightyellow2:"rgb(238, 238, 209)",lightyellow3:"rgb(205, 205, 180)",lightyellow4:"rgb(139, 139, 122)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",magenta1:"rgb(255, 0, 255)",magenta2:"rgb(238, 0, 238)",magenta3:"rgb(205, 0, 205)",magenta4:"rgb(139, 0, 139)",maroon:"rgb(176, 48, 96)",maroon1:"rgb(255, 52, 179)",maroon2:"rgb(238, 48, 167)",maroon3:"rgb(205, 41, 144)",maroon4:"rgb(139, 28, 98)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumorchid1:"rgb(224, 102, 255)",mediumorchid2:"rgb(209, 95, 238)",mediumorchid3:"rgb(180, 82, 205)",mediumorchid4:"rgb(122, 55, 139)",mediumpurple:"rgb(147, 112, 219)",mediumpurple1:"rgb(171, 130, 255)",mediumpurple2:"rgb(159, 121, 238)",mediumpurple3:"rgb(137, 104, 205)",mediumpurple4:"rgb(93, 71, 139)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",mistyrose1:"rgb(255, 228, 225)",mistyrose2:"rgb(238, 213, 210)",mistyrose3:"rgb(205, 183, 181)",mistyrose4:"rgb(139, 125, 123)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navajowhite1:"rgb(255, 222, 173)",navajowhite2:"rgb(238, 207, 161)",navajowhite3:"rgb(205, 179, 139)",navajowhite4:"rgb(139, 121, 94)",navy:"rgb(0, 0, 128)",navyblue:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olivedrab:"rgb(107, 142, 35)",olivedrab1:"rgb(192, 255, 62)",olivedrab2:"rgb(179, 238, 58)",olivedrab3:"rgb(154, 205, 50)",olivedrab4:"rgb(105, 139, 34)",orange:"rgb(255, 165, 0)",orange1:"rgb(255, 165, 0)",orange2:"rgb(238, 154, 0)",orange3:"rgb(205, 133, 0)",orange4:"rgb(139, 90, 0)",orangered:"rgb(255, 69, 0)",orangered1:"rgb(255, 69, 0)",orangered2:"rgb(238, 64, 0)",orangered3:"rgb(205, 55, 0)",orangered4:"rgb(139, 37, 0)",orchid:"rgb(218, 112, 214)",orchid1:"rgb(255, 131, 250)",orchid2:"rgb(238, 122, 233)",orchid3:"rgb(205, 105, 201)",orchid4:"rgb(139, 71, 137)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",palegreen1:"rgb(154, 255, 154)",palegreen2:"rgb(144, 238, 144)",palegreen3:"rgb(124, 205, 124)",palegreen4:"rgb(84, 139, 84)",paleturquoise:"rgb(175, 238, 238)",paleturquoise1:"rgb(187, 255, 255)",paleturquoise2:"rgb(174, 238, 238)",paleturquoise3:"rgb(150, 205, 205)",paleturquoise4:"rgb(102, 139, 139)",palevioletred:"rgb(219, 112, 147)",palevioletred1:"rgb(255, 130, 171)",palevioletred2:"rgb(238, 121, 159)",palevioletred3:"rgb(205, 104, 137)",palevioletred4:"rgb(139, 71, 93)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peachpuff1:"rgb(255, 218, 185)",peachpuff2:"rgb(238, 203, 173)",peachpuff3:"rgb(205, 175, 149)",peachpuff4:"rgb(139, 119, 101)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",pink1:"rgb(255, 181, 197)",pink2:"rgb(238, 169, 184)",pink3:"rgb(205, 145, 158)",pink4:"rgb(139, 99, 108)",plum:"rgb(221, 160, 221)",plum1:"rgb(255, 187, 255)",plum2:"rgb(238, 174, 238)",plum3:"rgb(205, 150, 205)",plum4:"rgb(139, 102, 139)",powderblue:"rgb(176, 224, 230)",purple:"rgb(160, 32, 240)",purple1:"rgb(155, 48, 255)",purple2:"rgb(145, 44, 238)",purple3:"rgb(125, 38, 205)",purple4:"rgb(85, 26, 139)",red:"rgb(255, 0, 0)",red1:"rgb(255, 0, 0)",red2:"rgb(238, 0, 0)",red3:"rgb(205, 0, 0)",red4:"rgb(139, 0, 0)",rosybrown:"rgb(188, 143, 143)",rosybrown1:"rgb(255, 193, 193)",rosybrown2:"rgb(238, 180, 180)",rosybrown3:"rgb(205, 155, 155)",rosybrown4:"rgb(139, 105, 105)",royalblue:"rgb(65, 105, 225)",royalblue1:"rgb(72, 118, 255)",royalblue2:"rgb(67, 110, 238)",royalblue3:"rgb(58, 95, 205)",royalblue4:"rgb(39, 64, 139)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",salmon1:"rgb(255, 140, 105)",salmon2:"rgb(238, 130, 98)",salmon3:"rgb(205, 112, 84)",salmon4:"rgb(139, 76, 57)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seagreen1:"rgb(84, 255, 159)",seagreen2:"rgb(78, 238, 148)",seagreen3:"rgb(67, 205, 128)",seagreen4:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",seashell1:"rgb(255, 245, 238)",seashell2:"rgb(238, 229, 222)",seashell3:"rgb(205, 197, 191)",seashell4:"rgb(139, 134, 130)",sienna:"rgb(160, 82, 45)",sienna1:"rgb(255, 130, 71)",sienna2:"rgb(238, 121, 66)",sienna3:"rgb(205, 104, 57)",sienna4:"rgb(139, 71, 38)",skyblue:"rgb(135, 206, 235)",skyblue1:"rgb(135, 206, 255)",skyblue2:"rgb(126, 192, 238)",skyblue3:"rgb(108, 166, 205)",skyblue4:"rgb(74, 112, 139)",slateblue:"rgb(106, 90, 205)",slateblue1:"rgb(131, 111, 255)",slateblue2:"rgb(122, 103, 238)",slateblue3:"rgb(105, 89, 205)",slateblue4:"rgb(71, 60, 139)",slategray:"rgb(112, 128, 144)",slategray1:"rgb(198, 226, 255)",slategray2:"rgb(185, 211, 238)",slategray3:"rgb(159, 182, 205)",slategray4:"rgb(108, 123, 139)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",snow1:"rgb(255, 250, 250)",snow2:"rgb(238, 233, 233)",snow3:"rgb(205, 201, 201)",snow4:"rgb(139, 137, 137)",springgreen:"rgb(0, 255, 127)",springgreen1:"rgb(0, 255, 127)",springgreen2:"rgb(0, 238, 118)",springgreen3:"rgb(0, 205, 102)",springgreen4:"rgb(0, 139, 69)",steelblue:"rgb(70, 130, 180)",steelblue1:"rgb(99, 184, 255)",steelblue2:"rgb(92, 172, 238)",steelblue3:"rgb(79, 148, 205)",steelblue4:"rgb(54, 100, 139)",tan:"rgb(210, 180, 140)",tan1:"rgb(255, 165, 79)",tan2:"rgb(238, 154, 73)",tan3:"rgb(205, 133, 63)",tan4:"rgb(139, 90, 43)",thistle:"rgb(216, 191, 216)",thistle1:"rgb(255, 225, 255)",thistle2:"rgb(238, 210, 238)",thistle3:"rgb(205, 181, 205)",thistle4:"rgb(139, 123, 139)",tomato:"rgb(255, 99, 71)",tomato1:"rgb(255, 99, 71)",tomato2:"rgb(238, 92, 66)",tomato3:"rgb(205, 79, 57)",tomato4:"rgb(139, 54, 38)",turquoise:"rgb(64, 224, 208)",turquoise1:"rgb(0, 245, 255)",turquoise2:"rgb(0, 229, 238)",turquoise3:"rgb(0, 197, 205)",turquoise4:"rgb(0, 134, 139)",violet:"rgb(238, 130, 238)",violetred:"rgb(208, 32, 144)",violetred1:"rgb(255, 62, 150)",violetred2:"rgb(238, 58, 140)",violetred3:"rgb(205, 50, 120)",violetred4:"rgb(139, 34, 82)",wheat:"rgb(245, 222, 179)",wheat1:"rgb(255, 231, 186)",wheat2:"rgb(238, 216, 174)",wheat3:"rgb(205, 186, 150)",wheat4:"rgb(139, 126, 102)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellow1:"rgb(255, 255, 0)",yellow2:"rgb(238, 238, 0)",yellow3:"rgb(205, 205, 0)",yellow4:"rgb(139, 139, 0)",yellowgreen:"rgb(154, 205, 50)"},i.f={},i.f.createEnum=function(e){return new String(e)},i.f.replaceVars=function(e,t){return e.replace(/%([a-z]*)\(([^\)]+)\)/gi,function(e,r,o){if("undefined"==typeof t[o])throw"Unknown variable: "+o;var n=t[o];if(r in i.f.replaceVars.functions)n=i.f.replaceVars.functions[r](n);else if(r)throw"Unknown escape function: "+r;return n})},i.f.replaceVars.functions={encodeURI:encodeURI,encodeURIComponent:encodeURIComponent,escapeHTML:function(e){var t={"<":"<",">":">","&":"&",'"':""","'":"'"};return e.replace(/[<>&\"\']/g,function(e){return t[e]})}},i.f.parseQuery=function(e){e.startsWith("?")&&(e=e.substr(1));for(var t={},r=e.split("&"),o=0;or?r:e},i.f.zpad=function(e,t){return String(e).padStart(t,"0")},i.f.getWhitespace=function(e){if(e<=0)return"";var t=this.getWhitespace;for(t.whitespace||(t.whitespace=" ");e>t.whitespace.length;)t.whitespace+=t.whitespace;return t.whitespace.substr(0,e)},i.f.alarm=function(e,t){var r=t||5e3,o=i.f.getStack(1);return function(){var t=setTimeout(function(){var n="string"==typeof e?n:e.name;n=n?": "+n:"",console.warn("lib.f.alarm: timeout expired: "+r/1e3+"s"+n),console.log(o),t=null},r),n=function(e){return function(){return t&&(clearTimeout(t),t=null),e.apply(null,arguments)}};return"string"==typeof e?n:n(e)}()},i.f.getStack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=(new Error).stack.split("\n");e+=2;var o=r.length-e;t=void 0===t?o:i.f.clamp(t,0,o);for(var n=new Array,s=e;s0&&void 0!==arguments[0]?arguments[0]:null,t=void 0;return window.browser&&browser.runtime?t=browser.runtime.lastError:window.chrome&&chrome.runtime&&(t=chrome.runtime.lastError),t&&t.message?t.message:e},i.i18n={},i.i18n.browser_=window.browser&&browser.i18n?browser.i18n:window.chrome&&chrome.i18n?chrome.i18n:null,i.i18n.getAcceptLanguages=function(e){i.i18n.browser_?i.i18n.browser_.getAcceptLanguages(e):setTimeout(function(){e([navigator.language.replace(/-/g,"_")])},0)},i.i18n.getMessage=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i.i18n.browser_){var o=i.i18n.browser_.getMessage(e,t);if(o)return o}return i.i18n.replaceReferences(r,t)},i.i18n.replaceReferences=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===t&&(t=[]),t instanceof Array||(t=[t]),e.replace(/\$(\d+)/g,function(e,r){return r<=t.length?t[r-1]:""})},i.MessageManager=function(e){this.languages_=e.map(function(e){return e.replace(/-/g,"_")}),-1==this.languages_.indexOf("en")&&this.languages_.unshift("en"),this.messages={}},i.MessageManager.prototype.addMessages=function(e){for(var t in e){var r=e[t];r.placeholders?this.messages[t]=r.message.replace(/\$([a-z][^\s\$]+)\$/gi,function(r,o){return e[t].placeholders[o.toLowerCase()].content}):this.messages[t]=r.message}},i.MessageManager.prototype.findAndLoadMessages=function(e,t){function r(e){e?n=o.shift():i=o.shift(),o.length?s():t(n,i)}var o=this.languages_.concat(),n=[],i=[],s=function(){this.loadMessages(this.replaceReferences(e,o),r.bind(this,!0),r.bind(this,!1))}.bind(this);s()},i.MessageManager.prototype.loadMessages=function(e,t,r){var o=this,n=new XMLHttpRequest;n.onload=function(){o.addMessages(JSON.parse(n.responseText)),t()},r&&(n.onerror=function(){return r(n)}),n.open("GET",e),n.send()},i.MessageManager.prototype.replaceReferences=i.i18n.replaceReferences,i.MessageManager.prototype.get=function(e,t,r){var o=i.i18n.getMessage(e,t);return o||(o=this.messages[e],o||(console.warn("Unknown message: "+e),o=void 0===r?e:r,this.messages[e]=o),this.replaceReferences(o,t))},i.MessageManager.prototype.processI18nAttributes=function(e){for(var t=e.querySelectorAll("[i18n]"),r=0;r=0&&this.observers.splice(t,1)},i.PreferenceManager.Record.prototype.get=function(){return this.currentValue===this.DEFAULT_VALUE?/^(string|number)$/.test(n(this.defaultValue))?this.defaultValue:"object"==n(this.defaultValue)?JSON.parse(JSON.stringify(this.defaultValue)):this.defaultValue:this.currentValue},i.PreferenceManager.prototype.deactivate=function(){if(!this.isActive_)throw new Error("Not activated");this.isActive_=!1,this.storage.removeObserver(this.storageObserver_)},i.PreferenceManager.prototype.activate=function(){if(this.isActive_)throw new Error("Already activated");this.isActive_=!0,this.storage.addObserver(this.storageObserver_)},i.PreferenceManager.prototype.readStorage=function(e){function t(){0==--o&&e&&e()}var r=this,o=0,n=Object.keys(this.prefRecords_).map(function(e){return r.prefix+e});this.trace&&console.log("Preferences read: "+this.prefix),this.storage.getItems(n,function(r){var n=this.prefix.length;for(var i in r){var s=r[i],a=i.substr(n),l=a in this.childLists_&&JSON.stringify(s)!=JSON.stringify(this.prefRecords_[a].currentValue);this.prefRecords_[a].currentValue=s,l&&(o++,this.syncChildList(a,t))}0==o&&e&&setTimeout(e)}.bind(this))},i.PreferenceManager.prototype.definePreference=function(e,t,r){var o=this.prefRecords_[e];o?this.changeDefault(e,t):o=this.prefRecords_[e]=new i.PreferenceManager.Record(e,t),r&&o.addObserver(r)},i.PreferenceManager.prototype.definePreferences=function(e){for(var t=0;t=0&&s.splice(c,1),!this.childLists_[e][l]){var u=this.childFactories_[e](this,l);if(!u){console.warn("Unable to restore child: "+e+": "+l);continue}u.trace=this.trace,this.childLists_[e][l]=u,o++,u.readStorage(r)}}for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:void 0,o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],n=this.prefRecords_[e];if(!n)throw new Error("Unknown preference: "+e);var i=n.get();this.diff(i,t)&&(this.diff(n.defaultValue,t)?(n.currentValue=t,o&&this.storage.setItem(this.prefix+e,t,r)):(n.currentValue=this.DEFAULT_VALUE,o&&this.storage.removeItem(this.prefix+e,r)),setTimeout(this.notifyChange_.bind(this,e),0))},i.PreferenceManager.prototype.get=function(e){var t=this.prefRecords_[e];if(!t)throw new Error("Unknown preference: "+e);return t.get()},i.PreferenceManager.prototype.exportAsJson=function(){var e={};for(var t in this.prefRecords_)if(t in this.childLists_){e[t]=[];for(var r=this.get(t),o=0;o=0;o--){var n=e[o],i=this.storage_.getItem(n);if("string"==typeof i)try{r[n]=JSON.parse(i)}catch(e){r[n]=i}else e.splice(o,1)}setTimeout(t.bind(null,r),0)},i.Storage.Local.prototype.setItem=function(e,t,r){this.storage_.setItem(e,JSON.stringify(t)),r&&setTimeout(r,0)},i.Storage.Local.prototype.setItems=function(e,t){for(var r in e)this.storage_.setItem(r,JSON.stringify(e[r]));t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItem=function(e,t){this.storage_.removeItem(e),t&&setTimeout(t,0)},i.Storage.Local.prototype.removeItems=function(e,t){for(var r=0;r=0;o--){var n=e[o],i=this.storage_[n];if("string"==typeof i)try{r[n]=JSON.parse(i)}catch(e){r[n]=i}else e.splice(o,1)}setTimeout(t.bind(null,r),0)},i.Storage.Memory.prototype.setItem=function(e,t,r){var o=this.storage_[e];this.storage_[e]=JSON.stringify(t);var n={};n[e]={oldValue:o,newValue:t},setTimeout(function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:console;this.save=!1,this.data="",this.prefix_="",this.prefixStack_=0,this.console_=t,["log","debug","info","warn","error"].forEach(function(t){var r="";switch(t){case"debug":case"warn":case"error":r=t.toUpperCase()+": "}var o=e.console_[t];e[t]=e.console_[t]=function(){for(var t=arguments.length,n=Array(t),i=0;i0&&void 0!==arguments[0]?arguments[0]:"";r(t),e.save&&(e.data+=e.prefix_+t+"\n"),e.prefix_=" ".repeat(++e.prefixStack_)}});var r=this.console_.groupEnd;this.groupEnd=this.console_.groupEnd=function(){r(),e.prefixStack_&&(e.prefix_=" ".repeat(--e.prefixStack_))}},i.TestManager.Suite=function(e){function t(t,r){this.testManager_=t,this.suiteName=e,this.setup(r)}return t.suiteName=e,t.addTest=i.TestManager.Suite.addTest,t.disableTest=i.TestManager.Suite.disableTest,t.getTest=i.TestManager.Suite.getTest,t.getTestList=i.TestManager.Suite.getTestList,t.testList_=[],t.testMap_={},t.prototype=Object.create(i.TestManager.Suite.prototype),t.constructor=i.TestManager.Suite,i.TestManager.Suite.subclasses.push(t),t},i.TestManager.Suite.subclasses=[],i.TestManager.Suite.addTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);this.testMap_[e]=r,this.testList_.push(r)},i.TestManager.Suite.disableTest=function(e,t){if(e in this.testMap_)throw"Duplicate test name: "+e;var r=new i.TestManager.Test(this,e,t);console.log("Disabled test: "+r.fullName)},i.TestManager.Suite.getTest=function(e){return this.testMap_[e]},i.TestManager.Suite.getTestList=function(){return this.testList_},i.TestManager.Suite.prototype.setDefaults=function(e,t){for(var r in t)this[r]=r in e?e[r]:t[r]},i.TestManager.Suite.prototype.setup=function(e){},i.TestManager.Suite.prototype.preamble=function(e,t){},i.TestManager.Suite.prototype.postamble=function(e,t){},i.TestManager.Test=function(e,t,r){this.suiteClass=e,this.testName=t,this.fullName=e.suiteName+"["+t+"]",this.testFunction_=r},i.TestManager.Test.prototype.run=function(e){try{this.testFunction_.apply(e.suite,[e,e.testRun.cx])}catch(t){if(t instanceof i.TestManager.Result.TestComplete)return;e.println("Test raised an exception: "+t),t.stack&&(t.stack instanceof Array?e.println(t.stack.join("\n")):e.println(t.stack)),e.completeTest_(e.FAILED,!1)}},i.TestManager.TestRun=function(e,t){this.testManager=e,this.log=e.log,this.cx=t||{},this.failures=[],this.passes=[],this.startDate=null,this.duration=null,this.currentResult=null,this.maxFailures=0,this.panic=!1,this.testQueue_=[]},i.TestManager.TestRun.prototype.ALL_TESTS=i.f.createEnum(""),i.TestManager.TestRun.prototype.selectTest=function(e){this.testQueue_.push(e)},i.TestManager.TestRun.prototype.selectSuite=function(e,t){for(var r=t||this.ALL_TESTS,o=0,n=e.getTestList(),i=0;i500&&this.log.warn("Slow test took "+this.msToSeconds_(e.duration)),this.log.groupEnd(),e.status==e.FAILED)this.failures.push(e),this.currentSuite=null;else{if(e.status!=e.PASSED)return this.log.error("Unknown result status: "+e.test.fullName+": "+e.status),void(this.panic=!0);this.passes.push(e)}this.runNextTest_()},i.TestManager.TestRun.prototype.onResultReComplete=function(e,t){this.log.error("Late complete for test: "+e.test.fullName+": "+t);var r=this.passes.indexOf(e);r>=0&&(this.passes.splice(r,1),this.failures.push(e))},i.TestManager.TestRun.prototype.runNextTest_=function(){if(this.panic||!this.testQueue_.length)return void this.onTestRunComplete_();if(this.maxFailures&&this.failures.length>=this.maxFailures)return this.log.error("Maximum failure count reached, aborting test run."),void this.onTestRunComplete_();var e=this.testQueue_[0],t=this.currentResult?this.currentResult.suite:null;try{t&&t instanceof e.suiteClass||(t&&this.log.groupEnd(),this.log.group(e.suiteClass.suiteName),t=new e.suiteClass(this.testManager,this.cx))}catch(e){return this.log.error("Exception during setup: "+(e.stack?e.stack:e)),this.panic=!0,void this.onTestRunComplete_()}try{this.log.group(e.testName),this.currentResult=new i.TestManager.Result(this,t,e),this.testManager.testPreamble(this.currentResult,this.cx),t.preamble(this.currentResult,this.cx),this.testQueue_.shift()}catch(e){return this.log.error("Unexpected exception during test preamble: "+(e.stack?e.stack:e)),this.log.groupEnd(),this.panic=!0,void this.onTestRunComplete_()}try{this.currentResult.run()}catch(e){this.log.error("Unexpected exception during test run: "+(e.stack?e.stack:e)),this.panic=!0}},i.TestManager.TestRun.prototype.run=function(){this.log.info("Running "+this.testQueue_.length+" test(s)"),window.onerror=this.onUncaughtException_.bind(this),this.startDate=new Date,this.runNextTest_()},i.TestManager.TestRun.prototype.msToSeconds_=function(e){return(e/1e3).toFixed(2)+"s"},i.TestManager.TestRun.prototype.summarize=function(){if(this.failures.length)for(var e=0;e1?"\n"+r.join("\n"):r.join("\n")}if(e!==t&&!(t instanceof Array&&i.array.compare(e,t))){var n=r?"["+r+"]":"";this.fail("assertEQ"+n+": "+this.getCallerLocation_(1)+": "+o(e)+" !== "+o(t))}},i.TestManager.Result.prototype.assert=function(e,t){if(!0!==e){var r=t?"["+t+"]":"";this.fail("assert"+r+": "+this.getCallerLocation_(1)+": "+String(e))}},i.TestManager.Result.prototype.getCallerLocation_=function(e){try{throw new Error}catch(o){var t=o.stack.split("\n")[e+2],r=t.match(/([^\/]+:\d+):\d+\)?$/);return r?r[1]:"???"}},i.TestManager.Result.prototype.println=function(e){this.testRun.log.info(e)},i.TestManager.Result.prototype.fail=function(e){arguments.length&&this.println(e),this.completeTest_(this.FAILED,!0)},i.TestManager.Result.prototype.pass=function(){this.completeTest_(this.PASSED,!0)},i.UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},i.UTF8Decoder.prototype.decode=function(e){for(var t="",r=0;r1114111?t+="\ufffd":n<65536?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296+(n>>>10&1023),56320+(1023&n)))}}else t+="\ufffd",this.bytesLeft=0,r--}return t},i.decodeUTF8=function(e){return(new i.UTF8Decoder).decode(e)},i.encodeUTF8=function(e){for(var t="",r=0;r>>6),i=1):o<=65535?(t+=String.fromCharCode(224|o>>>12),i=2):(t+=String.fromCharCode(240|o>>>18),i=3);i>0;)i--,t+=String.fromCharCode(128|o>>>6*i&63)}return t},i.wc={},i.wc.nulWidth=0,i.wc.controlWidth=0,i.wc.regardCjkAmbiguous=!1,i.wc.cjkAmbiguousWidth=2,i.wc.combining=[[173,173],[768,879],[1155,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1552,1562],[1564,1564],[1611,1631],[1648,1648],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2045,2045],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,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,3769],[3771,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,43452],[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],[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],[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],[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],[92912,92916],[92976,92982],[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],[125136,125142],[125252,125258],[917505,917505],[917536,917631],[917760,917999]],i.wc.ambiguous=[[161,161],[164,164],[167,168],[170,170],[173,174],[176,180],[182,186],[188,191],[198,198],[208,208],[215,216],[222,225],[230,230],[232,234],[236,237],[240,240],[242,243],[247,250],[252,252],[254,254],[257,257],[273,273],[275,275],[283,283],[294,295],[299,299],[305,307],[312,312],[319,322],[324,324],[328,331],[333,333],[338,339],[358,359],[363,363],[462,462],[464,464],[466,466],[468,468],[470,470],[472,472],[474,474],[476,476],[593,593],[609,609],[708,708],[711,711],[713,715],[717,717],[720,720],[728,731],[733,733],[735,735],[768,879],[913,929],[931,937],[945,961],[963,969],[1025,1025],[1040,1103],[1105,1105],[4352,4447],[8208,8208],[8211,8214],[8216,8217],[8220,8221],[8224,8226],[8228,8231],[8240,8240],[8242,8243],[8245,8245],[8251,8251],[8254,8254],[8308,8308],[8319,8319],[8321,8324],[8364,8364],[8451,8451],[8453,8453],[8457,8457],[8467,8467],[8470,8470],[8481,8482],[8486,8486],[8491,8491],[8531,8532],[8539,8542],[8544,8555],[8560,8569],[8585,8585],[8592,8601],[8632,8633],[8658,8658],[8660,8660],[8679,8679],[8704,8704],[8706,8707],[8711,8712],[8715,8715],[8719,8719],[8721,8721],[8725,8725],[8730,8730],[8733,8736],[8739,8739],[8741,8741],[8743,8748],[8750,8750],[8756,8759],[8764,8765],[8776,8776],[8780,8780],[8786,8786],[8800,8801],[8804,8807],[8810,8811],[8814,8815],[8834,8835],[8838,8839],[8853,8853],[8857,8857],[8869,8869],[8895,8895],[8978,8978],[8986,8987],[9001,9002],[9193,9196],[9200,9200],[9203,9203],[9312,9449],[9451,9547],[9552,9587],[9600,9615],[9618,9621],[9632,9633],[9635,9641],[9650,9651],[9654,9655],[9660,9661],[9664,9665],[9670,9672],[9675,9675],[9678,9681],[9698,9701],[9711,9711],[9725,9726],[9733,9734],[9737,9737],[9742,9743],[9748,9749],[9756,9756],[9758,9758],[9792,9792],[9794,9794],[9800,9811],[9824,9825],[9827,9829],[9831,9834],[9836,9837],[9839,9839],[9855,9855],[9875,9875],[9886,9887],[9889,9889],[9898,9899],[9917,9919],[9924,9953],[9955,9955],[9960,9983],[9989,9989],[9994,9995],[10024,10024],[10045,10045],[10060,10060],[10062,10062],[10067,10069],[10071,10071],[10102,10111],[10133,10135],[10160,10160],[10175,10175],[11035,11036],[11088,11088],[11093,11097],[11904,12255],[12272,12350],[12352,19903],[19968,42191],[43360,43391],[44032,55203],[57344,64255],[65024,65049],[65072,65135],[65281,65376],[65504,65510],[65533,65533],[94176,94177],[94208,101119],[110592,110895],[110960,111359],[126980,126980],[127183,127183],[127232,127242],[127248,127277],[127280,127337],[127344,127404],[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],[128747,128748],[128756,128761],[129296,129342],[129344,129392],[129395,129398],[129402,129402],[129404,129442],[129456,129465],[129472,129474],[129488,129535],[131072,196605],[196608,262141],[917760,917999],[983040,1048573],[1048576,1114109]],i.wc.unambiguous=[[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,12255],[12272,12350],[12352,12871],[12880,19903],[19968,42191],[43360,43391],[44032,55203],[63744,64255],[65040,65049],[65072,65135],[65281,65376],[65504,65510],[94176,94177],[94208,101119],[110592,110895],[110960,111359],[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],[128747,128748],[128756,128761],[129296,129342],[129344,129392],[129395,129398],[129402,129402],[129404,129442],[129456,129465],[129472,129474],[129488,129535],[131072,196605],[196608,262141]],i.wc.binaryTableSearch_=function(e,t){var r,o=0,n=t.length-1;if(et[n][1])return!1;for(;n>=o;)if(r=Math.floor((o+n)/2),e>t[r][1])o=r+1;else{if(!(e=32?1:0==e?i.wc.nulWidth:i.wc.controlWidth:e<160?i.wc.controlWidth:i.wc.isSpace(e)?0:i.wc.binaryTableSearch_(e,i.wc.unambiguous)?2:1},i.wc.charWidthRegardAmbiguous=function(e){return i.wc.isCjkAmbiguous(e)?i.wc.cjkAmbiguousWidth:i.wc.charWidthDisregardAmbiguous(e)},i.wc.strWidth=function(e){for(var t,r=0,o=0;ot)break;s+=a<=65535?1:2}if(void 0!=r){for(o=s,n=0;or)break;o+=l<=65535?1:2}return e.substring(s,o)}return e.substr(s)},i.wc.substring=function(e,t,r){return i.wc.substr(e,t,r-t)},i.resource.add("libdot/changelog/version","text/plain","2018-10-24"),i.resource.add("libdot/changelog/date","text/plain","1.24"),i.resource.add("hterm/audio/bell","audio/ogg;base64","T2dnUwACAAAAAAAAAADhqW5KAAAAAMFvEjYBHgF2b3JiaXMAAAAAAYC7AAAAAAAAAHcBAAAAAAC4AU9nZ1MAAAAAAAAAAAAA4aluSgEAAAAAesI3EC3//////////////////8kDdm9yYmlzHQAAAFhpcGguT3JnIGxpYlZvcmJpcyBJIDIwMDkwNzA5AAAAAAEFdm9yYmlzKUJDVgEACAAAADFMIMWA0JBVAAAQAABgJCkOk2ZJKaWUoSh5mJRISSmllMUwiZiUicUYY4wxxhhjjDHGGGOMIDRkFQAABACAKAmOo+ZJas45ZxgnjnKgOWlOOKcgB4pR4DkJwvUmY26mtKZrbs4pJQgNWQUAAAIAQEghhRRSSCGFFGKIIYYYYoghhxxyyCGnnHIKKqigggoyyCCDTDLppJNOOumoo4466ii00EILLbTSSkwx1VZjrr0GXXxzzjnnnHPOOeecc84JQkNWAQAgAAAEQgYZZBBCCCGFFFKIKaaYcgoyyIDQkFUAACAAgAAAAABHkRRJsRTLsRzN0SRP8ixREzXRM0VTVE1VVVVVdV1XdmXXdnXXdn1ZmIVbuH1ZuIVb2IVd94VhGIZhGIZhGIZh+H3f933f930gNGQVACABAKAjOZbjKaIiGqLiOaIDhIasAgBkAAAEACAJkiIpkqNJpmZqrmmbtmirtm3L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bWTPssAAAAXpee1tVrozYYn41wD1aeYtkKfswN5/SXPO0JDnhO/4laUortv/s412fybe/nONdncoCHnBVliu0CQGBWlPY/5Kwom2L/kruPM6Q7oz4tvDQy+bZ3HzOi+gNHA4DZEgA="),i.resource.add("hterm/images/icon-96","image/png;base64","iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAStklEQVR42u1dBXjrupL+RzIGmjIfvAcu42NmZub3lpmZmZmZmRkuMzPDYaYyJG0Sa9b2p2z1eQtp7bzefpv/nKnkkSw7Gg1IshNsDtpoo4022mijDWp/tlTgzbpJSqYvMoFTC9vjRD5JLb9RYaRkpk22SS28P8pacAaPdZ41KYMCI89YB6wN3JzQJM3UIGqurfTlKQTAZtqENid5SlNdU804VmbbWQtA6HMkAAdADsBeAJ7mxwIhIhFSXJ9iRPw4JYDEcqmGWEp1HhCI8gAtpXF7scB1ZRH9E3HObANCNy1AoGTegNDnCdE41tfQDH2t+CINQEpJ9Xp97oUDh3+nXK48DYAMIWQmANIkNTn6vP69e3d/zctfeu0nXNexmVn3F0gDAMxMlBoHuht0qnsEEekC42SdGHmNxgVjgk4bPN04Yui8bhc534cQBH35RKrPN9sGdLnB1/Wuv+HW4f+6/tZvBHAaAJvmKr0AjJGvyQMw8pLrrvqeT378Ax8UwrKeevoFgEhfjcGGO2JO+iuTt1SW5DHzyraDExyTlWwHjCQ/CAJcecU+XHn5xWDmVCGQFAKljsLbx8Ynvv3Bhx7/EQCzurimU04jADLsvK3r73/7W1//g1/6hU++uVqt0X/dcBcKxRIsy9Ji34DPow2et6FzgcXFKk6fOY83vu4VEFKkDiYHB3roSz73sc+Oj08eOHzk+B9oMyQABGk0gCIyOt9xHPvaD3/wnT/5VV/+meumpmbwD/98A0qdvVEBNhvMDCJaVXtM01GtVlEs+LBtC1ngzW98tX/m7Llv/emf+83HarX6vbrfGECQRgBmlLP9Ix961499+zd/5XVj45P407/8FxQ7uiGlQK1Ww1ZCvR6gXq3AsgQ8zwYzU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UhPMjjd9wGpOOEgIgUzaxFG8RZ4FTgxos9N1atajtd+S1LytA26p8NKbQE7/0+BtpNakNtpoo4022vgf7lRPtKCE39oAAAAASUVORK5CYII="),i.resource.add("hterm/concat/date","text/plain","Mon, 26 Nov 2018 08:50:09 +0000"),i.resource.add("hterm/changelog/version","text/plain","2018-10-24"),i.resource.add("hterm/changelog/date","text/plain","1.82"),i.resource.add("hterm/git/HEAD","text/plain","03ee0980444a38a97ef947b2272e44fdb3bdf5f5"),i.rtdep("lib.Storage");var h={};h.windowType=null,h.os=null,h.zoomWarningMessage="ZOOM != 100%",h.notifyCopyMessage="\u2702",h.desktopNotificationTitle="\u266a %(title) \u266a",h.testDeps=["hterm.AccessibilityReader.Tests","hterm.ScrollPort.Tests","hterm.Screen.Tests","hterm.Terminal.Tests","hterm.VT.Tests","hterm.VT.CannedTests"],i.registerInit("hterm",function(e){function t(t){h.os=t,e()}function r(){i.i18n.getAcceptLanguages(function(e){h.messageManager||(h.messageManager=new i.MessageManager(e)),i.f.getOs().then(t).catch(t)})}function o(e){h.windowType=e.type,r()}function n(e){e&&window.chrome?chrome.windows.get(e.windowId,null,o):(h.windowType="normal",r())}h.defaultStorage||(window.chrome&&chrome.storage&&chrome.storage.sync?h.defaultStorage=new i.Storage.Chrome(chrome.storage.sync):h.defaultStorage=new i.Storage.Local);var s=!1;if(window.chrome&&chrome.runtime&&chrome.runtime.getManifest){var a=chrome.runtime.getManifest();s=a.app&&a.app.background}s?setTimeout(o.bind(null,{type:"popup"}),0):window.chrome&&chrome.tabs?chrome.tabs.getCurrent(n):setTimeout(o.bind(null,{type:"normal"}),0)}),h.getClientSize=function(e){return e.getBoundingClientRect()},h.getClientWidth=function(e){return e.getBoundingClientRect().width},h.getClientHeight=function(e){return e.getBoundingClientRect().height},h.copySelectionToClipboard=function(e){try{e.execCommand("copy")}catch(e){}},h.pasteFromClipboard=function(e){try{return e.execCommand("paste")}catch(e){return!1}},h.msg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2];return h.messageManager.get("HTERM_"+e,t,r)},h.notify=function(e){var t=function(e,t){return void 0!==e?e:t};void 0!==e&&null!==e||(e={});var r={body:e.body,icon:t(e.icon,i.resource.getDataUrl("hterm/images/icon-96"))},o=t(e.title,window.document.title);o||(o="hterm"),o=i.f.replaceVars(h.desktopNotificationTitle,{title:o});var n=new Notification(o,r);return n.onclick=function(){window.focus(),this.close()},n},h.openUrl=function(e){if(window.chrome&&chrome.browser&&chrome.browser.openTab)chrome.browser.openTab({url:e});else{window.open(e,"_blank").focus()}},h.Size=function(e,t){this.width=e,this.height=t},h.Size.prototype.resize=function(e,t){this.width=e,this.height=t},h.Size.prototype.clone=function(){return new h.Size(this.width,this.height)},h.Size.prototype.setTo=function(e){this.width=e.width,this.height=e.height},h.Size.prototype.equals=function(e){return this.width==e.width&&this.height==e.height},h.Size.prototype.toString=function(){return"[hterm.Size: "+this.width+", "+this.height+"]"},h.RowCol=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},h.RowCol.prototype.move=function(e,t,r){this.row=e,this.column=t,this.overflow=!!r},h.RowCol.prototype.clone=function(){return new h.RowCol(this.row,this.column,this.overflow)},h.RowCol.prototype.setTo=function(e){this.row=e.row,this.column=e.column,this.overflow=e.overflow},h.RowCol.prototype.equals=function(e){return this.row==e.row&&this.column==e.column&&this.overflow==e.overflow},h.RowCol.prototype.toString=function(){return"[hterm.RowCol: "+this.row+", "+this.column+", "+this.overflow+"]"},h.AccessibilityReader=function(e){this.document_=e.ownerDocument;var t=this.document_.createElement("div");t.id="hterm:accessibility-live-region",t.style.cssText="position: absolute;\n width: 0; height: 0;\n overflow: hidden;\n left: 0; top: 0;",e.appendChild(t),this.accessibilityEnabled=!1,this.liveElement_=this.document_.createElement("p"),this.liveElement_.setAttribute("aria-live","polite"),this.liveElement_.setAttribute("aria-label",""),t.appendChild(this.liveElement_),this.assertiveLiveElement_=this.document_.createElement("p"),this.assertiveLiveElement_.setAttribute("aria-live","assertive"),this.assertiveLiveElement_.setAttribute("aria-label",""),t.appendChild(this.assertiveLiveElement_),this.queue_=[],this.nextReadTimer_=null,this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},h.AccessibilityReader.DELAY=50,h.AccessibilityReader.prototype.setAccessibilityEnabled=function(e){e||this.clear(),this.accessibilityEnabled=e},h.AccessibilityReader.prototype.decorate=function(e){var t=this;["keydown","keypress","keyup","textInput"].forEach(function(r){e.addEventListener(r,function(){t.hasUserGesture=!0})})},h.AccessibilityReader.prototype.beforeCursorChange=function(e,t,r){this.accessibilityEnabled&&this.hasUserGesture&&!this.cursorIsChanging_&&(this.cursorIsChanging_=!0,this.lastCursorRowString_=e,this.lastCursorRow_=t,this.lastCursorColumn_=r)},h.AccessibilityReader.prototype.afterCursorChange=function(e,t,r){if(this.cursorIsChanging_){if(this.cursorIsChanging_=!1,!this.announceAction_(e,t,r))for(var o=0;o0)return void this.queue_.push("");if(0==this.queue_.length)this.queue_.push(e);else{var t="";0!=this.queue_[this.queue_.length-1].length&&(t=" "),this.queue_[this.queue_.length-1]+=t+e}if(!this.nextReadTimer_){if(1!=this.queue_.length)throw new Error("Expected only one item in queue_ or nextReadTimer_ to be running.");this.nextReadTimer_=setTimeout(this.addToLiveRegion_.bind(this),h.AccessibilityReader.DELAY)}}},h.AccessibilityReader.prototype.assertiveAnnounce=function(e){this.hasUserGesture&&" "==e&&(e=h.msg("SPACE_CHARACTER",[],"Space")),e=e.trim(),e==this.assertiveLiveElement_.getAttribute("aria-label")&&(e="\n"+e),this.clear(),this.assertiveLiveElement_.setAttribute("aria-label",e)},h.AccessibilityReader.prototype.newLine=function(){this.announce("\n")},h.AccessibilityReader.prototype.clear=function(){this.liveElement_.setAttribute("aria-label",""),this.assertiveLiveElement_.setAttribute("aria-label",""),clearTimeout(this.nextReadTimer_),this.nextReadTimer_=null,this.queue_=[],this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},h.AccessibilityReader.prototype.announceAction_=function(e,t,r){if(this.lastCursorRow_!=t)return!1;if(this.lastCursorRowString_==e){if(this.lastCursorColumn_!=r&&""==this.cursorChangeQueue_.join("").trim()){var o=Math.min(this.lastCursorColumn_,r),n=Math.abs(r-this.lastCursorColumn_);return this.assertiveAnnounce(i.wc.substr(this.lastCursorRowString_,o,n)),!0}return!1}if(this.lastCursorRowString_!=e){if(this.lastCursorColumn_+1==r&&" "==i.wc.substr(e,r-1,1)&&this.cursorChangeQueue_.length>0&&" "==this.cursorChangeQueue_[0])return this.assertiveAnnounce(" "),!0;var s=r;if(i.wc.strWidth(e)<=i.wc.strWidth(this.lastCursorRowString_)&&i.wc.substr(this.lastCursorRowString_,0,s)==i.wc.substr(e,0,s)){for(var a=i.wc.strWidth(e);a>0&&(a!=s&&" "==i.wc.substr(e,a-1,1));--a);var l=i.wc.strWidth(this.lastCursorRowString_)-a,c=a-s;if(i.wc.substr(this.lastCursorRowString_,s+l,c)==i.wc.substr(e,s,c)){var u=i.wc.substr(this.lastCursorRowString_,s,l);if(""!=u)return this.assertiveAnnounce(u),!0}}return!1}return!1},h.AccessibilityReader.prototype.addToLiveRegion_=function(){this.nextReadTimer_=null;var e=this.queue_.join("\n").trim();e==this.liveElement_.getAttribute("aria-label")&&(e="\n"+e),this.liveElement_.setAttribute("aria-label",e),this.queue_=[]},h.ContextMenu=function(){this.document_=null,this.element_=null,this.menu_=[]},h.ContextMenu.SEPARATOR={},h.ContextMenu.prototype.setDocument=function(e){this.element_&&(this.element_.remove(),this.element_=null),this.document_=e,this.regenerate_(),this.document_.body.appendChild(this.element_)},h.ContextMenu.prototype.regenerate_=function(){var e=this;for(this.element_?this.hide():(this.element_=this.document_.createElement("menu"),this.element_.id="hterm:context-menu",this.element_.style.cssText="\n display: none;\n border: solid 1px;\n position: absolute;\n ");this.element_.firstChild;)this.element_.removeChild(this.element_.firstChild);this.menu_.forEach(function(t){var r=o(t,2),n=r[0],i=r[1],s=e.document_.createElement("menuitem");n===h.ContextMenu.SEPARATOR?(s.innerHTML="
",s.className="separator"):(s.innerText=n,s.addEventListener("mousedown",function(e){e.preventDefault(),i(e)})),e.element_.appendChild(s)})},h.ContextMenu.prototype.setItems=function(e){this.menu_=e,this.regenerate_()},h.ContextMenu.prototype.show=function(e,t){if(0!=this.menu_.length){t&&(this.element_.style.backgroundColor=t.getBackgroundColor(),this.element_.style.color=t.getForegroundColor(),this.element_.style.fontSize=t.getFontSize(),this.element_.style.fontFamily=t.getFontFamily()),this.element_.style.top=e.clientY+"px",this.element_.style.left=e.clientX+"px";var r=h.getClientSize(this.document_.body);this.element_.style.display="block";var o=h.getClientSize(this.element_),n=Math.max(0,r.height-o.height),i=Math.max(0,r.width-o.width);n=32&&(t=e.charCode);t&&this.terminal.onVTKeystroke(String.fromCharCode(t)),e.preventDefault(),e.stopPropagation()}},h.Keyboard.prototype.preventChromeAppNonCtrlShiftDefault_=function(e){window.chrome&&window.chrome.app&&window.chrome.app.window&&(e.ctrlKey&&e.shiftKey||e.preventDefault())},h.Keyboard.prototype.onFocusOut_=function(e){this.altKeyPressed=0},h.Keyboard.prototype.onKeyUp_=function(e){18==e.keyCode&&(this.altKeyPressed=this.altKeyPressed&~(1<=64&&w<=95&&(p=String.fromCharCode(w-64))}if(u&&"8-bit"==this.altSendsWhat&&1==p.length){var w=p.charCodeAt(0)+128;p=String.fromCharCode(w)}(u&&"escape"==this.altSendsWhat||d&&this.metaSendsEscape)&&(p="\x1b"+p)}this.terminal.onVTKeystroke(p)}},h.Keyboard.Bindings=function(){this.bindings_={}},h.Keyboard.Bindings.prototype.clear=function(){this.bindings_={}},h.Keyboard.Bindings.prototype.addBinding_=function(e,t){var r=null,o=this.bindings_[e.keyCode];if(o)for(var n=0;n",g,n(b,m),g,g],[191,"/?",g,o(s("_"),s("?")),g,g],[17,"[CTRL]",m,m,m,m],[18,"[ALT]",m,m,m,m],[91,"[LAPL]",m,m,m,m],[32," ",g,s("@"),g,g],[92,"[RAPL]",m,m,m,m],[93,"[RMENU]",m,m,m,m],[42,"[PRTSCR]",m,m,m,m],[145,"[SCRLK]",m,m,m,m],[19,"[BREAK]",m,m,m,m],[45,"[INSERT]",a("onKeyInsert_"),g,g,g],[36,"[HOME]",a("onKeyHome_"),g,g,g],[33,"[PGUP]",a("onKeyPageUp_"),g,g,g],[46,"[DEL]",a("onKeyDel_"),g,g,g],[35,"[END]",a("onKeyEnd_"),g,g,g],[34,"[PGDOWN]",a("onKeyPageDown_"),g,g,g],[38,"[UP]",a("onKeyArrowUp_"),g,g,g],[40,"[DOWN]",a("onKeyArrowDown_"),g,g,g],[39,"[RIGHT]",t("\x1b[C","\x1bOC"),g,g,g],[37,"[LEFT]",t("\x1b[D","\x1bOD"),g,g,g],[144,"[NUMLOCK]",m,m,m,m],[12,"[CLEAR]",m,m,m,m],[96,"[KP0]",g,g,g,g],[97,"[KP1]",g,g,g,g],[98,"[KP2]",g,g,g,g],[99,"[KP3]",g,g,g,g],[100,"[KP4]",g,g,g,g],[101,"[KP5]",g,g,g,g],[102,"[KP6]",g,g,g,g],[103,"[KP7]",g,g,g,g],[104,"[KP8]",g,g,g,g],[105,"[KP9]",g,g,g,g],[107,"[KP+]",g,a("onPlusMinusZero_"),g,a("onPlusMinusZero_")],[109,"[KP-]",g,a("onPlusMinusZero_"),g,a("onPlusMinusZero_")],[106,"[KP*]",g,g,g,g],[111,"[KP/]",g,g,g,g],[110,"[KP.]",g,g,g,g]),"cros"==h.os&&this.addKeyDefs([166,"[BACK]",l(i("\x1bOP","\x1b[P")),g,"\x1b[23~",g],[167,"[FWD]",l(i("\x1bOQ","\x1b[Q")),g,"\x1b[24~",g],[168,"[RELOAD]",l(i("\x1bOR","\x1b[R")),g,"\x1b[25~",g],[183,"[FSCR]",l(i("\x1bOS","\x1b[S")),g,"\x1b[26~",g],[182,"[WINS]",l("\x1b[15~"),g,"\x1b[28~",g],[216,"[BRIT-]",l("\x1b[17~"),g,"\x1b[29~",g],[217,"[BRIT+]",l("\x1b[18~"),g,"\x1b[31~",g],[173,"[MUTE]",l("\x1b[19~"),g,"\x1b[32~",g],[174,"[VOL-]",l("\x1b[20~"),g,"\x1b[33~",g],[175,"[VOL+]",l("\x1b[21~"),g,"\x1b[34~",g],[152,"[POWER]",g,g,g,g],[179,"[PLAY]",l("\x1b[18~"),g,"\x1b[31~",g],[154,"[DOGS]",l("\x1b[23~"),g,"\x1b[42~",g],[153,"[ASSIST]",g,g,g,g])},h.Keyboard.KeyMap.prototype.onKeyInsert_=function(e){return this.keyboard.shiftInsertPaste&&e.shiftKey?h.Keyboard.KeyActions.PASS:"\x1b[2~"},h.Keyboard.KeyMap.prototype.onKeyHome_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"\x1b[H":"\x1bOH":(this.keyboard.terminal.scrollHome(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyEnd_=function(e){return!this.keyboard.homeKeysScroll^e.shiftKey?e.altKey||e.ctrlKey||e.shiftKey||!this.keyboard.applicationCursor?"\x1b[F":"\x1bOF":(this.keyboard.terminal.scrollEnd(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyPageUp_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"\x1b[5~":(this.keyboard.terminal.scrollPageUp(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyDel_=function(e){return this.keyboard.altBackspaceIsMetaBackspace&&this.keyboard.altKeyPressed&&!e.altKey?"\x1b\x7f":"\x1b[3~"},h.Keyboard.KeyMap.prototype.onKeyPageDown_=function(e){return!this.keyboard.pageKeysScroll^e.shiftKey?"\x1b[6~":(this.keyboard.terminal.scrollPageDown(),h.Keyboard.KeyActions.CANCEL)},h.Keyboard.KeyMap.prototype.onKeyArrowUp_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineUp(),h.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"\x1b[A":"\x1bOA"},h.Keyboard.KeyMap.prototype.onKeyArrowDown_=function(e){return!this.keyboard.applicationCursor&&e.shiftKey?(this.keyboard.terminal.scrollLineDown(),h.Keyboard.KeyActions.CANCEL):e.shiftKey||e.ctrlKey||e.altKey||e.metaKey||!this.keyboard.applicationCursor?"\x1b[B":"\x1bOB"},h.Keyboard.KeyMap.prototype.onClear_=function(e,t){return this.keyboard.terminal.wipeContents(),h.Keyboard.KeyActions.CANCEL},h.Keyboard.KeyMap.prototype.onF11_=function(e,t){return"popup"!=h.windowType?h.Keyboard.KeyActions.PASS:"\x1b[23~"},h.Keyboard.KeyMap.prototype.onCtrlNum_=function(e,t){function r(e){return String.fromCharCode(e.charCodeAt(0)-64)}if(this.keyboard.terminal.passCtrlNumber&&!e.shiftKey)return h.Keyboard.KeyActions.PASS;switch(t.keyCap.substr(0,1)){case"1":return"1";case"2":return r("@");case"3":return r("[");case"4":return r("\\");case"5":return r("]");case"6":return r("^");case"7":return r("_");case"8":return"\x7f";case"9":return"9"}},h.Keyboard.KeyMap.prototype.onAltNum_=function(e,t){return this.keyboard.terminal.passAltNumber&&!e.shiftKey?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onMetaNum_=function(e,t){return this.keyboard.terminal.passMetaNumber&&!e.shiftKey?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onCtrlC_=function(e,t){var r=this.keyboard.terminal.getDocument().getSelection();if(!r.isCollapsed){if(this.keyboard.ctrlCCopy&&!e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),h.Keyboard.KeyActions.PASS;if(!this.keyboard.ctrlCCopy&&e.shiftKey)return this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(r.collapseToEnd.bind(r),50),this.keyboard.terminal.copySelectionToClipboard(),h.Keyboard.KeyActions.CANCEL}return"\x03"},h.Keyboard.KeyMap.prototype.onCtrlN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.innerWidth+",height="+window.innerHeight),h.Keyboard.KeyActions.CANCEL):"\x0e"},h.Keyboard.KeyMap.prototype.onCtrlV_=function(e,t){return!e.shiftKey&&this.keyboard.ctrlVPaste||e.shiftKey&&!this.keyboard.ctrlVPaste?this.keyboard.terminal.paste()?h.Keyboard.KeyActions.CANCEL:h.Keyboard.KeyActions.PASS:"\x16"},h.Keyboard.KeyMap.prototype.onMetaN_=function(e,t){return e.shiftKey?(window.open(document.location.href,"","chrome=no,close=yes,resize=yes,scrollbars=yes,minimizable=yes,width="+window.outerWidth+",height="+window.outerHeight),h.Keyboard.KeyActions.CANCEL):h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onMetaC_=function(e,t){var r=this.keyboard.terminal.getDocument();return e.shiftKey||r.getSelection().isCollapsed?t.keyCap.substr(e.shiftKey?1:0,1):(this.keyboard.terminal.clearSelectionAfterCopy&&setTimeout(function(){r.getSelection().collapseToEnd()},50),h.Keyboard.KeyActions.PASS)},h.Keyboard.KeyMap.prototype.onMetaV_=function(e,t){return e.shiftKey?h.Keyboard.KeyActions.PASS:this.keyboard.passMetaV?h.Keyboard.KeyActions.PASS:h.Keyboard.KeyActions.DEFAULT},h.Keyboard.KeyMap.prototype.onPlusMinusZero_=function(e,t){if(!(this.keyboard.ctrlPlusMinusZeroZoom^e.shiftKey))return"-_"==t.keyCap?"\x1f":h.Keyboard.KeyActions.CANCEL;if(1!=this.keyboard.terminal.getZoomFactor())return h.Keyboard.KeyActions.PASS;var r=t.keyCap.substr(0,1);if("0"==r)this.keyboard.terminal.setFontSize(0);else{var o=this.keyboard.terminal.getFontSize();"-"==r||"[KP-]"==t.keyCap?o-=1:o+=1,this.keyboard.terminal.setFontSize(o)}return h.Keyboard.KeyActions.CANCEL},h.Keyboard.KeyPattern=function(e){this.wildcardCount=0,this.keyCode=e.keyCode,h.Keyboard.KeyPattern.modifiers.forEach(function(t){this[t]=e[t]||!1,"*"==this[t]&&this.wildcardCount++}.bind(this))},h.Keyboard.KeyPattern.modifiers=["shift","ctrl","alt","meta"],h.Keyboard.KeyPattern.sortCompare=function(e,t){return e.wildcardCountt.wildcardCount?1:0},h.Keyboard.KeyPattern.prototype.match_=function(e,t){if(this.keyCode!=e.keyCode)return!1;var r=!0;return h.Keyboard.KeyPattern.modifiers.forEach(function(o){var n=o in e&&e[o];r&&(t||"*"!=this[o])&&this[o]!=n&&(r=!1)}.bind(this)),r},h.Keyboard.KeyPattern.prototype.matchKeyDown=function(e){return this.match_(e,!1)},h.Keyboard.KeyPattern.prototype.matchKeyPattern=function(e){return this.match_(e,!0)},h.Options=function(e){this.wraparound=!e||e.wraparound,this.reverseWraparound=!!e&&e.reverseWraparound,this.originMode=!!e&&e.originMode,this.autoCarriageReturn=!!e&&e.autoCarriageReturn,this.cursorVisible=!!e&&e.cursorVisible,this.cursorBlink=!!e&&e.cursorBlink,this.insertMode=!!e&&e.insertMode,this.reverseVideo=!!e&&e.reverseVideo,this.bracketedPaste=!!e&&e.bracketedPaste},i.rtdep("hterm.Keyboard.KeyActions"),h.Parser=function(){this.source="",this.pos=0,this.ch=null},h.Parser.prototype.error=function(e){return new Error("Parse error at "+this.pos+": "+e)},h.Parser.prototype.isComplete=function(){return this.pos==this.source.length},h.Parser.prototype.reset=function(e,t){this.source=e,this.pos=t||0,this.ch=e.substr(0,1)},h.Parser.prototype.parseKeySequence=function(){var e={keyCode:null};for(var t in h.Parser.identifiers.modifierKeys)e[h.Parser.identifiers.modifierKeys[t]]=!1;for(;this.pos 'none', else => 'right-alt'\n'none': Disable any AltGr related munging.\n'ctrl-alt': Assume Ctrl+Alt means AltGr.\n'left-alt': Assume left Alt means AltGr.\n'right-alt': Assume right Alt means AltGr."),"alt-backspace-is-meta-backspace":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If set, undoes the Chrome OS Alt-Backspace->DEL remap, so that Alt-Backspace indeed is Alt-Backspace."),"alt-is-meta":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Whether the Alt key acts as a Meta key or as a distinct Alt key."),"alt-sends-what":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,"escape",["escape","8-bit","browser-key"],"Controls how the Alt key is handled.\n\n escape: Send an ESC prefix.\n 8-bit: Add 128 to the typed character as in xterm.\n browser-key: Wait for the keypress event and see what the browser\n says. (This won't work well on platforms where the browser\n performs a default action for some Alt sequences.)"),"audible-bell-sound":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Sounds,"lib-resource:hterm/audio/bell","url","URL of the terminal bell sound. Empty string for no audible bell."),"desktop-notification-bell":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Sounds,!1,"bool",'If true, terminal bells in the background will create a Web Notification. https://www.w3.org/TR/notifications/\n\nDisplaying notifications requires permission from the user. When this option is set to true, hterm will attempt to ask the user for permission if necessary. Browsers may not show this permission request if it was not triggered by a user action.\n\nChrome extensions with the "notifications" permission have permission to display notifications.'),"background-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgb(16, 16, 16)","color","The background color for text with no other color attributes."),"background-image":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image. Empty string for no image.\n\nFor example:\n url(https://goo.gl/anedTK)\n linear-gradient(top bottom, blue, red)"),"background-size":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image size."),"background-position":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","string","CSS value of the background image position.\n\nFor example:\n 10% 10%\n center"),"backspace-sends-backspace":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, the backspace should send BS ('\\x08', aka ^H). Otherwise the backspace key should send '\\x7f'."),"character-map-overrides":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"value",'This is specified as an object. It is a sparse array, where each property is the character set code and the value is an object that is a sparse array itself. In that sparse array, each property is the received character and the value is the displayed character.\n\nFor example:\n {"0":{"+":"\\u2192",",":"\\u2190","-":"\\u2191",".":"\\u2193", "0":"\\u2588"}}'),"close-on-exit":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!0,"bool","Whether to close the window when the command finishes executing."),"cursor-blink":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!1,"bool","Whether the text cursor blinks by default. This can be toggled at runtime via terminal escape sequences."),"cursor-blink-cycle":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,[1e3,500],"value","The text cursor blink rate in milliseconds.\n\nA two element array, the first of which is how long the text cursor should be on, second is how long it should be off."),"cursor-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgba(255, 0, 0, 0.5)","color","The color of the visible text cursor."),"color-palette-overrides":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"value",'Override colors in the default palette.\n\nThis can be specified as an array or an object. If specified as an object it is assumed to be a sparse array, where each property is a numeric index into the color palette.\n\nValues can be specified as almost any CSS color value. This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the standard X11 rgb.txt file.\n\nYou can use \'null\' to specify that the default value should be not be changed. This is useful for skipping a small number of indices when the value is specified as an array.\n\nFor example, these both set color index 1 to blue:\n {1: "#0000ff"}\n [null, "#0000ff"]'),"copy-on-select":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Automatically copy mouse selection to the clipboard."),"use-default-window-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!1,"bool","Whether to use the default browser/OS's copy behavior.\n\nAllow the browser/OS to handle the copy event directly which might improve compatibility with some systems (where copying doesn't work at all), but makes the text selection less robust.\n\nFor example, long lines that were automatically line wrapped will be copied with the newlines still in them."),"clear-selection-after-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Whether to clear the selection after copying."),"ctrl-plus-minus-zero-zoom":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","If true, Ctrl-Plus/Minus/Zero controls zoom.\nIf false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing."),"ctrl-c-copy":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl-C copies if true, send ^C to host if false.\nCtrl-Shift-C sends ^C to host if true, copies if false."),"ctrl-v-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Ctrl-V pastes if true, send ^V to host if false.\nCtrl-Shift-V sends ^V to host if true, pastes if false."),"east-asian-ambiguous-as-two-column":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","Whether East Asian Ambiguous characters have two column width."),"enable-8-bit-control":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","True to enable 8-bit control characters, false to ignore them.\n\nWe'll respect the two-byte versions of these control characters regardless of this setting."),"enable-bold":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,null,"tristate","If true, use bold weight font for text with the bold/bright attribute. False to use the normal weight font. Null to autodetect."),"enable-bold-as-bright":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!0,"bool","If true, use bright colors (8-15 on a 16 color palette) for any text with the bold attribute. False otherwise."),"enable-blink":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,!0,"bool","If true, respect the blink attribute. False to ignore it."),"enable-clipboard-notice":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Whether to show a message in the terminal when the host writes to the clipboard."),"enable-clipboard-write":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","Allow the remote host to write directly to the local system clipboard.\nRead access is never granted regardless of this setting.\n\nThis is used to control access to features like OSC-52."),"enable-dec12":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!1,"bool","Respect the host's attempt to change the text cursor blink status using DEC Private Mode 12."),"enable-csi-j-3":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,!0,"bool","Whether CSI-J (Erase Display) mode 3 may clear the terminal scrollback buffer.\n\nEnabling this by default is safe."),environment:h.PreferenceManager.definePref_(h.PreferenceManager.categories.Miscellaneous,{NCURSES_NO_UTF8_ACS:"1",TERM:"xterm-256color",COLORTERM:"truecolor"},"value","The initial set of environment variables, as an object."),"font-family":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,'"DejaVu Sans Mono", "Noto Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace',"string","Default font family for the terminal text."),"font-size":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,15,"int","The default font size in pixels."),"font-smoothing":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"antialiased","string","CSS font-smoothing property."),"foreground-color":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"rgb(240, 240, 240)","color","The foreground color for text with no other color attributes."),"hide-mouse-while-typing":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether to automatically hide the mouse cursor when typing. By default, autodetect whether the platform/OS handles this.\n\nNote: Some operating systems may override this setting and thus you might not be able to always disable it."),"home-keys-scroll":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, Home/End controls the terminal scrollbar and Shift-Home/Shift-End are sent to the remote host. If false, then Home/End are sent to the remote host and Shift-Home/Shift-End scrolls."),keybindings:h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"value",'A map of key sequence to key actions. Key sequences include zero or more modifier keys followed by a key code. Key codes can be decimal or hexadecimal numbers, or a key identifier. Key actions can be specified as a string to send to the host, or an action identifier. For a full explanation of the format, see https://goo.gl/LWRndr.\n\nSample keybindings:\n{\n "Ctrl-Alt-K": "clearTerminal",\n "Ctrl-Shift-L": "PASS",\n "Ctrl-H": "\'Hello World\'"\n}'),"media-keys-are-fkeys":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, convert media keys to their Fkey equivalent. If false, let the browser handle the keys."),"meta-sends-escape":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Send an ESC prefix when pressing a key while holding the Meta key.\n\nFor example, when enabled, pressing Meta-K will send ^[k as if you typed Escape then k. When disabled, only k will be sent."),"mouse-right-click-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool",'Paste on right mouse button clicks.\n\nThis option is independent of the "mouse-paste-button" setting.\n\nNote: This will handle left & right handed mice correctly.'),"mouse-paste-button":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,null,[null,0,1,2,3,4,5,6],"Mouse paste button, or null to autodetect.\n\nFor autodetect, we'll use the middle mouse button for non-X11 platforms (including Chrome OS). On X11, we'll use the right mouse button (since the native window manager should paste via the middle mouse button).\n\n0 == left (primary) button.\n1 == middle (auxiliary) button.\n2 == right (secondary) button.\n\nThis option is independent of the setting for right-click paste.\n\nNote: This will handle left & right handed mice correctly."),"word-break-match-left":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:`]","string",'Regular expression to halt matching to the left (start) of a selection.\n\nNormally this is a character class to reject specific characters.\nWe allow "~" and "." by default as paths frequently start with those.'),"word-break-match-right":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:~.`]","string","Regular expression to halt matching to the right (end) of a selection.\n\nNormally this is a character class to reject specific characters."),"word-break-match-middle":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,"[^\\s\\[\\](){}<>\"'\\^]*","string","Regular expression to match all the characters in the middle.\n\nNormally this is a character class to reject specific characters.\n\nUsed to expand the selection surrounding the starting point."),"page-keys-scroll":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!1,"bool","If true, Page Up/Page Down controls the terminal scrollbar and Shift-Page Up/Shift-Page Down are sent to the remote host. If false, then Page Up/Page Down are sent to the remote host and Shift-Page Up/Shift-Page Down scrolls."),"pass-alt-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Alt-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Alt-1..9 will be handled by the browser. If false, Alt-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-ctrl-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Ctrl-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Ctrl-1..9 will be handled by the browser. If false, Ctrl-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-meta-number":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,null,"tristate","Whether Meta-1..9 is passed to the browser.\n\nThis is handy when running hterm in a browser tab, so that you don't lose Chrome's \"switch to tab\" keyboard accelerators. When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.\n\nIf true, Meta-1..9 will be handled by the browser. If false, Meta-1..9 will be sent to the host. If null, autodetect based on browser platform and window type."),"pass-meta-v":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Whether Meta-V gets passed to host."),"paste-on-drop":h.PreferenceManager.definePref_(h.PreferenceManager.categories.CopyPaste,!0,"bool","If true, Drag and dropped text will paste into terminal.\nIf false, dropped text will be ignored."),"receive-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the expected encoding for data received from the host.\nIf the encodings do not match, visual bugs are likely to be observed.\n\nValid values are 'utf-8' and 'raw'."),"scroll-on-keystroke":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!0,"bool","Whether to scroll to the bottom on any keystroke."),"scroll-on-output":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!1,"bool","Whether to scroll to the bottom on terminal output."),"scrollbar-visible":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!0,"bool","The vertical scrollbar mode."),"scroll-wheel-may-send-arrow-keys":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,!1,"bool","When using the alternative screen buffer, and DECCKM (Application Cursor Keys) is active, mouse wheel scroll events will emulate arrow keys.\n\nIt can be temporarily disabled by holding the Shift key.\n\nThis frequently comes up when using pagers (less) or reading man pages or text editors (vi/nano) or using screen/tmux."),"scroll-wheel-move-multiplier":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Scrolling,1,"int","The multiplier for scroll wheel events when measured in pixels.\n\nAlters how fast the page scrolls."),"send-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["utf-8","raw"],"Set the encoding for data sent to host."),"terminal-encoding":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Encoding,"utf-8",["iso-2022","utf-8","utf-8-locked"],"The default terminal encoding (DOCS).\n\nISO-2022 enables character map translations (like graphics maps).\nUTF-8 disables support for those.\n\nThe locked variant means the encoding cannot be changed at runtime via terminal escape sequences.\n\nYou should stick with UTF-8 unless you notice broken rendering with legacy applications."),"shift-insert-paste":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Keyboard,!0,"bool","Whether Shift-Insert is used for pasting or is sent to the remote host."),"user-css":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","url","URL of user stylesheet to include in the terminal document."),"user-css-text":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Appearance,"","multiline-string","Custom CSS text for styling the terminal."),"allow-images-inline":h.PreferenceManager.definePref_(h.PreferenceManager.categories.Extensions,null,"tristate","Whether to allow the remote host to display images in the terminal.\n\nBy default, we prompt until a choice is made.")},h.PreferenceManager.prototype=Object.create(i.PreferenceManager.prototype),h.PreferenceManager.constructor=h.PreferenceManager,h.PubSub=function(){this.observers_={}},h.PubSub.addBehavior=function(e){var t=new h.PubSub;for(var r in h.PubSub.prototype)e[r]=h.PubSub.prototype[r].bind(t)},h.PubSub.prototype.subscribe=function(e,t){e in this.observers_||(this.observers_[e]=[]),this.observers_[e].push(t)},h.PubSub.prototype.unsubscribe=function(e,t){var r=this.observers_[e];if(!r)throw"Invalid subject: "+e;var o=r.indexOf(t);if(o<0)throw"Not subscribed: "+e;r.splice(o,1)},h.PubSub.prototype.publish=function(e,t,r){function o(e){e=e&&this.setCursorPosition(this.cursorPosition.row,e-1)},h.Screen.prototype.shiftRow=function(){return this.shiftRows(1)[0]},h.Screen.prototype.shiftRows=function(e){return this.rowsArray.splice(0,e)},h.Screen.prototype.unshiftRow=function(e){this.rowsArray.splice(0,0,e)},h.Screen.prototype.unshiftRows=function(e){this.rowsArray.unshift.apply(this.rowsArray,e)},h.Screen.prototype.popRow=function(){return this.popRows(1)[0]},h.Screen.prototype.popRows=function(e){return this.rowsArray.splice(this.rowsArray.length-e,e)},h.Screen.prototype.pushRow=function(e){this.rowsArray.push(e)},h.Screen.prototype.pushRows=function(e){e.push.apply(this.rowsArray,e)},h.Screen.prototype.insertRow=function(e,t){this.rowsArray.splice(e,0,t)},h.Screen.prototype.insertRows=function(e,t){for(var r=0;r=this.rowsArray.length?(console.error("Row out of bounds: "+e),e=this.rowsArray.length-1):e<0&&(console.error("Row out of bounds: "+e),e=0),t>=this.columnCount_?(console.error("Column out of bounds: "+t),t=this.columnCount_-1):t<0&&(console.error("Column out of bounds: "+t),t=0),this.cursorPosition.overflow=!1;var r=this.rowsArray[e],o=r.firstChild;o||(o=r.ownerDocument.createTextNode(""),r.appendChild(o));var n=0;for(r==this.cursorRowNode_?t>=this.cursorPosition.column-this.cursorOffset_&&(o=this.cursorNode_,n=this.cursorPosition.column-this.cursorOffset_):this.cursorRowNode_=r,this.cursorPosition.move(e,t);o;){var i=t-n,s=h.TextAttributes.nodeWidth(o);if(!o.nextSibling||s>i)return this.cursorNode_=o,void(this.cursorOffset_=i);n+=s,o=o.nextSibling}},h.Screen.prototype.syncSelectionCaret=function(e){try{e.collapse(this.cursorNode_,this.cursorOffset_)}catch(e){}},h.Screen.prototype.splitNode_=function(e,t){var r=e.cloneNode(!1),o=e.textContent;e.textContent=h.TextAttributes.nodeSubstr(e,0,t),r.textContent=i.wc.substr(o,t),r.textContent&&e.parentNode.insertBefore(r,e.nextSibling),e.textContent||e.parentNode.removeChild(e)},h.Screen.prototype.maybeClipCurrentRow=function(){var e=h.TextAttributes.nodeWidth(this.cursorRowNode_);if(e<=this.columnCount_)return void(this.cursorPosition.column>=this.columnCount_&&(this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),this.cursorPosition.overflow=!0));var t=this.cursorPosition.column;this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),e=h.TextAttributes.nodeWidth(this.cursorNode_),this.cursorOffset_1&&void 0!==arguments[1]?arguments[1]:void 0,r=this.cursorNode_,o=r.textContent;this.cursorRowNode_.removeAttribute("line-overflow"),void 0===t&&(t=i.wc.strWidth(e)),this.cursorPosition.column+=t;var n=this.cursorOffset_,s=h.TextAttributes.nodeWidth(r)-n;if(s<0){var a=i.f.getWhitespace(-s);if(this.textAttributes.underline||this.textAttributes.strikethrough||this.textAttributes.background||this.textAttributes.wcNode||!this.textAttributes.asciiNode||null!=this.textAttributes.tileData)if(r.nodeType!=Node.TEXT_NODE&&(r.wcNode||!r.asciiNode||r.tileNode||r.style.textDecoration||r.style.textDecorationStyle||r.style.textDecorationLine||r.style.backgroundColor)){var l=r.ownerDocument.createTextNode(a);this.cursorRowNode_.insertBefore(l,r.nextSibling),this.cursorNode_=r=l,this.cursorOffset_=n=-s,o=a}else r.textContent=o+=a;else e=a+e;s=0}if(this.textAttributes.matchesContainer(r))return r.textContent=0==s?o+e:0==n?e+o:h.TextAttributes.nodeSubstr(r,0,n)+e+h.TextAttributes.nodeSubstr(r,n),void(this.cursorOffset_+=t);if(0==n){var c=r.previousSibling;if(c&&this.textAttributes.matchesContainer(c))return c.textContent+=e,this.cursorNode_=c,void(this.cursorOffset_=i.wc.strWidth(c.textContent));var u=this.textAttributes.createContainer(e);return this.cursorRowNode_.insertBefore(u,r),this.cursorNode_=u,void(this.cursorOffset_=t)}if(0==s){var d=r.nextSibling;if(d&&this.textAttributes.matchesContainer(d))return d.textContent=e+d.textContent,this.cursorNode_=d,void(this.cursorOffset_=i.wc.strWidth(e));var u=this.textAttributes.createContainer(e);return this.cursorRowNode_.insertBefore(u,d),this.cursorNode_=u,void(this.cursorOffset_=h.TextAttributes.nodeWidth(u))}this.splitNode_(r,n);var u=this.textAttributes.createContainer(e);this.cursorRowNode_.insertBefore(u,r.nextSibling),this.cursorNode_=u,this.cursorOffset_=t},h.Screen.prototype.overwriteString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this.columnCount_-this.cursorPosition.column;return r?(void 0===t&&(t=i.wc.strWidth(e)),this.textAttributes.matchesContainer(this.cursorNode_)&&this.cursorNode_.textContent.substr(this.cursorOffset_)==e?(this.cursorOffset_+=t,void(this.cursorPosition.column+=t)):(this.deleteChars(Math.min(t,r)),void this.insertString(e,t))):[e]},h.Screen.prototype.deleteChars=function(e){var t=this.cursorNode_,r=this.cursorOffset_,o=this.cursorPosition.column;if(!(e=Math.min(e,this.columnCount_-o)))return 0;for(var n,i,s=e;t&&e;){if(e<0){console.error("Deleting "+s+" chars went negative: "+e);break}if(n=h.TextAttributes.nodeWidth(t),t.textContent=h.TextAttributes.nodeSubstr(t,0,r)+h.TextAttributes.nodeSubstr(t,r+e),i=h.TextAttributes.nodeWidth(t),t.wcNode&&rh.TextAttributes.nodeWidth(e);){if(!e.hasAttribute("line-overflow")||!e.nextSibling)return-1;t-=h.TextAttributes.nodeWidth(e),e=e.nextSibling}return this.getNodeAndOffsetWithinRow_(e,t)},h.Screen.prototype.getNodeAndOffsetWithinRow_=function(e,t){for(var r=0;rl)){var p=i.wc.substring(u,l,i.wc.strWidth(u)),g=new RegExp("^"+o+r),m=p.match(g);if(m){var b=l+i.wc.strWidth(m[0]);-1==b||b\"'\\^!@#$%&*,;:`]","[^\\s\\[\\](){}<>\"'\\^!@#$%&*,;:~.`]","[^\\s\\[\\](){}<>\"'\\^]*")},h.Screen.prototype.saveCursorAndState=function(e){this.cursorState_.save(e)},h.Screen.prototype.restoreCursorAndState=function(e){this.cursorState_.restore(e)},h.Screen.CursorState=function(e){this.screen_=e,this.cursor=null,this.textAttributes=null,this.GL=this.GR=this.G0=this.G1=this.G2=this.G3=null},h.Screen.CursorState.prototype.save=function(e){this.cursor=e.terminal.saveCursor(),this.textAttributes=this.screen_.textAttributes.clone(),this.GL=e.GL,this.GR=e.GR,this.G0=e.G0,this.G1=e.G1,this.G2=e.G2,this.G3=e.G3},h.Screen.CursorState.prototype.restore=function(e){e.terminal.restoreCursor(this.cursor);var t=this.textAttributes.clone();t.colorPalette=this.screen_.textAttributes.colorPalette,t.syncColors(),this.screen_.textAttributes=t,e.GL=this.GL,e.GR=this.GR,e.G0=this.G0,e.G1=this.G1,e.G2=this.G2,e.G3=this.G3},i.rtdep("lib.f","hterm.PubSub","hterm.Size"),h.ScrollPort=function(e){h.PubSub.addBehavior(this),this.rowProvider_=e,this.characterSize=new h.Size(10,10),this.ruler_=null,this.selection=new h.ScrollPort.Selection(this),this.currentRowNodeCache_=null,this.previousRowNodeCache_={},this.lastScreenWidth_=null,this.lastScreenHeight_=null,this.selectionEnabled_=!0,this.lastRowCount_=0,this.scrollWheelMultiplier_=1,this.lastTouch_={},this.isScrolledEnd=!0,this.currentScrollbarWidthPx=16,this.ctrlVPaste=!1,this.pasteOnDrop=!0,this.div_=null,this.document_=null,this.timeouts_={},this.observers_={},this.DEBUG_=!1},h.ScrollPort.Selection=function(e){this.scrollPort_=e,this.startRow=null,this.endRow=null,this.isMultiline=null,this.isCollapsed=null};h.ScrollPort.Selection.prototype.findFirstChild=function(e,t){for(var r=e.firstChild;r;){if(-1!=t.indexOf(r))return r;if(r.childNodes.length){var o=this.findFirstChild(r,t);if(o)return o}r=r.nextSibling}return null},h.ScrollPort.Selection.prototype.sync=function(){function e(){r.startRow=i,r.startNode=o.anchorNode,r.startOffset=o.anchorOffset,r.endRow=s,r.endNode=o.focusNode,r.endOffset=o.focusOffset}function t(){r.startRow=s,r.startNode=o.focusNode,r.startOffset=o.focusOffset,r.endRow=i,r.endNode=o.anchorNode,r.endOffset=o.anchorOffset}var r=this,o=this.scrollPort_.getDocument().getSelection();if(this.startRow=null,this.endRow=null,this.isMultiline=null,this.isCollapsed=!o||o.isCollapsed,o){var n=this.scrollPort_.accessibilityReader_&&this.scrollPort_.accessibilityReader_.accessibilityEnabled;if(!this.isCollapsed||n){for(var i=o.anchorNode;i&&"X-ROW"!=i.nodeName;)i=i.parentNode;if(i){for(var s=o.focusNode;s&&"X-ROW"!=s.nodeName;)s=s.parentNode;if(s){if(i.rowIndexs.rowIndex)t();else if(o.focusNode==o.anchorNode)o.anchorOffset=this.lastRowCount_,this.updateScrollButtonState_()},h.ScrollPort.prototype.drawTopFold_=function(e){if(!this.selection.startRow||this.selection.startRow.rowIndex>=e)return void(this.rowNodes_.firstChild!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.rowNodes_.firstChild));if(!this.selection.isMultiline||this.selection.endRow.rowIndex>=e)this.selection.startRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.startRow.nextSibling);else for(this.selection.endRow.nextSibling!=this.topFold_&&this.rowNodes_.insertBefore(this.topFold_,this.selection.endRow.nextSibling);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.firstChild!=this.selection.startRow;)this.rowNodes_.removeChild(this.rowNodes_.firstChild)},h.ScrollPort.prototype.drawBottomFold_=function(e){if(!this.selection.endRow||this.selection.endRow.rowIndex<=e)return void(this.rowNodes_.lastChild!=this.bottomFold_&&this.rowNodes_.appendChild(this.bottomFold_));if(!this.selection.isMultiline||this.selection.startRow.rowIndex<=e)this.bottomFold_.nextSibling!=this.selection.endRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.endRow);else for(this.bottomFold_.nextSibling!=this.selection.startRow&&this.rowNodes_.insertBefore(this.bottomFold_,this.selection.startRow);this.selection.startRow.nextSibling!=this.selection.endRow;)this.rowNodes_.removeChild(this.selection.startRow.nextSibling);for(;this.rowNodes_.lastChild!=this.selection.endRow;)this.rowNodes_.removeChild(this.rowNodes_.lastChild)},h.ScrollPort.prototype.drawVisibleRows_=function(e,t){function r(e,t){for(;e!=t;){if(!e)throw"Did not encounter target node";if(e==o.bottomFold_)throw"Encountered bottom fold before target node";var r=e;e=e.nextSibling,r.parentNode.removeChild(r)}}for(var o=this,n=this.selection.startRow,i=this.selection.endRow,s=this.bottomFold_,a=this.topFold_.nextSibling,l=Math.min(this.visibleRowCount,this.rowProvider_.getRowCount()),c=0;c=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin,r=this.getScrollMax_();t>r&&(t=r),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t,this.scheduleRedraw())},h.ScrollPort.prototype.scrollRowToBottom=function(e){this.syncScrollHeight(),this.isScrolledEnd=e+this.visibleRowCount>=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin+this.visibleRowBottomMargin;t-=this.visibleRowCount*this.characterSize.height,t<0&&(t=0),this.screen_.scrollTop!=t&&(this.screen_.scrollTop=t)},h.ScrollPort.prototype.getTopRowIndex=function(){return Math.round(this.screen_.scrollTop/this.characterSize.height)},h.ScrollPort.prototype.getBottomRowIndex=function(e){return e+this.visibleRowCount-1},h.ScrollPort.prototype.onScroll_=function(e){var t=this.getScreenSize();if(t.width!=this.lastScreenWidth_||t.height!=this.lastScreenHeight_)return void this.resize();this.redraw_(),this.publish("scroll",{scrollPort:this})},h.ScrollPort.prototype.onScrollWheel=function(e){},h.ScrollPort.prototype.onScrollWheel_=function(e){if(this.onScrollWheel(e),!e.defaultPrevented){var t=this.scrollWheelDelta(e),r=this.screen_.scrollTop-t.y;r<0&&(r=0);var o=this.getScrollMax_();r>o&&(r=o),r!=this.screen_.scrollTop&&(this.screen_.scrollTop=r,e.preventDefault())}},h.ScrollPort.prototype.scrollWheelDelta=function(e){var t={x:0,y:0};switch(e.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:t.x=e.deltaX*this.scrollWheelMultiplier_,t.y=e.deltaY*this.scrollWheelMultiplier_;break;case WheelEvent.DOM_DELTA_LINE:t.x=e.deltaX*this.characterSize.width,t.y=e.deltaY*this.characterSize.height;break;case WheelEvent.DOM_DELTA_PAGE:t.x=e.deltaX*this.characterSize.width*this.screen_.getWidth(),t.y=e.deltaY*this.characterSize.height*this.screen_.getHeight()}return t.y*=-1,t},h.ScrollPort.prototype.onTouch=function(e){},h.ScrollPort.prototype.onTouch_=function(e){if(this.onTouch(e),!e.defaultPrevented){var t,r,o=function(e){return{id:e.identifier,y:e.clientY,x:e.clientX}};switch(e.type){case"touchstart":for(t=0;ts&&(i=s),i!=this.screen_.scrollTop&&(this.screen_.scrollTop=i)}e.preventDefault()}},h.ScrollPort.prototype.onResize_=function(e){this.syncCharacterSize()},h.ScrollPort.prototype.onCopy=function(e){},h.ScrollPort.prototype.onCopy_=function(e){if(this.onCopy(e),!e.defaultPrevented&&(this.resetSelectBags_(),this.selection.sync(),!(this.selection.isCollapsed||this.selection.endRow.rowIndex-this.selection.startRow.rowIndex<2))){var t=this.getTopRowIndex(),r=this.getBottomRowIndex(t);if(this.selection.startRow.rowIndexr){var n;n=this.selection.startRow.rowIndex>r?this.selection.startRow.rowIndex+1:this.bottomFold_.previousSibling.rowIndex+1,this.bottomSelectBag_.textContent=this.rowProvider_.getRowsText(n,this.selection.endRow.rowIndex),this.rowNodes_.insertBefore(this.bottomSelectBag_,this.selection.endRow)}}},h.ScrollPort.prototype.onBodyKeyDown_=function(e){this.ctrlVPaste&&(e.ctrlKey||e.metaKey)&&118==e.keyCode&&this.pasteTarget_.focus()},h.ScrollPort.prototype.onPaste_=function(e){this.pasteTarget_.focus();var t=this;setTimeout(function(){t.publish("paste",{text:t.pasteTarget_.value}),t.pasteTarget_.value="",t.focus()},0)},h.ScrollPort.prototype.handlePasteTargetTextInput_=function(e){e.stopPropagation()},h.ScrollPort.prototype.onDragAndDrop_=function(e){if(this.pasteOnDrop){e.preventDefault();var t=void 0,r=void 0;e.shiftKey&&(e.dataTransfer.types.forEach(function(e){!r&&"text/plain"!=e&&e.startsWith("text/")&&(r=e)}),r&&(t=e.dataTransfer.getData(r))),t||(t=e.dataTransfer.getData("text/plain")),t&&this.publish("paste",{text:t})}},h.ScrollPort.prototype.setScrollbarVisible=function(e){this.screen_.style.overflowY=e?"scroll":"hidden"},h.ScrollPort.prototype.setScrollWheelMoveMultipler=function(e){this.scrollWheelMultiplier_=e},i.rtdep("lib.colors","lib.PreferenceManager","lib.resource","lib.wc","lib.f","hterm.AccessibilityReader","hterm.Keyboard","hterm.Options","hterm.PreferenceManager","hterm.Screen","hterm.ScrollPort","hterm.Size","hterm.TextAttributes","hterm.VT"),h.Terminal=function(e){this.profileId_=null,this.primaryScreen_=new h.Screen,this.alternateScreen_=new h.Screen,this.screen_=this.primaryScreen_,this.screenSize=new h.Size(0,0),this.scrollPort_=new h.ScrollPort(this),this.scrollPort_.subscribe("resize",this.onResize_.bind(this)),this.scrollPort_.subscribe("scroll",this.onScroll_.bind(this)),this.scrollPort_.subscribe("paste",this.onPaste_.bind(this)),this.scrollPort_.subscribe("focus",this.onScrollportFocus_.bind(this)),this.scrollPort_.onCopy=this.onCopy_.bind(this),this.div_=null,this.document_=window.document,this.scrollbackRows_=[],this.tabStops_=[],this.defaultTabStops=!0,this.vtScrollTop_=null,this.vtScrollBottom_=null,this.cursorNode_=null,this.cursorShape_=h.Terminal.cursorShape.BLOCK,this.cursorBlinkCycle_=[100,100],this.myOnCursorBlink_=this.onCursorBlink_.bind(this),this.backgroundColor_=null,this.foregroundColor_=null,this.scrollOnOutput_=null,this.scrollOnKeystroke_=null,this.scrollWheelArrowKeys_=null,this.defeatMouseReports_=!1,this.setAutomaticMouseHiding(),this.mouseHideDelay_=null,this.bellAudio_=this.document_.createElement("audio"),this.bellAudio_.id="hterm:bell-audio",this.bellAudio_.setAttribute("preload","auto"),this.accessibilityReader_=null,this.contextMenu=new h.ContextMenu,this.bellNotificationList_=[],this.desktopNotificationBell_=!1,this.savedOptions_={},this.options_=new h.Options,this.timeouts_={},this.vt=new h.VT(this),this.saveCursorAndState(!0),this.keyboard=new h.Keyboard(this),this.io=new h.Terminal.IO(this),this.enableMouseDragScroll=!0,this.copyOnSelect=null,this.mouseRightClickPaste=null,this.mousePasteButton=null,this.useDefaultWindowCopy=!1,this.clearSelectionAfterCopy=!0,this.realizeSize_(80,24),this.setDefaultTabStops(),this.allowImagesInline=null,this.reportFocus=!1,this.setProfile(e||"default",function(){this.onTerminalReady()}.bind(this))},h.Terminal.cursorShape={BLOCK:"BLOCK",BEAM:"BEAM",UNDERLINE:"UNDERLINE"},h.Terminal.prototype.onTerminalReady=function(){},h.Terminal.prototype.tabWidth=8,h.Terminal.prototype.setProfile=function(e,t){this.profileId_=e.replace(/\//g,"");var r=this;this.prefs_&&this.prefs_.deactivate(),this.prefs_=new h.PreferenceManager(this.profileId_),this.prefs_.addObservers(null,{"alt-gr-mode":function(e){e=null==e?"en-us"==navigator.language.toLowerCase()?"none":"right-alt":"string"==typeof e?e.toLowerCase():"none",/^(none|ctrl-alt|left-alt|right-alt)$/.test(e)||(e="none"),r.keyboard.altGrMode=e},"alt-backspace-is-meta-backspace":function(e){r.keyboard.altBackspaceIsMetaBackspace=e},"alt-is-meta":function(e){r.keyboard.altIsMeta=e},"alt-sends-what":function(e){/^(escape|8-bit|browser-key)$/.test(e)||(e="escape"),r.keyboard.altSendsWhat=e},"audible-bell-sound":function(e){var t=e.match(/^lib-resource:(\S+)/);t?r.bellAudio_.setAttribute("src",i.resource.getDataUrl(t[1])):r.bellAudio_.setAttribute("src",e)},"desktop-notification-bell":function(e){e&&Notification?(r.desktopNotificationBell_="granted"===Notification.permission,r.desktopNotificationBell_||console.warn("desktop-notification-bell is true but we do not have permission to display notifications.")):r.desktopNotificationBell_=!1},"background-color":function(e){r.setBackgroundColor(e)},"background-image":function(e){r.scrollPort_.setBackgroundImage(e)},"background-size":function(e){r.scrollPort_.setBackgroundSize(e)},"background-position":function(e){r.scrollPort_.setBackgroundPosition(e)},"backspace-sends-backspace":function(e){r.keyboard.backspaceSendsBackspace=e},"character-map-overrides":function(e){if(!(null==e||e instanceof Object))return void console.warn("Preference character-map-modifications is not an object: "+e);r.vt.characterMaps.reset(),r.vt.characterMaps.setOverrides(e)},"cursor-blink":function(e){r.setCursorBlink(!!e)},"cursor-blink-cycle":function(e){e instanceof Array&&"number"==typeof e[0]&&"number"==typeof e[1]?r.cursorBlinkCycle_=e:r.cursorBlinkCycle_="number"==typeof e?[e,e]:[100,100]},"cursor-color":function(e){r.setCursorColor(e)},"color-palette-overrides":function(e){if(!(null==e||e instanceof Object||e instanceof Array))return void console.warn("Preference color-palette-overrides is not an array or object: "+e);if(i.colors.colorPalette=i.colors.stockColorPalette.concat(),e)for(var t in e){var o=parseInt(t);if(isNaN(o)||o<0||o>255)console.log("Invalid value in palette: "+t+": "+e[t]);else if(e[o]){var n=i.colors.normalizeCSS(e[o]);n&&(i.colors.colorPalette[o]=n)}}r.primaryScreen_.textAttributes.resetColorPalette(),r.alternateScreen_.textAttributes.resetColorPalette()},"copy-on-select":function(e){r.copyOnSelect=!!e},"use-default-window-copy":function(e){r.useDefaultWindowCopy=!!e},"clear-selection-after-copy":function(e){r.clearSelectionAfterCopy=!!e},"ctrl-plus-minus-zero-zoom":function(e){r.keyboard.ctrlPlusMinusZeroZoom=e},"ctrl-c-copy":function(e){r.keyboard.ctrlCCopy=e},"ctrl-v-paste":function(e){r.keyboard.ctrlVPaste=e,r.scrollPort_.setCtrlVPaste(e)},"paste-on-drop":function(e){r.scrollPort_.setPasteOnDrop(e)},"east-asian-ambiguous-as-two-column":function(e){i.wc.regardCjkAmbiguous=e},"enable-8-bit-control":function(e){r.vt.enable8BitControl=!!e},"enable-bold":function(e){r.syncBoldSafeState()},"enable-bold-as-bright":function(e){r.primaryScreen_.textAttributes.enableBoldAsBright=!!e,r.alternateScreen_.textAttributes.enableBoldAsBright=!!e},"enable-blink":function(e){r.setTextBlink(!!e)},"enable-clipboard-write":function(e){r.vt.enableClipboardWrite=!!e},"enable-dec12":function(e){r.vt.enableDec12=!!e},"enable-csi-j-3":function(e){r.vt.enableCsiJ3=!!e},"font-family":function(e){r.syncFontFamily()},"font-size":function(e){if((e=parseInt(e))<=0)return void console.error("Invalid font size: "+e);r.setFontSize(e)},"font-smoothing":function(e){r.syncFontFamily()},"foreground-color":function(e){r.setForegroundColor(e)},"hide-mouse-while-typing":function(e){r.setAutomaticMouseHiding(e)},"home-keys-scroll":function(e){r.keyboard.homeKeysScroll=e},keybindings:function(e){if(r.keyboard.bindings.clear(),e){if(!(e instanceof Object))return void console.error("Error in keybindings preference: Expected object");try{r.keyboard.bindings.addBindings(e)}catch(e){console.error("Error in keybindings preference: "+e)}}},"media-keys-are-fkeys":function(e){r.keyboard.mediaKeysAreFKeys=e},"meta-sends-escape":function(e){r.keyboard.metaSendsEscape=e},"mouse-right-click-paste":function(e){r.mouseRightClickPaste=e},"mouse-paste-button":function(e){r.syncMousePasteButton()},"page-keys-scroll":function(e){r.keyboard.pageKeysScroll=e},"pass-alt-number":function(e){null==e&&(e="mac"!=h.os&&"popup"!=h.windowType),r.passAltNumber=e},"pass-ctrl-number":function(e){null==e&&(e="mac"!=h.os&&"popup"!=h.windowType),r.passCtrlNumber=e},"pass-meta-number":function(e){null==e&&(e="mac"==h.os&&"popup"!=h.windowType),r.passMetaNumber=e},"pass-meta-v":function(e){r.keyboard.passMetaV=e},"receive-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "receive-encoding": '+e),e="utf-8"),r.vt.characterEncoding=e},"scroll-on-keystroke":function(e){r.scrollOnKeystroke_=e},"scroll-on-output":function(e){r.scrollOnOutput_=e},"scrollbar-visible":function(e){r.setScrollbarVisible(e)},"scroll-wheel-may-send-arrow-keys":function(e){r.scrollWheelArrowKeys_=e},"scroll-wheel-move-multiplier":function(e){r.setScrollWheelMoveMultipler(e)},"send-encoding":function(e){/^(utf-8|raw)$/.test(e)||(console.warn('Invalid value for "send-encoding": '+e),e="utf-8"),r.keyboard.characterEncoding=e},"shift-insert-paste":function(e){r.keyboard.shiftInsertPaste=e},"terminal-encoding":function(e){r.vt.setEncoding(e)},"user-css":function(e){r.scrollPort_.setUserCssUrl(e)},"user-css-text":function(e){r.scrollPort_.setUserCssText(e)},"word-break-match-left":function(e){r.primaryScreen_.wordBreakMatchLeft=e,r.alternateScreen_.wordBreakMatchLeft=e},"word-break-match-right":function(e){r.primaryScreen_.wordBreakMatchRight=e,r.alternateScreen_.wordBreakMatchRight=e},"word-break-match-middle":function(e){r.primaryScreen_.wordBreakMatchMiddle=e,r.alternateScreen_.wordBreakMatchMiddle=e},"allow-images-inline":function(e){r.allowImagesInline=e}}),this.prefs_.readStorage(function(){this.prefs_.notifyAll(),t&&t()}.bind(this))},h.Terminal.prototype.getPrefs=function(){return this.prefs_},h.Terminal.prototype.setBracketedPaste=function(e){this.options_.bracketedPaste=e},h.Terminal.prototype.setCursorColor=function(e){void 0===e&&(e=this.prefs_.get("cursor-color")),this.setCssVar("cursor-color",e)},h.Terminal.prototype.getCursorColor=function(){return this.getCssVar("cursor-color")},h.Terminal.prototype.setSelectionEnabled=function(e){this.enableMouseDragScroll=e},h.Terminal.prototype.setBackgroundColor=function(e){void 0===e&&(e=this.prefs_.get("background-color")),this.backgroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setBackgroundColor(e)},h.Terminal.prototype.getBackgroundColor=function(){return this.backgroundColor_},h.Terminal.prototype.setForegroundColor=function(e){void 0===e&&(e=this.prefs_.get("foreground-color")),this.foregroundColor_=i.colors.normalizeCSS(e),this.primaryScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.alternateScreen_.textAttributes.setDefaults(this.foregroundColor_,this.backgroundColor_),this.scrollPort_.setForegroundColor(e)},h.Terminal.prototype.getForegroundColor=function(){return this.foregroundColor_},h.Terminal.prototype.runCommandClass=function(e,t){var r=this.prefs_.get("environment");"object"==("undefined"===typeof r?"undefined":n(r))&&null!=r||(r={});var o=this;this.command=new e({argString:t||"",io:this.io.push(),environment:r,onExit:function(e){o.io.pop(),o.uninstallKeyboard(),o.prefs_.get("close-on-exit")&&window.close()}}),this.installKeyboard(),this.command.run()},h.Terminal.prototype.isPrimaryScreen=function(){return this.screen_==this.primaryScreen_},h.Terminal.prototype.installKeyboard=function(){this.keyboard.installKeyboard(this.scrollPort_.getDocument().body)},h.Terminal.prototype.uninstallKeyboard=function(){this.keyboard.installKeyboard(null)},h.Terminal.prototype.setCssVar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"--hterm-";this.document_.documentElement.style.setProperty(""+r+e,t)},h.Terminal.prototype.getCssVar=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"--hterm-";return this.document_.documentElement.style.getPropertyValue(""+t+e)},h.Terminal.prototype.setFontSize=function(e){e<=0&&(e=this.prefs_.get("font-size")),this.scrollPort_.setFontSize(e),this.setCssVar("charsize-width",this.scrollPort_.characterSize.width+"px"),this.setCssVar("charsize-height",this.scrollPort_.characterSize.height+"px")},h.Terminal.prototype.getFontSize=function(){return this.scrollPort_.getFontSize()},h.Terminal.prototype.getFontFamily=function(){return this.scrollPort_.getFontFamily()},h.Terminal.prototype.syncFontFamily=function(){this.scrollPort_.setFontFamily(this.prefs_.get("font-family"),this.prefs_.get("font-smoothing")),this.syncBoldSafeState()},h.Terminal.prototype.syncMousePasteButton=function(){var e=this.prefs_.get("mouse-paste-button");if("number"==typeof e)return void(this.mousePasteButton=e);"linux"!=h.os?this.mousePasteButton=1:this.mousePasteButton=2},h.Terminal.prototype.syncBoldSafeState=function(){var e=this.prefs_.get("enable-bold");if(null!==e)return this.primaryScreen_.textAttributes.enableBold=e,void(this.alternateScreen_.textAttributes.enableBold=e);var t=this.scrollPort_.measureCharacterSize(),r=this.scrollPort_.measureCharacterSize("bold"),o=t.equals(r);o||console.warn("Bold characters disabled: Size of bold weight differs from normal. Font family is: "+this.scrollPort_.getFontFamily()),this.primaryScreen_.textAttributes.enableBold=o,this.alternateScreen_.textAttributes.enableBold=o},h.Terminal.prototype.setTextBlink=function(e){void 0===e&&(e=this.prefs_.get("enable-blink")),this.setCssVar("blink-node-duration",e?"0.7s":"0")},h.Terminal.prototype.syncMouseStyle=function(){this.setCssVar("mouse-cursor-style",this.vt.mouseReport==this.vt.MOUSE_REPORT_DISABLED?"var(--hterm-mouse-cursor-text)":"var(--hterm-mouse-cursor-pointer)")},h.Terminal.prototype.saveCursor=function(){return this.screen_.cursorPosition.clone()},h.Terminal.prototype.getTextAttributes=function(){return this.screen_.textAttributes},h.Terminal.prototype.setTextAttributes=function(e){this.screen_.textAttributes=e},h.Terminal.prototype.getZoomFactor=function(){return this.scrollPort_.characterSize.zoomFactor},h.Terminal.prototype.setWindowTitle=function(e){window.document.title=e},h.Terminal.prototype.restoreCursor=function(e){var t=i.f.clamp(e.row,0,this.screenSize.height-1),r=i.f.clamp(e.column,0,this.screenSize.width-1);this.screen_.setCursorPosition(t,r),(e.column>r||e.column==r&&e.overflow)&&(this.screen_.cursorPosition.overflow=!0)},h.Terminal.prototype.clearCursorOverflow=function(){this.screen_.cursorPosition.overflow=!1},h.Terminal.prototype.saveCursorAndState=function(e){e?(this.primaryScreen_.saveCursorAndState(this.vt),this.alternateScreen_.saveCursorAndState(this.vt)):this.screen_.saveCursorAndState(this.vt)},h.Terminal.prototype.restoreCursorAndState=function(e){e?(this.primaryScreen_.restoreCursorAndState(this.vt),this.alternateScreen_.restoreCursorAndState(this.vt)):this.screen_.restoreCursorAndState(this.vt)},h.Terminal.prototype.setCursorShape=function(e){this.cursorShape_=e,this.restyleCursor_()},h.Terminal.prototype.getCursorShape=function(){return this.cursorShape_},h.Terminal.prototype.setWidth=function(e){if(null==e)return void(this.div_.style.width="100%");this.div_.style.width=Math.ceil(this.scrollPort_.characterSize.width*e+this.scrollPort_.currentScrollbarWidthPx)+"px",this.realizeSize_(e,this.screenSize.height),this.scheduleSyncCursorPosition_()},h.Terminal.prototype.setHeight=function(e){if(null==e)return void(this.div_.style.height="100%");this.div_.style.height=this.scrollPort_.characterSize.height*e+"px",this.realizeSize_(this.screenSize.width,e),this.scheduleSyncCursorPosition_()},h.Terminal.prototype.realizeSize_=function(e,t){e!=this.screenSize.width&&this.realizeWidth_(e),t!=this.screenSize.height&&this.realizeHeight_(t),this.io.onTerminalResize_(e,t)},h.Terminal.prototype.realizeWidth_=function(e){if(e<=0)throw new Error("Attempt to realize bad width: "+e);var t=e-this.screen_.getWidth();if(this.screenSize.width=e,this.screen_.setColumnCount(e),t>0)this.defaultTabStops&&this.setDefaultTabStops(this.screenSize.width-t);else for(var r=this.tabStops_.length-1;r>=0&&!(this.tabStops_[r]0){if(t<=this.scrollbackRows_.length){var i=Math.min(t,this.scrollbackRows_.length),s=this.scrollbackRows_.splice(this.scrollbackRows_.length-i,i);this.screen_.unshiftRows(s),t-=i,r.row+=i}t&&this.appendRows_(t)}this.setVTScrollRegion(null,null),this.restoreCursor(r)},h.Terminal.prototype.scrollHome=function(){this.scrollPort_.scrollRowToTop(0)},h.Terminal.prototype.scrollEnd=function(){this.scrollPort_.scrollRowToBottom(this.getRowCount())},h.Terminal.prototype.scrollPageUp=function(){this.scrollPort_.scrollPageUp()},h.Terminal.prototype.scrollPageDown=function(){this.scrollPort_.scrollPageDown()},h.Terminal.prototype.scrollLineUp=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e-1)},h.Terminal.prototype.scrollLineDown=function(){var e=this.scrollPort_.getTopRowIndex();this.scrollPort_.scrollRowToTop(e+1)},h.Terminal.prototype.wipeContents=function(){this.clearHome(this.primaryScreen_),this.clearHome(this.alternateScreen_),this.clearScrollback()},h.Terminal.prototype.clearScrollback=function(){var e=this;this.scrollEnd(),this.scrollbackRows_.length=0,this.scrollPort_.resetCache(),[this.primaryScreen_,this.alternateScreen_].forEach(function(t){var r=t.getHeight();e.renumberRows_(0,r,t)}),this.syncCursorPosition_(),this.scrollPort_.invalidate()},h.Terminal.prototype.reset=function(){var e=this;this.vt.reset(),this.clearAllTabStops(),this.setDefaultTabStops();var t=function(t){t.textAttributes.reset(),t.textAttributes.resetColorPalette(),e.clearHome(t),t.saveCursorAndState(e.vt)};t(this.primaryScreen_),t(this.alternateScreen_),this.options_=new h.Options,this.setCursorBlink(!!this.prefs_.get("cursor-blink")),this.setVTScrollRegion(null,null),this.setCursorVisible(!0)},h.Terminal.prototype.softReset=function(){var e=this;this.vt.reset(),this.options_=new h.Options,this.options_.cursorBlink=!!this.timeouts_.cursorBlink;var t=function(t){t.textAttributes.reset(),t.textAttributes.resetColorPalette(),t.saveCursorAndState(e.vt)};t(this.primaryScreen_),t(this.alternateScreen_),this.setVTScrollRegion(null,null),this.setCursorVisible(!0)},h.Terminal.prototype.forwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=0;te)return void this.setCursorColumn(this.tabStops_[t]);var r=this.screen_.cursorPosition.overflow;this.setCursorColumn(this.screenSize.width-1),this.screen_.cursorPosition.overflow=r},h.Terminal.prototype.backwardTabStop=function(){for(var e=this.screen_.cursorPosition.column,t=this.tabStops_.length-1;t>=0;t--)if(this.tabStops_[t]=0;t--){if(this.tabStops_[t]==e)return;if(this.tabStops_[t] to your HTML to fix."),this.div_=e,this.accessibilityReader_=new h.AccessibilityReader(e),this.scrollPort_.decorate(e),this.scrollPort_.setBackgroundImage(this.prefs_.get("background-image")),this.scrollPort_.setBackgroundSize(this.prefs_.get("background-size")),this.scrollPort_.setBackgroundPosition(this.prefs_.get("background-position")),this.scrollPort_.setUserCssUrl(this.prefs_.get("user-css")),this.scrollPort_.setUserCssText(this.prefs_.get("user-css-text")),this.scrollPort_.setAccessibilityReader(this.accessibilityReader_),this.div_.focus=this.focus.bind(this),this.setFontSize(this.prefs_.get("font-size")),this.syncFontFamily(),this.setScrollbarVisible(this.prefs_.get("scrollbar-visible")),this.setScrollWheelMoveMultipler(this.prefs_.get("scroll-wheel-move-multiplier")),this.document_=this.scrollPort_.getDocument(),this.accessibilityReader_.decorate(this.document_),this.document_.body.oncontextmenu=function(){return!1},this.contextMenu.setDocument(this.document_);var r=this.onMouse_.bind(this),o=this.scrollPort_.getScreenNode();o.addEventListener("mousedown",r),o.addEventListener("mouseup",r),o.addEventListener("mousemove",r),this.scrollPort_.onScrollWheel=r,o.addEventListener("keydown",this.onKeyboardActivity_.bind(this)),o.addEventListener("focus",this.onFocusChange_.bind(this,!0)),o.addEventListener("mousedown",function(){setTimeout(this.onFocusChange_.bind(this,!0))}.bind(this)),o.addEventListener("blur",this.onFocusChange_.bind(this,!1));var n=this.document_.createElement("style");n.textContent='.cursor-node[focus="false"] { box-sizing: border-box; background-color: transparent !important; border-width: 2px; border-style: solid;}menu { margin: 0; padding: 0; cursor: var(--hterm-mouse-cursor-pointer);}menuitem { white-space: nowrap; border-bottom: 1px dashed; display: block; padding: 0.3em 0.3em 0 0.3em;}menuitem.separator { border-bottom: none; height: 0.5em; padding: 0;}menuitem:hover { color: var(--hterm-cursor-color);}.wc-node { display: inline-block; text-align: center; width: calc(var(--hterm-charsize-width) * 2); line-height: var(--hterm-charsize-height);}:root { --hterm-charsize-width: '+this.scrollPort_.characterSize.width+"px; --hterm-charsize-height: "+this.scrollPort_.characterSize.height+"px; --hterm-cursor-offset-col: -1; --hterm-cursor-offset-row: -1; --hterm-blink-node-duration: 0.7s; --hterm-mouse-cursor-text: text; --hterm-mouse-cursor-pointer: default; --hterm-mouse-cursor-style: var(--hterm-mouse-cursor-text);}.uri-node:hover { text-decoration: underline; cursor: var(--hterm-mouse-cursor-pointer), pointer;}@keyframes blink { from { opacity: 1.0; } to { opacity: 0.0; }}.blink-node { animation-name: blink; animation-duration: var(--hterm-blink-node-duration); animation-iteration-count: infinite; animation-timing-function: ease-in-out; animation-direction: alternate;}",this.document_.head.insertBefore(n,this.document_.head.firstChild),this.cursorNode_=this.document_.createElement("div"),this.cursorNode_.id="hterm:terminal-cursor",this.cursorNode_.className="cursor-node",this.cursorNode_.style.cssText="position: absolute;left: calc(var(--hterm-charsize-width) * var(--hterm-cursor-offset-col));top: calc(var(--hterm-charsize-height) * var(--hterm-cursor-offset-row));display: "+(this.options_.cursorVisible?"":"none")+";width: var(--hterm-charsize-width);height: var(--hterm-charsize-height);background-color: var(--hterm-cursor-color);border-color: var(--hterm-cursor-color);-webkit-transition: opacity, background-color 100ms linear;-moz-transition: opacity, background-color 100ms linear;",this.setCursorColor(),this.setCursorBlink(!!this.prefs_.get("cursor-blink")),this.restyleCursor_(),this.document_.body.appendChild(this.cursorNode_),this.scrollBlockerNode_=this.document_.createElement("div"),this.scrollBlockerNode_.id="hterm:mouse-drag-scroll-blocker",this.scrollBlockerNode_.setAttribute("aria-hidden","true"),this.scrollBlockerNode_.style.cssText="position: absolute;top: -99px;display: block;width: 10px;height: 10px;",this.document_.body.appendChild(this.scrollBlockerNode_),this.scrollPort_.onScrollWheel=r,["mousedown","mouseup","mousemove","click","dblclick"].forEach(function(e){this.scrollBlockerNode_.addEventListener(e,r),this.cursorNode_.addEventListener(e,r),this.document_.addEventListener(e,r)}.bind(this)),this.cursorNode_.addEventListener("mousedown",function(){setTimeout(this.focus.bind(this))}.bind(this)),this.setReverseVideo(!1),this.scrollPort_.focus(),this.scrollPort_.scheduleRedraw()},h.Terminal.prototype.getDocument=function(){return this.document_},h.Terminal.prototype.focus=function(){this.scrollPort_.focus()},h.Terminal.prototype.getRowNode=function(e){if(e0){var s=this.screen_.shiftRows(i);Array.prototype.push.apply(this.scrollbackRows_,s),this.scrollPort_.isScrolledEnd&&this.scheduleScrollDown_()}t>=this.screen_.rowsArray.length&&(t=this.screen_.rowsArray.length-1),this.setAbsoluteCursorPosition(t,0)},h.Terminal.prototype.moveRows_=function(e,t,r){var o=this.screen_.removeRows(e,t);this.screen_.insertRows(r,o);var n,i;e=this.screenSize.width&&(s=!0,n=this.screenSize.width-this.screen_.cursorPosition.column),s&&!this.options_.wraparound?(o=i.wc.substr(e,t,n-1)+i.wc.substr(e,r-1),n=r):o=i.wc.substr(e,t,n);for(var a=h.TextAttributes.splitWidecharString(o),l=0;l0&&void 0!==arguments[0]&&arguments[0]||this.accessibilityReader_.newLine();var e=this.screen_.cursorPosition.row==this.screen_.rowsArray.length-1;null!=this.vtScrollBottom_?this.screen_.cursorPosition.row==this.vtScrollBottom_?(this.vtScrollUp(1),this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row,0)):e?this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row,0):this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row+1,0):e?this.appendRows_(1):this.setAbsoluteCursorPosition(this.screen_.cursorPosition.row+1,0)},h.Terminal.prototype.lineFeed=function(){var e=this.screen_.cursorPosition.column;this.newLine(),this.setCursorColumn(e)},h.Terminal.prototype.formFeed=function(){this.options_.autoCarriageReturn?this.newLine():this.lineFeed()},h.Terminal.prototype.reverseLineFeed=function(){var e=this.getVTScrollTop(),t=this.screen_.cursorPosition.row;t==e?this.insertLines(1):this.setAbsoluteCursorRow(t-1)},h.Terminal.prototype.eraseToLeft=function(){var e=this.saveCursor();this.setCursorColumn(0);var t=e.column+1;this.screen_.overwriteString(i.f.getWhitespace(t),t),this.restoreCursor(e)},h.Terminal.prototype.eraseToRight=function(e){if(!this.screen_.cursorPosition.overflow){var t=this.screenSize.width-this.screen_.cursorPosition.column,r=e?Math.min(e,t):t;if(this.screen_.textAttributes.background===this.screen_.textAttributes.DEFAULT_COLOR){var o=this.screen_.rowsArray[this.screen_.cursorPosition.row];if(h.TextAttributes.nodeWidth(o)<=this.screen_.cursorPosition.column+r)return this.screen_.deleteChars(r),void this.clearCursorOverflow()}var n=this.saveCursor();this.screen_.overwriteString(i.f.getWhitespace(r),r),this.restoreCursor(n),this.clearCursorOverflow()}},h.Terminal.prototype.eraseLine=function(){var e=this.saveCursor();this.screen_.clearCursorRow(),this.restoreCursor(e),this.clearCursorOverflow()},h.Terminal.prototype.eraseAbove=function(){var e=this.saveCursor();this.eraseToLeft();for(var t=0;t=0;n--)this.setAbsoluteCursorPosition(t+n,0),this.screen_.clearCursorRow()},h.Terminal.prototype.deleteLines=function(e){var t=this.saveCursor(),r=t.row,o=this.getVTScrollBottom(),n=o-r+1;e=Math.min(e,n);var i=o-e+1;e!=n&&this.moveRows_(r,e,i);for(var s=0;st)return this.setCssVar("cursor-offset-row","-1"),!1;this.options_.cursorVisible&&"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display=""),this.setCssVar("cursor-offset-row",r-e+" + "+this.scrollPort_.visibleRowTopMargin+"px"),this.setCssVar("cursor-offset-col",this.screen_.cursorPosition.column),this.cursorNode_.setAttribute("title","("+this.screen_.cursorPosition.column+", "+this.screen_.cursorPosition.row+")");var s=this.document_.getSelection();return s&&(s.isCollapsed||o)&&this.screen_.syncSelectionCaret(s),!0},h.Terminal.prototype.restyleCursor_=function(){var e=this.cursorShape_;"false"==this.cursorNode_.getAttribute("focus")&&(e=h.Terminal.cursorShape.BLOCK);var t=this.cursorNode_.style;switch(e){case h.Terminal.cursorShape.BEAM:t.height="var(--hterm-charsize-height)",t.backgroundColor="transparent",t.borderBottomStyle=null,t.borderLeftStyle="solid";break;case h.Terminal.cursorShape.UNDERLINE:t.height=this.scrollPort_.characterSize.baseline+"px",t.backgroundColor="transparent",t.borderBottomStyle="solid",t.borderLeftStyle=null;break;default:t.height="var(--hterm-charsize-height)",t.backgroundColor="var(--hterm-cursor-color)",t.borderBottomStyle=null,t.borderLeftStyle=null}},h.Terminal.prototype.scheduleSyncCursorPosition_=function(){if(!this.timeouts_.syncCursor){if(this.accessibilityReader_.accessibilityEnabled){var e=this.scrollbackRows_.length+this.screen_.cursorPosition.row,t=this.screen_.cursorPosition.column,r=this.screen_.rowsArray[this.screen_.cursorPosition.row].innerText;this.accessibilityReader_.beforeCursorChange(r,e,t)}var o=this;this.timeouts_.syncCursor=setTimeout(function(){o.syncCursorPosition_(),delete o.timeouts_.syncCursor},0)}},h.Terminal.prototype.showZoomWarning_=function(e){if(!this.zoomWarningNode_){if(!e)return;this.zoomWarningNode_=this.document_.createElement("div"),this.zoomWarningNode_.id="hterm:zoom-warning",this.zoomWarningNode_.style.cssText="color: black;background-color: #ff2222;font-size: large;border-radius: 8px;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;top: 0.5em;right: 1.2em;position: absolute;-webkit-text-size-adjust: none;-webkit-user-select: none;-moz-text-size-adjust: none;-moz-user-select: none;",this.zoomWarningNode_.addEventListener("click",function(e){this.parentNode.removeChild(this)})}this.zoomWarningNode_.textContent=i.MessageManager.replaceReferences(h.zoomWarningMessage,[parseInt(100*this.scrollPort_.characterSize.zoomFactor)]),this.zoomWarningNode_.style.fontFamily=this.prefs_.get("font-family"),e?this.zoomWarningNode_.parentNode||this.div_.parentNode.appendChild(this.zoomWarningNode_):this.zoomWarningNode_.parentNode&&this.zoomWarningNode_.parentNode.removeChild(this.zoomWarningNode_)},h.Terminal.prototype.showOverlay=function(e,t){var r=this;if(!this.overlayNode_){if(!this.div_)return;this.overlayNode_=this.document_.createElement("div"),this.overlayNode_.style.cssText="border-radius: 15px;font-size: xx-large;opacity: 0.75;padding: 0.2em 0.5em 0.2em 0.5em;position: absolute;-webkit-user-select: none;-webkit-transition: opacity 180ms ease-in;-moz-user-select: none;-moz-transition: opacity 180ms ease-in;",this.overlayNode_.addEventListener("mousedown",function(e){e.preventDefault(),e.stopPropagation()},!0)}this.overlayNode_.style.color=this.prefs_.get("background-color"),this.overlayNode_.style.backgroundColor=this.prefs_.get("foreground-color"),this.overlayNode_.style.fontFamily=this.prefs_.get("font-family"),this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.div_.appendChild(this.overlayNode_);var o=h.getClientSize(this.div_),n=h.getClientSize(this.overlayNode_);this.overlayNode_.style.top=(o.height-n.height)/2+"px",this.overlayNode_.style.left=(o.width-n.width-this.scrollPort_.currentScrollbarWidthPx)/2+"px",this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),this.accessibilityReader_.assertiveAnnounce(e),null!==t&&(this.overlayTimeout_=setTimeout(function(){r.overlayNode_.style.opacity="0",r.overlayTimeout_=setTimeout(function(){return r.hideOverlay()},200)},t||1500))},h.Terminal.prototype.hideOverlay=function(){this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),this.overlayTimeout_=null,this.overlayNode_.parentNode&&this.overlayNode_.parentNode.removeChild(this.overlayNode_),this.overlayNode_.style.opacity="0.75"},h.Terminal.prototype.paste=function(){return h.pasteFromClipboard(this.document_)},h.Terminal.prototype.copyStringToClipboard=function(e){this.prefs_.get("enable-clipboard-notice")&&setTimeout(this.showOverlay.bind(this,h.notifyCopyMessage,500),200);var t=this.document_.createElement("pre");t.id="hterm:copy-to-clipboard-source",t.textContent=e,t.style.cssText="-webkit-user-select: text;-moz-user-select: text;position: absolute;top: -99px",this.document_.body.appendChild(t);var r=this.document_.getSelection(),o=r.anchorNode,n=r.anchorOffset,i=r.focusNode,s=r.focusOffset;try{r.selectAllChildren(t)}catch(e){}h.copySelectionToClipboard(this.document_),r.extend&&(r.collapse(o,n),r.extend(i,s)),t.parentNode.removeChild(t)},h.Terminal.prototype.displayImage=function(e,t,r){var o=this;if(void 0!==e.uri){if(e.name||(e.name=""),!0!==this.allowImagesInline){this.newLine();var n=this.getRowNode(this.scrollbackRows_.length+this.getCursorRow()-1);if(!1===this.allowImagesInline)return void(n.textContent=h.msg("POPUP_INLINE_IMAGE_DISABLED",[],"Inline Images Disabled"));var i=void 0,s=this.document_.createElement("span");return s.innerText=h.msg("POPUP_INLINE_IMAGE",[],"Inline Images"),s.style.fontWeight="bold",s.style.borderWidth="1px",s.style.borderStyle="dashed",i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_BLOCK",[],"block"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.prefs_.set("allow-images-inline",!1)}),s.appendChild(i),i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_ALLOW_SESSION",[],"allow this session"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.allowImagesInline=!0}),s.appendChild(i),i=this.document_.createElement("span"),i.innerText=h.msg("BUTTON_ALLOW_ALWAYS",[],"always allow"),i.style.marginLeft="1em",i.style.borderWidth="1px",i.style.borderStyle="solid",i.addEventListener("click",function(){o.prefs_.set("allow-images-inline",!0)}),s.appendChild(i),void n.appendChild(s)}if(e.inline){var a=this.io.push();a.showOverlay(h.msg("LOADING_RESOURCE_START",[e.name],"Loading $1 ..."),null),a.onVTKeystroke=a.sendString=function(){};var l=this.document_.createElement("img");l.src=e.uri,l.title=l.alt=e.name,this.document_.body.appendChild(l),l.onload=function(){l.style.objectFit=e.preserveAspectRatio?"scale-down":"fill",l.style.maxWidth=o.document_.body.clientWidth+"px",l.style.maxHeight=o.document_.body.clientHeight+"px";var r=function(e,t,r){if(!e||"auto"==e)return"";var o=e.match(/^([0-9]+)(px|%)?$/);return o?"%"==o[2]?t*parseInt(o[1])/100+"px":"px"==o[2]?e:"calc("+e+" * var("+r+"))":""};l.style.width=r(e.width,o.document_.body.clientWidth,"--hterm-charsize-width"),l.style.height=r(e.height,o.document_.body.clientHeight,"--hterm-charsize-height");for(var n=Math.ceil(l.clientHeight/o.scrollPort_.characterSize.height),i=0;i2048||e.search(/[\s\[\](){}<>"'\\^`]/)>=0)){if(e.search("^[a-zA-Z][a-zA-Z0-9+.-]*://")<0)switch(e.split(":",1)[0]){case"mailto":break;default:e="http://"+e}h.openUrl(e)}},h.Terminal.prototype.setAutomaticMouseHiding=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;null===e&&(e="cros"!=h.os&&"mac"!=h.os),this.mouseHideWhileTyping_=!!e};h.Terminal.prototype.onKeyboardActivity_=function(e){this.mouseHideWhileTyping_&&!this.mouseHideDelay_&&this.setCssVar("mouse-cursor-style","none")},h.Terminal.prototype.onMouse_=function(e){var t=this;if(!e.processedByTerminalHandler_){e.button>2&&e.preventDefault();var r=!this.defeatMouseReports_&&this.vt.mouseReport!=this.vt.MOUSE_REPORT_DISABLED;if(e.processedByTerminalHandler_=!0,this.mouseHideWhileTyping_&&!this.mouseHideDelay_&&(this.syncMouseStyle(),this.mouseHideDelay_=setTimeout(function(){return t.mouseHideDelay_=null},1e3)),e.terminalRow=parseInt((e.clientY-this.scrollPort_.visibleRowTopMargin)/this.scrollPort_.characterSize.height)+1,e.terminalColumn=parseInt(e.clientX/this.scrollPort_.characterSize.width)+1,!("mousedown"==e.type&&e.terminalColumn>this.screenSize.width)){if(this.options_.cursorVisible&&!r&&(e.terminalRow-1==this.screen_.cursorPosition.row&&e.terminalColumn-1==this.screen_.cursorPosition.column?this.cursorNode_.style.display="none":"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display="")),"mousedown"==e.type&&(this.contextMenu.hide(e),e.altKey||!r?(this.defeatMouseReports_=!0,this.setSelectionEnabled(!0)):(this.defeatMouseReports_=!1,this.document_.getSelection().collapseToEnd(),this.setSelectionEnabled(!1),e.preventDefault())),r)this.scrollBlockerNode_.engaged||("mousedown"==e.type?(this.scrollBlockerNode_.engaged=!0,this.scrollBlockerNode_.style.top=e.clientY-5+"px",this.scrollBlockerNode_.style.left=e.clientX-5+"px"):"mousemove"==e.type&&(this.document_.getSelection().collapseToEnd(),e.preventDefault())),this.onMouse(e);else{if("dblclick"==e.type&&(this.screen_.expandSelection(this.document_.getSelection()),this.copyOnSelect&&this.copySelectionToClipboard(this.document_)),"click"==e.type&&!e.shiftKey&&(e.ctrlKey||e.metaKey))return clearTimeout(this.timeouts_.openUrl),void(this.timeouts_.openUrl=setTimeout(this.openSelectedUrl_.bind(this),500));if("mousedown"==e.type&&(e.ctrlKey&&2==e.button?(e.preventDefault(),this.contextMenu.show(e,this)):(e.button==this.mousePasteButton||this.mouseRightClickPaste&&2==e.button)&&(this.paste()||console.warn("Could not paste manually due to web restrictions"))),"mouseup"==e.type&&0==e.button&&this.copyOnSelect&&!this.document_.getSelection().isCollapsed&&this.copySelectionToClipboard(this.document_),"mousemove"!=e.type&&"mouseup"!=e.type||!this.scrollBlockerNode_.engaged||(this.scrollBlockerNode_.engaged=!1,this.scrollBlockerNode_.style.top="-99px"),this.scrollWheelArrowKeys_&&!e.shiftKey&&this.keyboard.applicationCursor&&!this.isPrimaryScreen()&&"wheel"==e.type){var o=this.scrollPort_.scrollWheelDelta(e),n=function(e,t,r,o){if(0==e)return"";var n=i.f.smartFloorDivide(Math.abs(e),t);return("\x1bO"+(e<0?o:r)).repeat(n)};this.io.sendString(n(o.y,this.scrollPort_.characterSize.height,"A","B")+n(o.x,this.scrollPort_.characterSize.width,"C","D")),e.preventDefault()}}"mouseup"==e.type&&this.document_.getSelection().isCollapsed&&(this.defeatMouseReports_=!1)}}},h.Terminal.prototype.onMouse=function(e){},h.Terminal.prototype.onFocusChange_=function(e){this.cursorNode_.setAttribute("focus",e),this.restyleCursor_(),this.reportFocus&&this.io.sendString(!0===e?"\x1b[I":"\x1b[O"),!0===e&&this.closeBellNotifications_()},h.Terminal.prototype.onScroll_=function(){this.scheduleSyncCursorPosition_()},h.Terminal.prototype.onPaste_=function(e){var t=e.text.replace(/\n/gm,"\r");if(t=this.keyboard.encode(t),this.options_.bracketedPaste){t="\x1b[200~"+function(e){return e.replace(/[\x00-\x07\x0b-\x0c\x0e-\x1f]/g,"")}(t)+"\x1b[201~"}this.io.sendString(t)},h.Terminal.prototype.onCopy_=function(e){this.useDefaultWindowCopy||(e.preventDefault(),setTimeout(this.copySelectionToClipboard.bind(this),0))},h.Terminal.prototype.onResize_=function(){var e=Math.floor(this.scrollPort_.getScreenWidth()/this.scrollPort_.characterSize.width)||0,t=i.f.smartFloorDivide(this.scrollPort_.getScreenHeight(),this.scrollPort_.characterSize.height)||0;if(!(e<=0||t<=0)){var r=e!=this.screenSize.width||t!=this.screenSize.height;this.realizeSize_(e,t),this.showZoomWarning_(1!=this.scrollPort_.characterSize.zoomFactor),r&&this.overlaySize(),this.restyleCursor_(),this.scheduleSyncCursorPosition_()}},h.Terminal.prototype.onCursorBlink_=function(){if(!this.options_.cursorBlink)return void delete this.timeouts_.cursorBlink;"false"==this.cursorNode_.getAttribute("focus")||"0"==this.cursorNode_.style.opacity?(this.cursorNode_.style.opacity="1",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[0])):(this.cursorNode_.style.opacity="0",this.timeouts_.cursorBlink=setTimeout(this.myOnCursorBlink_,this.cursorBlinkCycle_[1]))},h.Terminal.prototype.setScrollbarVisible=function(e){this.scrollPort_.setScrollbarVisible(e)},h.Terminal.prototype.setScrollWheelMoveMultipler=function(e){this.scrollPort_.setScrollWheelMoveMultipler(e)},h.Terminal.prototype.closeBellNotifications_=function(){this.bellNotificationList_.forEach(function(e){e.close()}),this.bellNotificationList_.length=0},h.Terminal.prototype.onScrollportFocus_=function(){var e=this.scrollPort_.getTopRowIndex(),t=this.scrollPort_.getBottomRowIndex(e),r=this.document_.getSelection();!this.syncCursorPosition_()&&r&&r.collapse(this.getRowNode(t))},i.rtdep("lib.encodeUTF8"),h.Terminal.IO=function(e){this.terminal_=e,this.previousIO_=null,this.buffered_=""},h.Terminal.IO.prototype.showOverlay=function(e,t){this.terminal_.showOverlay(e,t)},h.Terminal.IO.prototype.hideOverlay=function(){this.terminal_.hideOverlay()},h.Terminal.IO.prototype.createFrame=function(e,t){return new h.Frame(this.terminal_,e,t)},h.Terminal.IO.prototype.setTerminalProfile=function(e){this.terminal_.setProfile(e)},h.Terminal.IO.prototype.push=function(){var e=new h.Terminal.IO(this.terminal_);return e.keyboardCaptured_=this.keyboardCaptured_,e.columnCount=this.columnCount,e.rowCount=this.rowCount,e.previousIO_=this.terminal_.io,this.terminal_.io=e,e},h.Terminal.IO.prototype.pop=function(){this.terminal_.io=this.previousIO_,this.previousIO_.flush()},h.Terminal.IO.prototype.flush=function(){this.buffered_&&(this.terminal_.interpret(this.buffered_),this.buffered_="")},h.Terminal.IO.prototype.sendString=function(e){console.log("Unhandled sendString: "+e)},h.Terminal.IO.prototype.onVTKeystroke=function(e){console.log("Unobserverd VT keystroke: "+JSON.stringify(e))},h.Terminal.IO.prototype.onTerminalResize_=function(e,t){for(var r=this;r;)r.columnCount=e,r.rowCount=t,r=r.previousIO_;this.onTerminalResize(e,t)},h.Terminal.IO.prototype.onTerminalResize=function(e,t){},h.Terminal.IO.prototype.writeUTF8=function(e){if(this.terminal_.io!=this)return void(this.buffered_+=e);this.terminal_.interpret(e)},h.Terminal.IO.prototype.writelnUTF8=function(e){this.writeUTF8(e+"\r\n")},h.Terminal.IO.prototype.print=h.Terminal.IO.prototype.writeUTF16=function(e){this.writeUTF8(i.encodeUTF8(e))},h.Terminal.IO.prototype.println=h.Terminal.IO.prototype.writelnUTF16=function(e){this.writelnUTF8(i.encodeUTF8(e))},i.rtdep("lib.colors"),h.TextAttributes=function(e){this.document_=e,this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.underlineSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.underlineColor=this.DEFAULT_COLOR,this.defaultForeground="rgb(255, 255, 255)",this.defaultBackground="rgb(0, 0, 0)",this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0,this.tileData=null,this.uri=null,this.uriId=null,this.colorPalette=null,this.resetColorPalette()},h.TextAttributes.prototype.enableBold=!0,h.TextAttributes.prototype.enableBoldAsBright=!0,h.TextAttributes.prototype.DEFAULT_COLOR=i.f.createEnum(""),h.TextAttributes.prototype.SRC_DEFAULT="default",h.TextAttributes.prototype.setDocument=function(e){this.document_=e},h.TextAttributes.prototype.clone=function(){var e=new h.TextAttributes(null);for(var t in this)e[t]=this[t];return e.colorPalette=this.colorPalette.concat(),e},h.TextAttributes.prototype.reset=function(){this.foregroundSource=this.SRC_DEFAULT,this.backgroundSource=this.SRC_DEFAULT,this.underlineSource=this.SRC_DEFAULT,this.foreground=this.DEFAULT_COLOR,this.background=this.DEFAULT_COLOR,this.underlineColor=this.DEFAULT_COLOR,this.bold=!1,this.faint=!1,this.italic=!1,this.blink=!1,this.underline=!1,this.strikethrough=!1,this.inverse=!1,this.invisible=!1,this.wcNode=!1,this.asciiNode=!0,this.uri=null,this.uriId=null},h.TextAttributes.prototype.resetColorPalette=function(){this.colorPalette=i.colors.colorPalette.concat(),this.syncColors()},h.TextAttributes.prototype.resetColor=function(e){e=parseInt(e,10),isNaN(e)||e>=this.colorPalette.length||(this.colorPalette[e]=i.colors.stockColorPalette[e],this.syncColors())},h.TextAttributes.prototype.isDefault=function(){return this.foregroundSource==this.SRC_DEFAULT&&this.backgroundSource==this.SRC_DEFAULT&&!this.bold&&!this.faint&&!this.italic&&!this.blink&&!this.underline&&!this.strikethrough&&!this.inverse&&!this.invisible&&!this.wcNode&&this.asciiNode&&null==this.tileData&&null==this.uri},h.TextAttributes.prototype.createContainer=function(e){if(this.isDefault()){var t=this.document_.createTextNode(e);return t.asciiNode=!0,t}var r=this.document_.createElement("span"),o=r.style,n=[];this.foreground!=this.DEFAULT_COLOR&&(o.color=this.foreground),this.background!=this.DEFAULT_COLOR&&(o.backgroundColor=this.background),this.enableBold&&this.bold&&(o.fontWeight="bold"),this.faint&&(r.faint=!0),this.italic&&(o.fontStyle="italic"),this.blink&&(n.push("blink-node"),r.blinkNode=!0);var i="";return r.underline=this.underline,this.underline&&(i+=" underline",o.textDecorationStyle=this.underline),this.underlineSource!=this.SRC_DEFAULT&&(o.textDecorationColor=this.underlineColor),this.strikethrough&&(i+=" line-through",r.strikethrough=!0),i&&(o.textDecorationLine=i),this.wcNode&&(n.push("wc-node"),r.wcNode=!0),r.asciiNode=this.asciiNode,null!=this.tileData&&(n.push("tile"),n.push("tile_"+this.tileData),r.tileNode=!0),e&&(r.textContent=e),this.uri&&(n.push("uri-node"),r.uriId=this.uriId,r.title=this.uri,r.addEventListener("click",h.openUrl.bind(this,this.uri))),n.length&&(r.className=n.join(" ")),r},h.TextAttributes.prototype.matchesContainer=function(e){if("string"==typeof e||e.nodeType==Node.TEXT_NODE)return this.isDefault();var t=e.style;return!(this.wcNode||e.wcNode)&&this.asciiNode==e.asciiNode&&!(null!=this.tileData||e.tileNode)&&this.uriId==e.uriId&&this.foreground==t.color&&this.background==t.backgroundColor&&this.underlineColor==t.textDecorationColor&&(this.enableBold&&this.bold)==!!t.fontWeight&&this.blink==!!e.blinkNode&&this.italic==!!t.fontStyle&&this.underline==e.underline&&!!this.strikethrough==!!e.strikethrough},h.TextAttributes.prototype.setDefaults=function(e,t){this.defaultForeground=e,this.defaultBackground=t,this.syncColors()},h.TextAttributes.prototype.syncColors=function(){var e=this,t=function(t,r){return t==e.DEFAULT_COLOR?r:t},r=this.foregroundSource,o=this.backgroundSource;if(this.enableBoldAsBright&&this.bold&&Number.isInteger(r)&&(r=function(e){return e<8?e+8:e}(r)),r==this.SRC_DEFAULT?this.foreground=this.DEFAULT_COLOR:Number.isInteger(r)?this.foreground=this.colorPalette[r]:this.foreground=r,this.faint){var n=t(this.foreground,this.defaultForeground);this.foreground=i.colors.mix(n,"rgb(0, 0, 0)",.3333)}if(o==this.SRC_DEFAULT?this.background=this.DEFAULT_COLOR:Number.isInteger(o)?this.background=this.colorPalette[o]:this.background=o,this.inverse){var s=t(this.foreground,this.defaultForeground);this.foreground=t(this.background,this.defaultBackground),this.background=s}this.invisible&&(this.foreground=this.background),this.underlineSource==this.SRC_DEFAULT?this.underlineColor="":Number.isInteger(this.underlineSource)?this.underlineColor=this.colorPalette[this.underlineSource]:this.underlineColor=this.underlineSource},h.TextAttributes.containersMatch=function(e,t){if("string"==typeof e)return h.TextAttributes.containerIsDefault(t);if(e.nodeType!=t.nodeType)return!1;if(e.nodeType==Node.TEXT_NODE)return!0;var r=e.style,o=t.style;return r.color==o.color&&r.backgroundColor==o.backgroundColor&&r.backgroundColor==o.backgroundColor&&r.fontWeight==o.fontWeight&&r.fontStyle==o.fontStyle&&r.textDecoration==o.textDecoration&&r.textDecorationColor==o.textDecorationColor&&r.textDecorationStyle==o.textDecorationStyle&&r.textDecorationLine==o.textDecorationLine},h.TextAttributes.containerIsDefault=function(e){return"string"==typeof e||e.nodeType==Node.TEXT_NODE},h.TextAttributes.nodeWidth=function(e){return e.asciiNode?e.textContent.length:i.wc.strWidth(e.textContent)},h.TextAttributes.nodeSubstr=function(e,t,r){return e.asciiNode?e.textContent.substr(t,r):i.wc.substr(e.textContent,t,r)},h.TextAttributes.nodeSubstring=function(e,t,r){return e.asciiNode?e.textContent.substring(t,r):i.wc.substring(e.textContent,t,r)},h.TextAttributes.splitWidecharString=function(e){for(var t,r=[],o=0,n=0,s=0,a=!0,l=0;l0?0:1),a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a+32)+o+n,e.preventDefault();break;case"mousedown":var a=Math.min(e.button,2);this.mouseCoordinates!=this.MOUSE_COORDINATES_SGR&&(a+=32),a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a)+o+n;break;case"mouseup":this.mouseReport!=this.MOUSE_REPORT_PRESS&&(t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+e.button+";"+o+";"+n+"m":"\x1b[M#"+o+n);break;case"mousemove":this.mouseReport==this.MOUSE_REPORT_DRAG&&e.buttons&&(a=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?0:32,1&e.buttons?a+=0:4&e.buttons?a+=1:2&e.buttons?a+=2:a+=3,a+=32,a|=r,t=this.mouseCoordinates==this.MOUSE_COORDINATES_SGR?"\x1b[<"+a+";"+o+";"+n+"M":"\x1b[M"+String.fromCharCode(a)+o+n,this.lastMouseDragResponse_==t?t="":this.lastMouseDragResponse_=t);break;case"click":case"dblclick":break;default:console.error("Unknown mouse event: "+e.type,e)}t&&this.terminal.io.sendString(t)}},h.VT.prototype.interpret=function(e){for(this.parseState_.resetBuf(this.decode(e));!this.parseState_.isComplete();){var t=this.parseState_.func,r=this.parseState_.pos,e=this.parseState_.buf;if(this.parseState_.func.call(this,this.parseState_),this.parseState_.func==t&&this.parseState_.pos==r&&this.parseState_.buf==e)throw"Parser did not alter the state!"}},h.VT.prototype.decode=function(e){return"utf-8"==this.characterEncoding?this.decodeUTF8(e):e},h.VT.prototype.encodeUTF8=function(e){return i.encodeUTF8(e)},h.VT.prototype.decodeUTF8=function(e){return this.utf8Decoder_.decode(e)},h.VT.prototype.setEncoding=function(e){switch(e){default:console.warn('Invalid value for "terminal-encoding": '+e);case"iso-2022":this.codingSystemUtf8_=!1,this.codingSystemLocked_=!1;break;case"utf-8-locked":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!0;break;case"utf-8":this.codingSystemUtf8_=!0,this.codingSystemLocked_=!1}this.updateEncodingState_()},h.VT.prototype.updateEncodingState_=function(){var e=this,t=Object.keys(h.VT.CC1).filter(function(t){return!e.codingSystemUtf8_||t.charCodeAt()<128}).map(function(e){return"\\x"+i.f.zpad(e.charCodeAt().toString(16),2)}).join("");this.cc1Pattern_=new RegExp("["+t+"]")},h.VT.prototype.parseUnknown_=function(e){function t(e){!r.codingSystemUtf8_&&r[r.GL].GL&&(e=r[r.GL].GL(e)),r.terminal.print(e)}var r=this,o=e.peekRemainingBuf(),n=o.search(this.cc1Pattern_);return 0==n?(this.dispatch("CC1",o.substr(0,1),e),void e.advance(1)):-1==n?(t(o),void e.reset()):(t(o.substr(0,n)),this.dispatch("CC1",o.substr(n,1),e),void e.advance(n+1))},h.VT.prototype.parseCSI_=function(e){var t=e.peekChar(),r=e.args,o=function(){e.resetArguments(),e.subargs=null,e.resetParseFunction()};t>="@"&&t<="~"?(this.dispatch("CSI",this.leadingModifier_+this.trailingModifier_+t,e),o()):";"==t?this.trailingModifier_?o():(r.length||r.push(""),r.push("")):t>="0"&&t<="9"||":"==t?this.trailingModifier_?o():(r.length?r[r.length-1]+=t:r[0]=t,":"==t&&e.argSetSubargs(r.length-1)):t>=" "&&t<="?"?r.length?this.trailingModifier_+=t:this.leadingModifier_+=t:this.cc1Pattern_.test(t)?this.dispatch("CC1",t,e):o(),e.advance(1)},h.VT.prototype.parseUntilStringTerminator_=function(e){var t=e.peekRemainingBuf(),r=e.args,o=0;r.length?"\x1b"==r[0].slice(-1)&&(r[0]=r[0].slice(0,-1),t="\x1b"+t,o=1):(r[0]="",r[1]=new Date);var n=t.search(/[\x1b\x07]/),i=t[n];if(!(("\x1b"!=i||"\\"==t[n+1])&&-1!=n)){r[0]+=t;var s;return"\x1b"==i&&n!=t.length-1&&(s="embedded escape: "+n),(new Date-r[1]>this.oscTimeLimit_&&(s="timeout expired: "+(new Date-r[1])),s)?(this.warnUnimplemented&&console.log("parseUntilStringTerminator_: aborting: "+s,r[0]),e.reset(r[0]),!1):(e.advance(t.length-o),!0)}return r[0]+=t.substr(0,n),e.resetParseFunction(),e.advance(n+("\x1b"==i?2:1)-o),!0},h.VT.prototype.dispatch=function(e,t,r){var o=h.VT[e][t];return o?o==h.VT.ignore?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code: "+JSON.stringify(t))):r.subargs&&!o.supportsSubargs?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code w/subargs: "+JSON.stringify(t))):"CC1"==e&&t>"\x7f"&&!this.enable8BitControl?void console.warn("Ignoring 8-bit control code: 0x"+t.charCodeAt(0).toString(16)):void o.apply(this,[r,t]):void(this.warnUnimplemented&&console.warn("Unknown "+e+" code: "+JSON.stringify(t)))},h.VT.prototype.setANSIMode=function(e,t){4==e?this.terminal.setInsertMode(t):20==e?this.terminal.setAutoCarriageReturn(t):this.warnUnimplemented&&console.warn("Unimplemented ANSI Mode: "+e)},h.VT.prototype.setDECMode=function(e,t){switch(parseInt(e,10)){case 1:this.terminal.keyboard.applicationCursor=t;break;case 3:this.allowColumnWidthChanges_&&(this.terminal.setWidth(t?132:80),this.terminal.clearHome(),this.terminal.setVTScrollRegion(null,null));break;case 5:this.terminal.setReverseVideo(t);break;case 6:this.terminal.setOriginMode(t);break;case 7:this.terminal.setWraparound(t);break;case 9:this.mouseReport=t?this.MOUSE_REPORT_PRESS:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 12:this.enableDec12&&this.terminal.setCursorBlink(t);break;case 25:this.terminal.setCursorVisible(t);break;case 30:this.terminal.setScrollbarVisible(t);break;case 40:this.terminal.allowColumnWidthChanges_=t;break;case 45:this.terminal.setReverseWraparound(t);break;case 67:this.terminal.keyboard.backspaceSendsBackspace=t;break;case 1e3:this.mouseReport=t?this.MOUSE_REPORT_CLICK:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1002:this.mouseReport=t?this.MOUSE_REPORT_DRAG:this.MOUSE_REPORT_DISABLED,this.terminal.syncMouseStyle();break;case 1004:this.terminal.reportFocus=t;break;case 1005:this.mouseCoordinates=t?this.MOUSE_COORDINATES_UTF8:this.MOUSE_COORDINATES_X10;break;case 1006:this.mouseCoordinates=t?this.MOUSE_COORDINATES_SGR:this.MOUSE_COORDINATES_X10;break;case 1007:this.terminal.scrollWheelArrowKeys_=t;break;case 1010:this.terminal.scrollOnOutput=t;break;case 1011:this.terminal.scrollOnKeystroke=t;break;case 1036:this.terminal.keyboard.metaSendsEscape=t;break;case 1039:t?this.terminal.keyboard.previousAltSendsWhat_||(this.terminal.keyboard.previousAltSendsWhat_=this.terminal.keyboard.altSendsWhat,this.terminal.keyboard.altSendsWhat="escape"):this.terminal.keyboard.previousAltSendsWhat_&&(this.terminal.keyboard.altSendsWhat=this.terminal.keyboard.previousAltSendsWhat_,this.terminal.keyboard.previousAltSendsWhat_=null);break;case 47:case 1047:this.terminal.setAlternateMode(t);break;case 1048:t?this.terminal.saveCursorAndState():this.terminal.restoreCursorAndState();break;case 1049:t?(this.terminal.saveCursorAndState(),this.terminal.setAlternateMode(t),this.terminal.clear()):(this.terminal.setAlternateMode(t),this.terminal.restoreCursorAndState());break;case 2004:this.terminal.setBracketedPaste(t);break;default:this.warnUnimplemented&&console.warn("Unimplemented DEC Private Mode: "+e)}},h.VT.ignore=function(){},h.VT.CC1={},h.VT.ESC={},h.VT.CSI={},h.VT.OSC={},h.VT.VT52={},h.VT.CC1["\0"]=h.VT.ignore,h.VT.CC1["\x05"]=h.VT.ignore,h.VT.CC1["\x07"]=function(){this.terminal.ringBell()},h.VT.CC1["\b"]=function(){this.terminal.cursorLeft(1)},h.VT.CC1["\t"]=function(){this.terminal.forwardTabStop()},h.VT.CC1["\n"]=function(){this.terminal.formFeed()},h.VT.CC1["\v"]=h.VT.CC1["\n"],h.VT.CC1["\f"]=h.VT.CC1["\n"],h.VT.CC1["\r"]=function(){this.terminal.setCursorColumn(0)},h.VT.CC1["\x0e"]=function(){this.GL="G1"},h.VT.CC1["\x0f"]=function(){this.GL="G0"},h.VT.CC1["\x11"]=h.VT.ignore,h.VT.CC1["\x13"]=h.VT.ignore,h.VT.CC1["\x18"]=function(e){"G1"==this.GL&&(this.GL="G0"),e.resetParseFunction(),this.terminal.print("?")},h.VT.CC1["\x1a"]=h.VT.CC1["\x18"],h.VT.CC1["\x1b"]=function(e){function t(e){var r=e.consumeChar();"\x1b"!=r&&(this.dispatch("ESC",r,e),e.func==t&&e.resetParseFunction())}e.func=t},h.VT.CC1["\x7f"]=h.VT.ignore,h.VT.CC1["\x84"]=h.VT.ESC.D=function(){this.terminal.lineFeed()},h.VT.CC1["\x85"]=h.VT.ESC.E=function(){this.terminal.setCursorColumn(0),this.terminal.cursorDown(1)},h.VT.CC1["\x88"]=h.VT.ESC.H=function(){this.terminal.setTabStop(this.terminal.getCursorColumn())},h.VT.CC1["\x8d"]=h.VT.ESC.M=function(){this.terminal.reverseLineFeed()},h.VT.CC1["\x8e"]=h.VT.ESC.N=h.VT.ignore,h.VT.CC1["\x8f"]=h.VT.ESC.O=h.VT.ignore,h.VT.CC1["\x90"]=h.VT.ESC.P=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.CC1["\x96"]=h.VT.ESC.V=h.VT.ignore,h.VT.CC1["\x97"]=h.VT.ESC.W=h.VT.ignore,h.VT.CC1["\x98"]=h.VT.ESC.X=h.VT.ignore,h.VT.CC1["\x9a"]=h.VT.ESC.Z=function(){this.terminal.io.sendString("\x1b[?1;2c")},h.VT.CC1["\x9b"]=h.VT.ESC["["]=function(e){e.resetArguments(),this.leadingModifier_="",this.trailingModifier_="",e.func=this.parseCSI_},h.VT.CC1["\x9c"]=h.VT.ESC["\\"]=h.VT.ignore,h.VT.CC1["\x9d"]=h.VT.ESC["]"]=function(e){function t(e){if(this.parseUntilStringTerminator_(e)&&e.func!=t){var r=e.args[0].match(/^(\d+);(.*)$/);r?(e.args[0]=r[2],this.dispatch("OSC",r[1],e)):console.warn("Invalid OSC: "+JSON.stringify(e.args[0])),e.resetArguments()}}e.resetArguments(),e.func=t},h.VT.CC1["\x9e"]=h.VT.ESC["^"]=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.CC1["\x9f"]=h.VT.ESC._=function(e){e.resetArguments(),e.func=this.parseUntilStringTerminator_},h.VT.ESC[" "]=function(e){e.func=function(e){var t=e.consumeChar();this.warnUnimplemented&&console.warn("Unimplemented sequence: ESC 0x20 "+t),e.resetParseFunction()}},h.VT.ESC["#"]=function(e){e.func=function(e){"8"==e.consumeChar()&&(this.terminal.setCursorPosition(0,0),this.terminal.fill("E")),e.resetParseFunction()}},h.VT.ESC["%"]=function(e){e.func=function(e){var t=e.consumeChar();if(this.codingSystemLocked_)return"/"==t&&e.consumeChar(),void e.resetParseFunction();switch(t){case"@":this.setEncoding("iso-2022");break;case"G":this.setEncoding("utf-8");break;case"/":switch(t=e.consumeChar()){case"G":case"H":case"I":this.setEncoding("utf-8-locked");break;default:this.warnUnimplemented&&console.warn("Unknown ESC % / argument: "+JSON.stringify(t))}break;default:this.warnUnimplemented&&console.warn("Unknown ESC % argument: "+JSON.stringify(t))}e.resetParseFunction()}},h.VT.ESC["("]=h.VT.ESC[")"]=h.VT.ESC["*"]=h.VT.ESC["+"]=h.VT.ESC["-"]=h.VT.ESC["."]=h.VT.ESC["/"]=function(e,t){e.func=function(e){var r=e.consumeChar();if("\x1b"==r)return e.resetParseFunction(),void e.func();var o=this.characterMaps.getMap(r);void 0!==o?"("==t?this.G0=o:")"==t||"-"==t?this.G1=o:"*"==t||"."==t?this.G2=o:"+"!=t&&"/"!=t||(this.G3=o):this.warnUnimplemented&&console.log('Invalid character set for "'+t+'": '+r),e.resetParseFunction()}},h.VT.ESC[6]=h.VT.ignore,h.VT.ESC[7]=function(){this.terminal.saveCursorAndState()},h.VT.ESC[8]=function(){this.terminal.restoreCursorAndState()},h.VT.ESC[9]=h.VT.ignore,h.VT.ESC["="]=function(){this.terminal.keyboard.applicationKeypad=!0},h.VT.ESC[">"]=function(){this.terminal.keyboard.applicationKeypad=!1},h.VT.ESC.F=h.VT.ignore,h.VT.ESC.c=function(){this.terminal.reset()},h.VT.ESC.l=h.VT.ESC.m=h.VT.ignore,h.VT.ESC.n=function(){this.GL="G2"},h.VT.ESC.o=function(){this.GL="G3"},h.VT.ESC["|"]=function(){this.GR="G3"},h.VT.ESC["}"]=function(){this.GR="G2"},h.VT.ESC["~"]=function(){this.GR="G1"},h.VT.OSC[0]=function(e){this.terminal.setWindowTitle(e.args[0])},h.VT.OSC[2]=h.VT.OSC[0],h.VT.OSC[4]=function(e){for(var t=e.args[0].split(";"),r=parseInt(t.length/2),o=this.terminal.getTextAttributes().colorPalette,n=[],s=0;s=o.length||("?"!=l?(l=i.colors.x11ToCSS(l))&&(o[a]=l):(l=i.colors.rgbToX11(o[a]))&&n.push(a+";"+l))}n.length&&this.terminal.io.sendString("\x1b]4;"+n.join(";")+"\x07")},h.VT.OSC[8]=function(e){var t=e.args[0].split(";"),r=null,o=null;if(2!=t.length||0==t[1].length);else{var n=t[0].split(":");r="",n.forEach(function(e){var t=e.indexOf("=");if(-1!=t){var o=e.slice(0,t),n=e.slice(t+1);switch(o){case"id":r=n}}}),o=t[1]}var i=this.terminal.getTextAttributes();i.uri=o,i.uriId=r},h.VT.OSC[9]=function(e){h.notify({body:e.args[0]})},h.VT.OSC[10]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setForegroundColor(r),t.length>0&&(e.args[0]=t.join(";"),h.VT.OSC[11].apply(this,[e]))}},h.VT.OSC[11]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setBackgroundColor(r),t.length>0&&(e.args[0]=t.join(";"),h.VT.OSC[12].apply(this,[e]))}},h.VT.OSC[12]=function(e){var t=e.args[0].split(";");if(t){var r=i.colors.x11ToCSS(t.shift());r&&this.terminal.setCursorColor(r)}},h.VT.OSC[50]=function(e){var t=e.args[0].match(/CursorShape=(.)/i);if(!t)return void console.warn("Could not parse OSC 50 args: "+e.args[0]);switch(t[1]){case"1":this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM);break;case"2":this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE);break;default:this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK)}},h.VT.OSC[52]=function(e){if(this.enableClipboardWrite){var t=e.args[0].match(/^[cps01234567]*;(.*)/);if(t){var r=window.atob(t[1]);r&&this.terminal.copyStringToClipboard(this.decode(r))}}},h.VT.OSC[104]=function(e){var t=this.terminal.getTextAttributes();if(!e.args[0])return void t.resetColorPalette();e.args[0].split(";").forEach(function(e){return t.resetColor(e)})},h.VT.OSC[110]=function(e){this.terminal.setForegroundColor()},h.VT.OSC[111]=function(e){this.terminal.setBackgroundColor()},h.VT.OSC[112]=function(e){this.terminal.setCursorColor()},h.VT.OSC[1337]=function(e){var t=e.args[0].match(/^File=([^:]*):([\s\S]*)$/m);if(!t)return void(this.warnUnimplemented&&console.log("iTerm2 1337: unsupported sequence: "+t[1]));var r={name:"",size:0,preserveAspectRatio:!0,inline:!1,width:"auto",height:"auto",align:"left",uri:"data:application/octet-stream;base64,"+t[2].replace(/[\n\r]+/gm,"")};if(t[1].split(";").forEach(function(e){var t=e.match(/^([^=]+)=(.*)$/m);if(t)switch(t[1]){case"name":try{r.name=window.atob(t[2])}catch(e){}break;case"size":try{r.size=parseInt(t[2])}catch(e){}break;case"width":r.width=t[2];break;case"height":r.height=t[2];break;case"preserveAspectRatio":r.preserveAspectRatio=!("0"==t[2]);break;case"inline":r.inline=!("0"==t[2]);break;case"align":r.align=t[2]}}),r.inline){var o=this.terminal.io,n=e.peekRemainingBuf();e.advance(n.length),this.terminal.displayImage(r),o.writeUTF8(n)}else this.terminal.displayImage(r)},h.VT.OSC[777]=function(e){var t;switch(e.args[0].split(";",1)[0]){case"notify":var r,o;t=e.args[0].match(/^[^;]+;([^;]*)(;([\s\S]*))?$/),t&&(r=t[1],o=t[3]),h.notify({title:r,body:o});break;default:console.warn("Unknown urxvt module: "+e.args[0])}},h.VT.CSI["@"]=function(e){this.terminal.insertSpace(e.iarg(0,1))},h.VT.CSI.A=function(e){this.terminal.cursorUp(e.iarg(0,1))},h.VT.CSI.B=function(e){this.terminal.cursorDown(e.iarg(0,1))},h.VT.CSI.C=function(e){this.terminal.cursorRight(e.iarg(0,1))},h.VT.CSI.D=function(e){this.terminal.cursorLeft(e.iarg(0,1))},h.VT.CSI.E=function(e){this.terminal.cursorDown(e.iarg(0,1)),this.terminal.setCursorColumn(0)},h.VT.CSI.F=function(e){this.terminal.cursorUp(e.iarg(0,1)),this.terminal.setCursorColumn(0)},h.VT.CSI.G=function(e){this.terminal.setCursorColumn(e.iarg(0,1)-1)},h.VT.CSI.H=function(e){this.terminal.setCursorPosition(e.iarg(0,1)-1,e.iarg(1,1)-1)},h.VT.CSI.I=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rT"]=h.VT.ignore,h.VT.CSI.X=function(e){this.terminal.eraseToRight(e.iarg(0,1))},h.VT.CSI.Z=function(e){var t=e.iarg(0,1);t=i.f.clamp(t,1,this.terminal.screenSize.width);for(var r=0;rc"]=function(e){this.terminal.io.sendString("\x1b[>0;256;0c")},h.VT.CSI.d=function(e){this.terminal.setAbsoluteCursorRow(e.iarg(0,1)-1)},h.VT.CSI.f=h.VT.CSI.H,h.VT.CSI.g=function(e){e.args[0]&&0!=e.args[0]?3==e.args[0]&&this.terminal.clearAllTabStops():this.terminal.clearTabStopAtCursor(!1)},h.VT.CSI.h=function(e){for(var t=0;t=90&&o<=97?t.foregroundSource=o-90+8:o>=100&&o<=107&&(t.backgroundSource=o-100+8)}t.setDefaults(this.terminal.getForegroundColor(),this.terminal.getBackgroundColor())},h.VT.CSI.m.supportsSubargs=!0,h.VT.CSI[">m"]=h.VT.ignore,h.VT.CSI.n=function(e){if(5==e.args[0])this.terminal.io.sendString("\x1b0n");else if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("\x1b["+t+";"+r+"R")}};h.VT.CSI[">n"]=h.VT.ignore,h.VT.CSI["?n"]=function(e){if(6==e.args[0]){var t=this.terminal.getCursorRow()+1,r=this.terminal.getCursorColumn()+1;this.terminal.io.sendString("\x1b["+t+";"+r+"R")}else 15==e.args[0]?this.terminal.io.sendString("\x1b[?11n"):25==e.args[0]?this.terminal.io.sendString("\x1b[?21n"):26==e.args[0]?this.terminal.io.sendString("\x1b[?12;1;0;0n"):53==e.args[0]&&this.terminal.io.sendString("\x1b[?50n")},h.VT.CSI[">p"]=h.VT.ignore,h.VT.CSI["!p"]=function(){this.terminal.softReset()},h.VT.CSI.$p=h.VT.ignore,h.VT.CSI["?$p"]=h.VT.ignore,h.VT.CSI['"p']=h.VT.ignore,h.VT.CSI.q=h.VT.ignore,h.VT.CSI[" q"]=function(e){var t=e.args[0];0==t||1==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!0)):2==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BLOCK),this.terminal.setCursorBlink(!1)):3==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!0)):4==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.UNDERLINE),this.terminal.setCursorBlink(!1)):5==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!0)):6==t?(this.terminal.setCursorShape(h.Terminal.cursorShape.BEAM),this.terminal.setCursorBlink(!1)):console.warn("Unknown cursor style: "+t)},h.VT.CSI['"q']=h.VT.ignore,h.VT.CSI.r=function(e){var t=e.args,r=t[0]?parseInt(t[0],10)-1:null,o=t[1]?parseInt(t[1],10)-1:null;this.terminal.setVTScrollRegion(r,o),this.terminal.setCursorPosition(0,0)},h.VT.CSI["?r"]=h.VT.ignore,h.VT.CSI.$r=h.VT.ignore,h.VT.CSI.s=function(){this.terminal.saveCursorAndState()},h.VT.CSI["?s"]=h.VT.ignore,h.VT.CSI.t=h.VT.ignore,h.VT.CSI.$t=h.VT.ignore,h.VT.CSI[">t"]=h.VT.ignore,h.VT.CSI[" t"]=h.VT.ignore,h.VT.CSI.u=function(){this.terminal.restoreCursorAndState()},h.VT.CSI[" u"]=h.VT.ignore,h.VT.CSI.$v=h.VT.ignore,h.VT.CSI["'w"]=h.VT.ignore,h.VT.CSI.x=h.VT.ignore,h.VT.CSI["*x"]=h.VT.ignore,h.VT.CSI.$x=h.VT.ignore,h.VT.CSI.z=function(e){if(!(e.args.length<1)){var t=e.args[0];if(0==t){if(e.args.length<2)return;this.terminal.getTextAttributes().tileData=e.args[1]}else 1==t&&(this.terminal.getTextAttributes().tileData=null)}},h.VT.CSI["'z"]=h.VT.ignore,h.VT.CSI.$z=h.VT.ignore,h.VT.CSI["'{"]=h.VT.ignore,h.VT.CSI["'|"]=h.VT.ignore,h.VT.CSI["'}"]=h.VT.ignore,h.VT.CSI["'~"]=h.VT.ignore,i.rtdep("lib.f"),h.VT.CharacterMap=function(e,t){this.description=e,this.GL=null,this.glmapBase_=t,this.sync_()},h.VT.CharacterMap.prototype.sync_=function(e){var t=this;if(!this.glmapBase_&&!e)return this.GL=null,delete this.glmap_,void delete this.glre_;this.glmap_=e?Object.assign({},this.glmapBase_,e):this.glmapBase_;var r=Object.keys(this.glmap_).map(function(e){return"\\x"+i.f.zpad(e.charCodeAt(0).toString(16))});this.glre_=new RegExp("["+r.join("")+"]","g"),this.GL=function(e){return e.replace(t.glre_,function(e){return t.glmap_[e]})}},h.VT.CharacterMap.prototype.reset=function(){this.glmap_!==this.glmapBase_&&this.sync_()},h.VT.CharacterMap.prototype.setOverrides=function(e){this.sync_(e)},h.VT.CharacterMap.prototype.clone=function(){var e=new h.VT.CharacterMap(this.description,this.glmapBase_);return this.glmap_!==this.glmapBase_&&e.setOverrides(this.glmap_),e},h.VT.CharacterMaps=function(){this.maps_=h.VT.CharacterMaps.DefaultMaps,this.mapsBase_=this.maps_},h.VT.CharacterMaps.prototype.getMap=function(e){return this.maps_.hasOwnProperty(e)?this.maps_[e]:void 0},h.VT.CharacterMaps.prototype.addMap=function(e,t){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_)),this.maps_[e]=t},h.VT.CharacterMaps.prototype.reset=function(){this.maps_!==h.VT.CharacterMaps.DefaultMaps&&(this.maps_=h.VT.CharacterMaps.DefaultMaps)},h.VT.CharacterMaps.prototype.setOverrides=function(e){this.maps_===this.mapsBase_&&(this.maps_=Object.assign({},this.mapsBase_));for(var t in e){var r=this.getMap(t);void 0!==r?(this.maps_[t]=r.clone(),this.maps_[t].setOverrides(e[t])):this.addMap(t,new h.VT.CharacterMap("user "+t,e[t]))}},h.VT.CharacterMaps.DefaultMaps={},h.VT.CharacterMaps.DefaultMaps[0]=new h.VT.CharacterMap("graphic",{"`":"\u25c6",a:"\u2592",b:"\u2409",c:"\u240c",d:"\u240d",e:"\u240a",f:"\xb0",g:"\xb1",h:"\u2424",i:"\u240b",j:"\u2518",k:"\u2510",l:"\u250c",m:"\u2514",n:"\u253c",o:"\u23ba",p:"\u23bb",q:"\u2500",r:"\u23bc",s:"\u23bd",t:"\u251c",u:"\u2524",v:"\u2534",w:"\u252c",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03c0","|":"\u2260","}":"\xa3","~":"\xb7"}),h.VT.CharacterMaps.DefaultMaps.A=new h.VT.CharacterMap("british",{"#":"\xa3"}),h.VT.CharacterMaps.DefaultMaps.B=new h.VT.CharacterMap("us",null),h.VT.CharacterMaps.DefaultMaps[4]=new h.VT.CharacterMap("dutch",{"#":"\xa3","@":"\xbe","[":"\u0132","\\":"\xbd","]":"|","{":"\xa8","|":"f","}":"\xbc","~":"\xb4"}),h.VT.CharacterMaps.DefaultMaps.C=h.VT.CharacterMaps.DefaultMaps[5]=new h.VT.CharacterMap("finnish",{"[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps.R=new h.VT.CharacterMap("french",{"#":"\xa3","@":"\xe0","[":"\xb0","\\":"\xe7","]":"\xa7","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xa8"}),h.VT.CharacterMaps.DefaultMaps.Q=new h.VT.CharacterMap("french canadian",{"@":"\xe0","[":"\xe2","\\":"\xe7","]":"\xea","^":"\xee","`":"\xf4","{":"\xe9","|":"\xf9","}":"\xe8","~":"\xfb"}),h.VT.CharacterMaps.DefaultMaps.K=new h.VT.CharacterMap("german",{"@":"\xa7","[":"\xc4","\\":"\xd6","]":"\xdc","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xdf"}),h.VT.CharacterMaps.DefaultMaps.Y=new h.VT.CharacterMap("italian",{"#":"\xa3","@":"\xa7","[":"\xb0","\\":"\xe7","]":"\xe9","`":"\xf9","{":"\xe0","|":"\xf2","}":"\xe8","~":"\xec"}),h.VT.CharacterMaps.DefaultMaps.E=h.VT.CharacterMaps.DefaultMaps[6]=new h.VT.CharacterMap("norwegian/danish",{"@":"\xc4","[":"\xc6","\\":"\xd8","]":"\xc5","^":"\xdc","`":"\xe4","{":"\xe6","|":"\xf8","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps.Z=new h.VT.CharacterMap("spanish",{"#":"\xa3","@":"\xa7","[":"\xa1","\\":"\xd1","]":"\xbf","{":"\xb0","|":"\xf1","}":"\xe7"}),h.VT.CharacterMaps.DefaultMaps[7]=h.VT.CharacterMaps.DefaultMaps.H=new h.VT.CharacterMap("swedish",{"@":"\xc9","[":"\xc4","\\":"\xd6","]":"\xc5","^":"\xdc","`":"\xe9","{":"\xe4","|":"\xf6","}":"\xe5","~":"\xfc"}),h.VT.CharacterMaps.DefaultMaps["="]=new h.VT.CharacterMap("swiss",{"#":"\xf9","@":"\xe0","[":"\xe9","\\":"\xe7","]":"\xea","^":"\xee",_:"\xe8","`":"\xf4","{":"\xe4","|":"\xf6","}":"\xfc","~":"\xfb"}),i.resource.add("hterm/audio/bell","audio/ogg;base64","T2dnU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9UF6YQrMaBWRCufu4fHRn0Bvp7USzkUS4vmD9as+IP3cSHWL5eXGTUizk6v/IDubodM7+++qs+ENbsg2RxLlE/5pr1Ew8H25aFnp6u2CFvGx0e0JHQGdMEJTWgkTo7d4xe3NfXg1KpiLe86TWg9ONtc3eKuVX3yatei5m1AIa6pRT9QaCeb2YporBzx7Zd0chnRkgKbaSLsMLZcK6/rzecU53n5TSAEkw/HPkFy86BpJtq3LRBIK6jq7NDhPOqPi0A0+cuuxq6EMas5bGJaVQWFWgTbrqVTdEX9f4ZvmfB9/3Il5bW2hNmnZbDB4omLpw/h7n5RYCa+3E0ToY4Jp9XiGSYk/WMvHmlxDEn7yN5ffN4mTzrM808G+0leJqVbG81njbfjFJHHr4no4lZ3fjRT06GoWxQ+eFHn7rTz/1Tv5QSrBQpZrAmfVMaQJyNOXHOPESjztJfs54uxFJWl5q1zYuZRzD+RzAPEufoJFln2TyMv8axwUheJPGRVSMFEHe4ZckqMy8cOXLin5f7xVUyyPypwhKAHp13IjJCVW4iHGAz30Q5mmx3I+dwyvbWE36x0ck1AFW9Gb+g06qmWkMQVuLEQEtuVldyjR/vFJqyjxNb6+mTA6DV96HMvkx0ej2pAZZxoBL5QJ8oDKIW3jxnfA5twj1xUhPMjjd9wGpOOEgIgUzaxFG8RZ4FTgxos9N1atajtd+S1LytA26p8NKbQE7/0+BtpNakNtpoo4022vgf7lRPtKCE39oAAAAASUVORK5CYII="),i.resource.add("hterm/concat/date","text/plain","Mon, 26 Nov 2018 08:50:10 +0000"),i.resource.add("hterm/changelog/version","text/plain","2018-10-24"),i.resource.add("hterm/changelog/date","text/plain","1.82"),i.resource.add("hterm/git/HEAD","text/plain","03ee0980444a38a97ef947b2272e44fdb3bdf5f5")},function(e,t,r){"use strict";e.exports=r(24)},function(e,t,r){"use strict";function o(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(e){console.error(e)}}o(),e.exports=r(23)},function(e,t,r){"use strict";function o(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,a,l=o(e),c=1;c="a"&&e<="z")o.name=e;else if(1===e.length&&e>="A"&&e<="Z")o.name=e.toLowerCase(),o.shift=!0;else if(r=s.exec(e))o.name=r[1].toLowerCase(),o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=l.exec(e)){var n=(r[1]||"")+(r[2]||"")+(r[4]||"")+(r[9]||""),i=(r[3]||r[8]||1)-1;switch(o.ctrl=!!(4&i),o.meta=!!(10&i),o.shift=!!(1&i),o.code=n,n){case"OP":o.name="f1";break;case"OQ":o.name="f2";break;case"OR":o.name="f3";break;case"OS":o.name="f4";break;case"[11~":o.name="f1";break;case"[12~":o.name="f2";break;case"[13~":o.name="f3";break;case"[14~":o.name="f4";break;case"[[A":o.name="f1";break;case"[[B":o.name="f2";break;case"[[C":o.name="f3";break;case"[[D":o.name="f4";break;case"[[E":case"[15~":o.name="f5";break;case"[17~":o.name="f6";break;case"[18~":o.name="f7";break;case"[19~":o.name="f8";break;case"[20~":o.name="f9";break;case"[21~":o.name="f10";break;case"[23~":o.name="f11";break;case"[24~":o.name="f12";break;case"[A":o.name="up";break;case"[B":o.name="down";break;case"[C":o.name="right";break;case"[D":o.name="left";break;case"[E":o.name="clear";break;case"[F":o.name="end";break;case"[H":o.name="home";break;case"OA":o.name="up";break;case"OB":o.name="down";break;case"OC":o.name="right";break;case"OD":o.name="left";break;case"OE":o.name="clear";break;case"OF":o.name="end";break;case"OH":case"[1~":o.name="home";break;case"[2~":o.name="insert";break;case"[3~":o.name="delete";break;case"[4~":o.name="end";break;case"[5~":o.name="pageup";break;case"[6~":o.name="pagedown";break;case"[[5~":o.name="pageup";break;case"[[6~":o.name="pagedown";break;case"[7~":o.name="home";break;case"[8~":o.name="end";break;case"[a":o.name="up",o.shift=!0;break;case"[b":o.name="down",o.shift=!0;break;case"[c":o.name="right",o.shift=!0;break;case"[d":o.name="left",o.shift=!0;break;case"[e":o.name="clear",o.shift=!0;break;case"[2$":o.name="insert",o.shift=!0;break;case"[3$":o.name="delete",o.shift=!0;break;case"[5$":o.name="pageup",o.shift=!0;break;case"[6$":o.name="pagedown",o.shift=!0;break;case"[7$":o.name="home",o.shift=!0;break;case"[8$":o.name="end",o.shift=!0;break;case"Oa":o.name="up",o.ctrl=!0;break;case"Ob":o.name="down",o.ctrl=!0;break;case"Oc":o.name="right",o.ctrl=!0;break;case"Od":o.name="left",o.ctrl=!0;break;case"Oe":o.name="clear",o.ctrl=!0;break;case"[2^":o.name="insert",o.ctrl=!0;break;case"[3^":o.name="delete",o.ctrl=!0;break;case"[5^":o.name="pageup",o.ctrl=!0;break;case"[6^":o.name="pagedown",o.ctrl=!0;break;case"[7^":o.name="home",o.ctrl=!0;break;case"[8^":o.name="end",o.ctrl=!0;break;case"[Z":o.name="tab",o.shift=!0;break;default:o.name=null}}1===e.length&&(o.ch=e);var a=o.name||"";o.shift&&(a="S-"+a),o.meta&&(a="M-"+a),o.ctrl&&(a="C-"+a),o.fullName=a,t(o)})}}function n(e){return/\x1b\[M/.test(e)||/\x1b\[M([\x00\u0020-\uffff]{3})/.test(e)||/\x1b\[(\d+;\d+;\d+)M/.test(e)||/\x1b\[<(\d+;\d+;\d+)([mM])/.test(e)||/\x1b\[<(\d+;\d+;\d+;\d+)&w/.test(e)||/\x1b\[24([0135])~\[(\d+),(\d+)\]\r/.test(e)||/\x1b\[(O|I)/.test(e)}t.a=o;var i=/(?:\x1b)([a-zA-Z0-9])/,s=new RegExp("^"+i.source+"$"),a=new RegExp("(?:\x1b+)(O|N|\\[|\\[\\[)(?:"+["(\\d+)(?:;(\\d+))?([~^$])","(?:M([@ #!a`])(.)(.))","(?:1;)?(\\d+)?([a-zA-Z])"].join("|")+")"),l=new RegExp("^"+a.source),c=new RegExp([a.source,i.source,/\x1b./.source].join("|"))},function(e,t,r){"use strict";function o(e,t,r,o,i,s,a,l){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,o,i,s,a,l],h=0;c=new Error(t.replace(/%s/g,function(){return u[h++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var n=function(e){};e.exports=o},function(e,t,r){"use strict";var o={};e.exports=o},function(e,t,r){"use strict";function o(e){return function(){return e}}var n=function(){};n.thatReturns=o,n.thatReturnsFalse=o(!1),n.thatReturnsTrue=o(!0),n.thatReturnsNull=o(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}r.d(t,"a",function(){return c});for(var s=r(1),a=r.n(s),l=(function(){function e(e,t){for(var r=0;r=0?r.push(u[t.fci]):void 0!==t.fcs&&(o=o||{},o.color=t.fcs),t.bci>=0?r.push(h[t.bci]):void 0!==t.bcs&&(o=o||{},o.backgroundColor=t.bcs),t.uci>=0?r.push(d[t.uci]):void 0!==t.ucs&&(o=o||{},o.textDecorationColor=t.ucs),t.bold&&r.push("b"),t.italic&&r.push("i"),t.blink&&r.push("blink-node"),t.underline?(t.strikethrough?r.push("us"):r.push("u"),r.push(f[t.underline])):t.strikethrough&&r.push("s"),t.asciiNode||(t.wcNode?g.test(e.txt)?r.push("wc wc-node emoji"):r.push("wc wc-node"):e.wcwt)break;i+=s<=65535?1:2}if(void 0!=r){for(o=i,n=0;or)break;o+=a<=65535?1:2}return e.substring(i,o)}return e.substr(i)},d.b.wc.strWidth=function(e){var t,r=e.length,o=0,n=e.search(b);if(n<0)return r;var i=n;for(o=n;i2e4&&(y=new Map),y.set(e,t)),t}},function(e,t,r){r(13),e.exports=r(19)},function(e,t,r){"use strict";"undefined"===typeof Promise&&(r(14).enable(),window.Promise=r(17)),r(18),Object.assign=r(3)},function(e,t,r){"use strict";function o(){c=!1,a._47=null,a._71=null}function n(e){function t(t){(e.allRejections||s(h[t].error,e.whitelist||l))&&(h[t].displayId=u++,e.onUnhandled?(h[t].logged=!0,e.onUnhandled(h[t].displayId,h[t].error)):(h[t].logged=!0,i(h[t].displayId,h[t].error)))}function r(t){h[t].logged&&(e.onHandled?e.onHandled(h[t].displayId,h[t].error):h[t].onUnhandled||(console.warn("Promise Rejection Handled (id: "+h[t].displayId+"):"),console.warn(' This means you can ignore any previous messages of the form "Possible Unhandled Promise Rejection" with id '+h[t].displayId+".")))}e=e||{},c&&o(),c=!0;var n=0,u=0,h={};a._47=function(e){2===e._83&&h[e._56]&&(h[e._56].logged?r(e._56):clearTimeout(h[e._56].timeout),delete h[e._56])},a._71=function(e,r){0===e._75&&(e._56=n++,h[e._56]={displayId:null,error:r,timeout:setTimeout(t.bind(null,e._56),s(r,l)?100:2e3),logged:!1})}}function i(e,t){console.warn("Possible Unhandled Promise Rejection (id: "+e+"):"),((t&&(t.stack||t))+"").split("\n").forEach(function(e){console.warn(" "+e)})}function s(e,t){return t.some(function(t){return e instanceof t})}var a=r(5),l=[ReferenceError,TypeError,RangeError],c=!1;t.disable=o,t.enable=n},function(e,t,r){"use strict";(function(t){function r(e){s.length||(i(),a=!0),s[s.length]=e}function o(){for(;lc){for(var t=0,r=s.length-l;t-1?t:e}function f(e,t){t=t||{};var r=t.body;if(e instanceof f){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new n(e.headers)),this.method=e.method,this.mode=e.mode,r||null==e._bodyInit||(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new n(t.headers)),this.method=d(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(o),decodeURIComponent(n))}}),t}function g(e){var t=new n;return e.split(/\r?\n/).forEach(function(e){var r=e.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();t.append(o,n)}}),t}function m(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new n(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var b={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(b.arrayBuffer)var y=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=function(e){return e&&DataView.prototype.isPrototypeOf(e)},v=ArrayBuffer.isView||function(e){return e&&y.indexOf(Object.prototype.toString.call(e))>-1};n.prototype.append=function(e,o){e=t(e),o=r(o);var n=this.map[e];this.map[e]=n?n+","+o:o},n.prototype.delete=function(e){delete this.map[t(e)]},n.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},n.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},n.prototype.set=function(e,o){this.map[t(e)]=r(o)},n.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},n.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),o(e)},n.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),o(e)},n.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),o(e)},b.iterable&&(n.prototype[Symbol.iterator]=n.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];f.prototype.clone=function(){return new f(this,{body:this._bodyInit})},h.call(f.prototype),h.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new n(this.headers),url:this.url})},m.error=function(){var e=new m(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];m.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new m(null,{status:t,headers:{location:e}})},e.Headers=n,e.Request=f,e.Response=m,e.fetch=function(e,t){return new Promise(function(r,o){var n=new f(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:g(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;r(new m(t,e))},i.onerror=function(){o(new TypeError("Network request failed"))},i.ontimeout=function(){o(new TypeError("Network request failed"))},i.open(n.method,n.url,!0),"include"===n.credentials&&(i.withCredentials=!0),"responseType"in i&&b.blob&&(i.responseType="blob"),n.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof n._bodyInit?null:n._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),n=r(20);r(21),r(22),r(31),r(35),r(36),window.hterm=o.a,window.lib=o.b,window.KeystrokeVisualizer=n.a},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=r(6),i=function(){function e(e,t){for(var r=0;r>0;return othis.oscTimeLimit_&&(s="timeout expired: "+(new Date-r[1])),s)?(this.warnUnimplemented&&console.log("parseUntilStringTerminator_: aborting: "+s,r[0]),e.reset(r[0]),!1):(e.advance(t.length-o),!0)}return r[0]+=t.substr(0,n),e.resetParseFunction(),e.advance(n+("\x1b"==i?2:1)-o),!0},c.a.VT.prototype.dispatch=function(e,t,r){var o=b.get(e).get(t);return o?o===c.a.VT.ignore?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code: "+JSON.stringify(t))):r.subargs&&!o.supportsSubargs?void(this.warnUnimplemented&&console.warn("Ignored "+e+" code w/subargs: "+JSON.stringify(t))):"CC1"===e&&t>"\x7f"&&!this.enable8BitControl?void console.warn("Ignoring 8-bit control code: 0x"+t.charCodeAt(0).toString(16)):void o.call(this,r,t):void(this.warnUnimplemented&&console.warn("Unknown "+e+" code: "+JSON.stringify(t)))},c.a.VT.ParseState.prototype.peekRemainingBuf=function(){return this.buf.substr(this.pos)},c.a.VT.ParseState.prototype.peekChar=function(){return this.buf.charAt(this.pos)},c.a.VT.ParseState.prototype.consumeChar=function(){return this.buf.charAt(this.pos++)},c.a.VT.prototype.parseUnknown_=function(e){var t=e.peekRemainingBuf(),r=t.search(this.cc1Pattern_);return 0===r?(this.dispatch("CC1",t.charAt(0),e),void e.advance(1)):-1===r?(o(this,t),void e.reset()):(o(this,t.substr(0,r)),this.dispatch("CC1",t.charAt(r),e),void e.advance(r+1))};var f,p=[],g=null,m=!1;c.a.VT.prototype.interpret=function(e){f=this,p.push(this.decode(e)),m||(m=!0,n())},c.a.VT.prototype.parseCSI_=function(e){var t=e.peekChar(),r=e.args;t>="@"&&t<="~"?(this.dispatch("CSI",this.leadingModifier_+this.trailingModifier_+t,e),s(e)):";"===t?this.trailingModifier_?s(e):(r.length||r.push(""),r.push("")):t>="0"&&t<="9"||":"===t?this.trailingModifier_?s(e):(r.length?r[r.length-1]+=t:r[0]=t,":"===t&&e.argSetSubargs(r.length-1)):t>=" "&&t<="?"?r.length?this.trailingModifier_+=t:this.leadingModifier_+=t:this.cc1Pattern_.test(t)?this.dispatch("CC1",t,e):s(e),e.advance(1)};var b=new Map;c.a.VT.ParseState.prototype.resetArguments=function(){this.args=[]},c.a.VT.ParseState.prototype.parseInt=function(e,t){var r=e>>0;return 0===r?void 0===t?r:t:r},c.a.VT.prototype.parseSgrExtendedColors=function(e,t,r){var o=void 0,n=void 0;if(e.argHasSubargs(t))o=e.args[t].split(":"),o.shift(),n=!0;else{if(e.argHasSubargs(t+1))return{skipCount:0};if(e.args[t+1]>>0===5)return l(e.args,t,r);o=e.args.slice(t+1),n=!1}switch(o[0]>>0){default:case 0:return{skipCount:0};case 1:return n?{color:"rgba(0, 0, 0, 0)",skipCount:0}:{skipCount:0};case 2:var i=void 0;if(i=n?4==o.length?1:2:1,o.length>0)+", "+(o[i+1]>>0)+", "+(o[i+2]>>0)+")",skipCount:n?0:4};case 3:if(!n)return{skipCount:0};if(o.length<4)return{skipCount:0};o[1],o[2],o[3];return{skipCount:0};case 4:if(!n)return{skipCount:0};if(o.length<5)return{skipCount:0};o[1],o[2],o[3],o[4];return{skipCount:0};case 5:if(o.length<2)return{skipCount:0};var s={skipCount:n?0:2},a=o[1]>>0;return athis.eventPool.length&&this.eventPool.push(e)}function U(e){e.eventPool=[],e.getPooled=V,e.release=B}function K(e,t){switch(e){case"keyup":return-1!==An.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function z(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function L(e,t){switch(e){case"compositionend":return z(t);case"keypress":return 32!==t.which?null:(En=!0,xn);case"textInput":return e=t.data,e===xn&&En?null:e;default:return null}}function W(e,t){if(Rn)return"compositionend"===e||!Cn&&K(e,t)?(e=O(),bn._root=null,bn._startText=null,bn._fallbackText=null,Rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1t}return!1}function he(e,t,r,o,n){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t}function de(e){return e[1].toUpperCase()}function fe(e,t,r,o){var n=ti.hasOwnProperty(t)?ti[t]:null;(null!==n?0===n.type:!o&&(2Ei.length&&Ei.push(e)}}}function Ge(e){return Object.prototype.hasOwnProperty.call(e,Oi)||(e[Oi]=Fi++,Mi[e[Oi]]={}),Mi[e[Oi]]}function He(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ze(e,t){var r=He(e);e=0;for(var o;r;){if(3===r.nodeType){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=He(r)}}function qe(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Je(e,t){if(Ki||null==Vi||Vi!==Bo())return null;var r=Vi;return"selectionStart"in r&&qe(r)?r={start:r.selectionStart,end:r.selectionEnd}:window.getSelection?(r=window.getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}):r=void 0,Ui&&Uo(Ui,r)?null:(Ui=r,e=D.getPooled(Di.select,Bi,e,t),e.type="select",e.target=Vi,E(e),e)}function Ye(e){var t="";return Oo.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Xe(e,t){return e=Do({children:void 0},t),(t=Ye(t.children))&&(e.children=t),e}function $e(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n=t.length||o("93"),t=t[0]),r=""+t),null==r&&(r="")),e._wrapperState={initialValue:""+r}}function ot(e,t){var r=t.value;null!=r&&(r=""+r,r!==e.value&&(e.value=r),null==t.defaultValue&&(e.defaultValue=r)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function nt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function it(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function st(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?it(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function at(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&3===r.nodeType)return void(r.nodeValue=t)}e.textContent=t}function lt(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=0===r.indexOf("--"),n=r,i=t[r];n=null==i||"boolean"===typeof i||""===i?"":o||"number"!==typeof i||0===i||cs.hasOwnProperty(n)&&cs[n]?(""+i).trim():i+"px","float"===r&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}function ct(e,t,r){t&&(hs[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&o("137",e,r()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&o("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||o("61")),null!=t.style&&"object"!==typeof t.style&&o("62",r()))}function ut(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function ht(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var r=Ge(e);t=Zo[t];for(var o=0;o<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?r.createElement(e,{is:t.is}):r.createElement(e):e=r.createElementNS(o,e),e}function ft(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function pt(e,t,r,o){var n=ut(t,r);switch(t){case"iframe":case"object":Le("load",e);var i=r;break;case"video":case"audio":for(i=0;ivs||(e.current=_s[vs],_s[vs]=null,vs--)}function Tt(e,t){vs++,_s[vs]=e.current,e.current=t}function kt(e){return Pt(e)?Cs:ws.current}function xt(e,t){var r=e.type.contextTypes;if(!r)return zo;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n,i={};for(n in r)i[n]=t[n];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Pt(e){return 2===e.tag&&null!=e.type.childContextTypes}function Et(e){Pt(e)&&(St(As,e),St(ws,e))}function Rt(e){St(As,e),St(ws,e)}function Nt(e,t,r){ws.current!==zo&&o("168"),Tt(ws,t,e),Tt(As,r,e)}function Mt(e,t){var r=e.stateNode,n=e.type.childContextTypes;if("function"!==typeof r.getChildContext)return t;r=r.getChildContext();for(var i in r)i in n||o("108",se(e)||"Unknown",i);return Do({},t,r)}function Ft(e){if(!Pt(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||zo,Cs=ws.current,Tt(ws,t,e),Tt(As,As.current,e),!0}function Ot(e,t){var r=e.stateNode;if(r||o("169"),t){var n=Mt(e,Cs);r.__reactInternalMemoizedMergedChildContext=n,St(As,e),St(ws,e),Tt(ws,n,e)}else St(As,e);Tt(As,t,e)}function It(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=null,this.index=0,this.ref=null,this.pendingProps=t,this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function Dt(e,t,r){var o=e.alternate;return null===o?(o=new It(e.tag,t,e.key,e.mode),o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.effectTag=0,o.nextEffect=null,o.firstEffect=null,o.lastEffect=null),o.expirationTime=r,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Vt(e,t,r){var n=e.type,i=e.key;if(e=e.props,"function"===typeof n)var s=n.prototype&&n.prototype.isReactComponent?2:0;else if("string"===typeof n)s=5;else switch(n){case Wn:return Bt(e.children,t,r,i);case Zn:s=11,t|=3;break;case jn:s=11,t|=2;break;case Qn:return n=new It(15,e,i,4|t),n.type=Qn,n.expirationTime=r,n;case Jn:s=16,t|=2;break;default:e:{switch("object"===typeof n&&null!==n?n.$$typeof:null){case Gn:s=13;break e;case Hn:s=12;break e;case qn:s=14;break e;default:o("130",null==n?n:typeof n,"")}s=void 0}}return t=new It(s,e,i,t),t.type=n,t.expirationTime=r,t}function Bt(e,t,r,o){return e=new It(10,e,o,t),e.expirationTime=r,e}function Ut(e,t,r){return e=new It(6,e,null,t),e.expirationTime=r,e}function Kt(e,t,r){return t=new It(4,null!==e.children?e.children:[],e.key,t),t.expirationTime=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zt(e,t,r){return t=new It(3,null,null,t?3:0),e={current:t,containerInfo:e,pendingChildren:null,earliestPendingTime:0,latestPendingTime:0,earliestSuspendedTime:0,latestSuspendedTime:0,latestPingedTime:0,pendingCommitExpirationTime:0,finishedWork:null,context:null,pendingContext:null,hydrate:r,remainingExpirationTime:0,firstBatch:null,nextScheduledRoot:null},t.stateNode=e}function Lt(e){return function(t){try{return e(t)}catch(e){}}}function Wt(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var r=t.inject(e);Ss=Lt(function(e){return t.onCommitFiberRoot(r,e)}),Ts=Lt(function(e){return t.onCommitFiberUnmount(r,e)})}catch(e){}return!0}function jt(e){"function"===typeof Ss&&Ss(e)}function Qt(e){"function"===typeof Ts&&Ts(e)}function Gt(e){return{expirationTime:0,baseState:e,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ht(e){return{expirationTime:e.expirationTime,baseState:e.baseState,firstUpdate:e.firstUpdate,lastUpdate:e.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Zt(e){return{expirationTime:e,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function qt(e,t,r){null===e.lastUpdate?e.firstUpdate=e.lastUpdate=t:(e.lastUpdate.next=t,e.lastUpdate=t),(0===e.expirationTime||e.expirationTime>r)&&(e.expirationTime=r)}function Jt(e,t,r){var o=e.alternate;if(null===o){var n=e.updateQueue,i=null;null===n&&(n=e.updateQueue=Gt(e.memoizedState))}else n=e.updateQueue,i=o.updateQueue,null===n?null===i?(n=e.updateQueue=Gt(e.memoizedState),i=o.updateQueue=Gt(o.memoizedState)):n=e.updateQueue=Ht(i):null===i&&(i=o.updateQueue=Ht(n));null===i||n===i?qt(n,t,r):null===n.lastUpdate||null===i.lastUpdate?(qt(n,t,r),qt(i,t,r)):(qt(n,t,r),i.lastUpdate=t)}function Yt(e,t,r){var o=e.updateQueue;o=null===o?e.updateQueue=Gt(e.memoizedState):Xt(e,o),null===o.lastCapturedUpdate?o.firstCapturedUpdate=o.lastCapturedUpdate=t:(o.lastCapturedUpdate.next=t,o.lastCapturedUpdate=t),(0===o.expirationTime||o.expirationTime>r)&&(o.expirationTime=r)}function Xt(e,t){var r=e.alternate;return null!==r&&t===r.updateQueue&&(t=e.updateQueue=Ht(t)),t}function $t(e,t,r,o,n,i){switch(r.tag){case 1:return e=r.payload,"function"===typeof e?e.call(i,o,n):e;case 3:e.effectTag=-1025&e.effectTag|64;case 0:if(e=r.payload,null===(n="function"===typeof e?e.call(i,o,n):e)||void 0===n)break;return Do({},o,n);case 2:ks=!0}return o}function er(e,t,r,o,n){if(ks=!1,!(0===t.expirationTime||t.expirationTime>n)){t=Xt(e,t);for(var i=t.baseState,s=null,a=0,l=t.firstUpdate,c=i;null!==l;){var u=l.expirationTime;u>n?(null===s&&(s=l,i=c),(0===a||a>u)&&(a=u)):(c=$t(e,t,l,c,r,o),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastEffect?t.firstEffect=t.lastEffect=l:(t.lastEffect.nextEffect=l,t.lastEffect=l))),l=l.next}for(u=null,l=t.firstCapturedUpdate;null!==l;){var h=l.expirationTime;h>n?(null===u&&(u=l,null===s&&(i=c)),(0===a||a>h)&&(a=h)):(c=$t(e,t,l,c,r,o),null!==l.callback&&(e.effectTag|=32,l.nextEffect=null,null===t.lastCapturedEffect?t.firstCapturedEffect=t.lastCapturedEffect=l:(t.lastCapturedEffect.nextEffect=l,t.lastCapturedEffect=l))),l=l.next}null===s&&(t.lastUpdate=null),null===u?t.lastCapturedUpdate=null:e.effectTag|=32,null===s&&null===u&&(i=c),t.baseState=i,t.firstUpdate=s,t.firstCapturedUpdate=u,t.expirationTime=a,e.memoizedState=c}}function tr(e,t){"function"!==typeof e&&o("191",e),e.call(t)}function rr(e,t,r){for(null!==t.firstCapturedUpdate&&(null!==t.lastUpdate&&(t.lastUpdate.next=t.firstCapturedUpdate,t.lastUpdate=t.lastCapturedUpdate),t.firstCapturedUpdate=t.lastCapturedUpdate=null),e=t.firstEffect,t.firstEffect=t.lastEffect=null;null!==e;){var o=e.callback;null!==o&&(e.callback=null,tr(o,r)),e=e.nextEffect}for(e=t.firstCapturedEffect,t.firstCapturedEffect=t.lastCapturedEffect=null;null!==e;)t=e.callback,null!==t&&(e.callback=null,tr(t,r)),e=e.nextEffect}function or(e,t){return{value:e,source:t,stack:ae(t)}}function nr(e){var t=e.type._context;Tt(Es,t._changedBits,e),Tt(Ps,t._currentValue,e),Tt(xs,e,e),t._currentValue=e.pendingProps.value,t._changedBits=e.stateNode}function ir(e){var t=Es.current,r=Ps.current;St(xs,e),St(Ps,e),St(Es,e),e=e.type._context,e._currentValue=r,e._changedBits=t}function sr(e){return e===Rs&&o("174"),e}function ar(e,t){Tt(Fs,t,e),Tt(Ms,e,e),Tt(Ns,Rs,e);var r=t.nodeType;switch(r){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:st(null,"");break;default:r=8===r?t.parentNode:t,t=r.namespaceURI||null,r=r.tagName,t=st(t,r)}St(Ns,e),Tt(Ns,t,e)}function lr(e){St(Ns,e),St(Ms,e),St(Fs,e)}function cr(e){Ms.current===e&&(St(Ns,e),St(Ms,e))}function ur(e,t,r){var o=e.memoizedState;t=t(r,o),o=null===t||void 0===t?o:Do({},o,t),e.memoizedState=o,null!==(e=e.updateQueue)&&0===e.expirationTime&&(e.baseState=o)}function hr(e,t,r,o,n,i){var s=e.stateNode;return e=e.type,"function"===typeof s.shouldComponentUpdate?s.shouldComponentUpdate(r,n,i):!e.prototype||!e.prototype.isPureReactComponent||(!Uo(t,r)||!Uo(o,n))}function dr(e,t,r,o){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(r,o),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&Os.enqueueReplaceState(t,t.state,null)}function fr(e,t){var r=e.type,o=e.stateNode,n=e.pendingProps,i=kt(e);o.props=n,o.state=e.memoizedState,o.refs=zo,o.context=xt(e,i),i=e.updateQueue,null!==i&&(er(e,i,n,o,t),o.state=e.memoizedState),i=e.type.getDerivedStateFromProps,"function"===typeof i&&(ur(e,i,n),o.state=e.memoizedState),"function"===typeof r.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(r=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),r!==o.state&&Os.enqueueReplaceState(o,o.state,null),null!==(i=e.updateQueue)&&(er(e,i,n,o,t),o.state=e.memoizedState)),"function"===typeof o.componentDidMount&&(e.effectTag|=4)}function pr(e,t,r){if(null!==(e=r.ref)&&"function"!==typeof e&&"object"!==typeof e){if(r._owner){r=r._owner;var n=void 0;r&&(2!==r.tag&&o("110"),n=r.stateNode),n||o("147",e);var i=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=n.refs===zo?n.refs={}:n.refs;null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}"string"!==typeof e&&o("148"),r._owner||o("254",e)}return e}function gr(e,t){"textarea"!==e.type&&o("31","[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,"")}function mr(e){function t(t,r){if(e){var o=t.lastEffect;null!==o?(o.nextEffect=r,t.lastEffect=r):t.firstEffect=t.lastEffect=r,r.nextEffect=null,r.effectTag=8}}function r(r,o){if(!e)return null;for(;null!==o;)t(r,o),o=o.sibling;return null}function n(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t,r){return e=Dt(e,t,r),e.index=0,e.sibling=null,e}function s(t,r,o){return t.index=o,e?null!==(o=t.alternate)?(o=o.index,og?(m=h,h=null):m=h.sibling;var b=f(o,h,a[g],l);if(null===b){null===h&&(h=m);break}e&&h&&null===b.alternate&&t(o,h),i=s(b,i,g),null===u?c=b:u.sibling=b,u=b,h=m}if(g===a.length)return r(o,h),c;if(null===h){for(;gm?(b=g,g=null):b=g.sibling;var _=f(i,g,y.value,c);if(null===_){g||(g=b);break}e&&g&&null===_.alternate&&t(i,g),a=s(_,a,m),null===h?u=_:h.sibling=_,h=_,g=b}if(y.done)return r(i,g),u;if(null===g){for(;!y.done;m++,y=l.next())null!==(y=d(i,y.value,c))&&(a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return u}for(g=n(i,g);!y.done;m++,y=l.next())null!==(y=p(g,i,m,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?m:y.key),a=s(y,a,m),null===h?u=y:h.sibling=y,h=y);return e&&g.forEach(function(e){return t(i,e)}),u}return function(e,n,s,l){"object"===typeof s&&null!==s&&s.type===Wn&&null===s.key&&(s=s.props.children);var c="object"===typeof s&&null!==s;if(c)switch(s.$$typeof){case zn:e:{var u=s.key;for(c=n;null!==c;){if(c.key===u){if(10===c.tag?s.type===Wn:c.type===s.type){r(e,c.sibling),n=i(c,s.type===Wn?s.props.children:s.props,l),n.ref=pr(e,c,s),n.return=e,e=n;break e}r(e,c);break}t(e,c),c=c.sibling}s.type===Wn?(n=Bt(s.props.children,e.mode,l,s.key),n.return=e,e=n):(l=Vt(s,e.mode,l),l.ref=pr(e,n,s),l.return=e,e=l)}return a(e);case Ln:e:{for(c=s.key;null!==n;){if(n.key===c){if(4===n.tag&&n.stateNode.containerInfo===s.containerInfo&&n.stateNode.implementation===s.implementation){r(e,n.sibling),n=i(n,s.children||[],l),n.return=e,e=n;break e}r(e,n);break}t(e,n),n=n.sibling}n=Kt(s,e.mode,l),n.return=e,e=n}return a(e)}if("string"===typeof s||"number"===typeof s)return s=""+s,null!==n&&6===n.tag?(r(e,n.sibling),n=i(n,s,l),n.return=e,e=n):(r(e,n),n=Ut(s,e.mode,l),n.return=e,e=n),a(e);if(Is(s))return g(e,n,s,l);if(ie(s))return m(e,n,s,l);if(c&&gr(e,s),"undefined"===typeof s)switch(e.tag){case 2:case 1:l=e.type,o("152",l.displayName||l.name||"Component")}return r(e,n)}}function br(e,t){var r=new It(5,null,null,0);r.type="DELETED",r.stateNode=t,r.return=e,r.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=r,e.lastEffect=r):e.firstEffect=e.lastEffect=r}function yr(e,t){switch(e.tag){case 5:var r=e.type;return null!==(t=1!==t.nodeType||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function _r(e){if(Ks){var t=Us;if(t){var r=t;if(!yr(e,t)){if(!(t=wt(r))||!yr(e,t))return e.effectTag|=2,Ks=!1,void(Bs=e);br(Bs,r)}Bs=e,Us=At(t)}else e.effectTag|=2,Ks=!1,Bs=e}}function vr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;Bs=e}function wr(e){if(e!==Bs)return!1;if(!Ks)return vr(e),Ks=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!vt(t,e.memoizedProps))for(t=Us;t;)br(e,t),t=wt(t);return vr(e),Us=Bs?wt(e.stateNode):null,!0}function Ar(){Us=Bs=null,Ks=!1}function Cr(e,t,r){Sr(e,t,r,t.expirationTime)}function Sr(e,t,r,o){t.child=null===e?Vs(t,null,r,o):Ds(t,e.child,r,o)}function Tr(e,t){var r=t.ref;(null===e&&null!==r||null!==e&&e.ref!==r)&&(t.effectTag|=128)}function kr(e,t,r,o,n){Tr(e,t);var i=0!==(64&t.effectTag);if(!r&&!i)return o&&Ot(t,!1),Rr(e,t);r=t.stateNode,Un.current=t;var s=i?null:r.render();return t.effectTag|=1,i&&(Sr(e,t,null,n),t.child=null),Sr(e,t,s,n),t.memoizedState=r.state,t.memoizedProps=r.props,o&&Ot(t,!0),t.child}function xr(e){var t=e.stateNode;t.pendingContext?Nt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nt(e,t.context,!1),ar(e,t.containerInfo)}function Pr(e,t,r,o){var n=e.child;for(null!==n&&(n.return=e);null!==n;){switch(n.tag){case 12:var i=0|n.stateNode;if(n.type===t&&0!==(i&r)){for(i=n;null!==i;){var s=i.alternate;if(0===i.expirationTime||i.expirationTime>o)i.expirationTime=o,null!==s&&(0===s.expirationTime||s.expirationTime>o)&&(s.expirationTime=o);else{if(null===s||!(0===s.expirationTime||s.expirationTime>o))break;s.expirationTime=o}i=i.return}i=null}else i=n.child;break;case 13:i=n.type===e.type?null:n.child;break;default:i=n.child}if(null!==i)i.return=n;else for(i=n;null!==i;){if(i===e){i=null;break}if(null!==(n=i.sibling)){n.return=i.return,i=n;break}i=i.return}n=i}}function Er(e,t,r){var o=t.type._context,n=t.pendingProps,i=t.memoizedProps,s=!0;if(As.current)s=!1;else if(i===n)return t.stateNode=0,nr(t),Rr(e,t);var a=n.value;if(t.memoizedProps=n,null===i)a=1073741823;else if(i.value===n.value){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t);a=0}else{var l=i.value;if(l===a&&(0!==l||1/l===1/a)||l!==l&&a!==a){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t);a=0}else if(a="function"===typeof o._calculateChangedBits?o._calculateChangedBits(l,a):1073741823,0===(a|=0)){if(i.children===n.children&&s)return t.stateNode=0,nr(t),Rr(e,t)}else Pr(t,o,a,r)}return t.stateNode=a,nr(t),Cr(e,t,n.children),t.child}function Rr(e,t){if(null!==e&&t.child!==e.child&&o("153"),null!==t.child){e=t.child;var r=Dt(e,e.pendingProps,e.expirationTime);for(t.child=r,r.return=t;null!==e.sibling;)e=e.sibling,r=r.sibling=Dt(e,e.pendingProps,e.expirationTime),r.return=t;r.sibling=null}return t.child}function Nr(e,t,r){if(0===t.expirationTime||t.expirationTime>r){switch(t.tag){case 3:xr(t);break;case 2:Ft(t);break;case 4:ar(t,t.stateNode.containerInfo);break;case 13:nr(t)}return null}switch(t.tag){case 0:null!==e&&o("155");var n=t.type,i=t.pendingProps,s=kt(t);return s=xt(t,s),n=n(i,s),t.effectTag|=1,"object"===typeof n&&null!==n&&"function"===typeof n.render&&void 0===n.$$typeof?(s=t.type,t.tag=2,t.memoizedState=null!==n.state&&void 0!==n.state?n.state:null,s=s.getDerivedStateFromProps,"function"===typeof s&&ur(t,s,i),i=Ft(t),n.updater=Os,t.stateNode=n,n._reactInternalFiber=t,fr(t,r),e=kr(e,t,!0,i,r)):(t.tag=1,Cr(e,t,n),t.memoizedProps=i,e=t.child),e;case 1:return i=t.type,r=t.pendingProps,As.current||t.memoizedProps!==r?(n=kt(t),n=xt(t,n),i=i(r,n),t.effectTag|=1,Cr(e,t,i),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 2:if(i=Ft(t),null===e)if(null===t.stateNode){var a=t.pendingProps,l=t.type;n=kt(t);var c=2===t.tag&&null!=t.type.contextTypes;s=c?xt(t,n):zo,a=new l(a,s),t.memoizedState=null!==a.state&&void 0!==a.state?a.state:null,a.updater=Os,t.stateNode=a,a._reactInternalFiber=t,c&&(c=t.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=n,c.__reactInternalMemoizedMaskedChildContext=s),fr(t,r),n=!0}else{l=t.type,n=t.stateNode,c=t.memoizedProps,s=t.pendingProps,n.props=c;var u=n.context;a=kt(t),a=xt(t,a);var h=l.getDerivedStateFromProps;(l="function"===typeof h||"function"===typeof n.getSnapshotBeforeUpdate)||"function"!==typeof n.UNSAFE_componentWillReceiveProps&&"function"!==typeof n.componentWillReceiveProps||(c!==s||u!==a)&&dr(t,n,s,a),ks=!1;var d=t.memoizedState;u=n.state=d;var f=t.updateQueue;null!==f&&(er(t,f,s,n,r),u=t.memoizedState),c!==s||d!==u||As.current||ks?("function"===typeof h&&(ur(t,h,s),u=t.memoizedState),(c=ks||hr(t,c,s,d,u,a))?(l||"function"!==typeof n.UNSAFE_componentWillMount&&"function"!==typeof n.componentWillMount||("function"===typeof n.componentWillMount&&n.componentWillMount(),"function"===typeof n.UNSAFE_componentWillMount&&n.UNSAFE_componentWillMount()),"function"===typeof n.componentDidMount&&(t.effectTag|=4)):("function"===typeof n.componentDidMount&&(t.effectTag|=4),t.memoizedProps=s,t.memoizedState=u),n.props=s,n.state=u,n.context=a,n=c):("function"===typeof n.componentDidMount&&(t.effectTag|=4),n=!1)}else l=t.type,n=t.stateNode,s=t.memoizedProps,c=t.pendingProps,n.props=s,u=n.context,a=kt(t),a=xt(t,a),h=l.getDerivedStateFromProps,(l="function"===typeof h||"function"===typeof n.getSnapshotBeforeUpdate)||"function"!==typeof n.UNSAFE_componentWillReceiveProps&&"function"!==typeof n.componentWillReceiveProps||(s!==c||u!==a)&&dr(t,n,c,a),ks=!1,u=t.memoizedState,d=n.state=u,f=t.updateQueue,null!==f&&(er(t,f,c,n,r),d=t.memoizedState),s!==c||u!==d||As.current||ks?("function"===typeof h&&(ur(t,h,c),d=t.memoizedState),(h=ks||hr(t,s,c,u,d,a))?(l||"function"!==typeof n.UNSAFE_componentWillUpdate&&"function"!==typeof n.componentWillUpdate||("function"===typeof n.componentWillUpdate&&n.componentWillUpdate(c,d,a),"function"===typeof n.UNSAFE_componentWillUpdate&&n.UNSAFE_componentWillUpdate(c,d,a)),"function"===typeof n.componentDidUpdate&&(t.effectTag|=4),"function"===typeof n.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!==typeof n.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof n.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=c,t.memoizedState=d),n.props=c,n.state=d,n.context=a,n=h):("function"!==typeof n.componentDidUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!==typeof n.getSnapshotBeforeUpdate||s===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),n=!1);return kr(e,t,n,i,r);case 3:return xr(t),i=t.updateQueue,null!==i?(n=t.memoizedState,n=null!==n?n.element:null,er(t,i,t.pendingProps,null,r),(i=t.memoizedState.element)===n?(Ar(),e=Rr(e,t)):(n=t.stateNode,(n=(null===e||null===e.child)&&n.hydrate)&&(Us=At(t.stateNode.containerInfo),Bs=t,n=Ks=!0),n?(t.effectTag|=2,t.child=Vs(t,null,i,r)):(Ar(),Cr(e,t,i)),e=t.child)):(Ar(),e=Rr(e,t)),e;case 5:return sr(Fs.current),i=sr(Ns.current),n=st(i,t.type),i!==n&&(Tt(Ms,t,t),Tt(Ns,n,t)),null===e&&_r(t),i=t.type,c=t.memoizedProps,n=t.pendingProps,s=null!==e?e.memoizedProps:null,As.current||c!==n||((c=1&t.mode&&!!n.hidden)&&(t.expirationTime=1073741823),c&&1073741823===r)?(c=n.children,vt(i,n)?c=null:s&&vt(i,s)&&(t.effectTag|=16),Tr(e,t),1073741823!==r&&1&t.mode&&n.hidden?(t.expirationTime=1073741823,t.memoizedProps=n,e=null):(Cr(e,t,c),t.memoizedProps=n,e=t.child)):e=Rr(e,t),e;case 6:return null===e&&_r(t),t.memoizedProps=t.pendingProps,null;case 16:return null;case 4:return ar(t,t.stateNode.containerInfo),i=t.pendingProps,As.current||t.memoizedProps!==i?(null===e?t.child=Ds(t,null,i,r):Cr(e,t,i),t.memoizedProps=i,e=t.child):e=Rr(e,t),e;case 14:return i=t.type.render,r=t.pendingProps,n=t.ref,As.current||t.memoizedProps!==r||n!==(null!==e?e.ref:null)?(i=i(r,n),Cr(e,t,i),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 10:return r=t.pendingProps,As.current||t.memoizedProps!==r?(Cr(e,t,r),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 11:return r=t.pendingProps.children,As.current||null!==r&&t.memoizedProps!==r?(Cr(e,t,r),t.memoizedProps=r,e=t.child):e=Rr(e,t),e;case 15:return r=t.pendingProps,t.memoizedProps===r?e=Rr(e,t):(Cr(e,t,r.children),t.memoizedProps=r,e=t.child),e;case 13:return Er(e,t,r);case 12:e:if(n=t.type,s=t.pendingProps,c=t.memoizedProps,i=n._currentValue,a=n._changedBits,As.current||0!==a||c!==s){if(t.memoizedProps=s,l=s.unstable_observedBits,void 0!==l&&null!==l||(l=1073741823),t.stateNode=l,0!==(a&l))Pr(t,n,a,r);else if(c===s){e=Rr(e,t);break e}r=s.children,r=r(i),t.effectTag|=1,Cr(e,t,r),e=t.child}else e=Rr(e,t);return e;default:o("156")}}function Mr(e){e.effectTag|=4}function Fr(e,t){var r=t.pendingProps;switch(t.tag){case 1:return null;case 2:return Et(t),null;case 3:lr(t),Rt(t);var n=t.stateNode;return n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(wr(t),t.effectTag&=-3),zs(t),null;case 5:cr(t),n=sr(Fs.current);var i=t.type;if(null!==e&&null!=t.stateNode){var s=e.memoizedProps,a=t.stateNode,l=sr(Ns.current);a=gt(a,i,s,r,n),Ls(e,t,a,i,s,r,n,l),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!r)return null===t.stateNode&&o("166"),null;if(e=sr(Ns.current),wr(t))r=t.stateNode,i=t.type,s=t.memoizedProps,r[on]=t,r[nn]=s,n=bt(r,i,s,e,n),t.updateQueue=n,null!==n&&Mr(t);else{e=dt(i,r,n,e),e[on]=t,e[nn]=r;e:for(s=t.child;null!==s;){if(5===s.tag||6===s.tag)e.appendChild(s.stateNode);else if(4!==s.tag&&null!==s.child){s.child.return=s,s=s.child;continue}if(s===t)break;for(;null===s.sibling;){if(null===s.return||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}pt(e,i,r,n),_t(i,r)&&Mr(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ws(e,t,e.memoizedProps,r);else{if("string"!==typeof r)return null===t.stateNode&&o("166"),null;n=sr(Fs.current),sr(Ns.current),wr(t)?(n=t.stateNode,r=t.memoizedProps,n[on]=t,yt(n,r)&&Mr(t)):(n=ft(r,n),n[on]=t,t.stateNode=n)}return null;case 14:case 16:case 10:case 11:case 15:return null;case 4:return lr(t),zs(t),null;case 13:return ir(t),null;case 12:return null;case 0:o("167");default:o("156")}}function Or(e,t){var r=t.source;null===t.stack&&null!==r&&ae(r),null!==r&&se(r),t=t.value,null!==e&&2===e.tag&&se(e);try{t&&t.suppressReactErrorLogging||console.error(t)}catch(e){e&&e.suppressReactErrorLogging||console.error(e)}}function Ir(e){var t=e.ref;if(null!==t)if("function"===typeof t)try{t(null)}catch(t){qr(e,t)}else t.current=null}function Dr(e){switch("function"===typeof Qt&&Qt(e),e.tag){case 2:Ir(e);var t=e.stateNode;if("function"===typeof t.componentWillUnmount)try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){qr(e,t)}break;case 5:Ir(e);break;case 4:Ur(e)}}function Vr(e){return 5===e.tag||3===e.tag||4===e.tag}function Br(e){e:{for(var t=e.return;null!==t;){if(Vr(t)){var r=t;break e}t=t.return}o("160"),r=void 0}var n=t=void 0;switch(r.tag){case 5:t=r.stateNode,n=!1;break;case 3:case 4:t=r.stateNode.containerInfo,n=!0;break;default:o("161")}16&r.effectTag&&(at(t,""),r.effectTag&=-17);e:t:for(r=e;;){for(;null===r.sibling;){if(null===r.return||Vr(r.return)){r=null;break e}r=r.return}for(r.sibling.return=r.return,r=r.sibling;5!==r.tag&&6!==r.tag;){if(2&r.effectTag)continue t;if(null===r.child||4===r.tag)continue t;r.child.return=r,r=r.child}if(!(2&r.effectTag)){r=r.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)if(r)if(n){var s=t,a=i.stateNode,l=r;8===s.nodeType?s.parentNode.insertBefore(a,l):s.insertBefore(a,l)}else t.insertBefore(i.stateNode,r);else n?(s=t,a=i.stateNode,8===s.nodeType?s.parentNode.insertBefore(a,s):s.appendChild(a)):t.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Ur(e){for(var t=e,r=!1,n=void 0,i=void 0;;){if(!r){r=t.return;e:for(;;){switch(null===r&&o("160"),r.tag){case 5:n=r.stateNode,i=!1;break e;case 3:case 4:n=r.stateNode.containerInfo,i=!0;break e}r=r.return}r=!0}if(5===t.tag||6===t.tag){e:for(var s=t,a=s;;)if(Dr(a),null!==a.child&&4!==a.tag)a.child.return=a,a=a.child;else{if(a===s)break;for(;null===a.sibling;){if(null===a.return||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}i?(s=n,a=t.stateNode,8===s.nodeType?s.parentNode.removeChild(a):s.removeChild(a)):n.removeChild(t.stateNode)}else if(4===t.tag?n=t.stateNode.containerInfo:Dr(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(r=!1)}t.sibling.return=t.return,t=t.sibling}}function Kr(e,t){switch(t.tag){case 2:break;case 5:var r=t.stateNode;if(null!=r){var n=t.memoizedProps;e=null!==e?e.memoizedProps:n;var i=t.type,s=t.updateQueue;t.updateQueue=null,null!==s&&(r[nn]=n,mt(r,s,i,e,n))}break;case 6:null===t.stateNode&&o("162"),t.stateNode.nodeValue=t.memoizedProps;break;case 3:case 15:case 16:break;default:o("163")}}function zr(e,t,r){r=Zt(r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){po(o),Or(e,t)},r}function Lr(e,t,r){r=Zt(r),r.tag=3;var o=e.stateNode;return null!==o&&"function"===typeof o.componentDidCatch&&(r.callback=function(){null===na?na=new Set([this]):na.add(this);var r=t.value,o=t.stack;Or(e,t),this.componentDidCatch(r,{componentStack:null!==o?o:""})}),r}function Wr(e,t,r,o,n,i){r.effectTag|=512,r.firstEffect=r.lastEffect=null,o=or(o,r),e=t;do{switch(e.tag){case 3:return e.effectTag|=1024,o=zr(e,o,i),void Yt(e,o,i);case 2:if(t=o,r=e.stateNode,0===(64&e.effectTag)&&null!==r&&"function"===typeof r.componentDidCatch&&(null===na||!na.has(r)))return e.effectTag|=1024,o=Lr(e,t,i),void Yt(e,o,i)}e=e.return}while(null!==e)}function jr(e){switch(e.tag){case 2:Et(e);var t=e.effectTag;return 1024&t?(e.effectTag=-1025&t|64,e):null;case 3:return lr(e),Rt(e),t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 5:return cr(e),null;case 16:return t=e.effectTag,1024&t?(e.effectTag=-1025&t|64,e):null;case 4:return lr(e),null;case 13:return ir(e),null;default:return null}}function Qr(){if(null!==Js)for(var e=Js.return;null!==e;){var t=e;switch(t.tag){case 2:Et(t);break;case 3:lr(t),Rt(t);break;case 5:cr(t);break;case 4:lr(t);break;case 13:ir(t)}e=e.return}Ys=null,Xs=0,$s=-1,ea=!1,Js=null,oa=!1}function Gr(e){for(;;){var t=e.alternate,r=e.return,o=e.sibling;if(0===(512&e.effectTag)){t=Fr(t,e,Xs);var n=e;if(1073741823===Xs||1073741823!==n.expirationTime){var i=0;switch(n.tag){case 3:case 2:var s=n.updateQueue;null!==s&&(i=s.expirationTime)}for(s=n.child;null!==s;)0!==s.expirationTime&&(0===i||i>s.expirationTime)&&(i=s.expirationTime),s=s.sibling;n.expirationTime=i}if(null!==t)return t;if(null!==r&&0===(512&r.effectTag)&&(null===r.firstEffect&&(r.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==r.lastEffect&&(r.lastEffect.nextEffect=e.firstEffect),r.lastEffect=e.lastEffect),1da)&&(da=e),e}function Xr(e,t){for(;null!==e;){if((0===e.expirationTime||e.expirationTime>t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var r=e.stateNode;!qs&&0!==Xs&&twa&&o("185")}e=e.return}}function $r(){return Gs=ms()-js,Qs=2+(Gs/10|0)}function eo(e){var t=Zs;Zs=2+25*(1+(($r()-2+500)/25|0));try{return e()}finally{Zs=t}}function to(e,t,r,o,n){var i=Zs;Zs=1;try{return e(t,r,o,n)}finally{Zs=i}}function ro(e){if(0!==aa){if(e>aa)return;ys(la)}var t=ms()-js;aa=e,la=bs(io,{timeout:10*(e-2)-t})}function oo(e,t){if(null===e.nextScheduledRoot)e.remainingExpirationTime=t,null===sa?(ia=sa=e,e.nextScheduledRoot=e):(sa=sa.nextScheduledRoot=e,sa.nextScheduledRoot=ia);else{var r=e.remainingExpirationTime;(0===r||t=ha)&&(!fa||$r()>=ha);)$r(),uo(ua,ha,!fa),no();else for(;null!==ua&&0!==ha&&(0===e||e>=ha);)uo(ua,ha,!1),no();null!==ma&&(aa=0,la=-1),0!==ha&&ro(ha),ma=null,fa=!1,co()}function lo(e,t){ca&&o("253"),ua=e,ha=t,uo(e,t,!1),so(),co()}function co(){if(Aa=0,null!==va){var e=va;va=null;for(var t=0;t_&&(v=_,_=k,k=v),v=Ze(S,k),w=Ze(S,_),v&&w&&(1!==T.rangeCount||T.anchorNode!==v.node||T.anchorOffset!==v.offset||T.focusNode!==w.node||T.focusOffset!==w.offset)&&(A=document.createRange(),A.setStart(v.node,v.offset),T.removeAllRanges(),k>_?(T.addRange(A),T.extend(w.node,w.offset)):(A.setEnd(w.node,w.offset),T.addRange(A))))),T=[];for(k=S;k=k.parentNode;)1===k.nodeType&&T.push({element:k,left:k.scrollLeft,top:k.scrollTop});for(S.focus(),S=0;SCa)&&(fa=!0)}function po(e){null===ua&&o("246"),ua.remainingExpirationTime=0,pa||(pa=!0,ga=e)}function go(e){null===ua&&o("246"),ua.remainingExpirationTime=e}function mo(e,t){var r=ba;ba=!0;try{return e(t)}finally{(ba=r)||ca||so()}}function bo(e,t){if(ba&&!ya){ya=!0;try{return e(t)}finally{ya=!1}}return e(t)}function yo(e,t){ca&&o("187");var r=ba;ba=!0;try{return to(e,t)}finally{ba=r,so()}}function _o(e){var t=ba;ba=!0;try{to(e)}finally{(ba=t)||ca||ao(1,!1,null)}}function vo(e,t,r,n,i){var s=t.current;if(r){r=r._reactInternalFiber;var a;e:{for(2===Fe(r)&&2===r.tag||o("170"),a=r;3!==a.tag;){if(Pt(a)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}(a=a.return)||o("171")}a=a.stateNode.context}r=Pt(r)?Mt(r,a):a}else r=zo;return null===t.context?t.context=r:t.pendingContext=r,t=i,i=Zt(n),i.payload={element:e},t=void 0===t?null:t,null!==t&&(i.callback=t),Jt(s,i,n),Xr(s,n),n}function wo(e){var t=e._reactInternalFiber;return void 0===t&&("function"===typeof e.render?o("188"):o("268",Object.keys(e))),e=De(t),null===e?null:e.stateNode}function Ao(e,t,r,o){var n=t.current;return n=Yr($r(),n),vo(e,t,r,n,o)}function Co(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function So(e){var t=e.findFiberByHostInstance;return Wt(Do({},e,{findHostInstanceByFiber:function(e){return e=De(e),null===e?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null}}))}function To(e,t,r){var o=3=Sn),xn=String.fromCharCode(32),Pn={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},En=!1,Rn=!1,Nn={eventTypes:Pn,extractEvents:function(e,t,r,o){var n=void 0,i=void 0;if(Cn)e:{switch(e){case"compositionstart":n=Pn.compositionStart;break e;case"compositionend":n=Pn.compositionEnd;break e;case"compositionupdate":n=Pn.compositionUpdate;break e}n=void 0}else Rn?K(e,r)&&(n=Pn.compositionEnd):"keydown"===e&&229===r.keyCode&&(n=Pn.compositionStart);return n?(kn&&(Rn||n!==Pn.compositionStart?n===Pn.compositionEnd&&Rn&&(i=O()):(bn._root=o,bn._startText=I(),Rn=!0)),n=vn.getPooled(n,t,r,o),i?n.data=i:null!==(i=z(r))&&(n.data=i),E(n),i=n):i=null,(e=Tn?L(e,r):W(e,r))?(t=wn.getPooled(Pn.beforeInput,t,r,o),t.data=e,E(t)):t=null,null===i?t:null===t?i:[i,t]}},Mn=null,Fn={injectFiberControlledHostComponent:function(e){Mn=e}},On=null,In=null,Dn={injection:Fn,enqueueStateRestore:Q,needsStateRestore:G,restoreStateIfNeeded:H},Vn=!1,Bn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Un=Oo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kn="function"===typeof Symbol&&Symbol.for,zn=Kn?Symbol.for("react.element"):60103,Ln=Kn?Symbol.for("react.portal"):60106,Wn=Kn?Symbol.for("react.fragment"):60107,jn=Kn?Symbol.for("react.strict_mode"):60108,Qn=Kn?Symbol.for("react.profiler"):60114,Gn=Kn?Symbol.for("react.provider"):60109,Hn=Kn?Symbol.for("react.context"):60110,Zn=Kn?Symbol.for("react.async_mode"):60111,qn=Kn?Symbol.for("react.forward_ref"):60112,Jn=Kn?Symbol.for("react.timeout"):60113,Yn="function"===typeof Symbol&&Symbol.iterator,Xn=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$n={},ei={},ti={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ti[e]=new he(e,0,!1,e,null)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ti[t]=new he(t,1,!1,e[1],null)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ti[e]=new he(e,2,!1,e.toLowerCase(),null)}),["autoReverse","externalResourcesRequired","preserveAlpha"].forEach(function(e){ti[e]=new he(e,2,!1,e,null)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ti[e]=new he(e,3,!1,e.toLowerCase(),null)}),["checked","multiple","muted","selected"].forEach(function(e){ti[e]=new he(e,3,!0,e.toLowerCase(),null)}),["capture","download"].forEach(function(e){ti[e]=new he(e,4,!1,e.toLowerCase(),null)}),["cols","rows","size","span"].forEach(function(e){ti[e]=new he(e,6,!1,e.toLowerCase(),null)}),["rowSpan","start"].forEach(function(e){ti[e]=new he(e,5,!1,e.toLowerCase(),null)});var ri=/[\-:]([a-z])/g;"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,null)}),"xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,"http://www.w3.org/1999/xlink")}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ri,de);ti[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace")}),ti.tabIndex=new he("tabIndex",1,!1,"tabindex",null);var oi={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}},ni=null,ii=null,si=!1;Io.canUseDOM&&(si=ee("input")&&(!document.documentMode||9=document.documentMode,Di={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Vi=null,Bi=null,Ui=null,Ki=!1,zi={eventTypes:Di,extractEvents:function(e,t,r,o){var n,i=o.window===o?o.document:9===o.nodeType?o:o.ownerDocument;if(!(n=!i)){e:{i=Ge(i),n=Zo.onSelect;for(var s=0;se))){Zi=-1,es.didTimeout=!0;for(var t=0,r=Qi.length;tt&&(t=8),$i=t"+t+"",t=as.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),cs={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},us=["Webkit","ms","Moz","O"];Object.keys(cs).forEach(function(e){us.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cs[t]=cs[e]})});var hs=Do({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ds=Vo.thatReturns(""),fs={createElement:dt,createTextNode:ft,setInitialProperties:pt,diffProperties:gt,updateProperties:mt,diffHydratedProperties:bt,diffHydratedText:yt,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,r){switch(t){case"input":if(be(e,r),t=r.name,"radio"===r.type&&null!=t){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tB.length&&B.push(e)}function d(e,t,r,n){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var s=!1;if(null===e)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case A:case C:s=!0}}if(s)return r(n,e,""===t?"."+f(e,0):t),1;if(s=0,t=""===t?".":t+":",Array.isArray(e))for(var a=0;ai.rowIndex)t();else if(o.focusNode==o.anchorNode)o.anchorOffset=this.lastRowCount_},n.a.ScrollPort.prototype.drawVisibleRows_=function(e,t){for(var r=(this.selection.startRow,this.selection.endRow,this.bottomFold_,this.topFold_.nextSibling,Math.min(this.visibleRowCount,this.rowProvider_.getRowCount())),o=[],n=0;n=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin,r=this.getScrollMax_();t>r&&(t=r),d!==t&&(this.scroller_.scrollTo(0,t),this.scheduleRedraw())},n.a.ScrollPort.prototype.scrollRowToBottom=function(e){this.syncScrollHeight(),this.isScrolledEnd=e+this.visibleRowCount>=this.lastRowCount_;var t=e*this.characterSize.height+this.visibleRowTopMargin+this.visibleRowBottomMargin;t-=this.visibleRowCount*this.characterSize.height,t<0&&(t=0),d!==t&&this.scroller_.scrollTo(0,t)},n.a.ScrollPort.prototype.scrollToBottom=function(){this.syncScrollHeight(),this.scroller_.scrollTo(0,g-h.height,!1)},n.a.ScrollPort.prototype.getTopRowIndex=function(){var e=Math.round(d/this.characterSize.height);return e<0?0:e},n.a.ScrollPort.prototype.onScroll_=function(e){var t=this.getScreenSize();if(t.width!=this.lastScreenWidth_||t.height!=this.lastScreenHeight_)return void this.resize();this.redraw_(),this.publish("scroll",{scrollPort:this})},n.a.ScrollPort.prototype.onScrollWheel=function(e){},n.a.ScrollPort.prototype.onResize_=function(e){h=n.a.getClientSize(this.screen_),this.scroller_.setDimensions(h.width,h.height,null,g),this.syncCharacterSize()},n.a.ScrollPort.prototype.onCopy_=function(e){if(this.onCopy(e),!e.defaultPrevented&&(this.resetSelectBags_(),this.selection.sync(),this.selection.startRow&&!(this.selection.endRow.rowIndex-this.selection.startRow.rowIndex<2))){var t=this.getTopRowIndex(),r=this.getBottomRowIndex(t);if(this.selection.startRow.rowIndexr){var n;n=this.selection.startRow.rowIndex>r?this.selection.startRow.rowIndex+1:this.bottomFold_.previousSibling.rowIndex+1,this.bottomSelectBag_.textContent=this.rowProvider_.getRowsText(n,this.selection.endRow.rowIndex),this.rowNodes_.insertBefore(this.bottomSelectBag_,this.selection.endRow)}}},n.a.ScrollPort.prototype.measureCharacterSize=function(e){var t="canvas"!==window.fontSizeDetectionMethod;this.ruler_||(this.ruler_=this.document_.createElement("div"),this.ruler_.id="hterm:ruler-character-size",this.ruler_.style.cssText="position: absolute;top: 0;left: 0;visibility: hidden;height: auto !important;width: auto !important;",t&&(this.rulerSpan_=this.document_.createElement("span"),this.rulerSpan_.id="hterm:ruler-span-workaround",this.rulerSpan_.innerHTML=("X".repeat(100)+"\r").repeat(100),this.ruler_.appendChild(this.rulerSpan_)),this.rulerBaseline_=this.document_.createElement("span"),this.rulerBaseline_.id="hterm:ruler-baseline",this.rulerBaseline_.style.fontSize="0px",this.rulerBaseline_.textContent="X"),this.rulerSpan_&&(this.rulerSpan_.style.fontWeight=e||""),this.rowNodes_.appendChild(this.ruler_);var r;if(t){var i=n.a.getClientSize(this.rulerSpan_);r=new n.a.Size(i.width/100,i.height/100)}else{var s=this.screen_.style.font,a=o("QWER1YUIOX".repeat(10),s);r=new n.a.Size(a.width/100,a.height)}return this.ruler_.insertBefore(this.rulerBaseline_,this.ruler_.childNodes[0]),r.baseline=this.rulerBaseline_.offsetTop,this.ruler_.removeChild(this.rulerBaseline_),this.rowNodes_.removeChild(this.ruler_),this.div_.ownerDocument.body.appendChild(this.svg_),r.zoomFactor=this.svg_.currentScale,this.div_.ownerDocument.body.removeChild(this.svg_),r},n.a.ScrollPort.prototype.resize=function(){this.currentScrollbarWidthPx=n.a.getClientWidth(this.screen_)-this.screen_.clientWidth,this.syncScrollHeight(),this.syncRowNodesDimensions_();var e=this;this.publish("resize",{scrollPort:this},function(){e.scroller_.setDimensions(h.width,h.height,h.width,g);var t=g-h.height;t<0&&(t=0),e.scroller_.scrollTo(0,t,!1),e.scheduleRedraw()})}},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var s=r(1),a=r.n(s),l=r(2),c=(r.n(l),r(33)),u=function(){function e(e,t){for(var r=0;r0&&(Object(s.e)(l,o,n,a),e.nodes.splice(t+1,r),Object(i.e)(e))}Object.defineProperty(t,"__esModule",{value:!0});var i=r(4),s=r(11),a=r(0);a.a.Screen.prototype.invalidateCursorPosition=function(){this.cursorPosition.move(0,0),this.cursorRowIdx_=0,this.cursorNodeIdx_=0,this.cursorOffset_=0},a.a.Screen.prototype.clearCursorRow=function(){this.cursorOffset_=0,this.cursorPosition.column=0,this.cursorPosition.overflow=!1;var e;e=this.textAttributes.isDefault()?"":a.b.f.getWhitespace(this.columnCount_);var t=this.textAttributes.inverse;this.textAttributes.inverse=!1,this.textAttributes.syncColors();var r=Object(s.a)(this.textAttributes.attrs(),e,e.length),o=this.rowsArray[this.cursorRowIdx_];o.nodes=[r],o.o=!1,delete o.img,Object(i.e)(o),this.cursorNodeIdx_=0,this.textAttributes.inverse=t,this.textAttributes.syncColors()},a.a.Screen.prototype.commitLineOverflow=function(){var e=this.rowsArray[this.cursorRowIdx_];e.o=!0,Object(i.e)(e)},a.a.Screen.prototype.setCursorPosition=function(e,t){if(!this.rowsArray.length)return void console.warn("Attempt to set cursor position on empty screen.");e>=this.rowsArray.length&&(console.error("Row out of bounds: "+e),e=this.rowsArray.length-1),e<0&&(console.error("Row out of bounds: "+e),e=0),t>=this.columnCount_?(console.error("Column out of bounds: "+t),t=this.columnCount_-1):t<0&&(console.error("Column out of bounds: "+t),t=0),this.cursorPosition.overflow=!1;var r=this.rowsArray[e],o=0,n=r.nodes[0];n||(n=Object(s.c)("",0),r.nodes=[n],Object(i.e)(r));var a=0;if(e===this.cursorRowIdx_?t>=this.cursorPosition.column-this.cursorOffset_&&(o=this.cursorNodeIdx_,n=r.nodes[o],a=this.cursorPosition.column-this.cursorOffset_):this.cursorRowIdx_=e,this.cursorPosition.move(e,t),0===t)return this.cursorNodeIdx_=0,void(this.cursorOffset_=0);for(;n;){var l=t-a;if(!r.nodes[o+1]||n.wcw>l)return this.cursorNodeIdx_=o,void(this.cursorOffset_=l);a+=n.wcw,n=r.nodes[++o]}},a.a.Screen.prototype.syncSelectionCaret=function(e){e.collapse(null)},a.a.Screen.prototype.cursorRow=function(){return this.rowsArray[this.cursorRowIdx_]},a.a.Screen.prototype.maybeClipCurrentRow=function(){var e=this.cursorRow(),t=Object(i.d)(e);if(t<=this.columnCount_)return void(this.cursorPosition.column>=this.columnCount_&&(this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1),this.cursorPosition.overflow=!0));var r=this.cursorPosition.column;this.setCursorPosition(this.cursorPosition.row,this.columnCount_-1);var o=this.rowsArray[this.cursorRowIdx_].nodes[this.cursorNodeIdx_];t=o.wcw,this.cursorOffset_=0||l.attrs.bcs||l.attrs.underline||l.attrs.strikethrough))Object(s.f)(l,u+=f,l.wcw-d);else{var p=Object(s.b)(f,-d);this.cursorNodeIdx_++,n.nodes.splice(this.cursorNodeIdx_,0,p),l=p,this.cursorOffset_=h=-d,u=f}d=0}if(Object(s.d)(l,r)){if(0===d)Object(s.e)(r,l,u+e),n.nodes[this.cursorNodeIdx_+1]||(c=0);else if(0===h){var g=t-l.wcw;g>=0?(Object(s.e)(r,l,e,t),c=n.nodes[this.cursorNodeIdx_+1]?g:0):(Object(s.e)(r,l,e+Object(i.b)(l,t)),c=0)}else{var m=t+h-l.wcw;if(m>=0)Object(s.e)(r,l,Object(i.b)(l,0,h)+e),c=m;else{var b=Object(i.b)(l,0,h)+e+Object(i.b)(l,h+t);Object(s.e)(r,l,b),c=0}}return this.cursorOffset_+=t,c}if(0===h){var y=n.nodes[this.cursorNodeIdx_-1];if(y&&Object(s.d)(y,r)){Object(s.e)(r,y,y.txt+e);var _=t-l.wcw;return _>=0?(n.nodes.splice(this.cursorNodeIdx_,1),c=_):l.attrs.wcNode||(Object(s.f)(l,Object(i.b)(l,t)),c=0),this.cursorNodeIdx_=this.cursorNodeIdx_-1,this.cursorOffset_=y.wcw,c}var v=Object(s.a)(r,e,t);this.cursorOffset_=t;var w=t-l.wcw;return w>=0?(n.nodes.splice(this.cursorNodeIdx_,1,v),c=w):(n.nodes.splice(this.cursorNodeIdx_,0,v),Object(s.f)(l,Object(i.b)(l,t)),c=0),c}if(0===d){var A=n.nodes[this.cursorNodeIdx_+1];if(A&&Object(s.d)(A,r)){var C=t-A.wcw;return C>=0?(Object(s.e)(r,A,e,t),c=C):(Object(s.e)(r,A,e+Object(i.b)(A,t)),c=0),this.cursorNodeIdx_++,this.cursorOffset_=t,c}return v=Object(s.a)(r,e,t),n.nodes.splice(this.cursorNodeIdx_+1,0,v),this.cursorNodeIdx_++,A||(c=0),this.cursorOffset_=v.wcw,c}var S=h+t-l.wcw;if(S>=0){Object(s.f)(l,Object(i.b)(l,0,h));var v=Object(s.a)(r,e,t);return this.cursorNodeIdx_++,n.nodes.splice(this.cursorNodeIdx_,0,v),this.cursorOffset_=t,c=S}var v=Object(s.a)(r,e,t),T=o(l,h,v),k=T.length;return 1===k?n.nodes.splice(this.cursorNodeIdx_,1,T[0]):2===k?n.nodes.splice(this.cursorNodeIdx_,1,T[0],T[1]):3===k&&(n.nodes.splice(this.cursorNodeIdx_,1,T[0],T[1],T[2]),this.cursorNodeIdx_++),this.cursorNodeIdx_++,this.cursorOffset_=0,c},a.a.Screen.prototype.insertString=function(e,t){var r=this.rowsArray[this.cursorRowIdx_],n=r.nodes[this.cursorNodeIdx_],l=n.txt,c=this.textAttributes.attrs();r.o=!1,this.cursorPosition.column+=t;var u=this.cursorOffset_,h=n.wcw-u;if(h<0){var d=a.b.f.getWhitespace(-h);if(n.attrs.isDefault||!(!n.attrs.asciiNode||n.attrs.wcNode||n.attrs.bci>=0||n.attrs.bcs||n.attrs.underline||n.attrs.strikethrough))Object(s.f)(n,l+=d,n.wcw-h);else{var f=Object(s.b)(d,-h);this.cursorNodeIdx_++,r.nodes.splice(this.cursorNodeIdx_,0,f),n=f,this.cursorOffset_=u=-h,l=d}h=0}if(Object(s.d)(n,c)){if(0===h)Object(s.e)(c,n,l+e);else if(0===u)Object(s.e)(c,n,e+l);else{var p=Object(i.b)(n,0,u)+e+Object(i.b)(n,u);Object(s.e)(c,n,p)}return void(this.cursorOffset_+=t)}if(0===u){var g=r.nodes[this.cursorNodeIdx_-1];if(g&&Object(s.d)(g,c))return Object(s.e)(c,g,g.txt+e),this.cursorNodeIdx_=this.cursorNodeIdx_-1,void(this.cursorOffset_=g.wcw);var m=Object(s.a)(c,e,t);return r.nodes.splice(this.cursorNodeIdx_,0,m),void(this.cursorOffset_=t)}if(0===h){var b=r.nodes[this.cursorNodeIdx_+1];return b&&Object(s.d)(b,c)?(Object(s.e)(c,b,e+b.txt),this.cursorNodeIdx_++,void(this.cursorOffset_=t)):(m=Object(s.a)(c,e,t),r.nodes.splice(this.cursorNodeIdx_+1,0,m),this.cursorNodeIdx_++,void(this.cursorOffset_=m.wcw))}var m=Object(s.a)(c,e,t),y=o(n,u,m),_=y.length;1===_?r.nodes.splice(this.cursorNodeIdx_,1,y[0]):2===_?r.nodes.splice(this.cursorNodeIdx_,1,y[0],y[1]):3===_&&(r.nodes.splice(this.cursorNodeIdx_,1,y[0],y[1],y[2]),this.cursorNodeIdx_++),this.cursorNodeIdx_++,this.cursorOffset_=0},a.a.Screen.prototype.overwriteString=function(e,t){if(!(this.columnCount_-this.cursorPosition.column))return[e];var r=this.rowsArray[this.cursorRowIdx_],o=r.nodes[this.cursorNodeIdx_],a=this.textAttributes.attrs(),l=this.cursorOffset_,c=t+l-o.wcw;if(c<=0&&Object(s.d)(o,a)){if(this.cursorOffset_+=t,this.cursorPosition.column+=t,0===c&&o.txt.substr(l)===e)return;if(0===c)Object(s.e)(a,o,Object(i.b)(o,0,l)+e);else{var u=Object(i.b)(o,0,l)+e+Object(i.b)(o,l+t);Object(s.e)(a,o,u)}return void Object(i.e)(r)}var h=this.overwriteNode(e,t,a);h>0&&this.deleteChars(h),n(r,this.cursorNodeIdx_),Object(i.e)(r)},a.a.Screen.prototype.deleteChars=function(e){for(var t=this.rowsArray[this.cursorRowIdx_],r=this.cursorNodeIdx_,o=0,n=this.cursorOffset_,a=t.nodes.length,l=e,c=this.cursorNodeIdx_;c0){if(h-n===e)return Object(s.f)(u,Object(i.b)(u,0,n)),l;if(h-n>e)return Object(s.f)(u,Object(i.b)(u,0,n)+Object(i.b)(u,n+e)),l;Object(s.f)(u,Object(i.b)(u,0,n));if(!t.nodes[c+1])return l;e-=h-n,n=0,r++}else{if(!(h<=e)){if(Object(s.f)(u,Object(i.b)(u,e)),u.attrs.wcNode&&h===u.wcw){var d=Object(s.c)(" ",1);e-=1,t.nodes.splice(c,1,d)}break}o++,e-=h}}return 0===o?l:(t.nodes.splice(r,o),r>this.cursorNodeIdx_?l:0===(a=t.nodes.length)?(t.nodes=[Object(s.c)("",0)],this.cursorNodeIdx_=0,this.cursorOffset_=0,l):a<=this.cursorNodeIdx_?(this.cursorNodeIdx_=a-1,this.cursorOffset_=t.nodes[a-1].wcw,l):(this.cursorOffset_=0,l))},a.a.Screen.prototype.popRow=function(){return this.rowsArray.pop()},a.a.Screen.prototype.popRows=function(e){return this.rowsArray.splice(this.rowsArray.length-e,e)},a.a.Screen.prototype.pushRow=function(e){this.rowsArray[this.rowsArray.length]=e},a.a.Screen.prototype.setRow=function(e,t){this.rowsArray[t]=e},a.a.Screen.prototype.pushRows=function(e){for(var t=0,r=this.rowsArray.length,o=e.length;tt)return void this.setCssCursorPos({row:-1,col:-1});this.options_.cursorVisible&&"none"==this.cursorNode_.style.display&&(this.cursorNode_.style.display=""),this.setCssCursorPos({row:r-e+this.scrollPort_.visibleRowTopMargin,col:this.screen_.cursorPosition.column});var l=this.document_.getSelection();l&&(l.isCollapsed||o)&&this.screen_.syncSelectionCaret(l)};var a={row:-1,col:-1};o.a.Terminal.prototype.setCssCursorPos=function(e){a.row===e.row&&a.col===e.col||-1===a.row&&-1===e.row||(a.row!==e.row&&this.setCursorCssVar("cursor-offset-row",e.row+""),a.col!==e.col&&this.setCursorCssVar("cursor-offset-col",e.col+""),a=e)},o.a.Terminal.prototype.setCursorCssVar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"--hterm-";this.cursorOverlayNode_.style.setProperty(""+r+e,t)},o.a.Terminal.prototype.scheduleSyncCursorPosition_=function(){if(!this.timeouts_.syncCursor){var e=this;this.timeouts_.syncCursor=setTimeout(function(){requestAnimationFrame(function(){e.syncCursorPosition_(),e.timeouts_.syncCursor=0})},0)}},o.a.Terminal.prototype.scheduleRedraw_=function(){if(!this.timeouts_.redraw){var e=this;this.timeouts_.redraw=setTimeout(function(){e.timeouts_.redraw=0,e.scrollPort_.redraw_()},0)}},o.a.Terminal.prototype.scheduleScrollDown_=function(){if(!this.timeouts_.scrollDown){var e=this;this.timeouts_.scrollDown=setTimeout(function(){e.timeouts_.scrollDown=0,e.scrollPort_.scrollToBottom()},20)}},o.a.Terminal.prototype.renumberRows_=function(e,t,r){for(var o=r||this.screen_,i=this.scrollbackRows_.length,s=o.rowsArray,a=e;a6e3&&(this.scrollbackRows_.splice(0,2e3),t=!0);for(var r=this.screen_.rowsArray.length,o=this.scrollbackRows_.length+r,s=0;s0){var c=this.screen_.shiftRows(l);Array.prototype.push.apply(this.scrollbackRows_,c),this.scrollPort_.isScrolledEnd&&this.scheduleScrollDown_()}t&&(this.scrollPort_.syncScrollHeight(),this.scheduleScrollDown_()),r>=this.screen_.rowsArray.length&&(r=this.screen_.rowsArray.length-1),this.setAbsoluteCursorPosition(r,0)},o.a.Terminal.prototype.moveRows_=function(e,t,r){var o=this.screen_.removeRows(e,t);this.screen_.insertRows(r,o);var n,i;e=0;n--)this.setAbsoluteCursorPosition(t+n,0),this.screen_.clearCursorRow(),this.scrollPort_.renderRef.touchRow(this.screen_.cursorRow())},o.a.Terminal.prototype.deleteLines=function(e){var t=this.saveCursor(),r=t.row,o=this.getVTScrollBottom(),n=o-r+1;e=Math.min(e,n);var i=o-e+1;e!=n&&this.moveRows_(r,e,i);for(var s=0;s1&&void 0!==arguments[1])||arguments[1];this.scheduleSyncCursorPosition_(),t&&this.accessibilityReader_.announce(e);var r=0,n=o.b.wc.strWidth(e);for(0===n&&e&&(n=1);r=this.screenSize.width&&(a=!0,s=this.screenSize.width-this.screen_.cursorPosition.column),a&&!this.options_.wraparound?(i=o.b.wc.substr(e,r,s-1)+o.b.wc.substr(e,n-1),s=n):i=o.b.wc.substr(e,r,s);for(var l=this.screen_.textAttributes,c=o.a.TextAttributes.splitWidecharString(i),u=c.length,h=0;h0)return void this.queue_.push("");if(0==this.queue_.length)this.queue_.push(e);else{var t="";0!=this.queue_[this.queue_.length-1].length&&(t=" "),this.queue_[this.queue_.length-1]+=t+e}if(!this.nextReadTimer_){if(1!=this.queue_.length)throw new Error("Expected only one item in queue_ or nextReadTimer_ to be running.");this.nextReadTimer_=setTimeout(this.addToLiveRegion_.bind(this),o.a.AccessibilityReader.DELAY)}}},o.a.AccessibilityReader.prototype.assertiveAnnounce=function(e){this.hasUserGesture&&" "==e&&(e=o.a.msg("SPACE_CHARACTER",[],"Space")),e=(e||"").trim(),e==this.assertiveLiveElement_.innerText&&(e="\n"+e),this.clear(),this.assertiveLiveElement_.innerText=e},o.a.AccessibilityReader.prototype.newLine=function(){this.announce("\n")},o.a.AccessibilityReader.prototype.clear=function(){this.liveElement_.innerText="",this.assertiveLiveElement_.innerText="",clearTimeout(this.nextReadTimer_),this.nextReadTimer_=null,this.queue_=[],this.cursorIsChanging_=!1,this.cursorChangeQueue_=[],this.lastCursorRowString_=null,this.lastCursorRow_=null,this.lastCursorColumn_=null,this.hasUserGesture=!1},o.a.AccessibilityReader.prototype.announceAction_=function(e,t,r){if(this.lastCursorRow_!=t)return!1;if(this.lastCursorRowString_==e){if(this.lastCursorColumn_!=r&&""==this.cursorChangeQueue_.join("").trim()){var n=Math.min(this.lastCursorColumn_,r),i=Math.abs(r-this.lastCursorColumn_);return this.assertiveAnnounce(o.b.wc.substr(this.lastCursorRowString_,n,i)),!0}return!1}if(this.lastCursorRowString_!=e){if(this.lastCursorColumn_+1==r&&" "==o.b.wc.substr(e,r-1,1)&&this.cursorChangeQueue_.length>0&&" "==this.cursorChangeQueue_[0])return this.assertiveAnnounce(" "),!0;var s=r;if(o.b.wc.strWidth(e)<=o.b.wc.strWidth(this.lastCursorRowString_)&&o.b.wc.substr(this.lastCursorRowString_,0,s)==o.b.wc.substr(e,0,s)){for(var a=o.b.wc.strWidth(e);a>0&&(a!=s&&" "==o.b.wc.substr(e,a-1,1));--a);var l=o.b.wc.strWidth(this.lastCursorRowString_)-a,c=a-s;if(o.b.wc.substr(this.lastCursorRowString_,s+l,c)==o.b.wc.substr(e,s,c)){var u=o.b.wc.substr(this.lastCursorRowString_,s,l);if(""!=u)return this.assertiveAnnounce(u),!0}}return!1}return!1},o.a.AccessibilityReader.prototype.addToLiveRegion_=function(){this.nextReadTimer_=null;var e=this.queue_.join("\n").trim();e==this.liveElement_.innertText&&(e="\n"+e),this.liveElement_.innerText=e,this.queue_=[]}},function(e,t,r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=r(6),i=r(0),s=function(){function e(e,t){for(var r=0;r0?(this._cursor=this._lines[o-1].num,this._prompt._render()):(this._call=window.term_apiRequest("history.search",{pattern:this._prompt._value,before:1,after:0,cursor:this._cursor}),this._call.then(function(e){if(e){var r=e.lines[0];if(!r)return void t._prompt._term.ringBell();t._lines.splice(-1,1),t._lines.splice(0,0,r),t._cursor=r.num,t.render()}})))}this._call=window.term_apiRequest("history.search",{pattern:this._lastValue,before:1,after:0,cursor:this._cursor}),this._call.then(function(e){if(e){var r=e.lines[0];if(!r)return void t._prompt._term.ringBell();t._cursor=r.num,t._prompt._value=r.val,t._prompt._cursor=i.b.wc.strWidth(r.val),t._prompt._render()}})}},{key:"next",value:function(e){var t=this;if(e){var r=this._cursor,o=this._lines.findIndex(function(e){return e.num==r});return void(o0&&(o="\ud83d\udcd6 \ud83d\udd0d",0==this._lines.length&&(o+=" \ud83e\udd37")),o=(""+this._found).padStart(6," ")+" of "+this._total+" "+o;e.print(o,!1);var n=r+i.b.wc.strWidth("> "),s=n/t|0,a=n%t,l=Math.min(8,this._lines.length),c=l+this._prompt._startRow+s+2-e.screenSize.height;c>0&&(e.appendRows_(c),this._prompt._startRow-=c,e.setCursorPosition(this._prompt._startRow,this._prompt._startCol));for(var u=0;u ",!1),e.print(this._prompt._value,!1),n=this._prompt._cursor+i.b.wc.strWidth("> "),s=n/t|0,a=n%t,e.setCursorPosition(this._prompt._startRow+s+l+1,a),e.setCursorVisible(!0)}}]),e}(),u=function(){function e(t){o(this,e),this._cursor=-1,this._lastValue="",this._call=null,this._response=null,this._prompt=t,this._lastValue=t._value}return s(e,[{key:"complete",value:function(){var e=this;this._cancelCall(),this._call=window.term_apiRequest("completion.for",{input:this._prompt._value}),this._call.then(function(t){if(t){var r=t.result[0];r&&(e._prompt._value=r,e._prompt._cursor=i.b.wc.strWidth(r),"command"==t.kind?e._prompt._hint=t.hint:e._prompt.hint=""),e._prompt._render()}})}},{key:"hint",value:function(){var e=this;this._cancelCall(),this._response&&this._response.input==this._prompt._value||(this._call=window.term_apiRequest("completion.for",{input:this._prompt._value}),this._call.then(function(t){t&&(e._response=t,e._prompt._hint=t.hint,e._prompt._render())}))}},{key:"_cancelCall",value:function(){this._call&&this._call.cancel(),this._call=null}}]),e}(),h=function(){function e(t){o(this,e),d.call(this),this._term=t}return s(e,[{key:"_valueStartCol",value:function(){return this._startCol+i.b.wc.strWidth(this._prompt)}},{key:"_searchIfNeeded",value:function(){this._shell&&this._historySearchMode&&this._getHistory().search()}},{key:"_completeIfNeeded",value:function(){this._shell&&!this._historySearchMode&&this._getComplete().complete()}},{key:"_hintIfNeeded",value:function(){this._shell&&!this._historySearchMode?this._getComplete().hint():this._hint=""}},{key:"_moveLeft",value:function(){if(this._cursor<0)return this._cursor=0,void this._term.ringBell();var e,t,r=0;do{r+=1,e=i.b.wc.substring(this._value,0,this._cursor-r),t=i.b.wc.strWidth(e)}while(t>=this._cursor&&r<5);this._cursor=t}},{key:"_moveRight",value:function(){var e=i.b.wc.strWidth(this._value);if(this._cursor>=e)return this._cursor=e,void this._term.ringBell();var t,r,o=0;do{o+=1,t=i.b.wc.substring(this._value,0,this._cursor+o),r=i.b.wc.strWidth(t)}while(r<=this._cursor&&o<5);this._cursor=r}},{key:"_moveUp",value:function(){var e=this._term,t=this._term.screen_;if(((this._cursor+this._valueStartCol())/t.columnCount_|0)>0)this._cursor-=t.columnCount_,this._cursor<0&&(this._cursor=0);else{if(this._shell)return this._hint="",this._getHistory().prev(this._historySearchMode);e.ringBell()}this._render()}},{key:"_moveDown",value:function(){var e=this._term,t=this._term.screen_,r=i.b.wc.strWidth(this._value);if(((this._cursor+this._valueStartCol())/t.columnCount_|0)<(r/t.columnCount_|0))this._cursor+=t.columnCount_,this._cursor>r&&(this._cursor=r);else{if(this._shell)return this._hint="",this._getHistory().next(this._historySearchMode);e.ringBell()}this._render()}},{key:"_getHistory",value:function(){return this._history||(this._history=new c(this)),this._history}},{key:"_getComplete",value:function(){return this._complete||(this._complete=new u(this)),this._complete}},{key:"_resetHistory",value:function(){if(this._historySearchMode)return void this._getHistory().search();this._history&&(this._history.reset(),this._history=null)}},{key:"_forwardWord",value:function(){var e=i.b.wc.substr(this._value,this._cursor),t=a.exec(e);t&&(this._cursor+=i.b.wc.strWidth(t[0]))}},{key:"_backWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=l.exec(e);t&&(this._cursor-=i.b.wc.strWidth(t[0]),this._cursor<0&&(this._cursor=0))}},{key:"_deleteBackWord",value:function(){0==this._cursor&&this._term.ringBell();var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=l.exec(e);if(r){var o=i.b.wc.strWidth(r[0]);e=i.b.wc.substring(this._value,0,this._cursor-o),this._value=[e,t].join(""),this._cursor=Math.max(0,this._cursor-o),this._resetHistory()}}},{key:"_deleteForwardWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=a.exec(t);if(r){var o=i.b.wc.strWidth(r[0]);t=i.b.wc.substr(t,o),this._value=[e,t].join(""),this._resetHistory()}}},{key:"_uppercaseForwardWord",value:function(){var e=i.b.wc.substring(this._value,0,this._cursor),t=i.b.wc.substr(this._value,this._cursor),r=a.exec(t);if(r){var o=r[0].toUpperCase(),n=i.b.wc.strWidth(o);t=i.b.wc.substr(t,n),this._value=[e,o,t].join(""),this._cursor+=n,this._resetHistory()}}},{key:"_render",value:function(){if(this._historySearchMode)return void this._getHistory().render();var e=this._term,t=e.screen_.columnCount_;e.setCursorVisible(!1),e.setCursorPosition(this._startRow,this._startCol),e.eraseBelow();var r=i.b.wc.strWidth(this._hint),o=i.b.wc.strWidth(this._value);o=Math.max(r,o),this._secure&&(o=0,r=0);var n=o+this._valueStartCol(),s=n/t|0,a=n%t,l=this._startRow+s+1-e.screenSize.height;l>0&&(e.appendRows_(l),this._startRow-=l,e.setCursorPosition(this._startRow,this._startCol)),e.print(this._prompt,!1);var c=e.saveCursor();this._secure||(this._hint&&this._shell&&(e.screen_.textAttributes.faint=!0,e.screen_.textAttributes.foregroundSource=3,e.screen_.textAttributes.syncColors(),e.print(this._hint,!1),e.restoreCursor(c),e.screen_.textAttributes.reset()),e.print(this._value,!1)),n=(this._secure?0:this._cursor)+this._valueStartCol(),s=n/t|0,a=n%t,e.setCursorPosition(this._startRow+s,a),e.setCursorVisible(!0)}},{key:"processInput",value:function(e){this._startCol<0&&(this._value="",this._cursor=0,this._startCol=this._term.getCursorColumn(),this._startRow=this._term.getCursorRow()),Object(n.a)(e,this._onKey)}},{key:"processMouseClick",value:function(e){if(this._startCol<0)return!1;if(null==e.terminalRow||null==e.terminalColumn)return!1;var t=this._startRow,r=this._getHistory()._lines;this._historySearchMode&&(t+=r.length+1);var o=e.terminalRow-t;if(o<0){if(-o<=r.length){var n=r[r.length+o];return this._getHistory()._cursor=n.num,void this._getHistory().render()}return this._cursor=0,void this._render()}var s=i.b.wc.strWidth(this._value),a=this._term.screen_.columnCount_,l=o*a+e.terminalColumn-(this._historySearchMode?2:this._valueStartCol());this._cursor=Math.min(Math.max(l,0),s);var c=i.b.wc.substring(this._value,0,this._cursor);return this._cursor=i.b.wc.strWidth(c),this._render(),!0}},{key:"processMouseScroll",value:function(e){return!(this._startCol<0)&&(null!=e.terminalRow&&null!=e.terminalColumn&&(!!this._historySearchMode&&(e.deltaY>0?this._moveUp():this._moveDown(),!0)))}},{key:"promptB64",value:function(e){this.reset(),this._term.setAutoCarriageReturn(!0);var t=JSON.parse(window.atob(e));this._prompt=t.prompt,this._secure=t.secure,this._shell=t.shell,this._value="",this._hint="",this._cursor=0,this._startCol=this._term.getCursorColumn(),this._startRow=this._term.getCursorRow(),this._render(),this._term.accessibilityReader_.announce(this._prompt)}},{key:"reset",value:function(){-1!=this._startCol&&(this._history=null,this._complete=null,this._prompt="",this._startCol=-1,this._secure=!1,this._shell=!1,this._hint="",this._historySearchMode=!1)}},{key:"resize",value:function(){this._startCol<0||this._render()}}]),e}(),d=function(){var e=this;this._prompt="",this._shell=!1,this._secure=!1,this._cursor=0,this._row=0,this._value="",this._history=null,this._complete=null,this._startCol=0,this._startRow=0,this._historySearchMode=!1,this._hint="",this._onKey=function(t){var r=e._term;switch(t.fullName){case"tab":return void e._completeIfNeeded();case"M-f":case"M-right":e._forwardWord();break;case"M-b":case"M-left":e._backWord();break;case"C-w":e._deleteBackWord();break;case"M-d":e._deleteForwardWord();break;case"M-u":e._uppercaseForwardWord();break;case"home":case"C-a":e._cursor=0;break;case"end":case"C-e":e._cursor=i.b.wc.strWidth(e._value);break;case"C-k":e._value=i.b.wc.substring(e._value,0,e._cursor),e._cursor=i.b.wc.strWidth(e._value),e._resetHistory();break;case"C-u":e._value=i.b.wc.substr(e._value,e._cursor),e._cursor=0;break;case"C-l":0==e._cursor&&""===e._value?r.ringBell():(e._cursor=0,e._value="",e._resetHistory());break;case"C-r":e._shell?(e._historySearchMode=!0,e._resetHistory()):r.ringBell();break;case"C-c":e._cursor=0,e._value="";break;case"backspace":if(0==e._cursor)r.ringBell();else{var o=i.b.wc.substring(e._value,0,e._cursor-1),n=i.b.wc.substr(e._value,e._cursor);e._value=[o,n].join(""),e._cursor=i.b.wc.strWidth(o),e._resetHistory()}break;case"C-d":var s=i.b.wc.substring(e._value,0,e._cursor),a=i.b.wc.substr(e._value,e._cursor+1);e._value=[s,a].join("");break;case"C-b":case"left":e._moveLeft();break;case"C-f":case"right":e._moveRight();break;case"C-p":case"up":return e._moveUp();case"C-n":case"down":return e._moveDown();case"escape":e._historySearchMode=!1;break;case"return":case"enter":if(e._historySearchMode)return e._getHistory().enter(),e._historySearchMode=!1,e._resetHistory(),void e._render();e._cursor=i.b.wc.strWidth(e._value),e._hint="",e._render(),e._term.interpret("\r\n");var l={text:e._value||""};return void window.webkit.messageHandlers.interOp.postMessage({op:"line",data:l});default:if(t.ch){var c=i.b.wc.strWidth(t.ch),u=i.b.wc.substring(e._value,0,e._cursor),h=i.b.wc.substr(e._value,e._cursor);r.accessibilityReader_.assertiveAnnounce(t.ch),e._value=[u,t.ch,h].join(""),e._cursor+=c,e._resetHistory()}}e._searchIfNeeded(),e._hintIfNeeded(),e._render()}};t.a=h}]); +//# sourceMappingURL=main.087af44e.js.map \ No newline at end of file