├── public ├── icon.icns ├── icon.png ├── credits.html ├── index.html ├── style.css └── jquery.js ├── .gitignore ├── scripts └── nwbuild.sh ├── package.json ├── README.md ├── src ├── charsets.js ├── events.js ├── utils.js ├── themes.js └── index.js ├── LICENSE ├── main.js └── Gruntfile.js /public/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/sh.js/master/public/icon.icns -------------------------------------------------------------------------------- /public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/coding/sh.js/master/public/icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | lib-cov 2 | *.seed 3 | *.csv 4 | *.dat 5 | *.out 6 | *.pid 7 | *.gz 8 | 9 | pids 10 | logs 11 | results 12 | 13 | npm-debug.log 14 | /node_modules/ 15 | /.tmp 16 | /apps 17 | /.idea/ 18 | -------------------------------------------------------------------------------- /scripts/nwbuild.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SCRIPTPATH=$(cd -P -- "$(dirname -- "$0")" && pwd -P) 4 | 5 | NW_VERSION=$1 6 | NW_VERSION=${NW_VERSION:=0.8.0} 7 | REBUILD_MODULES=("pty.js") 8 | 9 | echo $NW_VERSION 10 | function rebuild_module () { 11 | bash -c "cd $1 && $SCRIPTPATH/../node_modules/nw-gyp/bin/nw-gyp.js rebuild --target=$NW_VERSION" 12 | } 13 | 14 | for module in ${REBUILD_MODULES[@]}; do 15 | rebuild_module node_modules/$module 16 | done -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sh.js", 3 | "version": "1.2.28", 4 | "dependencies": { 5 | "east-asian-width": "^0.1.1" 6 | }, 7 | "devDependencies": { 8 | "socket.io": "0.9.16", 9 | "express": "3.4.8", 10 | "pty.js": "chjj/pty.js", 11 | "grunt": "~0.4.2", 12 | "browserify": "~3.30.2", 13 | "grunt-browserify": "~1.3.1", 14 | "grunt-exec": "0.4.5", 15 | "grunt-node-webkit-builder": "0.1.16", 16 | "grunt-contrib-copy": "0.5.0", 17 | "grunt-contrib-clean": "0.5.0", 18 | "grunt-contrib-uglify": "0.3.2", 19 | "nw-gyp": "0.12.2" 20 | }, 21 | "scripts": { 22 | "start": "node ./main.js" 23 | }, 24 | "node-main": "main.js", 25 | "main": "./src/index.js", 26 | "window": { 27 | "title": "sh.js", 28 | "icon": "public/icon.png", 29 | "toolbar": false, 30 | "width": 800, 31 | "height": 500, 32 | "position": "mouse" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sh.js 2 | > Terminal emulator in Javascript (for running in browser) 3 | 4 | There is a release as a desktop application using node-webkit. 5 | 6 | ### How to use it? 7 | 8 | ``` 9 | 10 |
11 | 12 | 13 | 14 | 15 | 33 | 34 | 35 | ``` -------------------------------------------------------------------------------- /src/charsets.js: -------------------------------------------------------------------------------- 1 | var charsets = {}; 2 | 3 | charsets.SCLD = { 4 | "`": "\u25c6", 5 | a: "\u2592", 6 | b: "\t", 7 | c: "\f", 8 | d: "\r", 9 | e: "\n", 10 | f: "\u00b0", 11 | g: "\u00b1", 12 | h: "\u2424", 13 | i: "\x0B", 14 | j: "\u2518", 15 | k: "\u2510", 16 | l: "\u250c", 17 | m: "\u2514", 18 | n: "\u253c", 19 | o: "\u23ba", 20 | p: "\u23bb", 21 | q: "\u2500", 22 | r: "\u23bc", 23 | s: "\u23bd", 24 | t: "\u251c", 25 | u: "\u2524", 26 | v: "\u2534", 27 | w: "\u252c", 28 | x: "\u2502", 29 | y: "\u2264", 30 | z: "\u2265", 31 | "{": "\u03c0", 32 | "|": "\u2260", 33 | "}": "\u00a3", 34 | "~": "\u00b7" 35 | }; 36 | charsets.UK = null; 37 | charsets.US = null; 38 | charsets.Dutch = null; 39 | charsets.Finnish = null; 40 | charsets.French = null; 41 | charsets.FrenchCanadian = null; 42 | charsets.German = null; 43 | charsets.Italian = null; 44 | charsets.NorwegianDanish = null; 45 | charsets.Spanish = null; 46 | charsets.Swedish = null; 47 | charsets.Swiss = null; 48 | charsets.ISOLatin = null; 49 | 50 | module.exports = charsets; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013-2014, FriendCode (https://friendco.de) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /public/credits.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 |
12 | E-mail: contact@friendco.de
13 | Website: www.codebox.io
14 |
18 | Copyright 2014 FriendCode Inc. 19 |
20 |21 | Licensed under the Apache License, Version 2.0 (the "License"); 22 | you may not use this file except in compliance with the License. 23 | You may obtain a copy of the License at 24 |
25 |http://www.apache.org/licenses/LICENSE-2.0
26 |27 | Unless required by applicable law or agreed to in writing, software 28 | distributed under the License is distributed on an "AS IS" BASIS, 29 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 30 | See the License for the specific language governing permissions and 31 | limitations under the License. 32 |
33 | 34 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | var pty = require('pty.js'); 2 | var io = require('socket.io'), 3 | express = require('express'), 4 | http = require('http'); 5 | 6 | var btoa = function(s) { 7 | return (new Buffer(s)).toString('base64'); 8 | }; 9 | 10 | var atob = function(s) { 11 | return (new Buffer(s, 'base64')).toString('binary'); 12 | }; 13 | 14 | var app = express(); 15 | 16 | app.use(express.cookieParser()); 17 | app.use(express.static(__dirname + '/public')); 18 | app.use(express.static(__dirname + '/build')); 19 | 20 | var server = http.createServer(app); 21 | var sio = io.listen(server); 22 | 23 | sio.sockets.on('connection', function (socket) { 24 | console.log('A socket connected!'); 25 | 26 | var term = pty.spawn('bash', [], { 27 | name: 'xterm-color', 28 | cols: 80, 29 | rows: 30, 30 | cwd: "./", 31 | env: process.env 32 | }); 33 | 34 | term.on('data', function(data) { 35 | socket.emit('output', btoa(data)); 36 | }); 37 | 38 | socket.on('input', function (data) { 39 | term.write(atob(data)); 40 | }); 41 | 42 | socket.on('resize', function (data) { 43 | term.resize(data.w, data.h); 44 | }); 45 | }); 46 | 47 | var port = 5000; 48 | var host = "0.0.0.0"; 49 | 50 | server.listen(port, host, function() { 51 | console.log("Listening on %s:%d in %s mode", host, port, app.settings.env); 52 | }); -------------------------------------------------------------------------------- /src/events.js: -------------------------------------------------------------------------------- 1 | function EventEmitter() { 2 | this._events = this._events || {} 3 | } 4 | 5 | EventEmitter.prototype.addListener = function (a, c) { 6 | this._events[a] = this._events[a] || []; 7 | this._events[a].push(c) 8 | }; 9 | 10 | EventEmitter.prototype.removeListener = function (a, c) { 11 | if (this._events[a]) 12 | for (var k = this._events[a], f = k.length; f--;) 13 | if (k[f] === c || k[f].listener === c) { 14 | k.splice(f, 1); 15 | break 16 | } 17 | }; 18 | 19 | EventEmitter.prototype.on = EventEmitter.prototype.addListener; 20 | EventEmitter.prototype.off = EventEmitter.prototype.removeListener; 21 | 22 | 23 | EventEmitter.prototype.removeAllListeners = function (a) { 24 | this._events[a] && delete this._events[a] 25 | }; 26 | 27 | EventEmitter.prototype.once = function (a, c) { 28 | function k() { 29 | var f = Array.prototype.slice.call(arguments); 30 | this.removeListener(a, k); 31 | return c.apply(this, f) 32 | } 33 | k.listener = c; 34 | return this.on(a, k) 35 | }; 36 | 37 | EventEmitter.prototype.emit = function (a) { 38 | if (this._events[a]) 39 | for (var c = Array.prototype.slice.call(arguments, 1), k = this._events[a], f = k.length, v = 0; v < f; v++) k[v].apply(this, c) 40 | }; 41 | 42 | EventEmitter.prototype.listeners = function (a) { 43 | return this._events[a] = this._events[a] || [] 44 | }; 45 | 46 | function on(a, c, k, f) { 47 | a.addEventListener(c, k, f || !1) 48 | } 49 | 50 | function off(a, c, k, f) { 51 | a.removeEventListener(c, k, f || !1) 52 | } 53 | 54 | function cancel(e) { 55 | e.preventDefault(); 56 | e.stopPropagation && e.stopPropagation(); 57 | e.cancelBubble = !0; 58 | return !1 59 | } 60 | 61 | module.exports= { 62 | 'EventEmitter': EventEmitter, 63 | 'on': on, 64 | 'off': off, 65 | 'cancel': cancel 66 | }; -------------------------------------------------------------------------------- /src/utils.js: -------------------------------------------------------------------------------- 1 | function inherits(a, c) { 2 | function k() { 3 | this.constructor = a 4 | } 5 | k.prototype = c.prototype; 6 | a.prototype = new k 7 | } 8 | 9 | function isVisible(el) { 10 | var eap, 11 | rect = el.getBoundingClientRect(), 12 | docEl = document.documentElement, 13 | vWidth = window.innerWidth || docEl.clientWidth, 14 | vHeight = window.innerHeight || docEl.clientHeight, 15 | efp = function (x, y) { return document.elementFromPoint(x, y) }, 16 | contains = "contains" in el ? "contains" : "compareDocumentPosition", 17 | has = contains == "contains" ? 1 : 0x10; 18 | 19 | // Return false if it's not in the viewport 20 | if (rect.right < 0 || rect.bottom < 0 21 | || rect.left > vWidth || rect.top > vHeight) 22 | return false; 23 | 24 | // Return true if any of its four corners are visible 25 | return ( 26 | (eap = efp(rect.left + 1, rect.top + 1)) == el || el[contains](eap) == has 27 | || (eap = efp(rect.right - 1, rect.top + 1)) == el || el[contains](eap) == has 28 | || (eap = efp(rect.right - 1, rect.bottom - 1)) == el || el[contains](eap) == has 29 | || (eap = efp(rect.left + 1, rect.bottom - 1)) == el || el[contains](eap) == has 30 | ); 31 | } 32 | 33 | function getSelection() { 34 | var html = ""; 35 | if (typeof window.getSelection != "undefined") { 36 | return window.getSelection().toString(); 37 | } else if (typeof document.selection != "undefined") { 38 | if (document.selection.type == "Text") { 39 | return document.selection.createRange().htmlText; 40 | } 41 | } 42 | return null; 43 | } 44 | 45 | function isBoldBroken() { 46 | var a = document.createElement("span"); 47 | a.innerHTML = 48 | "hello world"; 49 | document.body.appendChild(a); 50 | var c = a.scrollWidth; 51 | a.style.fontWeight = "bold"; 52 | var k = a.scrollWidth; 53 | document.body.removeChild(a); 54 | return c !== k 55 | } 56 | 57 | module.exports = { 58 | 'inherits': inherits, 59 | 'isBoldBroken': isBoldBroken, 60 | 'isVisible': isVisible, 61 | 'getSelection': getSelection 62 | }; -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function (grunt) { 2 | var path = require("path"); 3 | 4 | var NW_VERSION = "0.8.4"; 5 | 6 | // Load NPM tasks 7 | grunt.loadNpmTasks('grunt-browserify'); 8 | grunt.loadNpmTasks('grunt-exec'); 9 | grunt.loadNpmTasks('grunt-node-webkit-builder'); 10 | grunt.loadNpmTasks('grunt-contrib-clean'); 11 | grunt.loadNpmTasks('grunt-contrib-copy'); 12 | grunt.loadNpmTasks('grunt-contrib-uglify'); 13 | 14 | // Init GRUNT configuraton 15 | grunt.initConfig({ 16 | pkg: grunt.file.readJSON('package.json'), 17 | 18 | browserify: { 19 | dist: { 20 | src: 'src/index.js', 21 | dest: 'build/sh.js', 22 | options: { 23 | standalone: "Terminal" 24 | } 25 | } 26 | }, 27 | 28 | uglify: { 29 | options: { 30 | mangle: false 31 | }, 32 | dist: { 33 | files: { 34 | 'build/sh.min.js': ['build/sh.js'] 35 | } 36 | } 37 | }, 38 | 39 | exec: { 40 | nwbuild: { 41 | command: "./scripts/nwbuild.sh "+NW_VERSION, 42 | cwd: '.tmp/', 43 | stdout: true, 44 | stderr: true 45 | } 46 | }, 47 | 48 | nodewebkit: { 49 | mac: { 50 | options: { 51 | build_dir: './apps', 52 | mac: true, 53 | win: false, 54 | linux32: false, 55 | linux64: false, 56 | mac_icns: "./public/icon.icns", 57 | credits: "./public/credits.html", 58 | version: NW_VERSION, 59 | zip: false 60 | }, 61 | src: [ 62 | ".tmp/**", 63 | 64 | // Don't want useless node_modules in app 65 | "!./node_modules/nw-gyp/**", 66 | ] 67 | } 68 | }, 69 | 70 | copy: { 71 | // Copy most files over 72 | tmp: { 73 | expand: true, 74 | dot: false, 75 | cwd: './', 76 | dest: '.tmp/', 77 | src: [ 78 | // Most files except the ones below 79 | "./**", 80 | 81 | // Ignore gitignore 82 | "!.gitignore", 83 | 84 | // Ignore dev related things 85 | "!./.tmp/**", 86 | "!./.git/**", 87 | 88 | // App builds 89 | "!./apps/**", 90 | 91 | // Ignore some build time only modules 92 | "./node_modules/.bin/**", 93 | "!./node_modules/grunt/**", 94 | "!./node_modules/grunt-*/**", 95 | "!./node_modules/browserify/**", 96 | 97 | // Exclude test directories from node modules 98 | "!./node_modules/**/test/**", 99 | ], 100 | 101 | // Preserve permissions 102 | options: { 103 | mode: true 104 | } 105 | } 106 | }, 107 | clean: { 108 | tmp: ['.tmp/'] 109 | } 110 | }); 111 | 112 | // Build 113 | grunt.registerTask('build', [ 114 | 'browserify', 115 | 'uglify' 116 | ]); 117 | 118 | // Build app 119 | grunt.registerTask('build-app', [ 120 | 'build', 121 | 'copy:tmp', 122 | 'exec:nwbuild', 123 | 'nodewebkit:mac', 124 | 'clean:tmp' 125 | ]); 126 | 127 | 128 | 129 | grunt.registerTask('default', [ 130 | 'build' 131 | ]); 132 | }; -------------------------------------------------------------------------------- /public/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0px; 3 | padding: 0px; 4 | box-sizing: border-box; 5 | user-select: none; 6 | -webkit-user-select: none; 7 | } 8 | 9 | body { 10 | font-family: "Lucida Grande", "Lucida Sans Unicode", sans-serif; 11 | } 12 | 13 | /* Tabs */ 14 | .tabs-header { 15 | position: fixed; 16 | top: 0px; 17 | left: 0px; 18 | right: 0px; 19 | height: 25px; 20 | background: #e9e9e9; 21 | background: -moz-linear-gradient(top, #e9e9e9 0%, #bbbabb 100%); 22 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e9e9e9), color-stop(100%,#bbbabb)); 23 | border-bottom: 1px solid #444444; 24 | box-shadow: 0px 0px 10px #141414; 25 | } 26 | 27 | .tabs-header .tab { 28 | display: inline-block; 29 | height: 100%; 30 | padding: 0px 10px; 31 | line-height: 24px; 32 | cursor: default; 33 | font-size: 12px; 34 | } 35 | 36 | .tabs-header .tab.active { 37 | color: #fff; 38 | background: #7793f5; 39 | background: -moz-linear-gradient(top, #7793f5 0%, #406df2 50%, #275af1 100%); 40 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#7793f5), color-stop(50%,#406df2), color-stop(100%,#275af1)); 41 | } 42 | 43 | .tabs-content { 44 | position: fixed; 45 | top: 25px; 46 | left: 0px; 47 | right: 0px; 48 | bottom: 0px; 49 | background: #000; 50 | padding: 3px; 51 | } 52 | 53 | .tabs-content .tab-content { 54 | width: 100%; 55 | height: 100%; 56 | display: none; 57 | } 58 | 59 | .tabs-content .tab-content.active { 60 | display: block; 61 | } 62 | 63 | /* Terminal */ 64 | .terminal-container { 65 | position: relative; 66 | width: 100%; 67 | height: 100%; 68 | font-family: Menlo,Monaco,"DejaVu Sans Mono",Consolas,"Andale Mono",monospace; 69 | } 70 | .terminal-container div { 71 | margin: 0px; 72 | padding: 0px; 73 | user-select: initial; 74 | -webkit-user-select: initial; 75 | } 76 | .terminal-container .terminal { 77 | width: 100%; 78 | height: 100%; 79 | font-size: 13px; 80 | line-height: 18px; 81 | } 82 | .terminal-container .terminal i.terminal_cjk { 83 | display: inline-block; 84 | font-style: normal; 85 | text-align: center; 86 | } 87 | .terminal-container .terminal-input { 88 | position: absolute; 89 | top: 0; 90 | left: -1000%; 91 | background: rgba(255,255,255,0.75); 92 | color: black; 93 | border: 0; 94 | outline: 0; 95 | width: 100%; 96 | } 97 | .terminal-container .terminal-screen-keys { 98 | position: absolute; 99 | top: 0; 100 | right: 0; 101 | } 102 | .terminal-container .terminal-screen-keys button { 103 | background: -webkit-linear-gradient(top, #eeeef0, #d3d3d9); 104 | border: 1px solid #58575e; 105 | box-shadow: 0 2px 2px rgba(0,0,0,0.25), inset 0 -2px 0 rgba(0,0,0,0.25), inset 0 1px 0 #fff; 106 | border: 1px solid #000; 107 | border-radius: 2px; 108 | padding: 8px; 109 | font-size: 14px; 110 | text-shadow: 0 1px 0 #fff; 111 | } 112 | .terminal-container .terminal-screen-keys button:focus, .terminal-container .terminal-screen-keys button.active { 113 | outline: 0px; 114 | background: -webkit-linear-gradient(top, #ccccd0, #a3a3a9); 115 | } 116 | .terminal-container .terminal-size-indicator { 117 | position: absolute; 118 | bottom: 0; 119 | left: 0; 120 | background-color: rgba(255,255,255,0.75); 121 | color: black; 122 | padding: 0 3px; 123 | } 124 | 125 | .terminal-container .term_scrollbar { 126 | position: absolute; 127 | right: 0; 128 | bottom: 0; 129 | top: 0; 130 | width: 13px; 131 | z-index: 6; 132 | } 133 | 134 | .terminal-container .term_scrollbar-v { 135 | overflow-x: hidden; 136 | overflow-y: scroll; 137 | top: 0; 138 | cursor: default; 139 | } 140 | 141 | .terminal-container .term_scrollbar-inner { 142 | position: absolute; 143 | left: 0; 144 | top: 0; 145 | width: 13px; 146 | } -------------------------------------------------------------------------------- /src/themes.js: -------------------------------------------------------------------------------- 1 | var TANGO_COLORS = [ 2 | // dark: 3 | '#2e3436', 4 | '#cc0000', 5 | '#4e9a06', 6 | '#c4a000', 7 | '#3465a4', 8 | '#75507b', 9 | '#06989a', 10 | '#d3d7cf', 11 | // bright: 12 | '#555753', 13 | '#ef2929', 14 | '#8ae234', 15 | '#fce94f', 16 | '#729fcf', 17 | '#ad7fa8', 18 | '#34e2e2', 19 | '#eeeeec' 20 | ]; 21 | 22 | var initColors = function (colors) { 23 | function out(a, c, f) { 24 | y.push("#" + hex(a) + hex(c) + hex(f)) 25 | } 26 | 27 | function hex(a) { 28 | a = a.toString(16); 29 | return 2 > a.length ? "0" + a : a 30 | } 31 | var y = colors, 32 | f = [0, 95, 135, 175, 215, 255], 33 | v; 34 | 35 | for (v = 0; 216 > v; v++) out(f[v / 36 % 6 | 0], f[v / 6 % 6 | 0], f[v % 6]); 36 | 37 | for (v = 0; 24 > v; v++) f = 8 + 10 * v, out(f, f, f); 38 | 39 | return y; 40 | }; 41 | 42 | // Our default colors to merge with all others 43 | var DEFAULT_COLORS = initColors(TANGO_COLORS.slice()); 44 | 45 | // Merge a theme's colors with our base Tango colors 46 | var mergeColors = function (themeColors, defaultColors) { 47 | if (themeColors.length === 8) { 48 | themeColors = themeColors.concat(defaultColors.slice(8)); 49 | } else if (themeColors.length === 16) { 50 | themeColors = themeColors.concat(defaultColors.slice(16)); 51 | } else if (themeColors.length === 10) { 52 | themeColors = themeColors.slice(0, -2).concat( 53 | defaultColors.slice(8, -2), themeColors.slice(-2)); 54 | } else if (themeColors.length === 18) { 55 | themeColors = themeColors.concat( 56 | defaultColors.slice(16, -2), themeColors.slice(-2)); 57 | } 58 | return themeColors; 59 | } 60 | 61 | // Return colors for a theme 62 | var colors = function(theme) { 63 | // Copy pallette 64 | var colors = theme.palette.slice(); 65 | 66 | // Set background and forground colors if available 67 | colors[256] = theme.background || "#000000"; 68 | colors[257] = theme.foreground || "#f0f0f0"; 69 | 70 | return mergeColors(colors, DEFAULT_COLORS); 71 | }; 72 | 73 | var defaults = { 74 | "default":{ 75 | "palette": [ 76 | "#000000", 77 | "#c81908", 78 | "#00c01d", 79 | "#c8c221", 80 | "#0033c5", 81 | "#c73ac5", 82 | "#00c6c7", 83 | "#c7c7c7", 84 | "#686868", 85 | "#8a8a8a", 86 | "#67f86e", 87 | "#fff970", 88 | "#6678fc", 89 | "#ff7cfd", 90 | "#65fdff", 91 | "#ffffff" 92 | ] 93 | }, 94 | "blazer":{ 95 | "palette":[ 96 | "#262626", 97 | "#dbbdbd", 98 | "#bddbbd", 99 | "#dbdbbd", 100 | "#bdbddb", 101 | "#dbbddb", 102 | "#bddbdb", 103 | "#ffffff" 104 | ], 105 | "name":"blazer" 106 | }, 107 | "chalkboard":{ 108 | "foreground":"#d9e6f2", 109 | "background":"#29262f", 110 | "cursor":"#d9e6f2", 111 | "cursor_text":"#29262f", 112 | "palette":[ 113 | "#000000", 114 | "#c37372", 115 | "#72c373", 116 | "#c2c372", 117 | "#7372c3", 118 | "#c372c2", 119 | "#72c2c3", 120 | "#d9d9d9", 121 | "#323232", 122 | "#dbaaaa", 123 | "#aadbaa", 124 | "#dadbaa", 125 | "#aaaadb", 126 | "#dbaada", 127 | "#aadadb", 128 | "#ffffff" 129 | ], 130 | "name":"chalkboard" 131 | }, 132 | "dark_pastel":{ 133 | "foreground":"#ffffff", 134 | "background":"#000000", 135 | "cursor":"#bbbbbb", 136 | "cursor_text":"#ffffff", 137 | "palette":[ 138 | "#000000", 139 | "#ff5555", 140 | "#55ff55", 141 | "#ffff55", 142 | "#5555ff", 143 | "#ff55ff", 144 | "#55ffff", 145 | "#bbbbbb", 146 | "#555555", 147 | "#ff5555", 148 | "#55ff55", 149 | "#ffff55", 150 | "#5555ff", 151 | "#ff55ff", 152 | "#55ffff", 153 | "#ffffff" 154 | ], 155 | "name":"dark_pastel" 156 | }, 157 | "desert":{ 158 | "foreground":"#ffffff", 159 | "background":"#333333", 160 | "cursor":"#00ff00", 161 | "cursor_text":"#000000", 162 | "palette":[ 163 | "#4d4d4d", 164 | "#ff2b2b", 165 | "#98fb98", 166 | "#f0e68c", 167 | "#cd853f", 168 | "#ffdead", 169 | "#ffa0a0", 170 | "#f5deb3", 171 | "#555555", 172 | "#ff5555", 173 | "#55ff55", 174 | "#ffff55", 175 | "#87ceff", 176 | "#ff55ff", 177 | "#ffd700", 178 | "#ffffff" 179 | ], 180 | "name":"desert" 181 | }, 182 | "espresso":{ 183 | "foreground":"#ffffff", 184 | "background":"#323232", 185 | "cursor":"#d6d6d6", 186 | "cursor_text":"#ffffff", 187 | "palette":[ 188 | "#343434", 189 | "#d25151", 190 | "#a5c261", 191 | "#ffc66d", 192 | "#6c99bb", 193 | "#d197d9", 194 | "#bed6ff", 195 | "#eeeeec", 196 | "#535353", 197 | "#f00c0c", 198 | "#c2e075", 199 | "#e1e38b", 200 | "#8ab7d9", 201 | "#efb5f7", 202 | "#dcf3ff", 203 | "#ffffff" 204 | ], 205 | "name":"espresso" 206 | }, 207 | "github":{ 208 | "foreground":"#3e3e3e", 209 | "background":"#f4f4f4", 210 | "cursor":"#3f3f3f", 211 | "cursor_text":"#f4f4f4", 212 | "palette":[ 213 | "#3e3e3e", 214 | "#970b16", 215 | "#07962a", 216 | "#f8eec7", 217 | "#003e8a", 218 | "#e94691", 219 | "#89d1ec", 220 | "#ffffff", 221 | "#666666", 222 | "#de0000", 223 | "#87d5a2", 224 | "#f1d007", 225 | "#2e6cba", 226 | "#ffa29f", 227 | "#1cfafe", 228 | "#ffffff" 229 | ], 230 | "name":"github" 231 | }, 232 | "grass":{ 233 | "foreground":"#fff0a5", 234 | "background":"#13773c", 235 | "cursor":"#8c2800", 236 | "cursor_text":"#ffffff", 237 | "palette":[ 238 | "#000000", 239 | "#bb0000", 240 | "#00bb00", 241 | "#e7b000", 242 | "#0000a3", 243 | "#950061", 244 | "#00bbbb", 245 | "#bbbbbb", 246 | "#555555", 247 | "#bb0000", 248 | "#00bb00", 249 | "#e7b000", 250 | "#0000bb", 251 | "#ff55ff", 252 | "#55ffff", 253 | "#ffffff" 254 | ], 255 | "name":"grass" 256 | }, 257 | "homebrew":{ 258 | "foreground":"#00ff00", 259 | "background":"#000000", 260 | "cursor":"#23ff18", 261 | "cursor_text":"#ff0017", 262 | "palette":[ 263 | "#000000", 264 | "#990000", 265 | "#00a600", 266 | "#999900", 267 | "#0000b2", 268 | "#b200b2", 269 | "#00a6b2", 270 | "#bfbfbf", 271 | "#666666", 272 | "#e50000", 273 | "#00d900", 274 | "#e5e500", 275 | "#0000ff", 276 | "#e500e5", 277 | "#00e5e5", 278 | "#e5e5e5" 279 | ], 280 | "name":"homebrew" 281 | }, 282 | "hurtado":{ 283 | "foreground":"#dadbda", 284 | "background":"#000000", 285 | "cursor":"#bbbbbb", 286 | "cursor_text":"#ffffff", 287 | "palette":[ 288 | "#575757", 289 | "#ff1b00", 290 | "#a5df55", 291 | "#fbe74a", 292 | "#486387", 293 | "#fc5ef0", 294 | "#85e9fe", 295 | "#cbcbcb", 296 | "#252525", 297 | "#d41c00", 298 | "#a5df55", 299 | "#fbe749", 300 | "#89bdff", 301 | "#bf00c0", 302 | "#85e9fe", 303 | "#dbdbdb" 304 | ], 305 | "name":"hurtado" 306 | }, 307 | "idletoes":{ 308 | "foreground":"#ffffff", 309 | "background":"#323232", 310 | "cursor":"#d6d6d6", 311 | "cursor_text":"#000000", 312 | "palette":[ 313 | "#323232", 314 | "#d25252", 315 | "#7fe173", 316 | "#ffc66d", 317 | "#4098ff", 318 | "#f57fff", 319 | "#bed6ff", 320 | "#eeeeec", 321 | "#535353", 322 | "#f07070", 323 | "#9dff90", 324 | "#ffe48b", 325 | "#5eb7f7", 326 | "#ff9dff", 327 | "#dcf4ff", 328 | "#ffffff" 329 | ], 330 | "name":"idletoes" 331 | }, 332 | "kibble":{ 333 | "foreground":"#f7f7f7", 334 | "background":"#0e100a", 335 | "cursor":"#9fda9c", 336 | "cursor_text":"#000000", 337 | "palette":[ 338 | "#4d4d4d", 339 | "#c70031", 340 | "#29cf13", 341 | "#d8e30e", 342 | "#3449d1", 343 | "#8400ff", 344 | "#0798ab", 345 | "#e2d1e3", 346 | "#5a5a5a", 347 | "#f01578", 348 | "#6ce05c", 349 | "#f3f79e", 350 | "#97a4f7", 351 | "#c495f0", 352 | "#68f2e0", 353 | "#ffffff" 354 | ], 355 | "name":"kibble" 356 | }, 357 | "man_page":{ 358 | "foreground":"#000000", 359 | "background":"#fef49c", 360 | "cursor":"#7f7f7f", 361 | "cursor_text":"#000000", 362 | "palette":[ 363 | "#000000", 364 | "#cc0000", 365 | "#00a600", 366 | "#999900", 367 | "#0000b2", 368 | "#b200b2", 369 | "#00a6b2", 370 | "#cccccc", 371 | "#666666", 372 | "#e50000", 373 | "#00d900", 374 | "#e5e500", 375 | "#0000ff", 376 | "#e500e5", 377 | "#00e5e5", 378 | "#e5e5e5" 379 | ], 380 | "name":"man_page" 381 | }, 382 | "monokai_soda":{ 383 | "foreground":"#c4c4b5", 384 | "background":"#191919", 385 | "cursor":"#f6f6ec", 386 | "cursor_text":"#c4c4b5", 387 | "palette":[ 388 | "#191919", 389 | "#f3005f", 390 | "#97e023", 391 | "#fa8419", 392 | "#9c64fe", 393 | "#f3005f", 394 | "#57d1ea", 395 | "#c4c4b5", 396 | "#615e4b", 397 | "#f3005f", 398 | "#97e023", 399 | "#dfd561", 400 | "#9c64fe", 401 | "#f3005f", 402 | "#57d1ea", 403 | "#f6f6ee" 404 | ], 405 | "name":"monokai_soda" 406 | }, 407 | "neopolitan":{ 408 | "foreground":"#ffffff", 409 | "background":"#17130f", 410 | "cursor":"#ffffff", 411 | "cursor_text":"#ffffff", 412 | "palette":[ 413 | "#17130f", 414 | "#800000", 415 | "#61ce3c", 416 | "#fbde2d", 417 | "#253b76", 418 | "#ff0080", 419 | "#8da6ce", 420 | "#f8f8f8", 421 | "#17130f", 422 | "#800000", 423 | "#61ce3c", 424 | "#fbde2d", 425 | "#253b76", 426 | "#ff0080", 427 | "#8da6ce", 428 | "#f8f8f8" 429 | ], 430 | "name":"neopolitan" 431 | }, 432 | "novel":{ 433 | "foreground":"#3b2322", 434 | "background":"#dfdbc3", 435 | "cursor":"#73635a", 436 | "cursor_text":"#000000", 437 | "palette":[ 438 | "#000000", 439 | "#cc0000", 440 | "#009600", 441 | "#d06b00", 442 | "#0000cc", 443 | "#cc00cc", 444 | "#0087cc", 445 | "#cccccc", 446 | "#7f7f7f", 447 | "#cc0000", 448 | "#009600", 449 | "#d06b00", 450 | "#0000cc", 451 | "#cc00cc", 452 | "#0086cb", 453 | "#ffffff" 454 | ], 455 | "name":"novel" 456 | }, 457 | "ocean":{ 458 | "foreground":"#ffffff", 459 | "background":"#224fbc", 460 | "cursor":"#7f7f7f", 461 | "cursor_text":"#ffffff", 462 | "palette":[ 463 | "#000000", 464 | "#990000", 465 | "#00a600", 466 | "#999900", 467 | "#0000b2", 468 | "#b200b2", 469 | "#00a6b2", 470 | "#bfbfbf", 471 | "#666666", 472 | "#e50000", 473 | "#00d900", 474 | "#e5e500", 475 | "#0000ff", 476 | "#e500e5", 477 | "#00e5e5", 478 | "#e5e5e5" 479 | ], 480 | "name":"ocean" 481 | }, 482 | "pro":{ 483 | "foreground":"#f2f2f2", 484 | "background":"#000000", 485 | "cursor":"#4d4d4d", 486 | "cursor_text":"#ffffff", 487 | "palette":[ 488 | "#000000", 489 | "#990000", 490 | "#00a600", 491 | "#999900", 492 | "#1f08db", 493 | "#b200b2", 494 | "#00a6b2", 495 | "#bfbfbf", 496 | "#666666", 497 | "#e50000", 498 | "#00d900", 499 | "#e5e500", 500 | "#0000ff", 501 | "#e500e5", 502 | "#00e5e5", 503 | "#e5e5e5" 504 | ], 505 | "name":"pro" 506 | }, 507 | "red_sands":{ 508 | "foreground":"#d7c9a7", 509 | "background":"#79241e", 510 | "cursor":"#ffffff", 511 | "cursor_text":"#000000", 512 | "palette":[ 513 | "#000000", 514 | "#ff3f00", 515 | "#00bb00", 516 | "#e7b000", 517 | "#0071ff", 518 | "#bb00bb", 519 | "#00bbbb", 520 | "#bbbbbb", 521 | "#555555", 522 | "#bb0000", 523 | "#00bb00", 524 | "#e7b000", 525 | "#0071ae", 526 | "#ff55ff", 527 | "#55ffff", 528 | "#ffffff" 529 | ], 530 | "name":"red_sands" 531 | }, 532 | "seafoam_pastel":{ 533 | "foreground":"#d3e7d3", 534 | "background":"#243434", 535 | "cursor":"#576479", 536 | "cursor_text":"#323232", 537 | "palette":[ 538 | "#757575", 539 | "#825d4d", 540 | "#718c61", 541 | "#ada16d", 542 | "#4d7b82", 543 | "#8a7167", 544 | "#719393", 545 | "#e0e0e0", 546 | "#8a8a8a", 547 | "#cf9379", 548 | "#98d9aa", 549 | "#fae79d", 550 | "#79c3cf", 551 | "#d6b2a1", 552 | "#ade0e0", 553 | "#e0e0e0" 554 | ], 555 | "name":"seafoam_pastel" 556 | }, 557 | "solarized_darcula":{ 558 | "foreground":"#d2d8d9", 559 | "background":"#3d3f41", 560 | "cursor":"#708183", 561 | "cursor_text":"#002731", 562 | "palette":[ 563 | "#25292a", 564 | "#f24840", 565 | "#629655", 566 | "#b68800", 567 | "#2075c7", 568 | "#797fd4", 569 | "#15968d", 570 | "#d2d8d9", 571 | "#25292a", 572 | "#f24840", 573 | "#629655", 574 | "#b68800", 575 | "#2075c7", 576 | "#797fd4", 577 | "#15968d", 578 | "#d2d8d9" 579 | ], 580 | "name":"solarized_darcula" 581 | }, 582 | "solarized_dark":{ 583 | "foreground":"#708183", 584 | "background":"#001e26", 585 | "cursor":"#708183", 586 | "cursor_text":"#002731", 587 | "palette":[ 588 | "#002731", 589 | "#d01b24", 590 | "#728905", 591 | "#a57705", 592 | "#2075c7", 593 | "#c61b6e", 594 | "#259185", 595 | "#e9e2cb", 596 | "#001e26", 597 | "#bd3612", 598 | "#465a61", 599 | "#52676f", 600 | "#708183", 601 | "#5856b9", 602 | "#81908f", 603 | "#fcf4dc" 604 | ], 605 | "name":"solarized_dark" 606 | }, 607 | "solarized_light":{ 608 | "foreground":"#52676f", 609 | "background":"#fcf4dc", 610 | "cursor":"#52676f", 611 | "cursor_text":"#e9e2cb", 612 | "palette":[ 613 | "#002731", 614 | "#d01b24", 615 | "#728905", 616 | "#a57705", 617 | "#2075c7", 618 | "#c61b6e", 619 | "#259185", 620 | "#e9e2cb", 621 | "#001e26", 622 | "#bd3612", 623 | "#465a61", 624 | "#52676f", 625 | "#708183", 626 | "#5856b9", 627 | "#81908f", 628 | "#fcf4dc" 629 | ], 630 | "name":"solarized_light" 631 | }, 632 | "symfonic":{ 633 | "foreground":"#ffffff", 634 | "background":"#000000", 635 | "cursor":"#dc322f", 636 | "cursor_text":"#ffffff", 637 | "palette":[ 638 | "#000000", 639 | "#dc322f", 640 | "#56db3a", 641 | "#ff8400", 642 | "#0084d4", 643 | "#b729d9", 644 | "#ccccff", 645 | "#ffffff", 646 | "#1b1d21", 647 | "#dc322f", 648 | "#56db3a", 649 | "#ff8400", 650 | "#0084d4", 651 | "#b729d9", 652 | "#ccccff", 653 | "#ffffff" 654 | ], 655 | "name":"symfonic" 656 | }, 657 | "terminal_basic":{ 658 | "foreground":"#000000", 659 | "background":"#ffffff", 660 | "cursor":"#7f7f7f", 661 | "cursor_text":"#000000", 662 | "palette":[ 663 | "#000000", 664 | "#990000", 665 | "#00a600", 666 | "#999900", 667 | "#0000b2", 668 | "#b200b2", 669 | "#00a6b2", 670 | "#bfbfbf", 671 | "#666666", 672 | "#e50000", 673 | "#00d900", 674 | "#e5e500", 675 | "#0000ff", 676 | "#e500e5", 677 | "#00e5e5", 678 | "#e5e5e5" 679 | ], 680 | "name":"terminal_basic" 681 | }, 682 | "vaughn":{ 683 | "foreground":"#dcdccc", 684 | "background":"#25234e", 685 | "cursor":"#ff5555", 686 | "cursor_text":"#ffffff", 687 | "palette":[ 688 | "#24234f", 689 | "#705050", 690 | "#60b48a", 691 | "#dfaf8f", 692 | "#5555ff", 693 | "#f08cc3", 694 | "#8cd0d3", 695 | "#709080", 696 | "#709080", 697 | "#dca3a3", 698 | "#60b48a", 699 | "#f0dfaf", 700 | "#5555ff", 701 | "#ec93d3", 702 | "#93e0e3", 703 | "#ffffff" 704 | ], 705 | "name":"vaughn" 706 | }, 707 | "zenburn":{ 708 | "foreground":"#dcdccc", 709 | "background":"#3f3f3f", 710 | "cursor":"#73635a", 711 | "cursor_text":"#000000", 712 | "palette":[ 713 | "#4d4d4d", 714 | "#705050", 715 | "#60b48a", 716 | "#f0dfaf", 717 | "#506070", 718 | "#dc8cc3", 719 | "#8cd0d3", 720 | "#dcdccc", 721 | "#709080", 722 | "#dca3a3", 723 | "#c3bf9f", 724 | "#e0cf9f", 725 | "#94bff3", 726 | "#ec93d3", 727 | "#93e0e3", 728 | "#ffffff" 729 | ], 730 | "name":"zenburn" 731 | } 732 | }; 733 | 734 | module.exports = { 735 | 'defaults': defaults, 736 | 'colors': colors 737 | } -------------------------------------------------------------------------------- /public/jquery.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 2 | !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length; 3 | while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length