<title>ttyd - Terminal</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAcCAYAAAAAwr0iAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA0xpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OTgyRjc1RjA3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OTgyRjc1RUY3MTZEMTFFNjg2M0NCOEY3RjJBMEY3N0EiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIgc3RSZWY6ZG9jdW1lbnRJRD0iYWRvYmU6ZG9jaWQ6cGhvdG9zaG9wOjU3YmQxNjhjLWI5ZDctMTE3OS1hM2RlLWZmNjQyYTM4NTJmMCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhsssMYAAALDSURBVHjaxFa9jxJBFH8zDMdCYrhIAppgIjaG5C5RQ+zO2Gty5gpbY2KsbOyu1MrGGEtj/A9stLPXs6CjJ5GYIF6AE5IDBHZmfG92F4ZzvQAnyyO7O8zX+73f+5gRd3bvvSgffN4/l948YgASFhQ9aWhqM6+pYfrVjD5WH9NK8f7x8ebNnVtvWC6b/RaPxy8zxsxmbB5lIfNsIDMggreezqG1o9GIGj8E45zFNzYgnU4D5xyUUkBglpFAKfgWa5gFY89rNVvgJJMgSBkpjcViIISA4XAI4/EYkBXTdyYQ9LOUU9sw7bmG2lqgPwwAKSV9D/P5/G2csNtoNJ71+32HFjqOszyQkDY9xLbrjkEorSe+wYGc67o72Wz2dSqV+tjr9e4iiAfdbnfL+G4B10wtDV/nBSYAN5O053eivVqtvq1UKr/RDaVCofCyVCo9ogXE0qISppgsJ3GlCzzGkQHcOEgT8n2xWLyfy+XeDwaDK7Va7Xm73X4YUHaaRfMwcbIPdTNBGWBSwkP3Ewdr9Xr9FcbAUwpICkyKAXuTRdkIAxH4QThOEn61W2YSKruAVpeJiUQiYRQjqHImk9nDjDiPijnO+d7pdN5hXOwRuGXdYRggANIdM9sy2tTeGPsuNpvNJwgkRVUMpYPdV5dJURsIZZ9WBEB6aRhKkeeWSzi2j9kxk8vLFqsABFkvlWSYhoqdni6zY2dRfHJfYoErvxBFLb5expVUDFlYCwDpM8CU0pEDoADUGH9YCf8dgKuQSRagXoo/Lg0Da3CBVwm9syBKBv46FfHNIlc+BYFZQHe0yBnQPgN0HFtV8H8VmXko8ABgEOo1uIDZMbCWALRiQAR/gkvpqsU+Rcl4gW9zR6JLCXXQ5XTVAKR/sqIvGODl89BnJfLHcRJNceP6tQ9fDr4+RmRHmAUqoiLEkOnM1vb2pz8CDACUMgcHE3VMqAAAAABJRU5ErkJggg==" />
<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:-9999em;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.terminal .terminal-cursor{background-color:#fff;color:#000}.terminal:not(.focus) .terminal-cursor{outline:1px solid #fff;outline-offset:-1px;background-color:transparent}.terminal.focus .terminal-cursor.blinking{animation:blink-cursor 1.2s infinite step-end}@keyframes blink-cursor{0%{background-color:#fff;color:#000}50%{background-color:transparent;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-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>#terminal-container,.terminal,body{background-color:#101010;height:100%;width:100%}#terminal-container,body{position:absolute;margin:0;font-size:15px;font-variant-ligatures:none;-webkit-font-smoothing:antialiased}.terminal{color:#f0f0f0;font-family:"DejaVu Sans Mono","Everson Mono",FreeMono,Menlo,Terminal,monospace;border:0}.terminal .xterm-viewport{background-color:#101010;overflow-x:hidden}.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>
+ <style>#terminal-container,body{position:absolute;height:100%;width:100%;margin:0;padding:0;font-size:15px;font-variant-ligatures:none;-webkit-font-smoothing:antialiased;background-color:#101010}.terminal{background-color:#101010;color:#f0f0f0;font-family:"DejaVu Sans Mono","Everson Mono",FreeMono,Menlo,Terminal,monospace;position:fixed;top:0;bottom:0;left:0;right:0;width:auto;height:auto}.terminal .xterm-viewport{background-color:#101010;overflow-x:hidden}.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,s,i){function r(a,n){if(!s[a]){if(!e[a]){var h="function"==typeof require&&require;if(!n&&h)return h(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=s[a]={exports:{}};e[a][0].call(l.exports,function(t){var s=e[a][1][t];return r(s?s:t)},l,l.exports,t,e,s,i)}return s[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,s){"use strict";function i(t,e,s){this.textarea=t,this.compositionView=e,this.terminal=s,this.isComposing=!1,this.compositionText=null,this.compositionPosition={start:null,end:null},this.isSendingComposition=!1}Object.defineProperty(s,"__esModule",{value:!0}),i.prototype.compositionstart=function(){this.isComposing=!0,this.compositionPosition.start=this.textarea.value.length,this.compositionView.textContent="",this.compositionView.classList.add("active")},i.prototype.compositionupdate=function(t){this.compositionView.textContent=t.data,this.updateCompositionElements();var e=this;setTimeout(function(){e.compositionPosition.end=e.textarea.value.length},0)},i.prototype.compositionend=function(){this.finalizeComposition(!0)},i.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)},i.prototype.finalizeComposition=function(t){if(this.compositionView.classList.remove("active"),this.isComposing=!1,this.clearTextareaPosition(),t){var e={start:this.compositionPosition.start,end:this.compositionPosition.end},s=this;this.isSendingComposition=!0,setTimeout(function(){if(s.isSendingComposition){s.isSendingComposition=!1;var t;t=s.isComposing?s.textarea.value.substring(e.start,e.end):s.textarea.value.substring(e.start),s.terminal.handler(t)}},0)}else{this.isSendingComposition=!1;var i=this.textarea.value.substring(this.compositionPosition.start,this.compositionPosition.end);this.terminal.handler(i)}},i.prototype.handleAnyTextareaChanges=function(){var t=this.textarea.value,e=this;setTimeout(function(){if(!e.isComposing){var s=e.textarea.value,i=s.replace(t,"");i.length>0&&e.terminal.handler(i)}},0)},i.prototype.updateCompositionElements=function(t){if(this.isComposing){var e=this.terminal.element.querySelector(".terminal-cursor");if(e){var s=this.terminal.element.querySelector(".xterm-rows"),i=s.offsetTop+e.offsetTop;this.compositionView.style.left=e.offsetLeft+"px",this.compositionView.style.top=i+"px",this.compositionView.style.height=e.offsetHeight+"px",this.compositionView.style.lineHeight=e.offsetHeight+"px";var r=this.compositionView.getBoundingClientRect();this.textarea.style.left=e.offsetLeft+"px",this.textarea.style.top=i+"px",this.textarea.style.width=r.width+"px",this.textarea.style.height=r.height+"px",this.textarea.style.lineHeight=r.height+"px"}t||setTimeout(this.updateCompositionElements.bind(this,!0),0)}},i.prototype.clearTextareaPosition=function(){this.textarea.style.left="",this.textarea.style.top=""},s.CompositionHelper=i},{}],2:[function(t,e,s){"use strict";function i(){this._events=this._events||{}}Object.defineProperty(s,"__esModule",{value:!0}),i.prototype.addListener=function(t,e){this._events[t]=this._events[t]||[],this._events[t].push(e)},i.prototype.on=i.prototype.addListener,i.prototype.removeListener=function(t,e){if(this._events[t])for(var s=this._events[t],i=s.length;i--;)if(s[i]===e||s[i].listener===e)return void s.splice(i,1)},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){this._events[t]&&delete this._events[t]},i.prototype.once=function(t,e){function s(){var i=Array.prototype.slice.call(arguments);return this.removeListener(t,s),e.apply(this,i)}return s.listener=e,this.on(t,s)},i.prototype.emit=function(t){if(this._events[t])for(var e=Array.prototype.slice.call(arguments,1),s=this._events[t],i=s.length,r=0;r<i;r++)s[r].apply(this,e)},i.prototype.listeners=function(t){return this._events[t]=this._events[t]||[]},s.EventEmitter=i},{}],3:[function(t,e,s){"use strict";function i(t,e,s,i){this.terminal=t,this.viewportElement=e,this.scrollArea=s,this.charMeasureElement=i,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)),this.syncScrollArea()}Object.defineProperty(s,"__esModule",{value:!0}),i.prototype.refresh=function(t){var e=t||this.charMeasureElement.getBoundingClientRect();if(e.height>0){var s=e.height!==this.currentRowHeight;s&&(this.currentRowHeight=e.height,this.viewportElement.style.lineHeight=e.height+"px",this.terminal.rowContainer.style.lineHeight=e.height+"px");var i=this.lastRecordedViewportHeight!==this.terminal.rows;(s||i)&&(this.lastRecordedViewportHeight=this.terminal.rows,this.viewportElement.style.height=e.height*this.terminal.rows+"px"),this.scrollArea.style.height=e.height*this.lastRecordedBufferLength+"px"}},i.prototype.syncScrollArea=function(){if(this.lastRecordedBufferLength!==this.terminal.lines.length)this.lastRecordedBufferLength=this.terminal.lines.length,this.refresh();else if(this.lastRecordedViewportHeight!==this.terminal.rows)this.refresh();else{var t=this.charMeasureElement.getBoundingClientRect();t.height!==this.currentRowHeight&&this.refresh(t)}var e=this.terminal.ydisp*this.currentRowHeight;this.viewportElement.scrollTop!==e&&(this.viewportElement.scrollTop=e)},i.prototype.onScroll=function(t){var e=Math.round(this.viewportElement.scrollTop/this.currentRowHeight),s=e-this.terminal.ydisp;this.terminal.scrollDisp(s,!0)},i.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()}},s.Viewport=i},{}],4:[function(t,e,s){"use strict";function i(t){var e=String.fromCharCode(32),s=String.fromCharCode(160),i=new RegExp(s,"g"),r=t.split("\n").map(function(t){var s=t.replace(/\s+$/g,"").replace(i,e);return s}).join("\n");return r}function r(t,e){var s=window.getSelection().toString(),r=i(s);e.browser.isMSIE?window.clipboardData.setData("Text",r):t.clipboardData.setData("text/plain",r),t.preventDefault()}function o(t,e){t.stopPropagation();var s=function(s){return e.handler(s),e.textarea.value="",e.cancel(t)};if(e.browser.isMSIE){if(window.clipboardData){var i=window.clipboardData.getData("Text");s(i)}}else if(t.clipboardData){var i=t.clipboardData.getData("text/plain");s(i)}}function a(t,e){var s=document.getSelection(),r=i(s.toString()),o=!1;if(s.rangeCount){var a,n,h=s.getRangeAt(0),c=h.getClientRects(),l=t.clientX,p=t.clientY;for(a=0;a<c.length&&(n=c[a],!(o=l>n.left&&l<n.right&&p>n.top&&p<n.bottom));a++);!r.match(/^\s$/)&&r.length||(o=!1)}o||(e.textarea.style.position="fixed",e.textarea.style.width="20px",e.textarea.style.height="20px",e.textarea.style.left=l-10+"px",e.textarea.style.top=p-10+"px",e.textarea.style.zIndex=1e3,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(s,"__esModule",{value:!0}),s.prepareTextForClipboard=i,s.copyHandler=r,s.pasteHandler=o,s.rightClickHandler=a},{}],5:[function(t,e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.isMSWindows=s.isIphone=s.isIpad=s.isMac=s.isMSIE=s.isFirefox=void 0;var i=t("./Generic.js"),r="undefined"==typeof navigator,o=r?"node":navigator.userAgent,a=r?"node":navigator.platform;s.isFirefox=!!~o.indexOf("Firefox"),s.isMSIE=!!~o.indexOf("MSIE")||!!~o.indexOf("Trident"),s.isMac=(0,i.contains)(["Macintosh","MacIntel","MacPPC","Mac68K"],a),s.isIpad="iPad"===a,s.isIphone="iPhone"===a,s.isMSWindows=(0,i.contains)(["Windows","Win16","Win32","WinCE"],a)},{"./Generic.js":6}],6:[function(t,e,s){"use strict";Object.defineProperty(s,"__esModule",{value:!0});s.contains=function(t,e){return t.indexOf(e)>=0}},{}],7:[function(e,s,i){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e.default=t,e}function o(t){var e=this;if(!(this instanceof o))return new o(arguments[0],arguments[1],arguments[2]);e.browser=g,e.cancel=o.cancel,b.EventEmitter.call(this),"number"==typeof t&&(t={cols:arguments[0],rows:arguments[1],handler:arguments[2]}),t=t||{},Object.keys(o.defaults).forEach(function(s){null==t[s]&&(t[s]=o.options[s],o[s]!==o.defaults[s]&&(t[s]=o[s])),e[s]=t[s]}),8===t.colors.length?t.colors=t.colors.concat(o._colors.slice(8)):16===t.colors.length?t.colors=t.colors.concat(o._colors.slice(16)):10===t.colors.length?t.colors=t.colors.slice(0,-2).concat(o._colors.slice(8,-2),t.colors.slice(-2)):18===t.colors.length&&(t.colors=t.colors.concat(o._colors.slice(16,-2),t.colors.slice(-2))),this.colors=t.colors,this.options=t,this.parent=t.body||t.parent||(x?x.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.isRefreshing=!1,this.cursorState=0,this.cursorHidden=!1,this.convertEol,this.state=0,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.customKeydownHandler=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.surrogate_high="",this.lines=[];for(var s=this.rows;s--;)this.lines.push(this.blankLine());this.tabs,this.setupStops(),this.userScrolling=!1}function a(t,e,s,i){Array.isArray(t)||(t=[t]),t.forEach(function(t){t.addEventListener(e,s,i||!1)})}function n(t,e,s,i){t.removeEventListener(e,s,i||!1)}function h(t,e){if(this.cancelEvents||e)return t.preventDefault(),t.stopPropagation(),!1}function c(t,e){function s(){this.constructor=t}s.prototype=e.prototype,t.prototype=new s}function l(t){var e=t.getElementsByTagName("body")[0],s=t.createElement("span");s.innerHTML="hello world",e.appendChild(s);var i=s.scrollWidth;s.style.fontWeight="bold";var r=s.scrollWidth;return e.removeChild(s),i!==r}function p(t,e){var s=t.browser.isMac&&e.altKey&&!e.ctrlKey&&!e.metaKey||t.browser.isMSWindows&&e.altKey&&e.ctrlKey&&!e.metaKey;return"keypress"==e.type?s:s&&(!e.keyCode||e.keyCode>47)}function u(t,e,s){var i=t<<16|e<<8|s;if(null!=u._cache[i])return u._cache[i];for(var r,a,n,h,c,l=1/0,p=-1,f=0;f<o.vcolors.length;f++){if(r=o.vcolors[f],a=r[0],n=r[1],h=r[2],c=u.distance(t,e,s,a,n,h),0===c){p=f;break}c<l&&(l=c,p=f)}return u._cache[i]=p}function f(t,e,s){if(t.forEach)return t.forEach(e,s);for(var i=0;i<t.length;i++)e.call(s,t[i],i,t)}function d(t){if(Object.keys)return Object.keys(t);var e,s=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&s.push(e);return s}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m=e("./CompositionHelper.js"),b=e("./EventEmitter.js"),k=e("./Viewport.js"),v=e("./handlers/Clipboard.js"),w=e("./utils/Browser"),g=r(w),x="undefined"!=typeof window?window.document:null,C=0,S=1,E=2,M=3,A=4,L=5,R=6;c(o,b.EventEmitter),o.prototype.eraseAttr=function(){return this.defAttr&-512|511&this.curAttr},o.tangoColors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],o.colors=function(){function t(t,s,r){i.push("#"+e(t)+e(s)+e(r))}function e(t){return t=t.toString(16),t.length<2?"0"+t:t}var s,i=o.tangoColors.slice(),r=[0,95,135,175,215,255];for(s=0;s<216;s++)t(r[s/36%6|0],r[s/6%6|0],r[s%6]);for(s=0;s<24;s++)r=8+10*s,t(r,r,r);return i}(),o._colors=o.colors.slice(),o.vcolors=function(){for(var t,e=[],s=o.colors,i=0;i<256;i++)t=parseInt(s[i].substring(1),16),e.push([t>>16&255,t>>8&255,255&t]);return e}(),o.defaults={colors:o.colors,theme:"default",convertEol:!1,termName:"xterm",geometry:[80,24],cursorBlink:!1,visualBell:!1,popOnBell:!1,scrollback:1e3,screenKeys:!1,debug:!1,cancelEvents:!1},o.options={},o.focus=null,f(d(o.defaults),function(t){o[t]=o.defaults[t],o.options[t]=o.defaults[t]}),o.prototype.focus=function(){return this.textarea.focus()},o.prototype.getOption=function(t,e){if(!(t in o.defaults))throw new Error('No option with key "'+t+'"');return"undefined"!=typeof this.options[t]?this.options[t]:this[t]},o.prototype.setOption=function(t,e){if(!(t in o.defaults))throw new Error('No option with key "'+t+'"');this[t]=e,this.options[t]=e},o.bindFocus=function(t){a(t.textarea,"focus",function(e){t.sendFocus&&t.send("\e[I"),t.element.classList.add("focus"),t.showCursor(),o.focus=t,t.emit("focus",{terminal:t})})},o.prototype.blur=function(){return this.textarea.blur()},o.bindBlur=function(t){a(t.textarea,"blur",function(e){t.refresh(t.y,t.y),t.sendFocus&&t.send("\e[O"),t.element.classList.remove("focus"),o.focus=null,t.emit("blur",{terminal:t})})},o.prototype.initGlobal=function(){function t(t){v.rightClickHandler.call(this,t,e)}var e=this;o.bindKeys(this),o.bindFocus(this),o.bindBlur(this),a(this.element,"copy",function(t){v.copyHandler.call(this,t,e)}),a(this.textarea,"paste",function(t){v.pasteHandler.call(this,t,e)}),e.browser.isFirefox?a(this.element,"mousedown",function(e){2==e.button&&t(e)}):a(this.element,"contextmenu",t)},o.bindKeys=function(t){a(t.element,"keydown",function(e){x.activeElement==this&&t.keyDown(e)},!0),a(t.element,"keypress",function(e){x.activeElement==this&&t.keyPress(e)},!0),a(t.element,"keyup",t.focus.bind(t)),a(t.textarea,"keydown",function(e){t.keyDown(e)},!0),a(t.textarea,"keypress",function(e){t.keyPress(e),this.value=""},!0),a(t.textarea,"compositionstart",t.compositionHelper.compositionstart.bind(t.compositionHelper)),a(t.textarea,"compositionupdate",t.compositionHelper.compositionupdate.bind(t.compositionHelper)),a(t.textarea,"compositionend",t.compositionHelper.compositionend.bind(t.compositionHelper)),t.on("refresh",t.compositionHelper.updateCompositionElements.bind(t.compositionHelper))},o.prototype.insertRow=function(t){return"object"!=("undefined"==typeof t?"undefined":y(t))&&(t=x.createElement("div")),this.rowContainer.appendChild(t),this.children.push(t),t},o.prototype.open=function(t){var e=this,s=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.element.style.height,this.element.setAttribute("tabindex",0),this.viewportElement=x.createElement("div"),this.viewportElement.classList.add("xterm-viewport"),this.element.appendChild(this.viewportElement),this.viewportScrollArea=x.createElement("div"),this.viewportScrollArea.classList.add("xterm-scroll-area"),this.viewportElement.appendChild(this.viewportScrollArea),this.rowContainer=x.createElement("div"),this.rowContainer.classList.add("xterm-rows"),this.element.appendChild(this.rowContainer),this.children=[],this.helperContainer=x.createElement("div"),this.helperContainer.classList.add("xterm-helpers"),this.element.appendChild(this.helperContainer),this.textarea=x.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=x.createElement("div"),this.compositionView.classList.add("composition-view"),this.compositionHelper=new m.CompositionHelper(this.textarea,this.compositionView,this),this.helperContainer.appendChild(this.compositionView),this.charMeasureElement=x.createElement("div"),this.charMeasureElement.classList.add("xterm-char-measure-element"),this.charMeasureElement.innerHTML="W",this.helperContainer.appendChild(this.charMeasureElement);s<this.rows;s++)this.insertRow();this.parent.appendChild(this.element),this.viewport=new k.Viewport(this,this.viewportElement,this.viewportScrollArea,this.charMeasureElement),this.refresh(0,this.rows-1),this.initGlobal(),this.focus(),a(this.element,"click",function(){var t=x.getSelection(),s=t.isCollapsed,i="boolean"==typeof s?!s:"Range"==t.type;i||e.focus()}),this.bindMouse(),null==o.brokenBold&&(o.brokenBold=l(this.document)),this.emit("open")},o.loadAddon=function(r,o){return"object"===("undefined"==typeof i?"undefined":y(i))&&"object"===("undefined"==typeof s?"undefined":y(s))?e("../addons/"+r):"function"==typeof t?e(["../addons/"+r+"/"+r],o):(console.error("Cannot load a module without a CommonJS or RequireJS environment."),!1)},o.prototype.bindMouse=function(){function t(t){var e,s;if(e=r(t),s=o(t))switch(i(e,s),t.overrideType||t.type){case"mousedown":l=e;break;case"mouseup":l=32;break;case"wheel":}}function e(t){var e,s=l;e=o(t),e&&(s+=32,i(s,e))}function s(t,e){if(c.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 i(t,e){if(c.vt300Mouse){t&=3,e.x-=32,e.y-=32;var i="\e[24";if(0===t)i+="1";else if(1===t)i+="3";else if(2===t)i+="5";else{if(3===t)return;i+="0"}return i+="~["+e.x+","+e.y+"]\r",void c.send(i)}if(c.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 c.send("\e["+t+";"+(3===t?4:0)+";"+e.y+";"+e.x+";"+(e.page||0)+"&w");if(c.urxvtMouse)return e.x-=32,e.y-=32,e.x++,e.y++,void c.send("\e["+t+";"+e.x+";"+e.y+"M");if(c.sgrMouse)return e.x-=32,e.y-=32,void c.send("\e[<"+(3===(3&t)?t&-4:t)+";"+e.x+";"+e.y+(3===(3&t)?"m":"M"));var i=[];s(i,t),s(i,e.x),s(i,e.y),c.send("\e[M"+String.fromCharCode.apply(String,i))}function r(t){var e,s,i,r,o;switch(t.overrideType||t.type){case"mousedown":e=null!=t.button?+t.button:null!=t.which?t.which-1:null,c.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 s=t.shiftKey?4:0,i=t.metaKey?8:0,r=t.ctrlKey?16:0,o=s|i|r,c.vt200Mouse?o&=r:c.normalMouse||(o=0),e=32+(o<<2)+e}function o(t){var e,s,i,r,o;if(null!=t.pageX){for(e=t.pageX,s=t.pageY,o=c.element;o&&o!==c.document.documentElement;)e-=o.offsetLeft,s-=o.offsetTop,o="offsetParent"in o?o.offsetParent:o.parentNode;return i=c.element.clientWidth,r=c.element.clientHeight,e=Math.ceil(e/i*c.cols),s=Math.ceil(s/r*c.rows),e<0&&(e=0),e>c.cols&&(e=c.cols),s<0&&(s=0),s>c.rows&&(s=c.rows),e+=32,s+=32,{x:e,y:s,type:"wheel"}}}var h=this.element,c=this,l=32;a(h,"mousedown",function(s){if(c.mouseEvents)return t(s),c.focus(),c.vt200Mouse?(s.overrideType="mouseup",t(s),c.cancel(s)):(c.normalMouse&&a(c.document,"mousemove",e),c.x10Mouse||a(c.document,"mouseup",function s(i){return t(i),c.normalMouse&&n(c.document,"mousemove",e),n(c.document,"mouseup",s),c.cancel(i)}),c.cancel(s))}),a(h,"wheel",function(e){if(c.mouseEvents&&!(c.x10Mouse||c.vt300Mouse||c.decLocator))return t(e),c.cancel(e)}),a(h,"wheel",function(t){if(!c.mouseEvents)return c.viewport.onWheel(t),c.cancel(t)})},o.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){},this.element.parentNode&&this.element.parentNode.removeChild(this.element)},o.flags={BOLD:1,UNDERLINE:2,BLINK:4,INVERSE:8,INVISIBLE:16},o.prototype.refresh=function(t,e,s){var i=this;if(s="undefined"==typeof s||s)return void(this._refreshIsQueued?this._fullRefreshNext=!0:(setTimeout(function(){i.refresh(t,e,!1)},34),this._refreshIsQueued=!0));this._refreshIsQueued=!1,this._fullRefreshNext&&(t=0,e=this.rows-1,this._fullRefreshNext=!1);var r,a,n,h,c,l,p,u,f,d,y,m,b,k,v;x.activeElement;for(e-t>=this.rows/2&&(v=this.element.parentNode,v&&this.element.removeChild(this.rowContainer)),u=this.cols,a=t,e>=this.rows.length&&(this.log("`end` is too large. Most likely a bad CSR."),e=this.rows.length-1);a<=e;a++){for(k=a+this.ydisp,h=this.lines[k],c="",r=this.y===a-(this.ybase-this.ydisp)&&this.cursorState&&!this.cursorHidden?this.x:-1,d=this.defAttr,n=0;n<u;n++)if(f=h[n][0],l=h[n][1],p=h[n][2]){if(n===r&&(f=-1),f!==d&&(d!==this.defAttr&&(c+="</span>"),f!==this.defAttr))if(f===-1)c+='<span class="reverse-video terminal-cursor',this.cursorBlink&&(c+=" blinking"),c+='">';else{var w=[];y=511&f,m=f>>9&511,b=f>>18,b&o.flags.BOLD&&(o.brokenBold||w.push("xterm-bold"),m<8&&(m+=8)),b&o.flags.UNDERLINE&&w.push("xterm-underline"),b&o.flags.BLINK&&w.push("xterm-blink"),b&o.flags.INVERSE&&(y=[m,m=y][0],1&b&&m<8&&(m+=8)),b&o.flags.INVISIBLE&&w.push("xterm-hidden"),b&o.flags.INVERSE&&(257==y&&(y=15),256==m&&(m=0)),y<256&&w.push("xterm-bg-color-"+y),m<256&&w.push("xterm-color-"+m),c+="<span",w.length&&(c+=' class="'+w.join(" ")+'"'),c+=">"}switch(l){case"&":c+="&";break;case"<":c+="<";break;case">":c+=">";break;default:c+=l<=" "?" ":l}d=f}d!==this.defAttr&&(c+="</span>"),this.children[a].innerHTML=c}v&&this.element.appendChild(this.rowContainer),this.emit("refresh",{element:this.element,start:t,end:e})},o.prototype.showCursor=function(){this.cursorState||(this.cursorState=1,this.refresh(this.y,this.y))},o.prototype.scroll=function(){var t;++this.ybase===this.scrollback&&(this.ybase=this.ybase/2|0,this.lines=this.lines.slice(-(this.ybase+this.rows)+1)),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)},o.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)},o.prototype.scrollPages=function(t){this.scrollDisp(t*(this.rows-1))},o.prototype.scrollToTop=function(){this.scrollDisp(-this.ydisp)},o.prototype.scrollToBottom=function(){this.scrollDisp(this.ybase-this.ydisp)},o.prototype.write=function(t){var e,s,i,r,a,n,h=t.length,c=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.surrogate_high&&(t=this.surrogate_high+t,this.surrogate_high="");c<h;c++){if(s=t[c],i=t.charCodeAt(c),55296<=i&&i<=56319){if(r=t.charCodeAt(c+1),isNaN(r)){this.surrogate_high=s;continue}i=1024*(i-55296)+(r-56320)+65536,s+=t.charAt(c+1)}if(!(56320<=i&&i<=57343))switch(this.state){case C:switch(s){case"\a":this.bell();break;case"\n":case"\v":case"\f":this.convertEol&&(this.x=0),this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll());break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case"\t":this.x=this.nextStop();break;case"\ e":this.setgLevel(1);break;case"\ f":this.setgLevel(0);break;case"\e":this.state=S;break;default:if(a=P(i),s>=" "){if(this.charset&&this.charset[s]&&(s=this.charset[s]),n=this.y+this.ybase,!a&&this.x){this.lines[n][this.x-1]&&(this.lines[n][this.x-1][2]?this.lines[n][this.x-1][1]+=s:this.lines[n][this.x-2]&&(this.lines[n][this.x-2][1]+=s),this.updateRange(this.y));break}if(this.x+a-1>=this.cols)if(this.wraparoundMode)this.x=0,this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll());else if(this.x=this.cols-1,2===a)continue;if(n=this.y+this.ybase,this.insertMode)for(var l=0;l<a;++l){var p=this.lines[this.y+this.ybase].pop();0===p[2]&&this.lines[n][this.cols-2]&&2===this.lines[n][this.cols-2][2]&&(this.lines[n][this.cols-2]=[this.curAttr," ",1]),this.lines[n].splice(this.x,0,[this.curAttr," ",1])}this.lines[n][this.x]=[this.curAttr,s,a],this.x++,this.updateRange(this.y),2===a&&(this.lines[n][this.x]=[this.curAttr,"",0],this.x++)}}break;case S:switch(s){case"[":this.params=[],this.currentParam=0,this.state=E;break;case"]":this.params=[],this.currentParam=0,this.state=M;break;case"P":this.params=[],this.currentParam=0,this.state=L;break;case"_":this.state=R;break;case"^":this.state=R;break;case"c":this.reset();break;case"E":this.x=0;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,o.charsets.US),this.state=C,c++;break;case"(":case")":case"*":case"+":case"-":case".":switch(s){case"(":this.gcharset=0;break;case")":this.gcharset=1;break;case"*":this.gcharset=2;break;case"+":this.gcharset=3;break;case"-":this.gcharset=1;break;case".":this.gcharset=2}this.state=A;break;case"/":this.gcharset=3,this.state=A,c--;break;case"N":break;case"O":break;case"n":this.setgLevel(2);break;case"o":this.setgLevel(3);break;case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=C;break;case"8":this.restoreCursor(),this.state=C;break;case"#":this.state=C,c++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.viewport.syncScrollArea(),this.state=C;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.viewport.syncScrollArea(),this.state=C;break;default:this.state=C,this.error("Unknown ESC control: %s.",s)}break;case A:switch(s){case"0":e=o.charsets.SCLD;break;case"A":e=o.charsets.UK;break;case"B":e=o.charsets.US;break;case"4":e=o.charsets.Dutch;break;case"C":case"5":e=o.charsets.Finnish;break;case"R":e=o.charsets.French;break;case"Q":e=o.charsets.FrenchCanadian;break;case"K":e=o.charsets.German;break;case"Y":e=o.charsets.Italian;break;case"E":case"6":e=o.charsets.NorwegianDanish;break;case"Z":e=o.charsets.Spanish;break;case"H":case"7":e=o.charsets.Swedish;break;case"=":e=o.charsets.Swiss;break;case"/":e=o.charsets.ISOLatin,c++;break;default:e=o.charsets.US}this.setgCharset(this.gcharset,e),this.gcharset=null,this.state=C;break;case M:if("\e"===s||"\a"===s){switch("\e"===s&&c++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.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.params=[],this.currentParam=0,this.state=C}else this.params.length?this.currentParam+=s:s>="0"&&s<="9"?this.currentParam=10*this.currentParam+s.charCodeAt(0)-48:";"===s&&(this.params.push(this.currentParam),this.currentParam="");break;case E:if("?"===s||">"===s||"!"===s){this.prefix=s;break}if(s>="0"&&s<="9"){this.currentParam=10*this.currentParam+s.charCodeAt(0)-48;break}if("$"===s||'"'===s||" "===s||"'"===s){this.postfix=s;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===s)break;switch(this.state=C,s){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.prefix||this.charAttributes(this.params);break;case"n":this.prefix||this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":this.sendDeviceAttributes(this.params);break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":this.setMode(this.params);break;case"l":this.resetMode(this.params);break;case"r":this.setScrollRegion(this.params);break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":this.scrollUp(this.params);break;case"T":this.params.length<2&&!this.prefix&&this.scrollDown(this.params);break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":switch(this.prefix){case"!":this.softReset(this.params)}break;default:this.error("Unknown CSI code: %s.",s)}this.prefix="",this.postfix="";break;case L:if("\e"===s||"\a"===s){switch("\e"===s&&c++,this.prefix){case"":break;case"$q":var u=this.currentParam,f=!1;switch(u){case'"q':u='0"q';break;case'"p':u='61"p';break;case"r":u=""+(this.scrollTop+1)+";"+(this.scrollBottom+1)+"r";break;case"m":u="0m";break;default:this.error("Unknown DCS Pt: %s.",u),u=""}this.send("\eP"+ +f+"$r"+u+"\e\\");break;case"+p":break;case"+q":var u=this.currentParam,f=!1;this.send("\eP"+ +f+"+r"+u+"\e\\");break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=C}else this.currentParam?this.currentParam+=s:this.prefix||"$"===s||"+"===s?2===this.prefix.length?this.currentParam=s:this.prefix+=s:this.currentParam=s;break;case R:"\e"!==s&&"\a"!==s||("\e"===s&&c++,this.state=C)}}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},o.prototype.writeln=function(t){this.write(t+"\r\n")},o.prototype.attachCustomKeydownHandler=function(t){this.customKeydownHandler=t},o.prototype.keyDown=function(t){if(this.ybase!==this.ydisp&&this.scrollToBottom(),this.customKeydownHandler&&this.customKeydownHandler(t)===!1)return!1;if(!this.compositionHelper.keydown.bind(this.compositionHelper)(t))return!1;var e=this.evaluateKeyEscapeSequence(t);return e.scrollDisp?(this.scrollDisp(e.scrollDisp),this.cancel(t,!0)):!!p(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)))},o.prototype.evaluateKeyEscapeSequence=function(t){var e={cancel:!1,key:void 0,scrollDisp:void 0},s=t.shiftKey<<0|t.altKey<<1|t.ctrlKey<<2|t.metaKey<<3;switch(t.keyCode){case 8:if(t.shiftKey){e.key="\b";break}e.key="\7f";break;case 9:if(t.shiftKey){e.key="\e[Z";break}e.key="\t",e.cancel=!0;break;case 13:e.key="\r",e.cancel=!0;break;case 27:e.key="\e",e.cancel=!0;break;case 37:s?(e.key="\e[1;"+(s+1)+"D",
"\e[1;3D"==e.key&&(e.key="\e[1;5D")):this.applicationCursor?e.key="\eOD":e.key="\e[D";break;case 39:s?(e.key="\e[1;"+(s+1)+"C","\e[1;3C"==e.key&&(e.key="\e[1;5C")):this.applicationCursor?e.key="\eOC":e.key="\e[C";break;case 38:s?(e.key="\e[1;"+(s+1)+"A","\e[1;3A"==e.key&&(e.key="\e[1;5A")):this.applicationCursor?e.key="\eOA":e.key="\e[A";break;case 40:s?(e.key="\e[1;"+(s+1)+"B","\e[1;3B"==e.key&&(e.key="\e[1;5B")):this.applicationCursor?e.key="\eOB":e.key="\e[B";break;case 45:t.shiftKey||t.ctrlKey||(e.key="\e[2~");break;case 46:s?e.key="\e[3;"+(s+1)+"~":e.key="\e[3~";break;case 36:s?e.key="\e[1;"+(s+1)+"H":this.applicationCursor?e.key="\eOH":e.key="\e[H";break;case 35:s?e.key="\e[1;"+(s+1)+"F":this.applicationCursor?e.key="\eOF":e.key="\e[F";break;case 33:t.shiftKey?e.scrollDisp=-(this.rows-1):e.key="\e[5~";break;case 34:t.shiftKey?e.scrollDisp=this.rows-1:e.key="\e[6~";break;case 112:s?e.key="\e[1;"+(s+1)+"P":e.key="\eOP";break;case 113:s?e.key="\e[1;"+(s+1)+"Q":e.key="\eOQ";break;case 114:s?e.key="\e[1;"+(s+1)+"R":e.key="\eOR";break;case 115:s?e.key="\e[1;"+(s+1)+"S":e.key="\eOS";break;case 116:s?e.key="\e[15;"+(s+1)+"~":e.key="\e[15~";break;case 117:s?e.key="\e[17;"+(s+1)+"~":e.key="\e[17~";break;case 118:s?e.key="\e[18;"+(s+1)+"~":e.key="\e[18~";break;case 119:s?e.key="\e[19;"+(s+1)+"~":e.key="\e[19~";break;case 120:s?e.key="\e[20;"+(s+1)+"~":e.key="\e[20~";break;case 121:s?e.key="\e[21;"+(s+1)+"~":e.key="\e[21~";break;case 122:s?e.key="\e[23;"+(s+1)+"~":e.key="\e[23~";break;case 123:s?e.key="\e[24;"+(s+1)+"~":e.key="\e[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="\e"+String.fromCharCode(t.keyCode+32):192===t.keyCode?e.key="\e`":t.keyCode>=48&&t.keyCode<=57&&(e.key="\e"+(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):221===t.keyCode&&(e.key=String.fromCharCode(29))}return e},o.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]},o.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)},o.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)&&!p(this,t))&&(e=String.fromCharCode(e),this.emit("keypress",e,t),this.emit("key",e,t),this.showCursor(),this.handler(e),!1)},o.prototype.send=function(t){var e=this;this.queue||setTimeout(function(){e.handler(e.queue),e.queue=""},1),this.queue+=t},o.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()}},o.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)}},o.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)}},o.prototype.resize=function(t,e){var s,i,r,o,a;if(t!==this.cols||e!==this.rows){if(t<1&&(t=1),e<1&&(e=1),r=this.cols,r<t)for(o=[this.defAttr," ",1],i=this.lines.length;i--;)for(;this.lines[i].length<t;)this.lines[i].push(o);else for(i=this.lines.length;i--;)for(;this.lines[i].length>t;)this.lines[i].pop();if(this.setupStops(r),this.cols=t,r=this.rows,a=0,r<e)for(s=this.element;r++<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(;r-- >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(s=this.children.shift(),!s)continue;s.parentNode.removeChild(s)}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.refresh(0,this.rows-1),this.normal=null,this.geometry=[this.cols,this.rows],this.emit("resize",{terminal:this,cols:t,rows:e})}},o.prototype.updateRange=function(t){t<this.refreshStart&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t)},o.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1},o.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);t<this.cols;t+=8)this.tabs[t]=!0},o.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},o.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},o.prototype.eraseRight=function(t,e){for(var s=this.lines[this.ybase+e],i=[this.eraseAttr()," ",1];t<this.cols;t++)s[t]=i;this.updateRange(e)},o.prototype.eraseLeft=function(t,e){var s=this.lines[this.ybase+e],i=[this.eraseAttr()," ",1];for(t++;t--;)s[t]=i;this.updateRange(e)},o.prototype.clear=function(){if(0!==this.ybase||0!==this.y){this.lines=[this.lines[this.ybase+this.y]],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)}},o.prototype.eraseLine=function(t){this.eraseRight(0,t)},o.prototype.blankLine=function(t){for(var e=t?this.eraseAttr():this.defAttr,s=[e," ",1],i=[],r=0;r<this.cols;r++)i[r]=s;return i},o.prototype.ch=function(t){return t?[this.eraseAttr()," ",1]:[this.defAttr," ",1]},o.prototype.is=function(t){var e=this.termName;return 0===(e+"").indexOf(t)},o.prototype.handler=function(t){this.emit("data",t)},o.prototype.handleTitle=function(t){this.emit("title",t)},o.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.state=C},o.prototype.reverseIndex=function(){var t;this.y--,this.y<this.scrollTop&&(this.y++,this.lines.splice(this.y+this.ybase,0,this.blankLine(!0)),t=this.rows-1-this.scrollBottom,this.lines.splice(this.rows-1+this.ybase-t+1,1),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)),this.state=C},o.prototype.reset=function(){this.options.rows=this.rows,this.options.cols=this.cols;var t=this.customKeydownHandler;o.call(this,this.options),this.customKeydownHandler=t,this.refresh(0,this.rows-1),this.viewport.syncScrollArea()},o.prototype.tabSet=function(){this.tabs[this.x]=!0,this.state=C},o.prototype.cursorUp=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0)},o.prototype.cursorDown=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},o.prototype.cursorForward=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},o.prototype.cursorBackward=function(t){var e=t[0];e<1&&(e=1),this.x-=e,this.x<0&&(this.x=0)},o.prototype.cursorPos=function(t){var e,s;e=t[0]-1,s=t.length>=2?t[1]-1:0,e<0?e=0:e>=this.rows&&(e=this.rows-1),s<0?s=0:s>=this.cols&&(s=this.cols-1),this.x=s,this.y=e},o.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this.eraseRight(this.x,this.y),e=this.y+1;e<this.rows;e++)this.eraseLine(e);break;case 1:for(this.eraseLeft(this.x,this.y),e=this.y;e--;)this.eraseLine(e);break;case 2:for(e=this.rows;e--;)this.eraseLine(e);break;case 3:}},o.prototype.eraseInLine=function(t){switch(t[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}},o.prototype.charAttributes=function(t){if(1===t.length&&0===t[0])return void(this.curAttr=this.defAttr);for(var e,s=t.length,i=0,r=this.curAttr>>18,o=this.curAttr>>9&511,a=511&this.curAttr;i<s;i++)e=t[i],e>=30&&e<=37?o=e-30:e>=40&&e<=47?a=e-40:e>=90&&e<=97?(e+=8,o=e-90):e>=100&&e<=107?(e+=8,a=e-100):0===e?(r=this.defAttr>>18,o=this.defAttr>>9&511,a=511&this.defAttr):1===e?r|=1:4===e?r|=2:5===e?r|=4:7===e?r|=8:8===e?r|=16:22===e?r&=-2:24===e?r&=-3:25===e?r&=-5:27===e?r&=-9:28===e?r&=-17:39===e?o=this.defAttr>>9&511:49===e?a=511&this.defAttr:38===e?2===t[i+1]?(i+=2,o=u(255&t[i],255&t[i+1],255&t[i+2]),o===-1&&(o=511),i+=2):5===t[i+1]&&(i+=2,e=255&t[i],o=e):48===e?2===t[i+1]?(i+=2,a=u(255&t[i],255&t[i+1],255&t[i+2]),a===-1&&(a=511),i+=2):5===t[i+1]&&(i+=2,e=255&t[i],a=e):100===e?(o=this.defAttr>>9&511,a=511&this.defAttr):this.error("Unknown SGR attribute: %d.",e);this.curAttr=r<<18|o<<9|a},o.prototype.deviceStatus=function(t){if(this.prefix){if("?"===this.prefix)switch(t[0]){case 6:this.send("\e[?"+(this.y+1)+";"+(this.x+1)+"R");break;case 15:break;case 25:break;case 26:break;case 53:}}else switch(t[0]){case 5:this.send("\e[0n");break;case 6:this.send("\e["+(this.y+1)+";"+(this.x+1)+"R")}},o.prototype.insertChars=function(t){var e,s,i,r;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.x,r=[this.eraseAttr()," ",1];e--&&i<this.cols;)this.lines[s].splice(i++,0,r),this.lines[s].pop()},o.prototype.cursorNextLine=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1),this.x=0},o.prototype.cursorPrecedingLine=function(t){var e=t[0];e<1&&(e=1),this.y-=e,this.y<0&&(this.y=0),this.x=0},o.prototype.cursorCharAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1},o.prototype.insertLines=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.rows-1-this.scrollBottom,i=this.rows-1+this.ybase-i+1;e--;)this.lines.splice(s,0,this.blankLine(!0)),this.lines.splice(i,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},o.prototype.deleteLines=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.rows-1-this.scrollBottom,i=this.rows-1+this.ybase-i;e--;)this.lines.splice(i+1,0,this.blankLine(!0)),this.lines.splice(s,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},o.prototype.deleteChars=function(t){var e,s,i;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=[this.eraseAttr()," ",1];e--;)this.lines[s].splice(this.x,1),this.lines[s].push(i)},o.prototype.eraseChars=function(t){var e,s,i,r;for(e=t[0],e<1&&(e=1),s=this.y+this.ybase,i=this.x,r=[this.eraseAttr()," ",1];e--&&i<this.cols;)this.lines[s][i++]=r},o.prototype.charPosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.x=e-1,this.x>=this.cols&&(this.x=this.cols-1)},o.prototype.HPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},o.prototype.sendDeviceAttributes=function(t){t[0]>0||(this.prefix?">"===this.prefix&&(this.is("xterm")?this.send("\e[>0;276;0c"):this.is("rxvt-unicode")?this.send("\e[>85;95;0c"):this.is("linux")?this.send(t[0]+"c"):this.is("screen")&&this.send("\e[>83;40003;0c")):this.is("xterm")||this.is("rxvt-unicode")||this.is("screen")?this.send("\e[?1;2c"):this.is("linux")&&this.send("\e[?6c"))},o.prototype.linePosAbsolute=function(t){var e=t[0];e<1&&(e=1),this.y=e-1,this.y>=this.rows&&(this.y=this.rows-1)},o.prototype.VPositionRelative=function(t){var e=t[0];e<1&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},o.prototype.HVPosition=function(t){t[0]<1&&(t[0]=1),t[1]<1&&(t[1]=1),this.y=t[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=t[1]-1,this.x>=this.cols&&(this.x=this.cols-1)},o.prototype.setMode=function(t){if("object"!==("undefined"==typeof t?"undefined":y(t)))if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!0;break;case 2:this.setgCharset(0,o.charsets.US),this.setgCharset(1,o.charsets.US),this.setgCharset(2,o.charsets.US),this.setgCharset(3,o.charsets.US);break;case 3:this.savedCols=this.cols,this.resize(132,this.rows);break;case 6:this.originMode=!0;break;case 7:this.wraparoundMode=!0;break;case 12:break;case 66:this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=9===t,this.vt200Mouse=1e3===t,this.normalMouse=t>1e3,this.mouseEvents=!0,this.element.style.cursor="default",this.log("Binding to mouse events.");break;case 1004:this.sendFocus=!0;break;case 1005:this.utfMouse=!0;break;case 1006:this.sgrMouse=!0;break;case 1015:this.urxvtMouse=!0;break;case 25:this.cursorHidden=!1;break;case 1049:case 47:case 1047:if(!this.normal){var e={lines:this.lines,ybase:this.ybase,ydisp:this.ydisp,x:this.x,y:this.y,scrollTop:this.scrollTop,scrollBottom:this.scrollBottom,tabs:this.tabs};this.reset(),this.normal=e,this.showCursor()}}}else switch(t){case 4:this.insertMode=!0;break;case 20:}else for(var s=t.length,i=0;i<s;i++)this.setMode(t[i])},o.prototype.resetMode=function(t){if("object"!==("undefined"==typeof t?"undefined":y(t)))if(this.prefix){if("?"===this.prefix)switch(t){case 1:this.applicationCursor=!1;break;case 3:132===this.cols&&this.savedCols&&this.resize(this.savedCols,this.rows),delete this.savedCols;break;case 6:this.originMode=!1;break;case 7:this.wraparoundMode=!1;break;case 12:break;case 66:this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.viewport.syncScrollArea();break;case 9:case 1e3:case 1002:case 1003:this.x10Mouse=!1,this.vt200Mouse=!1,this.normalMouse=!1,this.mouseEvents=!1,this.element.style.cursor="";break;case 1004:this.sendFocus=!1;break;case 1005:this.utfMouse=!1;break;case 1006:this.sgrMouse=!1;break;case 1015:this.urxvtMouse=!1;break;case 25:this.cursorHidden=!0;break;case 1049:case 47:case 1047:this.normal&&(this.lines=this.normal.lines,this.ybase=this.normal.ybase,this.ydisp=this.normal.ydisp,this.x=this.normal.x,this.y=this.normal.y,this.scrollTop=this.normal.scrollTop,this.scrollBottom=this.normal.scrollBottom,this.tabs=this.normal.tabs,this.normal=null,this.refresh(0,this.rows-1),this.showCursor())}}else switch(t){case 4:this.insertMode=!1;break;case 20:}else for(var e=t.length,s=0;s<e;s++)this.resetMode(t[s])},o.prototype.setScrollRegion=function(t){this.prefix||(this.scrollTop=(t[0]||1)-1,this.scrollBottom=(t[1]||this.rows)-1,this.x=0,this.y=0)},o.prototype.saveCursor=function(t){this.savedX=this.x,this.savedY=this.y},o.prototype.restoreCursor=function(t){this.x=this.savedX||0,this.y=this.savedY||0},o.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.nextStop()},o.prototype.scrollUp=function(t){for(var e=t[0]||1;e--;)this.lines.splice(this.ybase+this.scrollTop,1),this.lines.splice(this.ybase+this.scrollBottom,0,this.blankLine());this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},o.prototype.scrollDown=function(t){for(var e=t[0]||1;e--;)this.lines.splice(this.ybase+this.scrollBottom,1),this.lines.splice(this.ybase+this.scrollTop,0,this.blankLine());this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)},o.prototype.initMouseTracking=function(t){},o.prototype.resetTitleModes=function(t){},o.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.prevStop()},o.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,s=this.lines[this.ybase+this.y],i=s[this.x-1]||[this.defAttr," ",1];e--;)s[this.x++]=i},o.prototype.tabClear=function(t){var e=t[0];e<=0?delete this.tabs[this.x]:3===e&&(this.tabs={})},o.prototype.mediaCopy=function(t){},o.prototype.setResources=function(t){},o.prototype.disableModifiers=function(t){},o.prototype.setPointerMode=function(t){},o.prototype.softReset=function(t){this.cursorHidden=!1,this.insertMode=!1,this.originMode=!1,this.wraparoundMode=!1,this.applicationKeypad=!1,this.viewport.syncScrollArea(),this.applicationCursor=!1,this.scrollTop=0,this.scrollBottom=this.rows-1,this.curAttr=this.defAttr,this.x=this.y=0,this.charset=null,this.glevel=0,this.charsets=[null]},o.prototype.requestAnsiMode=function(t){},o.prototype.requestPrivateMode=function(t){},o.prototype.setConformanceLevel=function(t){},o.prototype.loadLEDs=function(t){},o.prototype.setCursorStyle=function(t){},o.prototype.setCharProtectionAttr=function(t){},o.prototype.restorePrivateValues=function(t){},o.prototype.setAttrInRectangle=function(t){for(var e,s,i=t[0],r=t[1],o=t[2],a=t[3],n=t[4];i<o+1;i++)for(e=this.lines[this.ybase+i],s=r;s<a;s++)e[s]=[n,e[s][1]];this.updateRange(t[0]),this.updateRange(t[2])},o.prototype.fillRectangle=function(t){for(var e,s,i=t[0],r=t[1],o=t[2],a=t[3],n=t[4];r<a+1;r++)for(e=this.lines[this.ybase+r],s=o;s<n;s++)e[s]=[e[s][0],String.fromCharCode(i)];this.updateRange(t[1]),this.updateRange(t[3])},o.prototype.enableLocatorReporting=function(t){t[0]>0},o.prototype.eraseRectangle=function(t){var e,s,i,r=t[0],o=t[1],a=t[2],n=t[3];for(i=[this.eraseAttr()," ",1];r<a+1;r++)for(e=this.lines[this.ybase+r],s=o;s<n;s++)e[s]=i;this.updateRange(t[0]),this.updateRange(t[2])},o.prototype.insertColumns=function(){for(var t,e=params[0],s=this.ybase+this.rows,i=[this.eraseAttr()," ",1];e--;)for(t=this.ybase;t<s;t++)this.lines[t].splice(this.x+1,0,i),this.lines[t].pop();this.maxRange()},o.prototype.deleteColumns=function(){for(var t,e=params[0],s=this.ybase+this.rows,i=[this.eraseAttr()," ",1];e--;)for(t=this.ybase;t<s;t++)this.lines[t].splice(this.x,1),this.lines[t].push(i);this.maxRange()},o.charsets={},o.charsets.SCLD={"`":"◆",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:"≥","{":"π","|":"≠","}":"£","~":"·"},o.charsets.UK=null,o.charsets.US=null,o.charsets.Dutch=null,o.charsets.Finnish=null,o.charsets.French=null,o.charsets.FrenchCanadian=null,o.charsets.German=null,o.charsets.Italian=null,o.charsets.NorwegianDanish=null,o.charsets.Spanish=null,o.charsets.Swedish=null,o.charsets.Swiss=null,o.charsets.ISOLatin=null,u._cache={},u.distance=function(t,e,s,i,r,o){return Math.pow(30*(t-i),2)+Math.pow(59*(e-r),2)+Math.pow(11*(s-o),2)};var P=function(t){function e(t){var e,s=0,r=i.length-1;if(t<i[0][0]||t>i[r][1])return!1;for(;r>=s;)if(e=Math.floor((s+r)/2),t>i[e][1])s=e+1;else{if(!(t<i[e][0]))return!0;r=e-1}return!1}function s(s){return 0===s?t.nul:s<32||s>=127&&s<160?t.control:e(s)?0:1+(s>=4352&&(s<=4447||9001==s||9002==s||s>=11904&&s<=42191&&12351!=s||s>=44032&&s<=55203||s>=63744&&s<=64255||s>=65040&&s<=65049||s>=65072&&s<=65135||s>=65280&&s<=65376||s>=65504&&s<=65510||s>=131072&&s<=196605||s>=196608&&s<=262141))}var i=[[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 s}({nul:0,control:0});o.EventEmitter=b.EventEmitter,o.CompositionHelper=m.CompositionHelper,o.Viewport=k.Viewport,o.inherits=c,o.on=a,o.off=n,o.cancel=h,s.exports=o},{"./CompositionHelper.js":1,"./EventEmitter.js":2,"./Viewport.js":3,"./handlers/Clipboard.js":4,"./utils/Browser":5}]},{},[7])(7)});</script>
<script>!function(e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("../../dist/xterm")):"function"==typeof define?define(["../../dist/xterm"],e):e(window.Terminal)}(function(e){var t={};return t.proposeGeometry=function(e){var t,r,n,o,i,p=window.getComputedStyle(e.element.parentElement),s=parseInt(p.getPropertyValue("height")),a=parseInt(p.getPropertyValue("width")),d=window.getComputedStyle(e.element),l=parseInt(d.getPropertyValue("padding-top"))+parseInt(d.getPropertyValue("padding-bottom")),u=parseInt(d.getPropertyValue("padding-right"))+parseInt(d.getPropertyValue("padding-left")),y=s-l,f=a-u,g=(e.rowContainer,e.rowContainer.firstElementChild),m=g.innerHTML;return g.style.display="inline",g.innerHTML="W",n=g.getBoundingClientRect().width,g.style.display="",t=parseInt(g.offsetHeight),g.innerHTML=m,r=parseInt(y/t),o=parseInt(f/n)-1,i={cols:o,rows:r}},t.fit=function(e){var r=t.proposeGeometry(e);e.resize(r.cols,r.rows)},e.prototype.proposeGeometry=function(){return t.proposeGeometry(this)},e.prototype.fit=function(){return t.fit(this)},t});</script>
<body>
<div id="terminal-container"></div>
<script src="auth_token.js"></script>
- <script>!function(){var e,t,o=document.getElementById("terminal-container"),n="https:"==window.location.protocol,i=(n?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",a=["tty"],s=-1,c=function(){var n=new WebSocket(i,a);n.onopen=function(i){for("undefined"!=typeof tty_auth_token&&n.send(JSON.stringify({AuthToken:tty_auth_token})),t=setInterval(r,3e4,n),"undefined"!=typeof e&&e.destroy(),e=new Terminal,e.on("resize",function(t){n.readyState===WebSocket.OPEN&&n.send("2"+JSON.stringify({columns:t.cols,rows:t.rows})),setTimeout(function(){e.showOverlay(t.cols+"x"+t.rows)},500)}),e.on("data",function(e){n.readyState===WebSocket.OPEN&&n.send("0"+e)}),window.onresize=function(t){e.fit()};o.firstChild;)o.removeChild(o.firstChild);e.open(o),e.fit(),e.focus()},n.onmessage=function(t){var o=t.data.slice(1);switch(t.data[0]){case"0":e.write(decodeURIComponent(escape(window.atob(o))));break;case"1":break;case"2":document.title=o;break;case"3":var n=JSON.parse(o);Object.keys(n).forEach(function(t){console.log("Setting "+t+": "+n[t]),e.setOption(t,n[t])});break;case"4":s=JSON.parse(o),console.log("Enabling reconnect: "+s+" seconds")}},n.onclose=function(o){e&&(e.off("data"),e.off("resize"),e.showOverlay("Connection Closed",null)),clearInterval(t),s>0&&setTimeout(c,1e3*s)},n.onerror=function(e){var t=document.createElement("div");t.style.cssText=["color: red","background-color: white","font-size: x-large","opacity: 0.75","text-align: center","margin: 1em","padding: 0.2em","border: 0.1em dotted #ccc"].join(";"),t.textContent="Websocket handshake failed!",o.insertBefore(t,o.firstChild)}},r=function(e){e.send("1")};c()}();</script>
+ <script>!function(){var e,n,o,t=document.getElementById("terminal-container"),s="https:"==window.location.protocol,a=(s?"wss://":"ws://")+window.location.host+window.location.pathname+"ws",i=["tty"],c=-1,r=function(){var s=new WebSocket(a,i);s.onopen=function(a){for(o=!1,"undefined"!=typeof tty_auth_token&&s.send(JSON.stringify({AuthToken:tty_auth_token})),n=setInterval(l,3e4,s),"undefined"!=typeof e&&e.destroy(),e=new Terminal,e.on("resize",function(n){s.readyState===WebSocket.OPEN&&s.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){s.readyState===WebSocket.OPEN&&s.send("0"+e)}),window.onresize=function(n){e.fit()};t.firstChild;)t.removeChild(t.firstChild);e.open(t),e.fit(),e.focus()},s.onmessage=function(n){var o=n.data.slice(1);switch(n.data[0]){case"0":e.write(decodeURIComponent(escape(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":c=JSON.parse(o),console.log("Enabling reconnect: "+c+" seconds")}},s.onclose=function(t){e&&(e.off("data"),e.off("resize"),o||e.showOverlay("Connection Closed",null)),clearInterval(n),c>0&&setTimeout(r,1e3*c)},s.onerror=function(n){o=!0,e.showOverlay("Websocket handshake failed",null)}},l=function(e){e.send("1")};r()}();</script>
</body>
</html>
\ No newline at end of file