]> prime8.dev >> repos - ttyd.git/commitdiff
Upgrade to xterm.js 2.6.0
authorShuanglei Tao <tsl0922@gmail.com>
Sat, 13 May 2017 11:51:52 +0000 (19:51 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Sat, 13 May 2017 11:51:52 +0000 (19:51 +0800)
html/js/app.js
html/package.json
html/yarn.lock
src/index.html

index ad1687d2201972501cdb6841c525055c0a5b16f6..f284d12139ad4ba537d0499765b197e5e1dd5c1d 100644 (file)
                 });
                 window.addEventListener('beforeunload', unloadCallback);
                 term.fit();
-                term.focus();
             });
 
             while (terminalContainer.firstChild) {
                 terminalContainer.removeChild(terminalContainer.firstChild);
             }
 
-            term.open(terminalContainer);
+            term.open(terminalContainer, true);
         };
 
         ws.onmessage = function(event) {
index 7ae033712362ced2b358f52ea903fe05a8a1054b..2b491799ff23b88416f4890f27236a1256d6652e 100644 (file)
@@ -15,6 +15,6 @@
   "dependencies": {
     "gulp": "^3.9.1",
     "gulp-inline-source": "^3.0.0",
-    "xterm": "^2.5.0"
+    "xterm": "^2.6.0"
   }
 }
index e480dfe6365faeb755e7bb8d3650e4651880b7c5..4f1c5eed63e110ce5dfd65c2f559b6b9fb2d0dd0 100644 (file)
@@ -1413,9 +1413,9 @@ wrappy@1:
   version "4.0.1"
   resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
 
-xterm@^2.5.0:
-  version "2.5.0"
-  resolved "https://registry.yarnpkg.com/xterm/-/xterm-2.5.0.tgz#5a6239ba08a40640127e80b3d8180df34a06b499"
+xterm@^2.6.0:
+  version "2.6.0"
+  resolved "https://registry.yarnpkg.com/xterm/-/xterm-2.6.0.tgz#d8daa6d9c3ebee0c850b156cd2f92fbfc8fdfb3e"
 
 yargs@~3.10.0:
   version "3.10.0"
index 6e9f529118308275de431cf8b2346759af6158f4..e2ec8b24e317e59ae38ae8004e27ce3470614c26 100644 (file)
@@ -8,8 +8,8 @@
     <style>.terminal{background-color:#000;color:#fff;font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative}.terminal.focus,.terminal:focus{outline:none}.terminal .xterm-helpers{position:absolute;top:0}.terminal .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal a{color:inherit;text-decoration:none}.terminal a:hover{cursor:pointer;text-decoration:underline}.terminal a.xterm-invalid-link:hover{cursor:text;text-decoration:none}.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor{background-color:transparent;color:inherit}.terminal.xterm-cursor-style-bar .terminal-cursor,.terminal.xterm-cursor-style-underline .terminal-cursor{position:relative}.terminal.xterm-cursor-style-bar .terminal-cursor::before,.terminal.xterm-cursor-style-underline .terminal-cursor::before{content:"";display:block;position:absolute;background-color:#fff}.terminal.xterm-cursor-style-bar .terminal-cursor::before{top:0;bottom:0;left:0;width:1px}.terminal.xterm-cursor-style-underline .terminal-cursor::before{bottom:0;left:0;right:0;height:1px}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before{background-color:transparent}.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before{background-color:#fff}.terminal .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.terminal .composition-view.active{display:block}.terminal .xterm-viewport{background-color:#000;overflow-y:scroll}.terminal .xterm-wide-char{display:inline-block}.terminal .xterm-rows{position:absolute;left:0;top:0}.terminal .xterm-rows>div{white-space:nowrap}.terminal .xterm-scroll-area{visibility:hidden}.terminal .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.terminal .xterm-bold{font-weight:700}.terminal .xterm-underline{text-decoration:underline}.terminal .xterm-blink{text-decoration:blink}.terminal .xterm-hidden{visibility:hidden}.terminal .xterm-color-0{color:#2e3436}.terminal .xterm-bg-color-0{background-color:#2e3436}.terminal .xterm-color-1{color:#c00}.terminal .xterm-bg-color-1{background-color:#c00}.terminal .xterm-color-2{color:#4e9a06}.terminal .xterm-bg-color-2{background-color:#4e9a06}.terminal .xterm-color-3{color:#c4a000}.terminal .xterm-bg-color-3{background-color:#c4a000}.terminal .xterm-color-4{color:#3465a4}.terminal .xterm-bg-color-4{background-color:#3465a4}.terminal .xterm-color-5{color:#75507b}.terminal .xterm-bg-color-5{background-color:#75507b}.terminal .xterm-color-6{color:#06989a}.terminal .xterm-bg-color-6{background-color:#06989a}.terminal .xterm-color-7{color:#d3d7cf}.terminal .xterm-bg-color-7{background-color:#d3d7cf}.terminal .xterm-color-8{color:#555753}.terminal .xterm-bg-color-8{background-color:#555753}.terminal .xterm-color-9{color:#ef2929}.terminal .xterm-bg-color-9{background-color:#ef2929}.terminal .xterm-color-10{color:#8ae234}.terminal .xterm-bg-color-10{background-color:#8ae234}.terminal .xterm-color-11{color:#fce94f}.terminal .xterm-bg-color-11{background-color:#fce94f}.terminal .xterm-color-12{color:#729fcf}.terminal .xterm-bg-color-12{background-color:#729fcf}.terminal .xterm-color-13{color:#ad7fa8}.terminal .xterm-bg-color-13{background-color:#ad7fa8}.terminal .xterm-color-14{color:#34e2e2}.terminal .xterm-bg-color-14{background-color:#34e2e2}.terminal .xterm-color-15{color:#eeeeec}.terminal .xterm-bg-color-15{background-color:#eeeeec}.terminal .xterm-color-16{color:#000}.terminal .xterm-bg-color-16{background-color:#000}.terminal .xterm-color-17{color:#00005f}.terminal .xterm-bg-color-17{background-color:#00005f}.terminal .xterm-color-18{color:#000087}.terminal .xterm-bg-color-18{background-color:#000087}.terminal .xterm-color-19{color:#0000af}.terminal .xterm-bg-color-19{background-color:#0000af}.terminal .xterm-color-20{color:#0000d7}.terminal .xterm-bg-color-20{background-color:#0000d7}.terminal .xterm-color-21{color:#00f}.terminal .xterm-bg-color-21{background-color:#00f}.terminal .xterm-color-22{color:#005f00}.terminal .xterm-bg-color-22{background-color:#005f00}.terminal .xterm-color-23{color:#005f5f}.terminal .xterm-bg-color-23{background-color:#005f5f}.terminal .xterm-color-24{color:#005f87}.terminal .xterm-bg-color-24{background-color:#005f87}.terminal .xterm-color-25{color:#005faf}.terminal .xterm-bg-color-25{background-color:#005faf}.terminal .xterm-color-26{color:#005fd7}.terminal .xterm-bg-color-26{background-color:#005fd7}.terminal .xterm-color-27{color:#005fff}.terminal .xterm-bg-color-27{background-color:#005fff}.terminal .xterm-color-28{color:#008700}.terminal .xterm-bg-color-28{background-color:#008700}.terminal .xterm-color-29{color:#00875f}.terminal .xterm-bg-color-29{background-color:#00875f}.terminal .xterm-color-30{color:#008787}.terminal .xterm-bg-color-30{background-color:#008787}.terminal .xterm-color-31{color:#0087af}.terminal .xterm-bg-color-31{background-color:#0087af}.terminal .xterm-color-32{color:#0087d7}.terminal .xterm-bg-color-32{background-color:#0087d7}.terminal .xterm-color-33{color:#0087ff}.terminal .xterm-bg-color-33{background-color:#0087ff}.terminal .xterm-color-34{color:#00af00}.terminal .xterm-bg-color-34{background-color:#00af00}.terminal .xterm-color-35{color:#00af5f}.terminal .xterm-bg-color-35{background-color:#00af5f}.terminal .xterm-color-36{color:#00af87}.terminal .xterm-bg-color-36{background-color:#00af87}.terminal .xterm-color-37{color:#00afaf}.terminal .xterm-bg-color-37{background-color:#00afaf}.terminal .xterm-color-38{color:#00afd7}.terminal .xterm-bg-color-38{background-color:#00afd7}.terminal .xterm-color-39{color:#00afff}.terminal .xterm-bg-color-39{background-color:#00afff}.terminal .xterm-color-40{color:#00d700}.terminal .xterm-bg-color-40{background-color:#00d700}.terminal .xterm-color-41{color:#00d75f}.terminal .xterm-bg-color-41{background-color:#00d75f}.terminal .xterm-color-42{color:#00d787}.terminal .xterm-bg-color-42{background-color:#00d787}.terminal .xterm-color-43{color:#00d7af}.terminal .xterm-bg-color-43{background-color:#00d7af}.terminal .xterm-color-44{color:#00d7d7}.terminal .xterm-bg-color-44{background-color:#00d7d7}.terminal .xterm-color-45{color:#00d7ff}.terminal .xterm-bg-color-45{background-color:#00d7ff}.terminal .xterm-color-46{color:#0f0}.terminal .xterm-bg-color-46{background-color:#0f0}.terminal .xterm-color-47{color:#00ff5f}.terminal .xterm-bg-color-47{background-color:#00ff5f}.terminal .xterm-color-48{color:#00ff87}.terminal .xterm-bg-color-48{background-color:#00ff87}.terminal .xterm-color-49{color:#00ffaf}.terminal .xterm-bg-color-49{background-color:#00ffaf}.terminal .xterm-color-50{color:#00ffd7}.terminal .xterm-bg-color-50{background-color:#00ffd7}.terminal .xterm-color-51{color:#0ff}.terminal .xterm-bg-color-51{background-color:#0ff}.terminal .xterm-color-52{color:#5f0000}.terminal .xterm-bg-color-52{background-color:#5f0000}.terminal .xterm-color-53{color:#5f005f}.terminal .xterm-bg-color-53{background-color:#5f005f}.terminal .xterm-color-54{color:#5f0087}.terminal .xterm-bg-color-54{background-color:#5f0087}.terminal .xterm-color-55{color:#5f00af}.terminal .xterm-bg-color-55{background-color:#5f00af}.terminal .xterm-color-56{color:#5f00d7}.terminal .xterm-bg-color-56{background-color:#5f00d7}.terminal .xterm-color-57{color:#5f00ff}.terminal .xterm-bg-color-57{background-color:#5f00ff}.terminal .xterm-color-58{color:#5f5f00}.terminal .xterm-bg-color-58{background-color:#5f5f00}.terminal .xterm-color-59{color:#5f5f5f}.terminal .xterm-bg-color-59{background-color:#5f5f5f}.terminal .xterm-color-60{color:#5f5f87}.terminal .xterm-bg-color-60{background-color:#5f5f87}.terminal .xterm-color-61{color:#5f5faf}.terminal .xterm-bg-color-61{background-color:#5f5faf}.terminal .xterm-color-62{color:#5f5fd7}.terminal .xterm-bg-color-62{background-color:#5f5fd7}.terminal .xterm-color-63{color:#5f5fff}.terminal .xterm-bg-color-63{background-color:#5f5fff}.terminal .xterm-color-64{color:#5f8700}.terminal .xterm-bg-color-64{background-color:#5f8700}.terminal .xterm-color-65{color:#5f875f}.terminal .xterm-bg-color-65{background-color:#5f875f}.terminal .xterm-color-66{color:#5f8787}.terminal .xterm-bg-color-66{background-color:#5f8787}.terminal .xterm-color-67{color:#5f87af}.terminal .xterm-bg-color-67{background-color:#5f87af}.terminal .xterm-color-68{color:#5f87d7}.terminal .xterm-bg-color-68{background-color:#5f87d7}.terminal .xterm-color-69{color:#5f87ff}.terminal .xterm-bg-color-69{background-color:#5f87ff}.terminal .xterm-color-70{color:#5faf00}.terminal .xterm-bg-color-70{background-color:#5faf00}.terminal .xterm-color-71{color:#5faf5f}.terminal .xterm-bg-color-71{background-color:#5faf5f}.terminal .xterm-color-72{color:#5faf87}.terminal .xterm-bg-color-72{background-color:#5faf87}.terminal .xterm-color-73{color:#5fafaf}.terminal .xterm-bg-color-73{background-color:#5fafaf}.terminal .xterm-color-74{color:#5fafd7}.terminal .xterm-bg-color-74{background-color:#5fafd7}.terminal .xterm-color-75{color:#5fafff}.terminal .xterm-bg-color-75{background-color:#5fafff}.terminal .xterm-color-76{color:#5fd700}.terminal .xterm-bg-color-76{background-color:#5fd700}.terminal .xterm-color-77{color:#5fd75f}.terminal .xterm-bg-color-77{background-color:#5fd75f}.terminal .xterm-color-78{color:#5fd787}.terminal .xterm-bg-color-78{background-color:#5fd787}.terminal .xterm-color-79{color:#5fd7af}.terminal .xterm-bg-color-79{background-color:#5fd7af}.terminal .xterm-color-80{color:#5fd7d7}.terminal .xterm-bg-color-80{background-color:#5fd7d7}.terminal .xterm-color-81{color:#5fd7ff}.terminal .xterm-bg-color-81{background-color:#5fd7ff}.terminal .xterm-color-82{color:#5fff00}.terminal .xterm-bg-color-82{background-color:#5fff00}.terminal .xterm-color-83{color:#5fff5f}.terminal .xterm-bg-color-83{background-color:#5fff5f}.terminal .xterm-color-84{color:#5fff87}.terminal .xterm-bg-color-84{background-color:#5fff87}.terminal .xterm-color-85{color:#5fffaf}.terminal .xterm-bg-color-85{background-color:#5fffaf}.terminal .xterm-color-86{color:#5fffd7}.terminal .xterm-bg-color-86{background-color:#5fffd7}.terminal .xterm-color-87{color:#5fffff}.terminal .xterm-bg-color-87{background-color:#5fffff}.terminal .xterm-color-88{color:#870000}.terminal .xterm-bg-color-88{background-color:#870000}.terminal .xterm-color-89{color:#87005f}.terminal .xterm-bg-color-89{background-color:#87005f}.terminal .xterm-color-90{color:#870087}.terminal .xterm-bg-color-90{background-color:#870087}.terminal .xterm-color-91{color:#8700af}.terminal .xterm-bg-color-91{background-color:#8700af}.terminal .xterm-color-92{color:#8700d7}.terminal .xterm-bg-color-92{background-color:#8700d7}.terminal .xterm-color-93{color:#8700ff}.terminal .xterm-bg-color-93{background-color:#8700ff}.terminal .xterm-color-94{color:#875f00}.terminal .xterm-bg-color-94{background-color:#875f00}.terminal .xterm-color-95{color:#875f5f}.terminal .xterm-bg-color-95{background-color:#875f5f}.terminal .xterm-color-96{color:#875f87}.terminal .xterm-bg-color-96{background-color:#875f87}.terminal .xterm-color-97{color:#875faf}.terminal .xterm-bg-color-97{background-color:#875faf}.terminal .xterm-color-98{color:#875fd7}.terminal .xterm-bg-color-98{background-color:#875fd7}.terminal .xterm-color-99{color:#875fff}.terminal .xterm-bg-color-99{background-color:#875fff}.terminal .xterm-color-100{color:#878700}.terminal .xterm-bg-color-100{background-color:#878700}.terminal .xterm-color-101{color:#87875f}.terminal .xterm-bg-color-101{background-color:#87875f}.terminal .xterm-color-102{color:#878787}.terminal .xterm-bg-color-102{background-color:#878787}.terminal .xterm-color-103{color:#8787af}.terminal .xterm-bg-color-103{background-color:#8787af}.terminal .xterm-color-104{color:#8787d7}.terminal .xterm-bg-color-104{background-color:#8787d7}.terminal .xterm-color-105{color:#8787ff}.terminal .xterm-bg-color-105{background-color:#8787ff}.terminal .xterm-color-106{color:#87af00}.terminal .xterm-bg-color-106{background-color:#87af00}.terminal .xterm-color-107{color:#87af5f}.terminal .xterm-bg-color-107{background-color:#87af5f}.terminal .xterm-color-108{color:#87af87}.terminal .xterm-bg-color-108{background-color:#87af87}.terminal .xterm-color-109{color:#87afaf}.terminal .xterm-bg-color-109{background-color:#87afaf}.terminal .xterm-color-110{color:#87afd7}.terminal .xterm-bg-color-110{background-color:#87afd7}.terminal .xterm-color-111{color:#87afff}.terminal .xterm-bg-color-111{background-color:#87afff}.terminal .xterm-color-112{color:#87d700}.terminal .xterm-bg-color-112{background-color:#87d700}.terminal .xterm-color-113{color:#87d75f}.terminal .xterm-bg-color-113{background-color:#87d75f}.terminal .xterm-color-114{color:#87d787}.terminal .xterm-bg-color-114{background-color:#87d787}.terminal .xterm-color-115{color:#87d7af}.terminal .xterm-bg-color-115{background-color:#87d7af}.terminal .xterm-color-116{color:#87d7d7}.terminal .xterm-bg-color-116{background-color:#87d7d7}.terminal .xterm-color-117{color:#87d7ff}.terminal .xterm-bg-color-117{background-color:#87d7ff}.terminal .xterm-color-118{color:#87ff00}.terminal .xterm-bg-color-118{background-color:#87ff00}.terminal .xterm-color-119{color:#87ff5f}.terminal .xterm-bg-color-119{background-color:#87ff5f}.terminal .xterm-color-120{color:#87ff87}.terminal .xterm-bg-color-120{background-color:#87ff87}.terminal .xterm-color-121{color:#87ffaf}.terminal .xterm-bg-color-121{background-color:#87ffaf}.terminal .xterm-color-122{color:#87ffd7}.terminal .xterm-bg-color-122{background-color:#87ffd7}.terminal .xterm-color-123{color:#87ffff}.terminal .xterm-bg-color-123{background-color:#87ffff}.terminal .xterm-color-124{color:#af0000}.terminal .xterm-bg-color-124{background-color:#af0000}.terminal .xterm-color-125{color:#af005f}.terminal .xterm-bg-color-125{background-color:#af005f}.terminal .xterm-color-126{color:#af0087}.terminal .xterm-bg-color-126{background-color:#af0087}.terminal .xterm-color-127{color:#af00af}.terminal .xterm-bg-color-127{background-color:#af00af}.terminal .xterm-color-128{color:#af00d7}.terminal .xterm-bg-color-128{background-color:#af00d7}.terminal .xterm-color-129{color:#af00ff}.terminal .xterm-bg-color-129{background-color:#af00ff}.terminal .xterm-color-130{color:#af5f00}.terminal .xterm-bg-color-130{background-color:#af5f00}.terminal .xterm-color-131{color:#af5f5f}.terminal .xterm-bg-color-131{background-color:#af5f5f}.terminal .xterm-color-132{color:#af5f87}.terminal .xterm-bg-color-132{background-color:#af5f87}.terminal .xterm-color-133{color:#af5faf}.terminal .xterm-bg-color-133{background-color:#af5faf}.terminal .xterm-color-134{color:#af5fd7}.terminal .xterm-bg-color-134{background-color:#af5fd7}.terminal .xterm-color-135{color:#af5fff}.terminal .xterm-bg-color-135{background-color:#af5fff}.terminal .xterm-color-136{color:#af8700}.terminal .xterm-bg-color-136{background-color:#af8700}.terminal .xterm-color-137{color:#af875f}.terminal .xterm-bg-color-137{background-color:#af875f}.terminal .xterm-color-138{color:#af8787}.terminal .xterm-bg-color-138{background-color:#af8787}.terminal .xterm-color-139{color:#af87af}.terminal .xterm-bg-color-139{background-color:#af87af}.terminal .xterm-color-140{color:#af87d7}.terminal .xterm-bg-color-140{background-color:#af87d7}.terminal .xterm-color-141{color:#af87ff}.terminal .xterm-bg-color-141{background-color:#af87ff}.terminal .xterm-color-142{color:#afaf00}.terminal .xterm-bg-color-142{background-color:#afaf00}.terminal .xterm-color-143{color:#afaf5f}.terminal .xterm-bg-color-143{background-color:#afaf5f}.terminal .xterm-color-144{color:#afaf87}.terminal .xterm-bg-color-144{background-color:#afaf87}.terminal .xterm-color-145{color:#afafaf}.terminal .xterm-bg-color-145{background-color:#afafaf}.terminal .xterm-color-146{color:#afafd7}.terminal .xterm-bg-color-146{background-color:#afafd7}.terminal .xterm-color-147{color:#afafff}.terminal .xterm-bg-color-147{background-color:#afafff}.terminal .xterm-color-148{color:#afd700}.terminal .xterm-bg-color-148{background-color:#afd700}.terminal .xterm-color-149{color:#afd75f}.terminal .xterm-bg-color-149{background-color:#afd75f}.terminal .xterm-color-150{color:#afd787}.terminal .xterm-bg-color-150{background-color:#afd787}.terminal .xterm-color-151{color:#afd7af}.terminal .xterm-bg-color-151{background-color:#afd7af}.terminal .xterm-color-152{color:#afd7d7}.terminal .xterm-bg-color-152{background-color:#afd7d7}.terminal .xterm-color-153{color:#afd7ff}.terminal .xterm-bg-color-153{background-color:#afd7ff}.terminal .xterm-color-154{color:#afff00}.terminal .xterm-bg-color-154{background-color:#afff00}.terminal .xterm-color-155{color:#afff5f}.terminal .xterm-bg-color-155{background-color:#afff5f}.terminal .xterm-color-156{color:#afff87}.terminal .xterm-bg-color-156{background-color:#afff87}.terminal .xterm-color-157{color:#afffaf}.terminal .xterm-bg-color-157{background-color:#afffaf}.terminal .xterm-color-158{color:#afffd7}.terminal .xterm-bg-color-158{background-color:#afffd7}.terminal .xterm-color-159{color:#afffff}.terminal .xterm-bg-color-159{background-color:#afffff}.terminal .xterm-color-160{color:#d70000}.terminal .xterm-bg-color-160{background-color:#d70000}.terminal .xterm-color-161{color:#d7005f}.terminal .xterm-bg-color-161{background-color:#d7005f}.terminal .xterm-color-162{color:#d70087}.terminal .xterm-bg-color-162{background-color:#d70087}.terminal .xterm-color-163{color:#d700af}.terminal .xterm-bg-color-163{background-color:#d700af}.terminal .xterm-color-164{color:#d700d7}.terminal .xterm-bg-color-164{background-color:#d700d7}.terminal .xterm-color-165{color:#d700ff}.terminal .xterm-bg-color-165{background-color:#d700ff}.terminal .xterm-color-166{color:#d75f00}.terminal .xterm-bg-color-166{background-color:#d75f00}.terminal .xterm-color-167{color:#d75f5f}.terminal .xterm-bg-color-167{background-color:#d75f5f}.terminal .xterm-color-168{color:#d75f87}.terminal .xterm-bg-color-168{background-color:#d75f87}.terminal .xterm-color-169{color:#d75faf}.terminal .xterm-bg-color-169{background-color:#d75faf}.terminal .xterm-color-170{color:#d75fd7}.terminal .xterm-bg-color-170{background-color:#d75fd7}.terminal .xterm-color-171{color:#d75fff}.terminal .xterm-bg-color-171{background-color:#d75fff}.terminal .xterm-color-172{color:#d78700}.terminal .xterm-bg-color-172{background-color:#d78700}.terminal .xterm-color-173{color:#d7875f}.terminal .xterm-bg-color-173{background-color:#d7875f}.terminal .xterm-color-174{color:#d78787}.terminal .xterm-bg-color-174{background-color:#d78787}.terminal .xterm-color-175{color:#d787af}.terminal .xterm-bg-color-175{background-color:#d787af}.terminal .xterm-color-176{color:#d787d7}.terminal .xterm-bg-color-176{background-color:#d787d7}.terminal .xterm-color-177{color:#d787ff}.terminal .xterm-bg-color-177{background-color:#d787ff}.terminal .xterm-color-178{color:#d7af00}.terminal .xterm-bg-color-178{background-color:#d7af00}.terminal .xterm-color-179{color:#d7af5f}.terminal .xterm-bg-color-179{background-color:#d7af5f}.terminal .xterm-color-180{color:#d7af87}.terminal .xterm-bg-color-180{background-color:#d7af87}.terminal .xterm-color-181{color:#d7afaf}.terminal .xterm-bg-color-181{background-color:#d7afaf}.terminal .xterm-color-182{color:#d7afd7}.terminal .xterm-bg-color-182{background-color:#d7afd7}.terminal .xterm-color-183{color:#d7afff}.terminal .xterm-bg-color-183{background-color:#d7afff}.terminal .xterm-color-184{color:#d7d700}.terminal .xterm-bg-color-184{background-color:#d7d700}.terminal .xterm-color-185{color:#d7d75f}.terminal .xterm-bg-color-185{background-color:#d7d75f}.terminal .xterm-color-186{color:#d7d787}.terminal .xterm-bg-color-186{background-color:#d7d787}.terminal .xterm-color-187{color:#d7d7af}.terminal .xterm-bg-color-187{background-color:#d7d7af}.terminal .xterm-color-188{color:#d7d7d7}.terminal .xterm-bg-color-188{background-color:#d7d7d7}.terminal .xterm-color-189{color:#d7d7ff}.terminal .xterm-bg-color-189{background-color:#d7d7ff}.terminal .xterm-color-190{color:#d7ff00}.terminal .xterm-bg-color-190{background-color:#d7ff00}.terminal .xterm-color-191{color:#d7ff5f}.terminal .xterm-bg-color-191{background-color:#d7ff5f}.terminal .xterm-color-192{color:#d7ff87}.terminal .xterm-bg-color-192{background-color:#d7ff87}.terminal .xterm-color-193{color:#d7ffaf}.terminal .xterm-bg-color-193{background-color:#d7ffaf}.terminal .xterm-color-194{color:#d7ffd7}.terminal .xterm-bg-color-194{background-color:#d7ffd7}.terminal .xterm-color-195{color:#d7ffff}.terminal .xterm-bg-color-195{background-color:#d7ffff}.terminal .xterm-color-196{color:red}.terminal .xterm-bg-color-196{background-color:red}.terminal .xterm-color-197{color:#ff005f}.terminal .xterm-bg-color-197{background-color:#ff005f}.terminal .xterm-color-198{color:#ff0087}.terminal .xterm-bg-color-198{background-color:#ff0087}.terminal .xterm-color-199{color:#ff00af}.terminal .xterm-bg-color-199{background-color:#ff00af}.terminal .xterm-color-200{color:#ff00d7}.terminal .xterm-bg-color-200{background-color:#ff00d7}.terminal .xterm-color-201{color:#f0f}.terminal .xterm-bg-color-201{background-color:#f0f}.terminal .xterm-color-202{color:#ff5f00}.terminal .xterm-bg-color-202{background-color:#ff5f00}.terminal .xterm-color-203{color:#ff5f5f}.terminal .xterm-bg-color-203{background-color:#ff5f5f}.terminal .xterm-color-204{color:#ff5f87}.terminal .xterm-bg-color-204{background-color:#ff5f87}.terminal .xterm-color-205{color:#ff5faf}.terminal .xterm-bg-color-205{background-color:#ff5faf}.terminal .xterm-color-206{color:#ff5fd7}.terminal .xterm-bg-color-206{background-color:#ff5fd7}.terminal .xterm-color-207{color:#ff5fff}.terminal .xterm-bg-color-207{background-color:#ff5fff}.terminal .xterm-color-208{color:#ff8700}.terminal .xterm-bg-color-208{background-color:#ff8700}.terminal .xterm-color-209{color:#ff875f}.terminal .xterm-bg-color-209{background-color:#ff875f}.terminal .xterm-color-210{color:#ff8787}.terminal .xterm-bg-color-210{background-color:#ff8787}.terminal .xterm-color-211{color:#ff87af}.terminal .xterm-bg-color-211{background-color:#ff87af}.terminal .xterm-color-212{color:#ff87d7}.terminal .xterm-bg-color-212{background-color:#ff87d7}.terminal .xterm-color-213{color:#ff87ff}.terminal .xterm-bg-color-213{background-color:#ff87ff}.terminal .xterm-color-214{color:#ffaf00}.terminal .xterm-bg-color-214{background-color:#ffaf00}.terminal .xterm-color-215{color:#ffaf5f}.terminal .xterm-bg-color-215{background-color:#ffaf5f}.terminal .xterm-color-216{color:#ffaf87}.terminal .xterm-bg-color-216{background-color:#ffaf87}.terminal .xterm-color-217{color:#ffafaf}.terminal .xterm-bg-color-217{background-color:#ffafaf}.terminal .xterm-color-218{color:#ffafd7}.terminal .xterm-bg-color-218{background-color:#ffafd7}.terminal .xterm-color-219{color:#ffafff}.terminal .xterm-bg-color-219{background-color:#ffafff}.terminal .xterm-color-220{color:gold}.terminal .xterm-bg-color-220{background-color:gold}.terminal .xterm-color-221{color:#ffd75f}.terminal .xterm-bg-color-221{background-color:#ffd75f}.terminal .xterm-color-222{color:#ffd787}.terminal .xterm-bg-color-222{background-color:#ffd787}.terminal .xterm-color-223{color:#ffd7af}.terminal .xterm-bg-color-223{background-color:#ffd7af}.terminal .xterm-color-224{color:#ffd7d7}.terminal .xterm-bg-color-224{background-color:#ffd7d7}.terminal .xterm-color-225{color:#ffd7ff}.terminal .xterm-bg-color-225{background-color:#ffd7ff}.terminal .xterm-color-226{color:#ff0}.terminal .xterm-bg-color-226{background-color:#ff0}.terminal .xterm-color-227{color:#ffff5f}.terminal .xterm-bg-color-227{background-color:#ffff5f}.terminal .xterm-color-228{color:#ffff87}.terminal .xterm-bg-color-228{background-color:#ffff87}.terminal .xterm-color-229{color:#ffffaf}.terminal .xterm-bg-color-229{background-color:#ffffaf}.terminal .xterm-color-230{color:#ffffd7}.terminal .xterm-bg-color-230{background-color:#ffffd7}.terminal .xterm-color-231{color:#fff}.terminal .xterm-bg-color-231{background-color:#fff}.terminal .xterm-color-232{color:#080808}.terminal .xterm-bg-color-232{background-color:#080808}.terminal .xterm-color-233{color:#121212}.terminal .xterm-bg-color-233{background-color:#121212}.terminal .xterm-color-234{color:#1c1c1c}.terminal .xterm-bg-color-234{background-color:#1c1c1c}.terminal .xterm-color-235{color:#262626}.terminal .xterm-bg-color-235{background-color:#262626}.terminal .xterm-color-236{color:#303030}.terminal .xterm-bg-color-236{background-color:#303030}.terminal .xterm-color-237{color:#3a3a3a}.terminal .xterm-bg-color-237{background-color:#3a3a3a}.terminal .xterm-color-238{color:#444}.terminal .xterm-bg-color-238{background-color:#444}.terminal .xterm-color-239{color:#4e4e4e}.terminal .xterm-bg-color-239{background-color:#4e4e4e}.terminal .xterm-color-240{color:#585858}.terminal .xterm-bg-color-240{background-color:#585858}.terminal .xterm-color-241{color:#626262}.terminal .xterm-bg-color-241{background-color:#626262}.terminal .xterm-color-242{color:#6c6c6c}.terminal .xterm-bg-color-242{background-color:#6c6c6c}.terminal .xterm-color-243{color:#767676}.terminal .xterm-bg-color-243{background-color:#767676}.terminal .xterm-color-244{color:gray}.terminal .xterm-bg-color-244{background-color:gray}.terminal .xterm-color-245{color:#8a8a8a}.terminal .xterm-bg-color-245{background-color:#8a8a8a}.terminal .xterm-color-246{color:#949494}.terminal .xterm-bg-color-246{background-color:#949494}.terminal .xterm-color-247{color:#9e9e9e}.terminal .xterm-bg-color-247{background-color:#9e9e9e}.terminal .xterm-color-248{color:#a8a8a8}.terminal .xterm-bg-color-248{background-color:#a8a8a8}.terminal .xterm-color-249{color:#b2b2b2}.terminal .xterm-bg-color-249{background-color:#b2b2b2}.terminal .xterm-color-250{color:#bcbcbc}.terminal .xterm-bg-color-250{background-color:#bcbcbc}.terminal .xterm-color-251{color:#c6c6c6}.terminal .xterm-bg-color-251{background-color:#c6c6c6}.terminal .xterm-color-252{color:#d0d0d0}.terminal .xterm-bg-color-252{background-color:#d0d0d0}.terminal .xterm-color-253{color:#dadada}.terminal .xterm-bg-color-253{background-color:#dadada}.terminal .xterm-color-254{color:#e4e4e4}.terminal .xterm-bg-color-254{background-color:#e4e4e4}.terminal .xterm-color-255{color:#eee}.terminal .xterm-bg-color-255{background-color:#eee}</style>
     <style>body,html{height:100%;min-height:100%;margin:0;overflow:hidden}#terminal-container{width:auto;height:100%;margin:0 auto;padding:5px 0 0 8px;background-color:#101010}.terminal{background-color:#101010;color:#f0f0f0;font-size:10pt;font-family:Menlo,Consolas,"DejaVu Sans Mono","Liberation Mono",Courier,monospace;font-variant-ligatures:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}.terminal .xterm-viewport{background-color:rgba(121,121,121,0);-webkit-background-clip:text;-webkit-text-fill-color:transparent;transition:background-color 800ms linear}.terminal .xterm-viewport::-webkit-scrollbar{width:10px}.terminal .xterm-viewport::-webkit-scrollbar-track{opacity:0}.terminal .xterm-viewport::-webkit-scrollbar-thumb{background-color:rgba(121,121,121,.4)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:hover{transition:opacity 0ms linear;background-color:rgba(100,100,100,.7)}.terminal .xterm-viewport::-webkit-scrollbar-thumb:window-inactive{background-color:inherit}.terminal .terminal-cursor{background-color:#f0f0f0;color:#101010;opacity:.7}.terminal:not(.focus) .terminal-cursor{outline:1px solid #f0f0f0}@keyframes blink-cursor{0%{background-color:#f0f0f0;color:#101010}50%{background-color:transparent;color:#f0f0f0}}</style>
     <script>!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Terminal=t()}}(function(){var t;return function t(e,i,r){function s(a,o){if(!i[a]){if(!e[a]){var h="function"==typeof require&&require;if(!o&&h)return h(a,!0);if(n)return n(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[a]={exports:{}};e[a][0].call(c.exports,function(t){var i=e[a][1][t];return s(i?i:t)},c,c.exports,t,e,i,r)}return i[a].exports}for(var n="function"==typeof require&&require,a=0;a<r.length;a++)s(r[a]);return s}({1:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CHARSETS={},i.DEFAULT_CHARSET=i.CHARSETS.B,i.CHARSETS[0]={"`":"◆",a:"▒",b:"\t",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"␤",i:"\v",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},i.CHARSETS.A={"#":"£"},i.CHARSETS.B=null,i.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},i.CHARSETS.C=i.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},i.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},i.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},i.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},i.CHARSETS.E=i.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},i.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},i.CHARSETS.H=i.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},i.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},{}],2:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i){this.textarea=t,this.compositionView=e,this.terminal=i,this.isComposing=!1,this.isSendingComposition=!1,this.compositionPosition={start:null,end:null}}return t.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},t.prototype.compositionupdate=function(t){var e=this;this.compositionView.textContent=t.data,this.updateCompositionElements(),setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},t.prototype.compositionend=function(){this.finalizeComposition(!0)},t.prototype.keydown=function(t){if(this.isComposing||this.isSendingComposition){if(229===t.keyCode)return!1;if(16===t.keyCode||17===t.keyCode||18===t.keyCode)return!1;this.finalizeComposition(!1)}return 229!==t.keyCode||(this.handleAnyTextareaChanges(),!1)},t.prototype.finalizeComposition=function(t){var e=this;if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var i={start:this.compositionPosition.start,end:this.compositionPosition.end};this.isSendingComposition=!0,setTimeout(function(){if(e.isSendingComposition){e.isSendingComposition=!1;var t=void 0;t=e.isComposing?e.textarea.value.substring(i.start,i.end):e.textarea.value.substring(i.start),e.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var r=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(r)}},t.prototype.handleAnyTextareaChanges=function(){var t=this,e=this.textarea.value;setTimeout(function(){if(!t.isComposing){var i=t.textarea.value,r=i.replace(e,"");r.length>0&&t.terminal.handler(r)}},0)},t.prototype.updateCompositionElements=function(t){var e=this;if(this.isComposing){var i=this.terminal.element.querySelector(".terminal-cursor");if(i){var r=this.terminal.element.querySelector(".xterm-rows"),s=r.offsetTop+i.offsetTop;this.compositionView.style.left=i.offsetLeft+"px",this.compositionView.style.top=s+"px",this.compositionView.style.height=i.offsetHeight+"px",this.compositionView.style.lineHeight=i.offsetHeight+"px";var n=this.compositionView.getBoundingClientRect();this.textarea.style.left=i.offsetLeft+"px",this.textarea.style.top=s+"px",this.textarea.style.width=n.width+"px",this.textarea.style.height=n.height+"px",this.textarea.style.lineHeight=n.height+"px"}t||setTimeout(function(){return e.updateCompositionElements(!0)},0)}},t.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},t}();i.CompositionHelper=r},{}],3:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r;!function(t){t.NUL="\0",t.SOH="\ 1",t.STX="\ 2",t.ETX="\ 3",t.EOT="\ 4",t.ENQ="\ 5",t.ACK="\ 6",t.BEL="\a",t.BS="\b",t.HT="\t",t.LF="\n",t.VT="\v",t.FF="\f",t.CR="\r",t.SO="\ e",t.SI="\ f",t.DLE="\10",t.DC1="\11",t.DC2="\12",t.DC3="\13",t.DC4="\14",t.NAK="\15",t.SYN="\16",t.ETB="\17",t.CAN="\18",t.EM="\19",t.SUB="\1a",t.ESC="\e",t.FS="\1c",t.GS="\1d",t.RS="\1e",t.US="\1f",t.SP=" ",t.DEL="\7f"}(r=i.C0||(i.C0={}))},{}],4:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(){this._events=this._events||{}}return t.prototype.on=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},t.prototype.off=function(t,e){if(this._events[t])for(var i=this._events[t],r=i.length;r--;)if(i[r]===e||i[r].listener===e)return void i.splice(r,1)},t.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},t.prototype.once=function(t,e){function i(){var r=Array.prototype.slice.call(arguments);return this.off(t,i),e.apply(this,r)}return i.listener=e,this.on(t,i)},t.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),i=this._events[t],r=0;r<i.length;r++)i[r].apply(this,e)},t.prototype.listeners=function(t){return this._events[t]||[]},t}();i.EventEmitter=r},{}],5:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n=function(){function t(t){this._terminal=t}return t.prototype.addChar=function(t,e){if(t>=" "){var i=a(e);this._terminal.charset&&this._terminal.charset[t]&&(t=this._terminal.charset[t]);var r=this._terminal.y+this._terminal.ybase;if(!i&&this._terminal.x)return void(this._terminal.lines.get(r)[this._terminal.x-1]&&(this._terminal.lines.get(r)[this._terminal.x-1][2]?this._terminal.lines.get(r)[this._terminal.x-1][1]+=t:this._terminal.lines.get(r)[this._terminal.x-2]&&(this._terminal.lines.get(r)[this._terminal.x-2][1]+=t),this._terminal.updateRange(this._terminal.y)));if(this._terminal.x+i-1>=this._terminal.cols)if(this._terminal.wraparoundMode)this._terminal.x=0,this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll());else if(2===i)return;if(r=this._terminal.y+this._terminal.ybase,this._terminal.insertMode)for(var s=0;s<i;++s){var n=this._terminal.lines.get(this._terminal.y+this._terminal.ybase).pop();0===n[2]&&this._terminal.lines.get(r)[this._terminal.cols-2]&&2===this._terminal.lines.get(r)[this._terminal.cols-2][2]&&(this._terminal.lines.get(r)[this._terminal.cols-2]=[this._terminal.curAttr," ",1]),this._terminal.lines.get(r).splice(this._terminal.x,0,[this._terminal.curAttr," ",1])}this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,t,i],this._terminal.x++,this._terminal.updateRange(this._terminal.y),2===i&&(this._terminal.lines.get(r)[this._terminal.x]=[this._terminal.curAttr,"",0],this._terminal.x++)}},t.prototype.bell=function(){var t=this;this._terminal.visualBell&&(this._terminal.element.style.borderColor="white",setTimeout(function(){return t._terminal.element.style.borderColor=""},10),this._terminal.popOnBell&&this._terminal.focus())},t.prototype.lineFeed=function(){this._terminal.convertEol&&(this._terminal.x=0),this._terminal.y++,this._terminal.y>this._terminal.scrollBottom&&(this._terminal.y--,this._terminal.scroll()),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.carriageReturn=function(){this._terminal.x=0},t.prototype.backspace=function(){this._terminal.x>0&&this._terminal.x--},t.prototype.tab=function(){this._terminal.x=this._terminal.nextStop()},t.prototype.shiftOut=function(){this._terminal.setgLevel(1)},t.prototype.shiftIn=function(){this._terminal.setgLevel(0)},t.prototype.insertChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i).splice(r++,0,s),this._terminal.lines.get(i).pop()},t.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0)},t.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this._terminal.x>=this._terminal.cols&&this._terminal.x--,this._terminal.x-=e,this._terminal.x<0&&(this._terminal.x=0)},t.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this._terminal.y-=e,this._terminal.y<0&&(this._terminal.y=0),this._terminal.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1},t.prototype.cursorPosition=function(t){var e,i;e=t[0]-1,i=t.length>=2?t[1]-1:0,e<0?e=0:e>=this._terminal.rows&&(e=this._terminal.rows-1),i<0?i=0:i>=this._terminal.cols&&(i=this._terminal.cols-1),this._terminal.x=i,this._terminal.y=e},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.nextStop()},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this._terminal.eraseRight(this._terminal.x,this._terminal.y),e=this._terminal.y+1;e<this._terminal.rows;e++)this._terminal.eraseLine(e);break;case 1:for(this._terminal.eraseLeft(this._terminal.x,this._terminal.y),e=this._terminal.y;e--;)this._terminal.eraseLine(e);break;case 2:for(e=this._terminal.rows;e--;)this._terminal.eraseLine(e);break;case 3:var i=this._terminal.lines.length-this._terminal.rows;i>0&&(this._terminal.lines.trimStart(i),this._terminal.ybase=Math.max(this._terminal.ybase-i,0),this._terminal.ydisp=Math.max(this._terminal.ydisp-i,0))}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this._terminal.eraseRight(this._terminal.x,this._terminal.y);break;case 1:this._terminal.eraseLeft(this._terminal.x,this._terminal.y);break;case 2:this._terminal.eraseLine(this._terminal.y)}},t.prototype.insertLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r+1;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase--,this._terminal.ydisp--,i--,r--),this._terminal.lines.splice(i,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(r,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteLines=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.rows-1-this._terminal.scrollBottom,r=this._terminal.rows-1+this._terminal.ybase-r;e--;)this._terminal.lines.length===this._terminal.lines.maxLength&&(this._terminal.lines.trimStart(1),this._terminal.ybase-=1,this._terminal.ydisp-=1),this._terminal.lines.splice(r+1,0,this._terminal.blankLine(!0)),this._terminal.lines.splice(i,1);this._terminal.updateRange(this._terminal.y),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.deleteChars=function(t){var e,i,r;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=[this._terminal.eraseAttr()," ",1];e--;)this._terminal.lines.get(i).splice(this._terminal.x,1),this._terminal.lines.get(i).push(r)},t.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollBottom,1),this._terminal.lines.splice(this._terminal.ybase+this._terminal.scrollTop,0,this._terminal.blankLine());this._terminal.updateRange(this._terminal.scrollTop),this._terminal.updateRange(this._terminal.scrollBottom)},t.prototype.eraseChars=function(t){var e,i,r,s;for(e=t[0],e<1&&(e=1),i=this._terminal.y+this._terminal.ybase,r=this._terminal.x,s=[this._terminal.eraseAttr()," ",1];e--&&r<this._terminal.cols;)this._terminal.lines.get(i)[r++]=s},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this._terminal.x=this._terminal.prevStop()},t.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.x=e-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.x+=e,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,i=this._terminal.lines.get(this._terminal.ybase+this._terminal.y),r=i[this._terminal.x-1]||[this._terminal.defAttr," ",1];e--;)i[this._terminal.x++]=r},t.prototype.sendDeviceAttributes=function(t){t[0]>0||(this._terminal.prefix?">"===this._terminal.prefix&&(this._terminal.is("xterm")?this._terminal.send(r.C0.ESC+"[>0;276;0c"):this._terminal.is("rxvt-unicode")?this._terminal.send(r.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._terminal.send(t[0]+"c"):this._terminal.is("screen")&&this._terminal.send(r.C0.ESC+"[>83;40003;0c")):this._terminal.is("xterm")||this._terminal.is("rxvt-unicode")||this._terminal.is("screen")?this._terminal.send(r.C0.ESC+"[?1;2c"):this._terminal.is("linux")&&this._terminal.send(r.C0.ESC+"[?6c"))},t.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this._terminal.y=e-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this._terminal.y+=e,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x>=this._terminal.cols&&this._terminal.x--},t.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this._terminal.y=t[0]-1,this._terminal.y>=this._terminal.rows&&(this._terminal.y=this._terminal.rows-1),this._terminal.x=t[1]-1,this._terminal.x>=this._terminal.cols&&(this._terminal.x=this._terminal.cols-1)},t.prototype.tabClear=function(t){var e=t[0];e<=0?delete this._terminal.tabs[this._terminal.x]:3===e&&(this._terminal.tabs={})},t.prototype.setMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.setMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!0;break;case 2:this._terminal.setgCharset(0,s.DEFAULT_CHARSET),this._terminal.setgCharset(1,s.DEFAULT_CHARSET),this._terminal.setgCharset(2,s.DEFAULT_CHARSET),this._terminal.setgCharset(3,s.DEFAULT_CHARSET);break;case 3:this._terminal.savedCols=this._terminal.cols,this._terminal.resize(132,this._terminal.rows);break;case 6:this._terminal.originMode=!0;break;case 7:this._terminal.wraparoundMode=!0;break;case 12:break;case 66:this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=9===t[0],this._terminal.vt200Mouse=1e3===t[0],this._terminal.normalMouse=t[0]>1e3,this._terminal.mouseEvents=!0,this._terminal.element.style.cursor="default",this._terminal.log("Binding to mouse events.");break;case 1004:this._terminal.sendFocus=!0;break;case 1005:this._terminal.utfMouse=!0;break;case 1006:this._terminal.sgrMouse=!0;break;case 1015:this._terminal.urxvtMouse=!0;break;case 25:this._terminal.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this._terminal.normal){var i={lines:this._terminal.lines,ybase:this._terminal.ybase,ydisp:this._terminal.ydisp,x:this._terminal.x,y:this._terminal.y,scrollTop:this._terminal.scrollTop,scrollBottom:this._terminal.scrollBottom,tabs:this._terminal.tabs};this._terminal.reset(),this._terminal.viewport.syncScrollArea(),this._terminal.normal=i,this._terminal.showCursor()}}}else switch(t[0]){case 4:this._terminal.insertMode=!0;break;case 20:}},t.prototype.resetMode=function(t){if(t.length>1)for(var e=0;e<t.length;e++)this.resetMode([t[e]]);else if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 1:this._terminal.applicationCursor=!1;break;case 3:132===this._terminal.cols&&this._terminal.savedCols&&this._terminal.resize(this._terminal.savedCols,this._terminal.rows),delete this._terminal.savedCols;break;case 6:this._terminal.originMode=!1;break;case 7:this._terminal.wraparoundMode=!1;break;case 12:break;case 66:this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this._terminal.x10Mouse=!1,this._terminal.vt200Mouse=!1,this._terminal.normalMouse=!1,this._terminal.mouseEvents=!1,this._terminal.element.style.cursor="";break;case 1004:this._terminal.sendFocus=!1;break;case 1005:this._terminal.utfMouse=!1;break;case 1006:this._terminal.sgrMouse=!1;break;case 1015:this._terminal.urxvtMouse=!1;break;case 25:this._terminal.cursorHidden=!0;break;case 1049:case 47:case 1047:this._terminal.normal&&(this._terminal.lines=this._terminal.normal.lines,this._terminal.ybase=this._terminal.normal.ybase,this._terminal.ydisp=this._terminal.normal.ydisp,this._terminal.x=this._terminal.normal.x,this._terminal.y=this._terminal.normal.y,this._terminal.scrollTop=this._terminal.normal.scrollTop,this._terminal.scrollBottom=this._terminal.normal.scrollBottom,this._terminal.tabs=this._terminal.normal.tabs,this._terminal.normal=null,this._terminal.refresh(0,this._terminal.rows-1),this._terminal.viewport.syncScrollArea(),this._terminal.showCursor())}}else switch(t[0]){case 4:this._terminal.insertMode=!1;break;case 20:}},t.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this._terminal.curAttr=this._terminal.defAttr);for(var e,i=t.length,r=0,s=this._terminal.curAttr>>18,n=this._terminal.curAttr>>9&511,a=511&this._terminal.curAttr;r<i;r++)e=t[r],e>=30&&e<=37?n=e-30:e>=40&&e<=47?a=e-40:e>=90&&e<=97?(e+=8,n=e-90):e>=100&&e<=107?(e+=8,a=e-100):0===e?(s=this._terminal.defAttr>>18,n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):1===e?s|=1:4===e?s|=2:5===e?s|=4:7===e?s|=8:8===e?s|=16:22===e?s&=-2:24===e?s&=-3:25===e?s&=-5:27===e?s&=-9:28===e?s&=-17:39===e?n=this._terminal.defAttr>>9&511:49===e?a=511&this._terminal.defAttr:38===e?2===t[r+1]?(r+=2,n=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),n===-1&&(n=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],n=e):48===e?2===t[r+1]?(r+=2,a=this._terminal.matchColor(255&t[r],255&t[r+1],255&t[r+2]),a===-1&&(a=511),r+=2):5===t[r+1]&&(r+=2,e=255&t[r],a=e):100===e?(n=this._terminal.defAttr>>9&511,a=511&this._terminal.defAttr):this._terminal.error("Unknown SGR attribute: %d.",e);this._terminal.curAttr=s<<18|n<<9|a},t.prototype.deviceStatus=function(t){if(this._terminal.prefix){if("?"===this._terminal.prefix)switch(t[0]){case 6:this._terminal.send(r.C0.ESC+"[?"+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this._terminal.send(r.C0.ESC+"[0n");break;case 6:this._terminal.send(r.C0.ESC+"["+(this._terminal.y+1)+";"+(this._terminal.x+1)+"R")}},t.prototype.softReset=function(t){this._terminal.cursorHidden=!1,this._terminal.insertMode=!1,this._terminal.originMode=!1,this._terminal.wraparoundMode=!0,this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._terminal.applicationCursor=!1,this._terminal.scrollTop=0,this._terminal.scrollBottom=this._terminal.rows-1,this._terminal.curAttr=this._terminal.defAttr,this._terminal.x=this._terminal.y=0,this._terminal.charset=null,this._terminal.glevel=0,this._terminal.charsets=[null]},t.prototype.setCursorStyle=function(t){var e=t[0]<1?1:t[0];switch(e){case 1:case 2:this._terminal.setOption("cursorStyle","block");break;case 3:case 4:this._terminal.setOption("cursorStyle","underline");break;case 5:case 6:this._terminal.setOption("cursorStyle","bar")}var i=e%2===1;this._terminal.setOption("cursorBlink",i)},t.prototype.setScrollRegion=function(t){this._terminal.prefix||(this._terminal.scrollTop=(t[0]||1)-1,this._terminal.scrollBottom=(t[1]&&t[1]<=this._terminal.rows?t[1]:this._terminal.rows)-1,this._terminal.x=0,this._terminal.y=0)},t.prototype.saveCursor=function(t){this._terminal.savedX=this._terminal.x,this._terminal.savedY=this._terminal.y},t.prototype.restoreCursor=function(t){this._terminal.x=this._terminal.savedX||0,this._terminal.y=this._terminal.savedY||0},t}();i.InputHandler=n;var a=function(t){function e(t){var e,i=0,r=s.length-1;if(t<s[0][0]||t>s[r][1])return!1;for(;r>=i;)if(e=Math.floor((i+r)/2),t>s[e][1])i=e+1;else{if(!(t<s[e][0]))return!0;r=e-1}return!1}function i(i){return 0===i?t.nul:i<32||i>=127&&i<160?t.control:e(i)?0:r(i)?2:1}function r(t){return t>=4352&&(t<=4447||9001===t||9002===t||t>=11904&&t<=42191&&12351!==t||t>=44032&&t<=55203||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65135||t>=65280&&t<=65376||t>=65504&&t<=65510||t>=131072&&t<=196605||t>=196608&&t<=262141)}var s=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];return i}({nul:0,control:0})},{"./Charsets":1,"./EscapeSequences":3}],6:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r="xterm-invalid-link",s="(https?:\\/\\/)",n="[\\da-z\\.-]+",a="[^\\da-z\\.-]+",o="("+n+")",h="([a-z\\.]{2,6})",l="((\\d{1,3}\\.){3}\\d{1,3})",c="(localhost)",u="(:\\d{1,5})",m="(("+o+"\\."+h+")|"+l+"|"+c+")"+u+"?",p="(\\/[\\/\\w\\.\\-%~]*)*",f="[0-9\\w\\[\\]\\(\\)\\/\\?\\!#@$%&'*+,:;~\\=\\.\\-]*",d="(\\?"+f+")?",_="(#"+f+")?",y="[^\\/\\w\\.\\-%]+",C=m+p+d+_,g="(?:^|"+a+")(",v=")($|"+y+")",b=new RegExp(g+s+C+v),k=0,w=function(){function t(){this._nextLinkMatcherId=k,this._rowTimeoutIds=[],this._linkMatchers=[],this.registerLinkMatcher(b,null,{matchIndex:1})}return t.prototype.attachToDom=function(t,e){this._document=t,this._rows=e},t.prototype.linkifyRow=function(e){if(this._document){var i=this._rowTimeoutIds[e];i&&clearTimeout(i),this._rowTimeoutIds[e]=setTimeout(this._linkifyRow.bind(this,e),t.TIME_BEFORE_LINKIFY)}},t.prototype.setHypertextLinkHandler=function(t){this._linkMatchers[k].handler=t},t.prototype.setHypertextValidationCallback=function(t){this._linkMatchers[k].validationCallback=t},t.prototype.registerLinkMatcher=function(t,e,i){if(void 0===i&&(i={}),this._nextLinkMatcherId!==k&&!e)throw new Error("handler must be defined");var r={id:this._nextLinkMatcherId++,regex:t,handler:e,matchIndex:i.matchIndex,validationCallback:i.validationCallback,priority:i.priority||0};return this._addLinkMatcherToList(r),r.id},t.prototype._addLinkMatcherToList=function(t){if(0===this._linkMatchers.length)return void this._linkMatchers.push(t);for(var e=this._linkMatchers.length-1;e>=0;e--)if(t.priority<=this._linkMatchers[e].priority)return void this._linkMatchers.splice(e+1,0,t);this._linkMatchers.splice(0,0,t)},t.prototype.deregisterLinkMatcher=function(t){for(var e=1;e<this._linkMatchers.length;e++)if(this._linkMatchers[e].id===t)return this._linkMatchers.splice(e,1),!0;return!1},t.prototype._linkifyRow=function(t){var e=this._rows[t];if(e)for(var i=(e.textContent,0);i<this._linkMatchers.length;i++){var s=this._linkMatchers[i],n=this._doLinkifyRow(e,s);if(n.length>0){if(s.validationCallback)for(var a=function(t){var e=n[t];s.validationCallback(e.textContent,e,function(t){t||e.classList.add(r)})},o=0;o<n.length;o++)a(o);return}}},t.prototype._doLinkifyRow=function(t,e){var i=[],r=e.id===k,s=t.childNodes,n=t.textContent.match(e.regex);if(!n||0===n.length)return i;for(var a=n["number"!=typeof e.matchIndex?0:e.matchIndex],o=n.index+a.length,h=0;h<s.length;h++){var l=s[h],c=l.textContent.indexOf(a);if(c>=0){var u=this._createAnchorElement(a,e.handler,r);if(l.textContent.length===a.length)if(3===l.nodeType)this._replaceNode(l,u);else{var m=l;if("A"===m.nodeName)return i;m.innerHTML="",m.appendChild(u)}else{var p=this._replaceNodeSubstringWithNode(l,u,a,c);h+=p}if(i.push(u),n=t.textContent.substring(o).match(e.regex),!n||0===n.length)return i;a=n["number"!=typeof e.matchIndex?0:e.matchIndex],o+=n.index+a.length}}return i},t.prototype._createAnchorElement=function(t,e,i){var s=this._document.createElement("a");return s.textContent=t,s.draggable=!1,i?(s.href=t,s.target="_blank",s.addEventListener("click",function(i){if(e)return e(i,t)})):s.addEventListener("click",function(i){if(!s.classList.contains(r))return e(i,t)}),s},t.prototype._replaceNode=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var r=t.parentNode,s=0;s<e.length;s++)r.insertBefore(e[s],t);r.removeChild(t)},t.prototype._replaceNodeSubstringWithNode=function(t,e,i,r){var s=t;if(3!==s.nodeType&&(s=s.childNodes[0]),0===s.childNodes.length&&3!==s.nodeType)throw new Error("targetNode must be a text node or only contain a single text node");var n=s.textContent;if(0===r){var a=n.substring(i.length),o=this._document.createTextNode(a);return this._replaceNode(s,e,o),0}if(r===t.textContent.length-i.length){var h=n.substring(0,r),l=this._document.createTextNode(h);return this._replaceNode(s,l,e),0}var c=n.substring(0,r),u=this._document.createTextNode(c),m=n.substring(r+i.length),p=this._document.createTextNode(m);return this._replaceNode(s,u,e,p),1},t}();w.TIME_BEFORE_LINKIFY=200,i.Linkifier=w},{}],7:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./EscapeSequences"),s=t("./Charsets"),n={};n[r.C0.BEL]=function(t,e){return e.bell()},n[r.C0.LF]=function(t,e){return e.lineFeed()},n[r.C0.VT]=n[r.C0.LF],n[r.C0.FF]=n[r.C0.LF],n[r.C0.CR]=function(t,e){return e.carriageReturn()},n[r.C0.BS]=function(t,e){return e.backspace()},n[r.C0.HT]=function(t,e){return e.tab()},n[r.C0.SO]=function(t,e){return e.shiftOut()},n[r.C0.SI]=function(t,e){return e.shiftIn()},n[r.C0.ESC]=function(t,e){return t.setState(l.ESCAPED)};var a={};a["["]=function(t,e){e.params=[],e.currentParam=0,t.setState(l.CSI_PARAM)},a["]"]=function(t,e){e.params=[],e.currentParam=0,t.setState(l.OSC)},a.P=function(t,e){e.params=[],e.currentParam=0,t.setState(l.DCS)},a._=function(t,e){t.setState(l.IGNORE)},a["^"]=function(t,e){t.setState(l.IGNORE)},a.c=function(t,e){e.reset()},a.E=function(t,e){e.x=0,e.index(),t.setState(l.NORMAL)},a.D=function(t,e){e.index(),t.setState(l.NORMAL)},a.M=function(t,e){e.reverseIndex(),t.setState(l.NORMAL)},a["%"]=function(t,e){e.setgLevel(0),e.setgCharset(0,s.DEFAULT_CHARSET),t.setState(l.NORMAL),t.skipNextChar()},a[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var o={};o["?"]=function(t){return t.setPrefix("?")},o[">"]=function(t){return t.setPrefix(">")},o["!"]=function(t){return t.setPrefix("!")},o[0]=function(t){return t.setParam(10*t.getParam())},o[1]=function(t){return t.setParam(10*t.getParam()+1)},o[2]=function(t){return t.setParam(10*t.getParam()+2)},o[3]=function(t){return t.setParam(10*t.getParam()+3)},o[4]=function(t){return t.setParam(10*t.getParam()+4)},o[5]=function(t){return t.setParam(10*t.getParam()+5)},o[6]=function(t){return t.setParam(10*t.getParam()+6)},o[7]=function(t){return t.setParam(10*t.getParam()+7)},o[8]=function(t){return t.setParam(10*t.getParam()+8)},o[9]=function(t){return t.setParam(10*t.getParam()+9)},o.$=function(t){return t.setPostfix("$")},o['"']=function(t){return t.setPostfix('"')},o[" "]=function(t){return t.setPostfix(" ")},o["'"]=function(t){return t.setPostfix("'")},o[";"]=function(t){return t.finalizeParam()},o[r.C0.CAN]=function(t){return t.setState(l.NORMAL)};var h={};h["@"]=function(t,e,i){return t.insertChars(e)},h.A=function(t,e,i){return t.cursorUp(e)},h.B=function(t,e,i){return t.cursorDown(e)},h.C=function(t,e,i){return t.cursorForward(e)},h.D=function(t,e,i){return t.cursorBackward(e)},h.E=function(t,e,i){return t.cursorNextLine(e)},h.F=function(t,e,i){return t.cursorPrecedingLine(e)},h.G=function(t,e,i){return t.cursorCharAbsolute(e)},h.H=function(t,e,i){return t.cursorPosition(e)},h.I=function(t,e,i){return t.cursorForwardTab(e)},h.J=function(t,e,i){return t.eraseInDisplay(e)},h.K=function(t,e,i){return t.eraseInLine(e)},h.L=function(t,e,i){return t.insertLines(e)},h.M=function(t,e,i){return t.deleteLines(e)},h.P=function(t,e,i){return t.deleteChars(e)},h.S=function(t,e,i){return t.scrollUp(e)},h.T=function(t,e,i){e.length<2&&!i&&t.scrollDown(e)},h.X=function(t,e,i){return t.eraseChars(e)},h.Z=function(t,e,i){return t.cursorBackwardTab(e)},h["`"]=function(t,e,i){return t.charPosAbsolute(e)},h.a=function(t,e,i){return t.HPositionRelative(e)},h.b=function(t,e,i){return t.repeatPrecedingCharacter(e)},h.c=function(t,e,i){return t.sendDeviceAttributes(e)},h.d=function(t,e,i){return t.linePosAbsolute(e)},h.e=function(t,e,i){return t.VPositionRelative(e)},h.f=function(t,e,i){return t.HVPosition(e)},h.g=function(t,e,i){return t.tabClear(e)},h.h=function(t,e,i){return t.setMode(e)},h.l=function(t,e,i){return t.resetMode(e)},h.m=function(t,e,i){return t.charAttributes(e)},h.n=function(t,e,i){return t.deviceStatus(e)},h.p=function(t,e,i){switch(i){case"!":t.softReset(e);
-}},h.q=function(t,e,i,r){" "===r&&t.setCursorStyle(e)},h.r=function(t,e){return t.setScrollRegion(e)},h.s=function(t,e){return t.saveCursor(e)},h.u=function(t,e){return t.restoreCursor(e)},h[r.C0.CAN]=function(t,e,i,r,s){return s.setState(l.NORMAL)};var l;!function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(l||(l={}));var c=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,i,c,u,m=t.length;for(this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<m;this._position++){if(i=t[this._position],c=t.charCodeAt(this._position),55296<=c&&c<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}c=1024*(c-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:i in n?n[i](this,this._inputHandler):this._inputHandler.addChar(i,c);break;case l.ESCAPED:if(i in a){a[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":break;case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":this._terminal.setgLevel(3);break;case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case l.CHARSET:i in s.CHARSETS?(e=s.CHARSETS[i],"/"===i&&this.skipNextChar()):e=s.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this._terminal.params=[],this._terminal.currentParam=0,this._state=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(i in o){o[i](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:i in h?h[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",i),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.prefix){case"":break;case"$q":var p=this._terminal.currentParam,f=!1;switch(p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.scrollTop+1)+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(r.C0.ESC+"P"+ +f+"$r"+p+r.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(r.C0.ESC+"P"+ +f+"+r"+p+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case l.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=l.NORMAL)}}},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=c},{"./Charsets":1,"./EscapeSequences":3}],8:[function(t,e,i){"use strict";function r(t){var e=t.ownerDocument,i=e.createElement("span");i.innerHTML="hello world",t.appendChild(i);var r=i.offsetWidth,s=i.offsetHeight;i.style.fontWeight="bold";var n=i.offsetWidth,a=i.offsetHeight;return t.removeChild(i),r!==n||s!==a}Object.defineProperty(i,"__esModule",{value:!0});var s,n=5;!function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE"}(s||(s={}));var a=null,o=function(){function t(t){this._terminal=t,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,null===a&&(a=r(this._terminal.element))}return t.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},t.prototype._refreshLoop=function(){var t=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=n;if(t)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var e,i;if(this._refreshRowsQueue.length>4)e=0,i=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,i=this._refreshRowsQueue[0].end;for(var r=1;r<this._refreshRowsQueue.length;r++)this._refreshRowsQueue[r].start<e&&(e=this._refreshRowsQueue[r].start),this._refreshRowsQueue[r].end>i&&(i=this._refreshRowsQueue[r].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,i)},t.prototype._refresh=function(t,e){var i,r,n,o,h,l,c,u,m,p,f,d,_,y,C;document.activeElement;for(e-t>=this._terminal.rows/2&&(C=this._terminal.element.parentNode,C&&this._terminal.element.removeChild(this._terminal.rowContainer)),u=this._terminal.cols,r=t,e>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),e=this._terminal.rows-1);r<=e;r++)if(y=r+this._terminal.ydisp,o=this._terminal.lines.get(y),o&&this._terminal.children[r]){for(h="",i=this._terminal.y===r-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1,p=this._terminal.defAttr,n=0;n<u;n++)if(o[n]&&(m=o[n][0],l=o[n][1],c=o[n][2])){if(n===i&&(m=-1),m!==p&&(p!==this._terminal.defAttr&&(h+="</span>"),m!==this._terminal.defAttr))if(m===-1)h+='<span class="reverse-video terminal-cursor">';else{var g=[];f=511&m,d=m>>9&511,_=m>>18,_&s.BOLD&&(a||g.push("xterm-bold"),d<8&&(d+=8)),_&s.UNDERLINE&&g.push("xterm-underline"),_&s.BLINK&&g.push("xterm-blink"),_&s.INVERSE&&(f=[d,d=f][0],1&_&&d<8&&(d+=8)),_&s.INVISIBLE&&g.push("xterm-hidden"),_&s.INVERSE&&(257===f&&(f=15),256===d&&(d=0)),f<256&&g.push("xterm-bg-color-"+f),d<256&&g.push("xterm-color-"+d),h+="<span",g.length&&(h+=' class="'+g.join(" ")+'"'),h+=">"}switch(2===c&&(h+='<span class="xterm-wide-char">'),l){case"&":h+="&amp;";break;case"<":h+="&lt;";break;case">":h+="&gt;";break;default:h+=l<=" "?"&nbsp;":l}2===c&&(h+="</span>"),p=m}p!==this._terminal.defAttr&&(h+="</span>"),this._terminal.children[r].innerHTML=h}C&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:t,end:e})},t}();i.Renderer=o},{}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i,r){var s=this;this.terminal=t,this.viewportElement=e,this.scrollArea=i,this.charMeasure=r,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.refresh=function(){if(this.charMeasure.height>0){var t=this.charMeasure.height!==this.currentRowHeight;t&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var e=this.lastRecordedViewportHeight!==this.terminal.rows;(t||e)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px"),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var t=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),i=e-this.terminal.ydisp;this.terminal.scrollDisp(i,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t}();i.Viewport=r},{}],10:[function(t,e,i){"use strict";function r(t){var e=String.fromCharCode(32),i=String.fromCharCode(160),r=new RegExp(i,"g"),s=t.split("\n").map(function(t){var i=t.replace(/\s+$/g,"").replace(r,e);return i}).join("\n");return s}function s(t,e){var i=window.getSelection().toString(),s=r(i);e.browser.isMSIE?window.clipboardData.setData("Text",s):t.clipboardData.setData("text/plain",s),t.preventDefault()}function n(t,e){t.stopPropagation();var i,r=function(i){return e.handler(i),e.textarea.value="",e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),r(i)):t.clipboardData&&(i=t.clipboardData.getData("text/plain"),r(i))}function a(t,e){var i=document.getSelection(),s=r(i.toString()),n=!1,a=t.clientX,o=t.clientY;if(i.rangeCount){for(var h=i.getRangeAt(0),l=h.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(n=a>u.left&&a<u.right&&o>u.top&&o<u.bottom)break}!s.match(/^\s$/)&&s.length||(n=!1)}n||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=a-10+"px",e.textarea.style.top=o-10+"px",e.textarea.style.zIndex="1000",e.textarea.focus(),setTimeout(function(){e.textarea.style.position=null,e.textarea.style.width=null,e.textarea.style.height=null,e.textarea.style.left=null,e.textarea.style.top=null,e.textarea.style.zIndex=null},4))}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForClipboard=r,i.copyHandler=s,i.pasteHandler=n,i.rightClickHandler=a},{}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Generic"),s="undefined"==typeof navigator,n=s?"node":navigator.userAgent,a=s?"node":navigator.platform;i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=r.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],a),i.isIpad="iPad"===a,i.isIphone="iPhone"===a,i.isMSWindows=r.contains(["Windows","Win16","Win32","WinCE"],a)},{"./Generic":14}],12:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s=t("../EventEmitter.js"),n=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(){var t=this;this._measureElement?this._doMeasure():(this._measureElement=this._document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement),setTimeout(function(){return t._doMeasure()},0))},e.prototype._doMeasure=function(){var t=this._measureElement.getBoundingClientRect();0!==t.width&&0!==t.height&&(this._width===t.width&&this._height===t.height||(this._width=t.width,this._height=t.height,this.emit("charsizechanged")))},e}(s.EventEmitter);i.CharMeasure=n},{"../EventEmitter.js":4}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._array=new Array(t),this._startIndex=0,this._length=0}return Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forEach",{get:function(){return this._array.forEach},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},t.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},t.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0)):this._length++},t.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},t.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var s=t;s<this._length-e;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+e)];this._length-=e}if(i&&i.length){for(var s=this._length-1;s>=t;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(var s=0;s<i.length;s++)this._array[this._getCyclicIndex(t+s)]=i[s];this._length+i.length>this.maxLength?(this._startIndex+=this._length+i.length-this.maxLength,this._length=this.maxLength):this._length+=i.length}},t.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t},t.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var s=t+e+i-this._length;if(s>0)for(this._length+=s;this._length>this.maxLength;)this._length--,this._startIndex++}else for(var r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},t.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},t}();i.CircularList=r},{}],14:[function(t,e,i){"use strict";function r(t,e){return t.indexOf(e)>=0}Object.defineProperty(i,"__esModule",{value:!0}),i.contains=r},{}],15:[function(e,i,r){"use strict";function s(t){var e=this;if(!(this instanceof s))return new s(arguments[0],arguments[1],arguments[2]);e.browser=S,e.cancel=s.cancel,d.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(s.defaults).forEach(function(i){null==t[i]&&(t[i]=s.options[i],s[i]!==s.defaults[i]&&(t[i]=s[i])),e[i]=t[i]}),8===t.colors.length?t.colors=t.colors.concat(s._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(s._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(s._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(s._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(E?E.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new v.InputHandler(this),this.parser=new b.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.linkifier=this.linkifier||new w.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new C.CircularList(this.scrollback);for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function n(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})}function a(t,e,i,r){t.removeEventListener(e,i,r||!1)}function o(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function h(t,e){function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i}function l(t,e){var i=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?i:i&&(!e.keyCode||e.keyCode>47)}function c(t,e,i){var r=t<<16|e<<8|i;if(null!=c._cache[r])return c._cache[r];for(var n,a,o,h,l,u=1/0,m=-1,p=0;p<s.vcolors.length;p++){if(n=s.vcolors[p],a=n[0],o=n[1],h=n[2],l=c.distance(t,e,i,a,o,h),0===l){m=p;break}l<u&&(u=l,m=p)}return c._cache[r]=m}function u(t,e,i){if(t.forEach)return t.forEach(e,i);for(var r=0;r<t.length;r++)e.call(i,t[r],r,t)}function m(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}function p(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}Object.defineProperty(r,"__esModule",{value:!0});var f=e("./CompositionHelper"),d=e("./EventEmitter"),_=e("./Viewport"),y=e("./handlers/Clipboard"),C=e("./utils/CircularList"),g=e("./EscapeSequences"),v=e("./InputHandler"),b=e("./Parser"),k=e("./Renderer"),w=e("./Linkifier"),x=e("./utils/CharMeasure"),S=e("./utils/Browser"),E="undefined"!=typeof window?window.document:null,A=5,M=300,L=600;h(s,d.EventEmitter),s.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},s.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],s.colors=function(){function t(t,i,s){r.push("#"+e(t)+e(i)+e(s))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var i,r=s.tangoColors.slice(),n=[0,95,135,175,215,255];for(i=0;i<216;i++)t(n[i/36%6|0],n[i/6%6|0],n[i%6]);for(i=0;i<24;i++)n=8+10*i,t(n,n,n);return r}(),s._colors=s.colors.slice(),s.vcolors=function(){for(var t,e=[],i=s.colors,r=0;r<256;r++)t=parseInt(i[r].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),s.defaults={colors:s.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},s.options={},s.focus=null,u(p(s.defaults),function(t){s[t]=s.defaults[t],s.options[t]=s.defaults[t]}),s.prototype.focus=function(){return this.textarea.focus()},s.prototype.getOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},s.prototype.setOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');switch(t){case"scrollback":if(this.options[t]!==e){if(this.lines.length>e){var i=this.lines.length-e,r=this.ydisp-i<0;this.lines.trimStart(i),this.ybase=Math.max(this.ybase-i,0),this.ydisp=Math.max(this.ydisp-i,0),r&&this.refresh(0,this.rows-1)}this.lines.maxLength=e,this.viewport.syncScrollArea()}}switch(this[t]=e,this.options[t]=e,t){case"cursorBlink":this.setCursorBlinking(e);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===e),this.element.classList.toggle("xterm-cursor-style-bar","bar"===e);break;case"tabStopWidth":this.setupStops()}},s.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},s.prototype.setCursorBlinking=function(t){if(this.element.classList.toggle("xterm-cursor-blink",t),this.clearCursorBlinkingInterval(),t){var e=this;this.cursorBlinkInterval=setInterval(function(){e.element.classList.toggle("xterm-cursor-blink-on")},L)}},s.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},s.bindFocus=function(t){n(t.textarea,"focus",function(e){t.sendFocus&&t.send(g.C0.ESC+"[I"),t.element.classList.add("focus"),t.showCursor(),t.restartCursorBlinking.apply(t),s.focus=t,t.emit("focus",{terminal:t})})},s.prototype.blur=function(){return this.textarea.blur()},s.bindBlur=function(t){n(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send(g.C0.ESC+"[O"),t.element.classList.remove("focus"),t.clearCursorBlinkingInterval.apply(t),s.focus=null,t.emit("blur",{terminal:t})})},s.prototype.initGlobal=function(){function t(t){y.rightClickHandler.call(this,t,e)}var e=this;s.bindKeys(this),s.bindFocus(this),s.bindBlur(this),n(this.element,"copy",function(t){y.copyHandler.call(this,t,e)}),n(this.textarea,"paste",function(t){y.pasteHandler.call(this,t,e)}),n(this.element,"paste",function(t){y.pasteHandler.call(this,t,e)}),e.browser.isFirefox?n(this.element,"mousedown",function(e){2==e.button&&t(e)}):n(this.element,"contextmenu",t)},s.bindKeys=function(t){n(t.element,"keydown",function(e){E.activeElement==this&&t.keyDown(e)},!0),n(t.element,"keypress",function(e){E.activeElement==this&&t.keyPress(e)},!0),n(t.element,"keyup",function(e){m(e)||t.focus(t)},!0),n(t.textarea,"keydown",function(e){t.keyDown(e)},!0),n(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),n(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),n(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),n(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper)),t.on("refresh",function(e){t.queueLinkification(e.start,e.end)})},s.prototype.insertRow=function(t){return"object"!=typeof t&&(t=E.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},s.prototype.open=function(t){var e=this,i=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.setCursorBlinking(this.options.cursorBlink),this.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=E.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=E.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=E.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(E,this.children),this.helperContainer=E.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=E.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){e.emit("focus",{terminal:e})}),this.textarea.addEventListener("blur",function(){e.emit("blur",{terminal:e})}),this.helperContainer.appendChild(this.textarea),this.compositionView=E.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new f.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=E.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);i<this.rows;i++)this.insertRow();this.parent.appendChild(this.element),this.charMeasure=new x.CharMeasure(E,this.helperContainer),this.charMeasure.on("charsizechanged",function(){e.updateCharSizeCSS()}),this.charMeasure.measure(),this.viewport=new _.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new k.Renderer(this),this.refresh(0,this.rows-1),this.initGlobal(),this.focus(),n(this.element,"click",function(){var t=E.getSelection(),i=t.isCollapsed,r="boolean"==typeof i?!i:"Range"==t.type;r||e.focus()}),this.bindMouse(),this.emit("open")},s.loadAddon=function(s,n){return"object"==typeof r&&"object"==typeof i?e("./addons/"+s+"/"+s):"function"==typeof t?e(["./addons/"+s+"/"+s],n):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},s.prototype.updateCharSizeCSS=function(){this.charSizeStyleElement.textContent=".xterm-wide-char{width:"+2*this.charMeasure.width+"px;}"},s.prototype.bindMouse=function(){function t(t){var e,i;if(e=s(t),i=o(t))switch(r(e,i),t.overrideType||t.type){case"mousedown":c=e;break;case"mouseup":c=32;break;case"wheel":}}function e(t){var e,i=c;e=o(t),e&&(i+=32,r(i,e))}function i(t,e){if(l.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function r(t,e){if(l.vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=g.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void l.send(r)}if(l.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void l.send(g.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(l.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void l.send(g.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(l.sgrMouse)return e.x-=32,e.y-=32,void l.send(g.C0.ESC+"[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var r=[];i(r,t),i(r,e.x),i(r,e.y),l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}function s(t){var e,i,r,s,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,l.browser.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return i=t.shiftKey?4:0,r=t.metaKey?8:0,s=t.ctrlKey?16:0,n=i|r|s,l.vt200Mouse?n&=s:l.normalMouse||(n=0),e=32+(n<<2)+e}function o(t){var e,i,r;if(null!=t.pageX){for(e=t.pageX,i=t.pageY,r=l.element;r&&r!==l.document.documentElement;)e-=r.offsetLeft,i-=r.offsetTop,r="offsetParent"in r?r.offsetParent:r.parentNode;return e=Math.ceil(e/l.charMeasure.width),i=Math.ceil(i/l.charMeasure.height),e<0&&(e=0),e>l.cols&&(e=l.cols),i<0&&(i=0),i>l.rows&&(i=l.rows),e+=32,i+=32,{x:e,y:i,type:"wheel"}}}var h=this.element,l=this,c=32;n(h,"mousedown",function(i){if(l.mouseEvents)return t(i),l.focus(),l.vt200Mouse?(i.overrideType="mouseup",t(i),l.cancel(i)):(l.normalMouse&&n(l.document,"mousemove",e),l.x10Mouse||n(l.document,"mouseup",function i(r){return t(r),l.normalMouse&&a(l.document,"mousemove",e),a(l.document,"mouseup",i),l.cancel(r)}),l.cancel(i))}),n(h,"wheel",function(e){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return t(e),l.cancel(e)}),n(h,"wheel",function(t){if(!l.mouseEvents)return l.viewport.onWheel(t),l.cancel(t)})},s.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},s.prototype.queueLinkification=function(t,e){if(this.linkifier)for(var i=t;i<=e;i++)this.linkifier.linkifyRow(i)},s.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},s.prototype.scroll=function(){var t;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,t-=this.rows-1-this.scrollBottom,t===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},s.prototype.scrollDisp=function(t,e){t<0?this.userScrolling=!0:t+this.ydisp>=this.ybase&&(this.userScrolling=!1),this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},s.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},s.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},s.prototype.scrollToBottom=function(){
-this.scrollDisp(this.ybase-this.ydisp)},s.prototype.write=function(t){if(this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=A&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var e=this;setTimeout(function(){e.innerWrite()})}},s.prototype.innerWrite=function(){for(var t=this.writeBuffer.splice(0,M);t.length>0;){var e=t.shift();e.length;this.xoffSentToCatchUp&&0===t.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y,this.parser.parse(e),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var i=this;setTimeout(function(){i.innerWrite()},0)}else this.writeInProgress=!1},s.prototype.writeln=function(t){this.write(t+"\r\n")},s.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},s.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},s.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},s.prototype.registerLinkMatcher=function(t,e,i){if(this.linkifier){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r}},s.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},s.prototype.keyDown=function(t){if(this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.key===g.C0.DC3?this.writeStopped=!0:e.key===g.C0.DC1&&(this.writeStopped=!1),e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!l(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},s.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},i=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key=g.C0.BS;break}e.key=g.C0.DEL;break;case 9:if(t.shiftKey){e.key=g.C0.ESC+"[Z";break}e.key=g.C0.HT,e.cancel=!0;break;case 13:e.key=g.C0.CR,e.cancel=!0;break;case 27:e.key=g.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"D",e.key==g.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?e.key=g.C0.ESC+"OD":e.key=g.C0.ESC+"[D";break;case 39:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"C",e.key==g.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?e.key=g.C0.ESC+"OC":e.key=g.C0.ESC+"[C";break;case 38:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"A",e.key==g.C0.ESC+"[1;3A"&&(e.key=g.C0.ESC+"[1;5A")):this.applicationCursor?e.key=g.C0.ESC+"OA":e.key=g.C0.ESC+"[A";break;case 40:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"B",e.key==g.C0.ESC+"[1;3B"&&(e.key=g.C0.ESC+"[1;5B")):this.applicationCursor?e.key=g.C0.ESC+"OB":e.key=g.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=g.C0.ESC+"[2~");break;case 46:i?e.key=g.C0.ESC+"[3;"+(i+1)+"~":e.key=g.C0.ESC+"[3~";break;case 36:i?e.key=g.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=g.C0.ESC+"OH":e.key=g.C0.ESC+"[H";break;case 35:i?e.key=g.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=g.C0.ESC+"OF":e.key=g.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key=g.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key=g.C0.ESC+"[6~";break;case 112:i?e.key=g.C0.ESC+"[1;"+(i+1)+"P":e.key=g.C0.ESC+"OP";break;case 113:i?e.key=g.C0.ESC+"[1;"+(i+1)+"Q":e.key=g.C0.ESC+"OQ";break;case 114:i?e.key=g.C0.ESC+"[1;"+(i+1)+"R":e.key=g.C0.ESC+"OR";break;case 115:i?e.key=g.C0.ESC+"[1;"+(i+1)+"S":e.key=g.C0.ESC+"OS";break;case 116:i?e.key=g.C0.ESC+"[15;"+(i+1)+"~":e.key=g.C0.ESC+"[15~";break;case 117:i?e.key=g.C0.ESC+"[17;"+(i+1)+"~":e.key=g.C0.ESC+"[17~";break;case 118:i?e.key=g.C0.ESC+"[18;"+(i+1)+"~":e.key=g.C0.ESC+"[18~";break;case 119:i?e.key=g.C0.ESC+"[19;"+(i+1)+"~":e.key=g.C0.ESC+"[19~";break;case 120:i?e.key=g.C0.ESC+"[20;"+(i+1)+"~":e.key=g.C0.ESC+"[20~";break;case 121:i?e.key=g.C0.ESC+"[21;"+(i+1)+"~":e.key=g.C0.ESC+"[21~";break;case 122:i?e.key=g.C0.ESC+"[23;"+(i+1)+"~":e.key=g.C0.ESC+"[23~";break;case 123:i?e.key=g.C0.ESC+"[24;"+(i+1)+"~":e.key=g.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey||(t.keyCode>=65&&t.keyCode<=90?e.key=g.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=g.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=g.C0.ESC+(t.keyCode-48))):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},s.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},s.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},s.prototype.keyPress=function(t){var e;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!l(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},s.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},s.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},s.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},s.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},s.prototype.resize=function(t,e){if(!isNaN(t)&&!isNaN(e)){var i,r,s,n,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),s=this.cols,s<t)for(n=[this.defAttr," ",1],r=this.lines.length;r--;)for(;this.lines.get(r).length<t;)this.lines.get(r).push(n);if(this.cols=t,this.setupStops(this.cols),s=this.rows,a=0,s<e)for(i=this.element;s++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;s-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(i=this.children.shift(),!i)continue;i.parentNode.removeChild(i)}this.rows=e,this.y>=e&&(this.y=e-1),a&&(this.y+=a),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}}},s.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},s.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},s.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=this.getOption("tabStopWidth"))this.tabs[t]=!0},s.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.eraseRight=function(t,e){var i=this.lines.get(this.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1];t<this.cols;t++)i[t]=r;this.updateRange(e)}},s.prototype.eraseLeft=function(t,e){var i=this.lines.get(this.ybase+e);if(i){var r=[this.eraseAttr()," ",1];for(t++;t--;)i[t]=r;this.updateRange(e)}},s.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines.set(0,this.lines.get(this.ybase+this.y)),this.lines.length=1,this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},s.prototype.eraseLine=function(t){this.eraseRight(0,t)},s.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,i=[e," ",1],r=[],s=0;s<this.cols;s++)r[s]=i;return r},s.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},s.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},s.prototype.handler=function(t){this.options.disableStdin||(this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t))},s.prototype.handleTitle=function(t){this.emit("title",t)},s.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},s.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},s.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler;s.call(this,this.options),this.customKeydownHandler=t,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},s.prototype.tabSet=function(){this.tabs[this.x]=!0},s.prototype.matchColor=c,c._cache={},c.distance=function(t,e,i,r,s,n){return Math.pow(30*(t-r),2)+Math.pow(59*(e-s),2)+Math.pow(11*(i-n),2)},s.EventEmitter=d.EventEmitter,s.inherits=h,s.on=n,s.off=a,s.cancel=o,i.exports=s},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Linkifier":6,"./Parser":7,"./Renderer":8,"./Viewport":9,"./handlers/Clipboard":10,"./utils/Browser":11,"./utils/CharMeasure":12,"./utils/CircularList":13}]},{},[15])(15)});</script>
+}},h.q=function(t,e,i,r){" "===r&&t.setCursorStyle(e)},h.r=function(t,e){return t.setScrollRegion(e)},h.s=function(t,e){return t.saveCursor(e)},h.u=function(t,e){return t.restoreCursor(e)},h[r.C0.CAN]=function(t,e,i,r,s){return s.setState(l.NORMAL)};var l;!function(t){t[t.NORMAL=0]="NORMAL",t[t.ESCAPED=1]="ESCAPED",t[t.CSI_PARAM=2]="CSI_PARAM",t[t.CSI=3]="CSI",t[t.OSC=4]="OSC",t[t.CHARSET=5]="CHARSET",t[t.DCS=6]="DCS",t[t.IGNORE=7]="IGNORE"}(l||(l={}));var c=function(){function t(t,e){this._inputHandler=t,this._terminal=e,this._state=l.NORMAL}return t.prototype.parse=function(t){var e,i,c,u,m=t.length;for(this._position=0,this._terminal.surrogate_high&&(t=this._terminal.surrogate_high+t,this._terminal.surrogate_high="");this._position<m;this._position++){if(i=t[this._position],c=t.charCodeAt(this._position),55296<=c&&c<=56319){if(u=t.charCodeAt(this._position+1),isNaN(u)){this._terminal.surrogate_high=i;continue}c=1024*(c-55296)+(u-56320)+65536,i+=t.charAt(this._position+1)}if(!(56320<=c&&c<=57343))switch(this._state){case l.NORMAL:i in n?n[i](this,this._inputHandler):this._inputHandler.addChar(i,c);break;case l.ESCAPED:if(i in a){a[i](this,this._terminal);break}switch(i){case"(":case")":case"*":case"+":case"-":case".":switch(i){case"(":this._terminal.gcharset=0;break;case")":this._terminal.gcharset=1;break;case"*":this._terminal.gcharset=2;break;case"+":this._terminal.gcharset=3;break;case"-":this._terminal.gcharset=1;break;case".":this._terminal.gcharset=2}this._state=l.CHARSET;break;case"/":this._terminal.gcharset=3,this._state=l.CHARSET,this._position--;break;case"N":break;case"O":break;case"n":this._terminal.setgLevel(2);break;case"o":this._terminal.setgLevel(3);break;case"|":this._terminal.setgLevel(3);break;case"}":this._terminal.setgLevel(2);break;case"~":this._terminal.setgLevel(1);break;case"7":this._inputHandler.saveCursor(),this._state=l.NORMAL;break;case"8":this._inputHandler.restoreCursor(),this._state=l.NORMAL;break;case"#":this._state=l.NORMAL,this._position++;break;case"H":this._terminal.tabSet(),this._state=l.NORMAL;break;case"=":this._terminal.log("Serial port requested application keypad."),this._terminal.applicationKeypad=!0,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;case">":this._terminal.log("Switching back to normal keypad."),this._terminal.applicationKeypad=!1,this._terminal.viewport.syncScrollArea(),this._state=l.NORMAL;break;default:this._state=l.NORMAL,this._terminal.error("Unknown ESC control: %s.",i)}break;case l.CHARSET:i in s.CHARSETS?(e=s.CHARSETS[i],"/"===i&&this.skipNextChar()):e=s.DEFAULT_CHARSET,this._terminal.setgCharset(this._terminal.gcharset,e),this._terminal.gcharset=null,this._state=l.NORMAL;break;case l.OSC:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.params.push(this._terminal.currentParam),this._terminal.params[0]){case 0:case 1:case 2:this._terminal.params[1]&&(this._terminal.title=this._terminal.params[1],this._terminal.handleTitle(this._terminal.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this._terminal.params=[],this._terminal.currentParam=0,this._state=l.NORMAL}else this._terminal.params.length?this._terminal.currentParam+=i:i>="0"&&i<="9"?this._terminal.currentParam=10*this._terminal.currentParam+i.charCodeAt(0)-48:";"===i&&(this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam="");break;case l.CSI_PARAM:if(i in o){o[i](this);break}this.finalizeParam(),this._state=l.CSI;case l.CSI:i in h?h[i](this._inputHandler,this._terminal.params,this._terminal.prefix,this._terminal.postfix,this):this._terminal.error("Unknown CSI code: %s.",i),this._state=l.NORMAL,this._terminal.prefix="",this._terminal.postfix="";break;case l.DCS:if(i===r.C0.ESC||i===r.C0.BEL){switch(i===r.C0.ESC&&this._position++,this._terminal.prefix){case"":break;case"$q":var p=this._terminal.currentParam,f=!1;switch(p){case'"q':p='0"q';break;case'"p':p='61"p';break;case"r":p=""+(this._terminal.scrollTop+1)+";"+(this._terminal.scrollBottom+1)+"r";break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(r.C0.ESC+"P"+ +f+"$r"+p+r.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(r.C0.ESC+"P"+ +f+"+r"+p+r.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,this._terminal.prefix="",this._state=l.NORMAL}else this._terminal.currentParam?this._terminal.currentParam+=i:this._terminal.prefix||"$"===i||"+"===i?2===this._terminal.prefix.length?this._terminal.currentParam=i:this._terminal.prefix+=i:this._terminal.currentParam=i;break;case l.IGNORE:i!==r.C0.ESC&&i!==r.C0.BEL||(i===r.C0.ESC&&this._position++,this._state=l.NORMAL)}}},t.prototype.setState=function(t){this._state=t},t.prototype.setPrefix=function(t){this._terminal.prefix=t},t.prototype.setPostfix=function(t){this._terminal.postfix=t},t.prototype.setParam=function(t){this._terminal.currentParam=t},t.prototype.getParam=function(){return this._terminal.currentParam},t.prototype.finalizeParam=function(){this._terminal.params.push(this._terminal.currentParam),this._terminal.currentParam=0},t.prototype.skipNextChar=function(){this._position++},t}();i.Parser=c},{"./Charsets":1,"./EscapeSequences":3}],8:[function(t,e,i){"use strict";function r(t){var e=t.ownerDocument,i=e.createElement("span");i.innerHTML="hello world",t.appendChild(i);var r=i.offsetWidth,s=i.offsetHeight;i.style.fontWeight="bold";var n=i.offsetWidth,a=i.offsetHeight;return t.removeChild(i),r!==n||s!==a}Object.defineProperty(i,"__esModule",{value:!0});var s,n=5;!function(t){t[t.BOLD=1]="BOLD",t[t.UNDERLINE=2]="UNDERLINE",t[t.BLINK=4]="BLINK",t[t.INVERSE=8]="INVERSE",t[t.INVISIBLE=16]="INVISIBLE"}(s||(s={}));var a=null,o=function(){function t(t){this._terminal=t,this._refreshRowsQueue=[],this._refreshFramesSkipped=0,this._refreshAnimationFrame=null,null===a&&(a=r(this._terminal.element))}return t.prototype.queueRefresh=function(t,e){this._refreshRowsQueue.push({start:t,end:e}),this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)))},t.prototype._refreshLoop=function(){var t=this._terminal.writeBuffer.length>0&&this._refreshFramesSkipped++<=n;if(t)return void(this._refreshAnimationFrame=window.requestAnimationFrame(this._refreshLoop.bind(this)));this._refreshFramesSkipped=0;var e,i;if(this._refreshRowsQueue.length>4)e=0,i=this._terminal.rows-1;else{e=this._refreshRowsQueue[0].start,i=this._refreshRowsQueue[0].end;for(var r=1;r<this._refreshRowsQueue.length;r++)this._refreshRowsQueue[r].start<e&&(e=this._refreshRowsQueue[r].start),this._refreshRowsQueue[r].end>i&&(i=this._refreshRowsQueue[r].end)}this._refreshRowsQueue=[],this._refreshAnimationFrame=null,this._refresh(e,i)},t.prototype._refresh=function(t,e){var i,r,n,o,h,l,c,u,m,p,f,d,_,y,C;document.activeElement;for(e-t>=this._terminal.rows/2&&(C=this._terminal.element.parentNode,C&&this._terminal.element.removeChild(this._terminal.rowContainer)),u=this._terminal.cols,r=t,e>=this._terminal.rows&&(this._terminal.log("`end` is too large. Most likely a bad CSR."),e=this._terminal.rows-1);r<=e;r++)if(y=r+this._terminal.ydisp,o=this._terminal.lines.get(y),o&&this._terminal.children[r]){for(h="",i=this._terminal.y===r-(this._terminal.ybase-this._terminal.ydisp)&&this._terminal.cursorState&&!this._terminal.cursorHidden?this._terminal.x:-1,p=this._terminal.defAttr,n=0;n<u;n++)if(o[n]&&(m=o[n][0],l=o[n][1],c=o[n][2])){if(n===i&&(m=-1),m!==p&&(p!==this._terminal.defAttr&&(h+="</span>"),m!==this._terminal.defAttr))if(m===-1)h+='<span class="reverse-video terminal-cursor">';else{var g=[];f=511&m,d=m>>9&511,_=m>>18,_&s.BOLD&&(a||g.push("xterm-bold"),d<8&&(d+=8)),_&s.UNDERLINE&&g.push("xterm-underline"),_&s.BLINK&&g.push("xterm-blink"),_&s.INVERSE&&(f=[d,d=f][0],1&_&&d<8&&(d+=8)),_&s.INVISIBLE&&g.push("xterm-hidden"),_&s.INVERSE&&(257===f&&(f=15),256===d&&(d=0)),f<256&&g.push("xterm-bg-color-"+f),d<256&&g.push("xterm-color-"+d),h+="<span",g.length&&(h+=' class="'+g.join(" ")+'"'),h+=">"}switch(2===c&&(h+='<span class="xterm-wide-char">'),l){case"&":h+="&amp;";break;case"<":h+="&lt;";break;case">":h+="&gt;";break;default:h+=l<=" "?"&nbsp;":l}2===c&&(h+="</span>"),p=m}p!==this._terminal.defAttr&&(h+="</span>"),this._terminal.children[r].innerHTML=h}C&&this._terminal.element.appendChild(this._terminal.rowContainer),this._terminal.emit("refresh",{element:this._terminal.element,start:t,end:e})},t}();i.Renderer=o},{}],9:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t,e,i,r){var s=this;this.terminal=t,this.viewportElement=e,this.scrollArea=i,this.charMeasure=r,this.currentRowHeight=0,this.lastRecordedBufferLength=0,this.lastRecordedViewportHeight=0,this.terminal.on("scroll",this.syncScrollArea.bind(this)),this.terminal.on("resize",this.syncScrollArea.bind(this)),this.viewportElement.addEventListener("scroll",this.onScroll.bind(this)),setTimeout(function(){return s.syncScrollArea()},0)}return t.prototype.refresh=function(){if(this.charMeasure.height>0){var t=this.charMeasure.height!==this.currentRowHeight;t&&(this.currentRowHeight=this.charMeasure.height,this.viewportElement.style.lineHeight=this.charMeasure.height+"px",this.terminal.rowContainer.style.lineHeight=this.charMeasure.height+"px");var e=this.lastRecordedViewportHeight!==this.terminal.rows;(t||e)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=this.charMeasure.height*this.terminal.rows+"px"),this.scrollArea.style.height=this.charMeasure.height*this.lastRecordedBufferLength+"px"}},t.prototype.syncScrollArea=function(){this.lastRecordedBufferLength!==this.terminal.lines.length?(this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh()):this.lastRecordedViewportHeight!==this.terminal.rows?this.refresh():this.charMeasure.height!==this.currentRowHeight&&this.refresh();var t=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==t&&(this.viewportElement.scrollTop=t)},t.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),i=e-this.terminal.ydisp;this.terminal.scrollDisp(i,!0)},t.prototype.onWheel=function(t){if(0!==t.deltaY){var e=1;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e=this.currentRowHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e=this.currentRowHeight*this.terminal.rows),this.viewportElement.scrollTop+=t.deltaY*e,t.preventDefault()}},t}();i.Viewport=r},{}],10:[function(t,e,i){"use strict";function r(t){var e=String.fromCharCode(32),i=String.fromCharCode(160),r=new RegExp(i,"g"),s=t.split("\n").map(function(t){var i=t.replace(/\s+$/g,"").replace(r,e);return i}).join("\n");return s}function s(t,e){var i=window.getSelection().toString(),s=r(i);e.browser.isMSIE?window.clipboardData.setData("Text",s):t.clipboardData.setData("text/plain",s),t.preventDefault()}function n(t,e){t.stopPropagation();var i,r=function(i){return e.handler(i),e.textarea.value="",e.cancel(t)};e.browser.isMSIE?window.clipboardData&&(i=window.clipboardData.getData("Text"),r(i)):t.clipboardData&&(i=t.clipboardData.getData("text/plain"),r(i))}function a(t,e){var i=document.getSelection(),s=r(i.toString()),n=!1,a=t.clientX,o=t.clientY;if(i.rangeCount){for(var h=i.getRangeAt(0),l=h.getClientRects(),c=0;c<l.length;c++){var u=l[c];if(n=a>u.left&&a<u.right&&o>u.top&&o<u.bottom)break}!s.match(/^\s$/)&&s.length||(n=!1)}n||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=a-10+"px",e.textarea.style.top=o-10+"px",e.textarea.style.zIndex="1000",e.textarea.focus(),setTimeout(function(){e.textarea.style.position=null,e.textarea.style.width=null,e.textarea.style.height=null,e.textarea.style.left=null,e.textarea.style.top=null,e.textarea.style.zIndex=null},4))}Object.defineProperty(i,"__esModule",{value:!0}),i.prepareTextForClipboard=r,i.copyHandler=s,i.pasteHandler=n,i.rightClickHandler=a},{}],11:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=t("./Generic"),s="undefined"==typeof navigator,n=s?"node":navigator.userAgent,a=s?"node":navigator.platform;i.isFirefox=!!~n.indexOf("Firefox"),i.isMSIE=!!~n.indexOf("MSIE")||!!~n.indexOf("Trident"),i.isMac=r.contains(["Macintosh","MacIntel","MacPPC","Mac68K"],a),i.isIpad="iPad"===a,i.isIphone="iPhone"===a,i.isMSWindows=r.contains(["Windows","Win16","Win32","WinCE"],a)},{"./Generic":14}],12:[function(t,e,i){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])};return function(e,i){function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(i,"__esModule",{value:!0});var s=t("../EventEmitter.js"),n=function(t){function e(e,i){var r=t.call(this)||this;return r._document=e,r._parentElement=i,r}return r(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.measure=function(){var t=this;this._measureElement?this._doMeasure():(this._measureElement=this._document.createElement("span"),this._measureElement.style.position="absolute",this._measureElement.style.top="0",this._measureElement.style.left="-9999em",this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement),setTimeout(function(){return t._doMeasure()},0))},e.prototype._doMeasure=function(){var t=this._measureElement.getBoundingClientRect();0!==t.width&&0!==t.height&&(this._width===t.width&&this._height===t.height||(this._width=t.width,this._height=t.height,this.emit("charsizechanged")))},e}(s.EventEmitter);i.CharMeasure=n},{"../EventEmitter.js":4}],13:[function(t,e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r=function(){function t(t){this._array=new Array(t),this._startIndex=0,this._length=0}return Object.defineProperty(t.prototype,"maxLength",{get:function(){return this._array.length},set:function(t){for(var e=new Array(t),i=0;i<Math.min(t,this.length);i++)e[i]=this._array[this._getCyclicIndex(i)];this._array=e,this._startIndex=0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},set:function(t){if(t>this._length)for(var e=this._length;e<t;e++)this._array[e]=void 0;this._length=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"forEach",{get:function(){return this._array.forEach},enumerable:!0,configurable:!0}),t.prototype.get=function(t){return this._array[this._getCyclicIndex(t)]},t.prototype.set=function(t,e){this._array[this._getCyclicIndex(t)]=e},t.prototype.push=function(t){this._array[this._getCyclicIndex(this._length)]=t,this._length===this.maxLength?(this._startIndex++,this._startIndex===this.maxLength&&(this._startIndex=0)):this._length++},t.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length-- -1)]},t.prototype.splice=function(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];if(e){for(var s=t;s<this._length-e;s++)this._array[this._getCyclicIndex(s)]=this._array[this._getCyclicIndex(s+e)];this._length-=e}if(i&&i.length){for(var s=this._length-1;s>=t;s--)this._array[this._getCyclicIndex(s+i.length)]=this._array[this._getCyclicIndex(s)];for(var s=0;s<i.length;s++)this._array[this._getCyclicIndex(t+s)]=i[s];this._length+i.length>this.maxLength?(this._startIndex+=this._length+i.length-this.maxLength,this._length=this.maxLength):this._length+=i.length}},t.prototype.trimStart=function(t){t>this._length&&(t=this._length),this._startIndex+=t,this._length-=t},t.prototype.shiftElements=function(t,e,i){if(!(e<=0)){if(t<0||t>=this._length)throw new Error("start argument out of range");if(t+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(var r=e-1;r>=0;r--)this.set(t+r+i,this.get(t+r));var s=t+e+i-this._length;if(s>0)for(this._length+=s;this._length>this.maxLength;)this._length--,this._startIndex++}else for(var r=0;r<e;r++)this.set(t+r+i,this.get(t+r))}},t.prototype._getCyclicIndex=function(t){return(this._startIndex+t)%this.maxLength},t}();i.CircularList=r},{}],14:[function(t,e,i){"use strict";function r(t,e){return t.indexOf(e)>=0}Object.defineProperty(i,"__esModule",{value:!0}),i.contains=r},{}],15:[function(e,i,r){"use strict";function s(t){var e=this;if(!(this instanceof s))return new s(arguments[0],arguments[1],arguments[2]);e.browser=S,e.cancel=s.cancel,d.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(s.defaults).forEach(function(i){null==t[i]&&(t[i]=s.options[i],s[i]!==s.defaults[i]&&(t[i]=s[i])),e[i]=t[i]}),8===t.colors.length?t.colors=t.colors.concat(s._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(s._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(s._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(s._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(E?E.getElementsByTagName("body")[0]:null),this.cols=t.cols||t.geometry[0],this.rows=t.rows||t.geometry[1],this.geometry=[this.cols,this.rows],t.handler&&this.on("data",t.handler),this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=null,this.cursorBlinkInterval=null,this.applicationKeypad=!1,this.applicationCursor=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!0,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.decLocator,this.x10Mouse,this.vt200Mouse,this.vt300Mouse,this.normalMouse,this.mouseEvents,this.sendFocus,this.utfMouse,this.sgrMouse,this.urxvtMouse,this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.inputHandler=new v.InputHandler(this),this.parser=new b.Parser(this.inputHandler,this),this.renderer=this.renderer||null,this.linkifier=this.linkifier||new w.Linkifier,this.writeBuffer=[],this.writeInProgress=!1,this.xoffSentToCatchUp=!1,this.writeStopped=!1,this.surrogate_high="",this.lines=new C.CircularList(this.scrollback);for(var i=this.rows;i--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function n(t,e,i,r){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,i,r||!1)})}function a(t,e,i,r){t.removeEventListener(e,i,r||!1)}function o(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function h(t,e){function i(){this.constructor=t}i.prototype=e.prototype,t.prototype=new i}function l(t,e){var i=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?i:i&&(!e.keyCode||e.keyCode>47)}function c(t,e,i){var r=t<<16|e<<8|i;if(null!=c._cache[r])return c._cache[r];for(var n,a,o,h,l,u=1/0,m=-1,p=0;p<s.vcolors.length;p++){if(n=s.vcolors[p],a=n[0],o=n[1],h=n[2],l=c.distance(t,e,i,a,o,h),0===l){m=p;break}l<u&&(u=l,m=p)}return c._cache[r]=m}function u(t,e,i){if(t.forEach)return t.forEach(e,i);for(var r=0;r<t.length;r++)e.call(i,t[r],r,t)}function m(t){return 16===t.keyCode||17===t.keyCode||18===t.keyCode}function p(t){if(Object.keys)return Object.keys(t);var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i}Object.defineProperty(r,"__esModule",{value:!0});var f=e("./CompositionHelper"),d=e("./EventEmitter"),_=e("./Viewport"),y=e("./handlers/Clipboard"),C=e("./utils/CircularList"),g=e("./EscapeSequences"),v=e("./InputHandler"),b=e("./Parser"),k=e("./Renderer"),w=e("./Linkifier"),x=e("./utils/CharMeasure"),S=e("./utils/Browser"),E="undefined"!=typeof window?window.document:null,A=5,M=300,L=600;h(s,d.EventEmitter),s.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},s.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],s.colors=function(){function t(t,i,s){r.push("#"+e(t)+e(i)+e(s))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var i,r=s.tangoColors.slice(),n=[0,95,135,175,215,255];for(i=0;i<216;i++)t(n[i/36%6|0],n[i/6%6|0],n[i%6]);for(i=0;i<24;i++)n=8+10*i,t(n,n,n);return r}(),s._colors=s.colors.slice(),s.vcolors=function(){for(var t,e=[],i=s.colors,r=0;r<256;r++)t=parseInt(i[r].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),s.defaults={colors:s.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,cursorStyle:"block",visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1,disableStdin:!1,useFlowControl:!1,tabStopWidth:8},s.options={},s.focus=null,u(p(s.defaults),function(t){s[t]=s.defaults[t],s.options[t]=s.defaults[t]}),s.prototype.focus=function(){return this.textarea.focus()},s.prototype.getOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},s.prototype.setOption=function(t,e){if(!(t in s.defaults))throw new Error('No option with key "'+t+'"');switch(t){case"scrollback":if(this.options[t]!==e){if(this.lines.length>e){var i=this.lines.length-e,r=this.ydisp-i<0;this.lines.trimStart(i),this.ybase=Math.max(this.ybase-i,0),this.ydisp=Math.max(this.ydisp-i,0),r&&this.refresh(0,this.rows-1)}this.lines.maxLength=e,this.viewport.syncScrollArea()}}switch(this[t]=e,this.options[t]=e,t){case"cursorBlink":this.setCursorBlinking(e);break;case"cursorStyle":this.element.classList.toggle("xterm-cursor-style-underline","underline"===e),this.element.classList.toggle("xterm-cursor-style-bar","bar"===e);break;case"tabStopWidth":this.setupStops()}},s.prototype.restartCursorBlinking=function(){this.setCursorBlinking(this.options.cursorBlink)},s.prototype.setCursorBlinking=function(t){if(this.element.classList.toggle("xterm-cursor-blink",t),this.clearCursorBlinkingInterval(),t){var e=this;this.cursorBlinkInterval=setInterval(function(){e.element.classList.toggle("xterm-cursor-blink-on")},L)}},s.prototype.clearCursorBlinkingInterval=function(){this.element.classList.remove("xterm-cursor-blink-on"),this.cursorBlinkInterval&&(clearInterval(this.cursorBlinkInterval),this.cursorBlinkInterval=null)},s.bindFocus=function(t){n(t.textarea,"focus",function(e){t.sendFocus&&t.send(g.C0.ESC+"[I"),t.element.classList.add("focus"),t.showCursor(),t.restartCursorBlinking.apply(t),s.focus=t,t.emit("focus",{terminal:t})})},s.prototype.blur=function(){return this.textarea.blur()},s.bindBlur=function(t){n(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send(g.C0.ESC+"[O"),t.element.classList.remove("focus"),t.clearCursorBlinkingInterval.apply(t),s.focus=null,t.emit("blur",{terminal:t})})},s.prototype.initGlobal=function(){function t(t){y.rightClickHandler.call(this,t,e)}var e=this;s.bindKeys(this),s.bindFocus(this),s.bindBlur(this),n(this.element,"copy",function(t){y.copyHandler.call(this,t,e)}),n(this.textarea,"paste",function(t){y.pasteHandler.call(this,t,e)}),n(this.element,"paste",function(t){y.pasteHandler.call(this,t,e)}),e.browser.isFirefox?n(this.element,"mousedown",function(e){2==e.button&&t(e)}):n(this.element,"contextmenu",t)},s.bindKeys=function(t){n(t.element,"keydown",function(e){E.activeElement==this&&t.keyDown(e)},!0),n(t.element,"keypress",function(e){E.activeElement==this&&t.keyPress(e)},!0),n(t.element,"keyup",function(e){m(e)||t.focus(t)},!0),n(t.textarea,"keydown",function(e){t.keyDown(e)},!0),n(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),n(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),n(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),n(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper)),t.on("refresh",function(e){t.queueLinkification(e.start,e.end)})},s.prototype.insertRow=function(t){return"object"!=typeof t&&(t=E.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},s.prototype.open=function(t,e){var i=this,r=0;if(this.parent=t||this.parent,!this.parent)throw new Error("Terminal requires a parent element.");for(this.context=this.parent.ownerDocument.defaultView,this.document=this.parent.ownerDocument,this.body=this.document.getElementsByTagName("body")[0],this.element=this.document.createElement("div"),this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.classList.add("xterm-theme-"+this.theme),this.setCursorBlinking(this.options.cursorBlink),this.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=E.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=E.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=E.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.linkifier.attachToDom(E,this.children),this.helperContainer=E.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=E.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.textarea.addEventListener("focus",function(){i.emit("focus",{terminal:i})}),this.textarea.addEventListener("blur",function(){i.emit("blur",{terminal:i})}),this.helperContainer.appendChild(this.textarea),this.compositionView=E.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new f.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charSizeStyleElement=E.createElement("style"),this.helperContainer.appendChild(this.charSizeStyleElement);r<this.rows;r++)this.insertRow();if(this.parent.appendChild(this.element),this.charMeasure=new x.CharMeasure(E,this.helperContainer),this.charMeasure.on("charsizechanged",function(){i.updateCharSizeCSS()}),this.charMeasure.measure(),this.viewport=new _.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasure),this.renderer=new k.Renderer(this),this.refresh(0,this.rows-1),this.initGlobal(),"undefined"==typeof e){var s="You did not pass the `focus` argument in `Terminal.prototype.open()`.\n";s+="The `focus` argument now defaults to `true` but starting with xterm.js 3.0 ",s+="it will default to `false`.",console.warn(s),e=!0}e&&this.focus(),n(this.element,"click",function(){var t=E.getSelection(),e=t.isCollapsed,r="boolean"==typeof e?!e:"Range"==t.type;r||i.focus()}),this.bindMouse(),this.emit("open")},s.loadAddon=function(s,n){return"object"==typeof r&&"object"==typeof i?e("./addons/"+s+"/"+s):"function"==typeof t?e(["./addons/"+s+"/"+s],n):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},s.prototype.updateCharSizeCSS=function(){this.charSizeStyleElement.textContent=".xterm-wide-char{width:"+2*this.charMeasure.width+"px;}"},s.prototype.bindMouse=function(){function t(t){var e,i;if(e=s(t),i=o(t))switch(r(e,i),t.overrideType||t.type){case"mousedown":c=e;break;case"mouseup":c=32;break;case"wheel":}}function e(t){var e,i=c;e=o(t),e&&(i+=32,r(i,e))}function i(t,e){if(l.utfMouse){if(2047===e)return t.push(0);e<127?t.push(e):(e>2047&&(e=2047),t.push(192|e>>6),t.push(128|63&e))}else{if(255===e)return t.push(0);e>127&&(e=127),t.push(e)}}function r(t,e){if(l.vt300Mouse){t&=3,e.x-=32,e.y-=32;var r=g.C0.ESC+"[24";if(0===t)r+="1";else if(1===t)r+="3";else if(2===t)r+="5";else{if(3===t)return;r+="0"}return r+="~["+e.x+","+e.y+"]\r",void l.send(r)}if(l.decLocator)return t&=3,e.x-=32,e.y-=32,0===t?t=2:1===t?t=4:2===t?t=6:3===t&&(t=3),void l.send(g.C0.ESC+"["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(l.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void l.send(g.C0.ESC+"["+t+";"+e.x+";"+e.y+"M");if(l.sgrMouse)return e.x-=32,e.y-=32,void l.send(g.C0.ESC+"[<"+((3===(3&t)?t&-4:t)-32)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var r=[];i(r,t),i(r,e.x),i(r,e.y),l.send(g.C0.ESC+"[M"+String.fromCharCode.apply(String,r))}function s(t){var e,i,r,s,n;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,l.browser.isMSIE&&(e=1===e?0:4===e?1:e);break;case"mouseup":e=3;break;case"DOMMouseScroll":e=t.detail<0?64:65;break;case"wheel":e=t.wheelDeltaY>0?64:65}return i=t.shiftKey?4:0,r=t.metaKey?8:0,s=t.ctrlKey?16:0,n=i|r|s,l.vt200Mouse?n&=s:l.normalMouse||(n=0),e=32+(n<<2)+e}function o(t){var e,i,r;if(null!=t.pageX){for(e=t.pageX,i=t.pageY,r=l.element;r&&r!==l.document.documentElement;)e-=r.offsetLeft,i-=r.offsetTop,r="offsetParent"in r?r.offsetParent:r.parentNode;return e=Math.ceil(e/l.charMeasure.width),i=Math.ceil(i/l.charMeasure.height),e<0&&(e=0),e>l.cols&&(e=l.cols),i<0&&(i=0),i>l.rows&&(i=l.rows),e+=32,i+=32,{x:e,y:i,type:"wheel"}}}var h=this.element,l=this,c=32;n(h,"mousedown",function(i){if(l.mouseEvents)return t(i),l.focus(),l.vt200Mouse?(i.overrideType="mouseup",t(i),l.cancel(i)):(l.normalMouse&&n(l.document,"mousemove",e),l.x10Mouse||n(l.document,"mouseup",function i(r){return t(r),l.normalMouse&&a(l.document,"mousemove",e),a(l.document,"mouseup",i),l.cancel(r)}),l.cancel(i))}),n(h,"wheel",function(e){if(l.mouseEvents&&!(l.x10Mouse||l.vt300Mouse||l.decLocator))return t(e),l.cancel(e)}),n(h,"wheel",function(t){if(!l.mouseEvents)return l.viewport.onWheel(t),l.cancel(t)})},s.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)},s.prototype.refresh=function(t,e){this.renderer&&this.renderer.queueRefresh(t,e)},s.prototype.queueLinkification=function(t,e){if(this.linkifier)for(var i=t;i<=e;i++)this.linkifier.linkifyRow(i)},s.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},s.prototype.scroll=function(){var t;this.lines.length===this.lines.maxLength&&(this.lines.trimStart(1),this.ybase--,0!==this.ydisp&&this.ydisp--),this.ybase++,this.userScrolling||(this.ydisp=this.ybase),t=this.ybase+this.rows-1,t-=this.rows-1-this.scrollBottom,t===this.lines.length?this.lines.push(this.blankLine()):this.lines.splice(t,0,this.blankLine()),0!==this.scrollTop&&(0!==this.ybase&&(this.ybase--,this.userScrolling||(this.ydisp=this.ybase)),this.lines.splice(this.ybase+this.scrollTop,1)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom),this.emit("scroll",this.ydisp)},s.prototype.scrollDisp=function(t,e){t<0?this.userScrolling=!0:t+this.ydisp>=this.ybase&&(this.userScrolling=!1),this.ydisp+=t,this.ydisp>this.ybase?this.ydisp=this.ybase:this.ydisp<0&&(this.ydisp=0),
+e||this.emit("scroll",this.ydisp),this.refresh(0,this.rows-1)},s.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},s.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},s.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},s.prototype.write=function(t){if(this.writeBuffer.push(t),this.options.useFlowControl&&!this.xoffSentToCatchUp&&this.writeBuffer.length>=A&&(this.send(g.C0.DC3),this.xoffSentToCatchUp=!0),!this.writeInProgress&&this.writeBuffer.length>0){this.writeInProgress=!0;var e=this;setTimeout(function(){e.innerWrite()})}},s.prototype.innerWrite=function(){for(var t=this.writeBuffer.splice(0,M);t.length>0;){var e=t.shift();e.length;this.xoffSentToCatchUp&&0===t.length&&0===this.writeBuffer.length&&(this.send(g.C0.DC1),this.xoffSentToCatchUp=!1),this.refreshStart=this.y,this.refreshEnd=this.y,this.parser.parse(e),this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)}if(this.writeBuffer.length>0){var i=this;setTimeout(function(){i.innerWrite()},0)}else this.writeInProgress=!1},s.prototype.writeln=function(t){this.write(t+"\r\n")},s.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},s.prototype.setHypertextLinkHandler=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext link handler before Terminal.open is called");this.linkifier.setHypertextLinkHandler(t),this.refresh(0,this.rows-1)},s.prototype.setHypertextValidationCallback=function(t){if(!this.linkifier)throw new Error("Cannot attach a hypertext validation callback before Terminal.open is called");this.linkifier.setHypertextValidationCallback(t),this.refresh(0,this.rows-1)},s.prototype.registerLinkMatcher=function(t,e,i){if(this.linkifier){var r=this.linkifier.registerLinkMatcher(t,e,i);return this.refresh(0,this.rows-1),r}},s.prototype.deregisterLinkMatcher=function(t){this.linkifier&&this.linkifier.deregisterLinkMatcher(t)&&this.refresh(0,this.rows-1)},s.prototype.keyDown=function(t){if(this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(this.restartCursorBlinking(),!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return this.ybase!==this.ydisp&&this.scrollToBottom(),!1;var e=this.evaluateKeyEscapeSequence(t);return e.key===g.C0.DC3?this.writeStopped=!0:e.key===g.C0.DC1&&(this.writeStopped=!1),e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!l(this,t)||(e.cancel&&this.cancel(t,!0),!e.key||(this.emit("keydown",t),this.emit("key",e.key,t),this.showCursor(),this.handler(e.key),this.cancel(t,!0)))},s.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},i=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key=g.C0.BS;break}e.key=g.C0.DEL;break;case 9:if(t.shiftKey){e.key=g.C0.ESC+"[Z";break}e.key=g.C0.HT,e.cancel=!0;break;case 13:e.key=g.C0.CR,e.cancel=!0;break;case 27:e.key=g.C0.ESC,e.cancel=!0;break;case 37:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"D",e.key==g.C0.ESC+"[1;3D"&&(e.key=this.browser.isMac?g.C0.ESC+"b":g.C0.ESC+"[1;5D")):this.applicationCursor?e.key=g.C0.ESC+"OD":e.key=g.C0.ESC+"[D";break;case 39:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"C",e.key==g.C0.ESC+"[1;3C"&&(e.key=this.browser.isMac?g.C0.ESC+"f":g.C0.ESC+"[1;5C")):this.applicationCursor?e.key=g.C0.ESC+"OC":e.key=g.C0.ESC+"[C";break;case 38:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"A",e.key==g.C0.ESC+"[1;3A"&&(e.key=g.C0.ESC+"[1;5A")):this.applicationCursor?e.key=g.C0.ESC+"OA":e.key=g.C0.ESC+"[A";break;case 40:i?(e.key=g.C0.ESC+"[1;"+(i+1)+"B",e.key==g.C0.ESC+"[1;3B"&&(e.key=g.C0.ESC+"[1;5B")):this.applicationCursor?e.key=g.C0.ESC+"OB":e.key=g.C0.ESC+"[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key=g.C0.ESC+"[2~");break;case 46:i?e.key=g.C0.ESC+"[3;"+(i+1)+"~":e.key=g.C0.ESC+"[3~";break;case 36:i?e.key=g.C0.ESC+"[1;"+(i+1)+"H":this.applicationCursor?e.key=g.C0.ESC+"OH":e.key=g.C0.ESC+"[H";break;case 35:i?e.key=g.C0.ESC+"[1;"+(i+1)+"F":this.applicationCursor?e.key=g.C0.ESC+"OF":e.key=g.C0.ESC+"[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key=g.C0.ESC+"[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key=g.C0.ESC+"[6~";break;case 112:i?e.key=g.C0.ESC+"[1;"+(i+1)+"P":e.key=g.C0.ESC+"OP";break;case 113:i?e.key=g.C0.ESC+"[1;"+(i+1)+"Q":e.key=g.C0.ESC+"OQ";break;case 114:i?e.key=g.C0.ESC+"[1;"+(i+1)+"R":e.key=g.C0.ESC+"OR";break;case 115:i?e.key=g.C0.ESC+"[1;"+(i+1)+"S":e.key=g.C0.ESC+"OS";break;case 116:i?e.key=g.C0.ESC+"[15;"+(i+1)+"~":e.key=g.C0.ESC+"[15~";break;case 117:i?e.key=g.C0.ESC+"[17;"+(i+1)+"~":e.key=g.C0.ESC+"[17~";break;case 118:i?e.key=g.C0.ESC+"[18;"+(i+1)+"~":e.key=g.C0.ESC+"[18~";break;case 119:i?e.key=g.C0.ESC+"[19;"+(i+1)+"~":e.key=g.C0.ESC+"[19~";break;case 120:i?e.key=g.C0.ESC+"[20;"+(i+1)+"~":e.key=g.C0.ESC+"[20~";break;case 121:i?e.key=g.C0.ESC+"[21;"+(i+1)+"~":e.key=g.C0.ESC+"[21~";break;case 122:i?e.key=g.C0.ESC+"[23;"+(i+1)+"~":e.key=g.C0.ESC+"[23~";break;case 123:i?e.key=g.C0.ESC+"[24;"+(i+1)+"~":e.key=g.C0.ESC+"[24~";break;default:!t.ctrlKey||t.shiftKey||t.altKey||t.metaKey?this.browser.isMac||!t.altKey||t.ctrlKey||t.metaKey||(t.keyCode>=65&&t.keyCode<=90?e.key=g.C0.ESC+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key=g.C0.ESC+"`":t.keyCode>=48&&t.keyCode<=57&&(e.key=g.C0.ESC+(t.keyCode-48))):t.keyCode>=65&&t.keyCode<=90?e.key=String.fromCharCode(t.keyCode-64):32===t.keyCode?e.key=String.fromCharCode(0):t.keyCode>=51&&t.keyCode<=55?e.key=String.fromCharCode(t.keyCode-51+27):56===t.keyCode?e.key=String.fromCharCode(127):219===t.keyCode?e.key=String.fromCharCode(27):220===t.keyCode?e.key=String.fromCharCode(28):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},s.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},s.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},s.prototype.keyPress=function(t){var e;if(this.cancel(t),t.charCode)e=t.charCode;else if(null==t.which)e=t.keyCode;else{if(0===t.which||0===t.charCode)return!1;e=t.which}return!(!e||(t.altKey||t.ctrlKey||t.metaKey)&&!l(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},s.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},s.prototype.bell=function(){if(this.visualBell){var t=this;this.element.style.borderColor="white",setTimeout(function(){t.element.style.borderColor=""},10),this.popOnBell&&this.focus()}},s.prototype.log=function(){if(this.debug&&this.context.console&&this.context.console.log){var t=Array.prototype.slice.call(arguments);this.context.console.log.apply(this.context.console,t)}},s.prototype.error=function(){if(this.debug&&this.context.console&&this.context.console.error){var t=Array.prototype.slice.call(arguments);this.context.console.error.apply(this.context.console,t)}},s.prototype.resize=function(t,e){if(!isNaN(t)&&!isNaN(e)){var i,r,s,n,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),s=this.cols,s<t)for(n=[this.defAttr," ",1],r=this.lines.length;r--;)for(;this.lines.get(r).length<t;)this.lines.get(r).push(n);if(this.cols=t,this.setupStops(this.cols),s=this.rows,a=0,s<e)for(i=this.element;s++<e;)this.lines.length<e+this.ybase&&(this.ybase>0&&this.lines.length<=this.ybase+this.y+a+1?(this.ybase--,a++,this.ydisp>0&&this.ydisp--):this.lines.push(this.blankLine())),this.children.length<e&&this.insertRow();else for(;s-- >e;)if(this.lines.length>e+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++)),this.children.length>e){if(i=this.children.shift(),!i)continue;i.parentNode.removeChild(i)}this.rows=e,this.y>=e&&(this.y=e-1),a&&(this.y+=a),this.x>=t&&(this.x=t-1),this.scrollTop=0,this.scrollBottom=e-1,this.charMeasure.measure(),this.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}}},s.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},s.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},s.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=this.getOption("tabStopWidth"))this.tabs[t]=!0},s.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&t<this.cols;);return t>=this.cols?this.cols-1:t<0?0:t},s.prototype.eraseRight=function(t,e){var i=this.lines.get(this.ybase+e);if(i){for(var r=[this.eraseAttr()," ",1];t<this.cols;t++)i[t]=r;this.updateRange(e)}},s.prototype.eraseLeft=function(t,e){var i=this.lines.get(this.ybase+e);if(i){var r=[this.eraseAttr()," ",1];for(t++;t--;)i[t]=r;this.updateRange(e)}},s.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines.set(0,this.lines.get(this.ybase+this.y)),this.lines.length=1,this.ydisp=0,this.ybase=0,this.y=0;for(var t=1;t<this.rows;t++)this.lines.push(this.blankLine());this.refresh(0,this.rows-1),this.emit("scroll",this.ydisp)}},s.prototype.eraseLine=function(t){this.eraseRight(0,t)},s.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,i=[e," ",1],r=[],s=0;s<this.cols;s++)r[s]=i;return r},s.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},s.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},s.prototype.handler=function(t){this.options.disableStdin||(this.ybase!==this.ydisp&&this.scrollToBottom(),this.emit("data",t))},s.prototype.handleTitle=function(t){this.emit("title",t)},s.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.x>=this.cols&&this.x--},s.prototype.reverseIndex=function(){this.y===this.scrollTop?(this.lines.shiftElements(this.y+this.ybase,this.rows-1,1),this.lines.set(this.y+this.ybase,this.blankLine(!0)),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)):this.y--},s.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler,e=this.cursorBlinkInterval;s.call(this,this.options),this.customKeydownHandler=t,this.cursorBlinkInterval=e,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},s.prototype.tabSet=function(){this.tabs[this.x]=!0},s.prototype.matchColor=c,c._cache={},c.distance=function(t,e,i,r,s,n){return Math.pow(30*(t-r),2)+Math.pow(59*(e-s),2)+Math.pow(11*(i-n),2)},s.EventEmitter=d.EventEmitter,s.inherits=h,s.on=n,s.off=a,s.cancel=o,i.exports=s},{"./CompositionHelper":2,"./EscapeSequences":3,"./EventEmitter":4,"./InputHandler":5,"./Linkifier":6,"./Parser":7,"./Renderer":8,"./Viewport":9,"./handlers/Clipboard":10,"./utils/Browser":11,"./utils/CharMeasure":12,"./utils/CircularList":13}]},{},[15])(15)});</script>
     <script>!function(e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("../../xterm")):"function"==typeof define?define(["../../xterm"],e):e(window.Terminal)}(function(e){var t={};return t.proposeGeometry=function(e){if(!e.element.parentElement)return null;var t,n,r,o,i,p=window.getComputedStyle(e.element.parentElement),a=parseInt(p.getPropertyValue("height")),l=Math.max(0,parseInt(p.getPropertyValue("width"))-17),s=window.getComputedStyle(e.element),u=parseInt(s.getPropertyValue("padding-top"))+parseInt(s.getPropertyValue("padding-bottom")),d=parseInt(s.getPropertyValue("padding-right"))+parseInt(s.getPropertyValue("padding-left")),y=a-u,g=l-d,m=(e.rowContainer,e.rowContainer.firstElementChild),f=m.innerHTML;return m.style.display="inline",m.innerHTML="W",r=m.getBoundingClientRect().width,m.style.display="",t=m.getBoundingClientRect().height,m.innerHTML=f,n=parseInt(y/t),o=parseInt(g/r),i={cols:o,rows:n}},t.fit=function(e){var n=t.proposeGeometry(e);n&&e.resize(n.cols,n.rows)},e.prototype.proposeGeometry=function(){return t.proposeGeometry(this)},e.prototype.fit=function(){return t.fit(this)},t});</script>
     <script>UTF8Decoder=function(){this.bytesLeft=0,this.codePoint=0,this.lowerBound=0},UTF8Decoder.prototype.decode=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(0==this.bytesLeft)i<=127?e+=t.charAt(o):192<=i&&i<=223?(this.codePoint=i-192,this.bytesLeft=1,this.lowerBound=128):224<=i&&i<=239?(this.codePoint=i-224,this.bytesLeft=2,this.lowerBound=2048):240<=i&&i<=247?(this.codePoint=i-240,this.bytesLeft=3,this.lowerBound=65536):248<=i&&i<=251?(this.codePoint=i-248,this.bytesLeft=4,this.lowerBound=2097152):252<=i&&i<=253?(this.codePoint=i-252,this.bytesLeft=5,this.lowerBound=67108864):e+="�";else if(128<=i&&i<=191){if(this.bytesLeft--,this.codePoint=(this.codePoint<<6)+(i-128),0==this.bytesLeft){var r=this.codePoint;r<this.lowerBound||55296<=r&&r<=57343||r>1114111?e+="�":r<65536?e+=String.fromCharCode(r):(r-=65536,e+=String.fromCharCode(55296+(r>>>10&1023),56320+(1023&r)))}}else e+="�",this.bytesLeft=0,o--}return e},Terminal.prototype.decodeUTF8=function(t){return(new UTF8Decoder).decode(t)},Terminal.prototype.encodeUTF8=function(t){for(var e="",o=0;o<t.length;o++){var i=t.charCodeAt(o);if(56320<=i&&i<=57343)i=65533;else if(55296<=i&&i<=56319)if(o+1<t.length){var r=t.charCodeAt(o+1);56320<=r&&r<=57343?(i=65536+((1023&i)<<10)+(1023&r),o++):i=65533}else i=65533;var n;if(i<=127)e+=t.charAt(o);else for(i<=2047?(e+=String.fromCharCode(192|i>>>6),n=1):i<=65535?(e+=String.fromCharCode(224|i>>>12),n=2):(e+=String.fromCharCode(240|i>>>18),n=3);n>0;)n--,e+=String.fromCharCode(128|i>>>6*n&63)}return e},Terminal.prototype.writeUTF8=function(t){this.write(this.decodeUTF8(t))};</script>
     <script>Terminal.prototype.showOverlay=function(e,t){if(!this.overlayNode_){if(!this.element)return;this.overlayNode_=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="#101010",this.overlayNode_.style.backgroundColor="#f0f0f0",this.overlayNode_.textContent=e,this.overlayNode_.style.opacity="0.75",this.overlayNode_.parentNode||this.element.appendChild(this.overlayNode_);var o=this.element.getBoundingClientRect(),i=this.overlayNode_.getBoundingClientRect();this.overlayNode_.style.top=(o.height-i.height)/2+"px",this.overlayNode_.style.left=(o.width-i.width)/2+"px";var l=this;this.overlayTimeout_&&clearTimeout(this.overlayTimeout_),null!==t&&(this.overlayTimeout_=setTimeout(function(){l.overlayNode_.style.opacity="0",l.overlayTimeout_=setTimeout(function(){l.overlayNode_.parentNode&&l.overlayNode_.parentNode.removeChild(l.overlayNode_),l.overlayTimeout_=null,l.overlayNode_.style.opacity="0.75"},200)},t||1500))};</script>
@@ -17,6 +17,6 @@ this.scrollDisp(this.ybase-this.ydisp)},s.prototype.write=function(t){if(this.wr
 <body>
        <div id="terminal-container"></div>
        <script src="auth_token.js"></script>
-       <script>!function(){var e,n,o,t=document.getElementById("terminal-container"),i="https:"==window.location.protocol,s=(i?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",a="undefined"!=typeof tty_auth_token?tty_auth_token:null,c=["tty"],r=-1,l=function(){var i=new WebSocket(s,c),f=function(e){var n="Close terminal? this will also terminate the command.";return(e||window.event).returnValue=n,n};i.onopen=function(s){for(console.log("Websocket connection opened"),o=!1,i.send(JSON.stringify({AuthToken:a})),n=setInterval(d,3e4,i),"undefined"!=typeof e&&e.destroy(),e=new Terminal,e.on("resize",function(n){i.readyState===WebSocket.OPEN&&i.send("2"+JSON.stringify({columns:n.cols,rows:n.rows})),setTimeout(function(){e.showOverlay(n.cols+"x"+n.rows)},500)}),e.on("data",function(e){i.readyState===WebSocket.OPEN&&i.send("0"+e)}),e.on("open",function(){window.addEventListener("resize",function(n){e.fit()}),window.addEventListener("beforeunload",f),e.fit(),e.focus()});t.firstChild;)t.removeChild(t.firstChild);e.open(t)},i.onmessage=function(n){var o=n.data.slice(1);switch(n.data[0]){case"0":e.writeUTF8(window.atob(o));break;case"1":break;case"2":document.title=o;break;case"3":var t=JSON.parse(o);Object.keys(t).forEach(function(n){console.log("Setting "+n+": "+t[n]),e.setOption(n,t[n])});break;case"4":r=JSON.parse(o),console.log("Enabling reconnect: "+r+" seconds")}},i.onclose=function(t){console.log("Websocket connection closed with code: "+t.code),e&&(e.off("data"),e.off("resize"),o||e.showOverlay("Connection Closed",null)),window.removeEventListener("beforeunload",f),clearInterval(n),r>0&&setTimeout(l,1e3*r)}},d=function(e){e.send("1")};l()}();</script>
+       <script>!function(){var e,n,o,t=document.getElementById("terminal-container"),i="https:"==window.location.protocol,s=(i?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",a="undefined"!=typeof tty_auth_token?tty_auth_token:null,c=["tty"],r=-1,l=function(){var i=new WebSocket(s,c),f=function(e){var n="Close terminal? this will also terminate the command.";return(e||window.event).returnValue=n,n};i.onopen=function(s){for(console.log("Websocket connection opened"),o=!1,i.send(JSON.stringify({AuthToken:a})),n=setInterval(d,3e4,i),"undefined"!=typeof e&&e.destroy(),e=new Terminal,e.on("resize",function(n){i.readyState===WebSocket.OPEN&&i.send("2"+JSON.stringify({columns:n.cols,rows:n.rows})),setTimeout(function(){e.showOverlay(n.cols+"x"+n.rows)},500)}),e.on("data",function(e){i.readyState===WebSocket.OPEN&&i.send("0"+e)}),e.on("open",function(){window.addEventListener("resize",function(n){e.fit()}),window.addEventListener("beforeunload",f),e.fit()});t.firstChild;)t.removeChild(t.firstChild);e.open(t,!0)},i.onmessage=function(n){var o=n.data.slice(1);switch(n.data[0]){case"0":e.writeUTF8(window.atob(o));break;case"1":break;case"2":document.title=o;break;case"3":var t=JSON.parse(o);Object.keys(t).forEach(function(n){console.log("Setting "+n+": "+t[n]),e.setOption(n,t[n])});break;case"4":r=JSON.parse(o),console.log("Enabling reconnect: "+r+" seconds")}},i.onclose=function(t){console.log("Websocket connection closed with code: "+t.code),e&&(e.off("data"),e.off("resize"),o||e.showOverlay("Connection Closed",null)),window.removeEventListener("beforeunload",f),clearInterval(n),r>0&&setTimeout(l,1e3*r)}},d=function(e){e.send("1")};l()}();</script>
 </body>
 </html>